On 10/29/2015 02:07 PM, Wei Liu wrote:
On Tue, Oct 13, 2015 at 03:11:18PM +0200, Juergen Gross wrote:
[...]
err:
diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
index 333ef6b..0847761 100644
--- a/tools/libxc/xc_dom_x86.c
+++ b/tools/libxc/xc_dom_x86.c
@@ -68,6 +68,8 @@
#define bits_to_mask(bits) (((xen_vaddr_t)1 << (bits)) - 1)
#define round_down(addr, mask) ((addr) & ~(mask))
#define round_up(addr, mask) ((addr) | (mask))
+#define round_pg(addr) (((addr) + PAGE_SIZE_X86 - 1) & ~(PAGE_SIZE_X86 - 1))
Minor suggestion: rename this to round_pgup to make it more explicit?
Yes, this is better.
+#define round_pfn(addr) (((addr) + PAGE_SIZE_X86 - 1) / PAGE_SIZE_X86)
And this to round_pfnup?
Yes.
struct xc_dom_x86_mapping_lvl {
xen_vaddr_t from;
@@ -84,7 +86,7 @@ struct xc_dom_x86_mapping {
struct xc_dom_image_x86 {
unsigned n_mappings;
-#define MAPPING_MAX 1
+#define MAPPING_MAX 2
struct xc_dom_x86_mapping maps[MAPPING_MAX];
};
@@ -536,6 +538,7 @@ static int setup_pgtables_x86_64(struct xc_dom_image *dom)
}
}
}
+
Stay blank line.
Will remove.
Other than that:
Acked-by: Wei Liu <wei.l...@citrix.com>
Thanks,
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel