xen: patch to batch pvh/dom0 mem mapping#181
Open
alexandermerritt wants to merge 1 commit into
Open
Conversation
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
bleggett
approved these changes
May 20, 2026
Contributor
bleggett
left a comment
There was a problem hiding this comment.
looks good to me and makes logical sense but I'm not an MMU expert.
clupuishere
reviewed
May 21, 2026
| #include <xen/interface/memory.h> | ||
| #include <xen/balloon.h> | ||
|
|
||
| +#define XLATE_BATCH_SIZE 16 |
There was a problem hiding this comment.
Comment copied from here:
I think we should add some info in the commit message why we picked this value, maybe even reference the table in https://github.com/edera-dev/protect/issues/1890#issuecomment-4464040270.
| +int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, unsigned long addr, | ||
| + xen_pfn_t *gfn, int nr, int *err_ptr, | ||
| + pgprot_t prot, unsigned domid, | ||
| + struct page **pages) |
There was a problem hiding this comment.
Comment copied from here:
Can we keep the changes to a minimum please? For example here, can we keep the function signature exactly as it was? This way we show that the parameters of the function didn't actually change.
| - nr_gfn = min_t(typeof(info->nr_fgfn), XEN_PFN_PER_PAGE, info->nr_fgfn); | ||
| - info->nr_fgfn -= nr_gfn; | ||
| + BUILD_BUG_ON(XLATE_BATCH_SIZE % XEN_PFN_PER_PAGE != 0); | ||
| + BUG_ON(!((vma->vm_flags & (VM_PFNMAP | VM_IO)) == (VM_PFNMAP | VM_IO))); |
There was a problem hiding this comment.
Comment copied from here:
Can we keep the comment that was here please?
/* Kept here for the purpose of making sure code doesn't break
x86 PVOPS */
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses some of the latency costs identified in https://github.com/edera-dev/protect/issues/1890
Tested on native dell desktop and was measured to improve performance of zone launches by ~37ms.