support linear p2m list in migrate stream v2
v3 cover support linear p2m list in migrate stream v2
Add support for the virtual mapped linear p2m list of pv-domains in the v2 migrate stream. This will allow to migrate domains larger than 512 GB.
Tested with 32- and 64-bit pv-domains both with and without linear p2m list and with a hvm domain.
Changes in V3:
- Moved defines to header file in patch 2 as requested by Andrew Cooper
Changes in V2:
- Added some sanity tests in patch 2 as suggested by Andrew Cooper
- Modified patch 3 according to Andrew Cooper's requests: rename of check_iteration to check_vm_state, call check_vm_state after each checkpoint, don't change check_vm_state hook but do the check decision internally
- Modified docs/features/migration.pandoc according to changes done in the series in patch 4 (requested by Andrew Cooper)
Juergen Gross (4):
libxc: split mapping p2m leaves into a separate function
libxc: support of linear p2m list for migration of pv-domains
libxc: stop migration in case of p2m list structural changes
libxc: set flag for support of linear p2m list in domain builder
docs/features/migration.pandoc | 7 +- tools/libxc/xc_dom_compat_linux.c | 2 +- tools/libxc/xc_dom_core.c | 2 + tools/libxc/xc_sr_common.h | 12 ++ tools/libxc/xc_sr_common_x86_pv.h | 7 + tools/libxc/xc_sr_save.c | 7 +- tools/libxc/xc_sr_save_x86_hvm.c | 7 + tools/libxc/xc_sr_save_x86_pv.c | 304 +++++++++++++++++++++++++++++++++----- 8 files changed, 304 insertions(+), 44 deletions(-)
Signature · 1 line
2.6.2
PATCH v3 1/4 libxc: split mapping p2m leaves into a separate function
In order to prepare using the virtual mapped linear p2m list for migration split mapping of the p2m leaf pages into a separate function.
--- tools/libxc/xc_sr_save_x86_pv.c | 77 ++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 32 deletions(-)
tools/libxc/xc_sr_save_x86_pv.c +45 -32
@@ -68,6 +68,50 @@ static int copy_mfns_from_guest(const struct xc_sr_context *ctx, }/* +* Map the p2m leave pages and build an array of their pfns. +*/ +static int map_p2m_leaves (struct xc_sr_context *ctx,xen_pfn_t *mfns, +size_t n_mfns) +{ +xc_interface *xch = ctx->xch; +unsigned x; + + ctx->x86_pv.p2m =xc_map_foreign_pages (xch, ctx->domid,PROT_READ , + mfns, n_mfns); +if ( !ctx->x86_pv.p2m ) + { +PERROR ("Failed to map p2m frames" ); +return -1 ; + } + + ctx->save.p2m_size = ctx->x86_pv.max_pfn +1 ; + ctx->x86_pv.p2m_frames = n_mfns; + ctx->x86_pv.p2m_pfns =malloc (n_mfns *sizeof (*mfns)); +if ( !ctx->x86_pv.p2m_pfns ) + { +ERROR ("Cannot allocate %zu bytes for p2m pfns list" , + n_mfns *sizeof (*mfns)); +return -1 ; + } + +/* Convert leaf frames from mfns to pfns. */ +for ( x =0 ; x < n_mfns; ++x ) + { +if ( !mfn_in_pseudophysmap (ctx, mfns[x]) ) + { +ERROR ("Bad mfn in p2m_frame_list[%u]" , x); +dump_bad_pseudophysmap_entry (ctx, mfns[x]); + errno =ERANGE ; +return -1 ; + } + + ctx->x86_pv.p2m_pfns[x] =mfn_to_pfn (ctx, mfns[x]); + } + +return 0 ; +} + +/* * Walk the guests frame list list and frame list to identify and map the * frames making up the guests p2m table. Construct a list of pfns making up * the table.
@@ -173,7 +217,6 @@ static int map_p2m(struct xc_sr_context *ctx) ctx->x86_pv.p2m_frames = (ctx->x86_pv.max_pfn + fpp) / fpp;DPRINTF ("max_pfn %#lx, p2m_frames %d" , ctx->x86_pv.max_pfn, ctx->x86_pv.p2m_frames); - ctx->save.p2m_size = ctx->x86_pv.max_pfn +1 ; fl_entries = (ctx->x86_pv.max_pfn / fpp) +1 ;/* Map the guest mid p2m frames. */
@@ -211,38 +254,8 @@ static int map_p2m(struct xc_sr_context *ctx) }/* Map the p2m leaves themselves. */ - ctx->x86_pv.p2m =xc_map_foreign_pages (xch, ctx->domid,PROT_READ , - local_fl, fl_entries); -if ( !ctx->x86_pv.p2m ) - { -PERROR ("Failed to map p2m frames" ); - goto err; - } + rc =map_p2m_leaves (ctx, local_fl, fl_entries); - ctx->x86_pv.p2m_frames = fl_entries; - ctx->x86_pv.p2m_pfns =malloc (local_fl_size); -if ( !ctx->x86_pv.p2m_pfns ) - { -ERROR ("Cannot allocate %zu bytes for p2m pfns list" , - local_fl_size); - goto err; - } - -/* Convert leaf frames from mfns to pfns. */ -for ( x =0 ; x < fl_entries; ++x ) - { -if ( !mfn_in_pseudophysmap (ctx, local_fl[x]) ) - { -ERROR ("Bad mfn in p2m_frame_list[%u]" , x); -dump_bad_pseudophysmap_entry (ctx, local_fl[x]); - errno =ERANGE ; - goto err; - } - - ctx->x86_pv.p2m_pfns[x] =mfn_to_pfn (ctx, local_fl[x]); - } - - rc =0 ; err:free (local_fl);
Signature · 1 line
2.6.2
Re: [PATCH v3 1/4] libxc: split mapping p2m leaves into a separate function
Quoted 5 lines · Juergen Gross
In order to prepare using the virtual mapped linear p2m list for migration split mapping of the p2m leaf pages into a separate function.
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
PATCH v3 2/4 libxc: support of linear p2m list for migration of pv-domains
In reply to Juergen GrossIn order to be able to migrate pv-domains with more than 512 GB of RAM the p2m information can be specified by the guest kernel via a virtual mapped linear p2m list instead of a 3 level tree.
Add support for this new p2m format in libxc.
As the sanity checking of the virtual p2m address needs defines for the xen regions use those defines when doing page table checks as well.
--- tools/libxc/xc_sr_common_x86_pv.h | 7 ++ tools/libxc/xc_sr_save_x86_pv.c | 194 +++++++++++++++++++++++++++++++++++--- 2 files changed, 188 insertions(+), 13 deletions(-)
tools/libxc/xc_sr_common_x86_pv.h +7 -0
@@ -3,6 +3,13 @@#include "xc_sr_common_x86.h" +/* Virtual address ranges reserved for hypervisor. */ +#define HYPERVISOR_VIRT_START_X86_64 0xFFFF800000000000ULL +#define HYPERVISOR_VIRT_END_X86_64 0xFFFF87FFFFFFFFFFULL + +#define HYPERVISOR_VIRT_START_X86_32 0x00000000F5800000ULL +#define HYPERVISOR_VIRT_END_X86_32 0x00000000FFFFFFFFULL +/* * Convert an mfn to a pfn, given Xen's m2p table. *
tools/libxc/xc_sr_save_x86_pv.c +181 -13
237 lines not on this page · raw message
Signature · 1 line
2.6.2
Re: [PATCH v3 2/4] libxc: support of linear p2m list for migration of pv-domains
On Wed, Dec 16, 2015 at 10:24:18AM +0100, Juergen Gross wrote:
[...]
tools/libxc/xc_sr_save_x86_pv.c static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src, · line 871
Quoted 6 lines
tools/libxc/xc_sr_save_x86_pv.c +1
-1@@ -698,21 +868,19 @@ static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src,/* 32bit guests can only use the first 4 entries of their L3 tables. * All other are potentially used by Xen. */ xen_first =4 ; - xen_last =512 ; + xen_last =511 ;
Is this a bug fix in its own right?
Wei.
Quoted 25 lines
tools/libxc/xc_sr_save_x86_pv.c +5
-7break ;case XEN_DOMCTL_PFINFO_L2TAB :/* It is hard to spot Xen mappings in a 32bit guest's L2. Most * are normal but only a few will have Xen mappings. -* -* 428 = (HYPERVISOR_VIRT_START_PAE >> L2_PAGETABLE_SHIFT_PAE)&0x1ff -* -* ...which is conveniently unavailable to us in a 64bit build. */ -if (pte_to_frame (src[428 ]) == ctx->x86_pv.compat_m2p_mfn0 ) + i = (HYPERVISOR_VIRT_START_X86_32 >>L2_PAGETABLE_SHIFT_PAE ) &511 ; +if (pte_to_frame (src[i]) == ctx->x86_pv.compat_m2p_mfn0 ) { - xen_first =428 ; - xen_last =512 ; + xen_first = i; + xen_last = (HYPERVISOR_VIRT_END_X86_32 >> +L2_PAGETABLE_SHIFT_PAE ) &511 ; }break ; }Signature · 1 line
2.6.2
Re: [PATCH v3 2/4] libxc: support of linear p2m list for migration of pv-domains
Quoted 10 lines · Wei Liu
On Wed, Dec 16, 2015 at 10:24:18AM +0100, Juergen Gross wrote:
[...]tools/libxc/xc_sr_save_x86_pv.c static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src, · line 871
Quoted 6 lines
tools/libxc/xc_sr_save_x86_pv.c +1
-1@@ -698,21 +868,19 @@ static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src,/* 32bit guests can only use the first 4 entries of their L3 tables. * All other are potentially used by Xen. */ xen_first =4 ; - xen_last =512 ; + xen_last =511 ;Is this a bug fix in its own right?
Hmm, bug fix is too much. It is a harmonization with the change below using macros to set xen_last to 511 at maximum. In fact it doesn't matter, because xen_last is used in:
if ( i >= xen_first && i <= xen_last )
with i being in the range from 0 to 511.
Juergen
Quoted 34 lines
Wei.
Quoted 25 lines
tools/libxc/xc_sr_save_x86_pv.c +5
-7break ;case XEN_DOMCTL_PFINFO_L2TAB :/* It is hard to spot Xen mappings in a 32bit guest's L2. Most * are normal but only a few will have Xen mappings. -* -* 428 = (HYPERVISOR_VIRT_START_PAE >> L2_PAGETABLE_SHIFT_PAE)&0x1ff -* -* ...which is conveniently unavailable to us in a 64bit build. */ -if (pte_to_frame (src[428 ]) == ctx->x86_pv.compat_m2p_mfn0 ) + i = (HYPERVISOR_VIRT_START_X86_32 >>L2_PAGETABLE_SHIFT_PAE ) &511 ; +if (pte_to_frame (src[i]) == ctx->x86_pv.compat_m2p_mfn0 ) { - xen_first =428 ; - xen_last =512 ; + xen_first = i; + xen_last = (HYPERVISOR_VIRT_END_X86_32 >> +L2_PAGETABLE_SHIFT_PAE ) &511 ; }break ; }Signature · 1 line
2.6.2_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Wei Liu
Reviewed-byRe: [PATCH v3 2/4] libxc: support of linear p2m list for migration of pv-domains
Quoted 12 lines · Juergen Gross
Quoted 10 lines · Wei Liu
On Wed, Dec 16, 2015 at 10:24:18AM +0100, Juergen Gross wrote:
[...]tools/libxc/xc_sr_save_x86_pv.c static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src, · line 871
Quoted 6 lines
tools/libxc/xc_sr_save_x86_pv.c +1
-1@@ -698,21 +868,19 @@ static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src,/* 32bit guests can only use the first 4 entries of their L3 tables. * All other are potentially used by Xen. */ xen_first =4 ; - xen_last =512 ; + xen_last =511 ;Is this a bug fix in its own right?
Quoted 8 lines
Hmm, bug fix is too much. It is a harmonization with the change below using macros to set
xen_lastto 511 at maximum. In fact it doesn't matter, becausexen_lastis used in:if ( i >= xen_first && i <= xen_last )with i being in the range from 0 to 511.
Yes, that's what I was thinking. There seemed to be an off-by-one error in the code. But as you said, i is within [0,511] so the code is fine.
Could you add a words or two about this hunk in commit message please.
With that:
Wei.
Quoted 38 lines
Juergen
Quoted 34 lines
Wei.
Quoted 25 lines
tools/libxc/xc_sr_save_x86_pv.c +5
-7break ;case XEN_DOMCTL_PFINFO_L2TAB :/* It is hard to spot Xen mappings in a 32bit guest's L2. Most * are normal but only a few will have Xen mappings. -* -* 428 = (HYPERVISOR_VIRT_START_PAE >> L2_PAGETABLE_SHIFT_PAE)&0x1ff -* -* ...which is conveniently unavailable to us in a 64bit build. */ -if (pte_to_frame (src[428 ]) == ctx->x86_pv.compat_m2p_mfn0 ) + i = (HYPERVISOR_VIRT_START_X86_32 >>L2_PAGETABLE_SHIFT_PAE ) &511 ; +if (pte_to_frame (src[i]) == ctx->x86_pv.compat_m2p_mfn0 ) { - xen_first =428 ; - xen_last =512 ; + xen_first = i; + xen_last = (HYPERVISOR_VIRT_END_X86_32 >> +L2_PAGETABLE_SHIFT_PAE ) &511 ; }break ; }Signature · 1 line
2.6.2_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v3 2/4] libxc: support of linear p2m list for migration of pv-domains
Quoted 19 lines · Wei Liu
Quoted 18 lines · Juergen Gross
Quoted 10 lines · Wei Liu
On Wed, Dec 16, 2015 at 10:24:18AM +0100, Juergen Gross wrote:
[...]tools/libxc/xc_sr_save_x86_pv.c static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src, · line 871
Quoted 6 lines
tools/libxc/xc_sr_save_x86_pv.c +1
-1@@ -698,21 +868,19 @@ static int normalise_pagetable(struct xc_sr_context *ctx, const uint64_t *src,/* 32bit guests can only use the first 4 entries of their L3 tables. * All other are potentially used by Xen. */ xen_first =4 ; - xen_last =512 ; + xen_last =511 ;Is this a bug fix in its own right?
Hmm, bug fix is too much. It is a harmonization with the change below using macros to set
xen_lastto 511 at maximum. In fact it doesn't matter, becausexen_lastis used in:if ( i >= xen_first && i <= xen_last )
Quoted 7 lines
Quoted 2 lines
with i being in the range from 0 to 511.
Yes, that's what I was thinking. There seemed to be an off-by-one error in the code. But as you said, i is within [0,511] so the code is fine.
Could you add a words or two about this hunk in commit message please.
Sure.
Quoted 4 lines
With that:
Reviewed-by Wei Liu <[email protected]>
Thanks,
Juergen
PATCH v3 3/4 libxc: stop migration in case of p2m list structural changes
In reply to Juergen GrossWith support of the virtual mapped linear p2m list for migration it is now possible to detect structural changes of the p2m list which before would either lead to a crashing or otherwise wrong behaving domU.
A guest supporting the linear p2m list will increment the p2m_generation counter located in the shared info page before and after each modification of a mapping related to the p2m list. A change of that counter can be detected by the tools and reacted upon.
As such a change should occur only very rarely once the domU is up the most simple reaction is to cancel migration in such an event.
--- tools/libxc/xc_sr_common.h | 12 +++++++++++ tools/libxc/xc_sr_save.c | 7 ++++++- tools/libxc/xc_sr_save_x86_hvm.c | 7 +++++++ tools/libxc/xc_sr_save_x86_pv.c | 45 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-)
tools/libxc/xc_sr_common.h +12 -0
@@ -83,6 +83,15 @@ struct xc_sr_save_opsint (*end_of_checkpoint)(struct xc_sr_context *ctx);/** +* Check state of guest to decide whether it makes sense to continue +* migration. This is called in each iteration or checkpoint to check +* whether all criteria for the migration are still met. If that's not +* the case either migration is cancelled via a bad rc or the situation +* is handled, e.g. by sending appropriate records. +*/ +int (*check_vm_state)(struct xc_sr_context *ctx); + +/** * Clean up the local environment. Will be called exactly once, either * after a successful save, or upon encountering an error. */
@@ -280,6 +289,9 @@ struct xc_sr_context/* Read-only mapping of guests shared info page */ shared_info_any_t *shinfo; +/* p2m generation count for verifying validity of local p2m. */ +uint64_t p2m_generation; +union { struct
tools/libxc/xc_sr_save.c +6 -1
@@ -394,7 +394,8 @@ static int send_dirty_pages(struct xc_sr_context *ctx,DPRINTF ("Bitmap contained more entries than expected..." );xc_report_progress_step (xch, entries, entries); -return 0 ; + +return ctx->save.ops.check_vm_state (ctx); }/*
@@ -751,6 +752,10 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type)if ( rc ) goto err; + rc = ctx->save.ops.check_vm_state (ctx); +if ( rc ) + goto err; +if ( ctx->save.live ) rc =send_domain_memory_live (ctx);else if ( ctx->save.checkpointed )
tools/libxc/xc_sr_save_x86_hvm.c +7 -0
@@ -175,6 +175,12 @@ static int x86_hvm_start_of_checkpoint(struct xc_sr_context *ctx)return 0 ; } +static int x86_hvm_check_vm_state (struct xc_sr_context *ctx) +{ +/* no-op */ +return 0 ; +} +static int x86_hvm_end_of_checkpoint (struct xc_sr_context *ctx) {int rc;
@@ -221,6 +227,7 @@ struct xc_sr_save_ops save_ops_x86_hvm = .start_of_stream = x86_hvm_start_of_stream, .start_of_checkpoint = x86_hvm_start_of_checkpoint, .end_of_checkpoint = x86_hvm_end_of_checkpoint, + .check_vm_state = x86_hvm_check_vm_state, .cleanup = x86_hvm_cleanup, };
tools/libxc/xc_sr_save_x86_pv.c +45 -0
75 lines not on this page · raw message
Signature · 1 line
2.6.2
Re: [PATCH v3 3/4] libxc: stop migration in case of p2m list structural changes
Quoted 9 lines · Juergen Gross
With support of the virtual mapped linear p2m list for migration it is now possible to detect structural changes of the p2m list which before would either lead to a crashing or otherwise wrong behaving domU.
A guest supporting the linear p2m list will increment the
p2m_generationcounter located in the shared info page before and after each modification of a mapping related to the p2m list. A change of that counter can be detected by the tools and reacted upon.
Quoted 5 lines
As such a change should occur only very rarely once the domU is up the most simple reaction is to cancel migration in such an event.
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
PATCH v3 4/4 libxc: set flag for support of linear p2m list in domain builder
In reply to Juergen GrossSet the SIF_VIRT_P2M_4TOOLS flag for pv-domUs in the domain builder to indicate the Xen tools have full support for the virtual mapped linear p2m list.
This will enable pv-domUs to drop support of the 3 level p2m tree and use the linear list only. Without setting this flag some kernels might limit themselves to 512 GB memory size in order not to break migration.
--- docs/features/migration.pandoc | 7 ++++--- tools/libxc/xc_dom_compat_linux.c | 2 +- tools/libxc/xc_dom_core.c | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-)
docs/features/migration.pandoc +4 -3
@@ -1,5 +1,5 @@ % Migration -% Revision 1 +% Revision 2 \clearpage
@@ -95,7 +95,6 @@ scenarios, which will involve starting with VMs from Xen 4.5 # Areas for improvement * Arm support -* Linear P2M support for x86 PV * Live looping parameters # Known issues
@@ -105,7 +104,8 @@ scenarios, which will involve starting with VMs from Xen 4.5 * x86 HVM with nested-virt (no relevant information included in the stream) * x86 PV ballooning (P2M marked dirty, target frame not marked) -* x86 PV P2M structure changes (not noticed, stale mappings used) +* x86 PV P2M structure changes (not noticed, stale mappings used) for + guests not using the linear p2m layout # References
@@ -120,4 +120,5 @@ for Migration v2 Date Revision Version Notes ---------- -------- -------- ------------------------------------------- 2015-10-24 1 Xen 4.6 Document written +2015-12-11 2 Xen 4.7 Support of linear p2m list ---------- -------- -------- -------------------------------------------
tools/libxc/xc_dom_compat_linux.c +1 -1
@@ -59,7 +59,7 @@ int xc_linux_build(xc_interface *xch, uint32_t domid, ((rc = xc_dom_ramdisk_file(dom, initrd_name)) != 0) ) goto out; - dom->flags = flags; + dom->flags |= flags; dom->console_evtchn = console_evtchn; dom->xenstore_evtchn = store_evtchn;
tools/libxc/xc_dom_core.c +2 -0
@@ -777,6 +777,8 @@ struct xc_dom_image *xc_dom_allocate(xc_interface *xch, dom->parms.elf_paddr_offset =UNSET_ADDR ; dom->parms.p2m_base =UNSET_ADDR ; + dom->flags =SIF_VIRT_P2M_4TOOLS ; + dom->alloc_malloc +=sizeof (*dom);return dom;
Signature · 1 line
2.6.2
Re: [PATCH v3 4/4] libxc: set flag for support of linear p2m list in domain builder
Quoted 11 lines · Juergen Gross
Set the
SIF_VIRT_P2M_4TOOLSflag for pv-domUs in the domain builder to indicate the Xen tools have full support for the virtual mapped linear p2m list.This will enable pv-domUs to drop support of the 3 level p2m tree and use the linear list only. Without setting this flag some kernels might limit themselves to 512 GB memory size in order not to break migration.
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
Re: [PATCH v3 4/4] libxc: set flag for support of linear p2m list in domain builder
In reply to Juergen GrossQuoted 11 lines · Juergen Gross
Set the
SIF_VIRT_P2M_4TOOLSflag for pv-domUs in the domain builder to indicate the Xen tools have full support for the virtual mapped linear p2m list.This will enable pv-domUs to drop support of the 3 level p2m tree and use the linear list only. Without setting this flag some kernels might limit themselves to 512 GB memory size in order not to break migration.
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
I would have applied all 4 on the basis of Andy's other Reviewed-by to the patches purely touching migration v2 files, except for this on 32-bit:
xc_sr_save_x86_pv.c:328:9: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’ [-Werror=format=] ERROR("Bad p2m_cr3 value %#lx", p2m_cr3);
^
xc_sr_save_x86_pv.c:350:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘xen_vaddr_t’ [-Werror=format=] ERROR("Bad virtual p2m address range %#lx-%#lx",
^
xc_sr_save_x86_pv.c:350:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘xen_vaddr_t’ [-Werror=format=] xc_sr_save_x86_pv.c:363:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘xen_vaddr_t’ [-Werror=format=] ERROR("Bad virtual p2m address range %#lx-%#lx",
^
xc_sr_save_x86_pv.c:363:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘xen_vaddr_t’ [-Werror=format=] xc_sr_save_x86_pv.c:370:5: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘xen_vaddr_t’ [-Werror=format=] DPRINTF("p2m list from %#lx to %#lx, root at %#lx", p2m_vaddr, p2m_end,
^
xc_sr_save_x86_pv.c:370:5: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘xen_vaddr_t’ [-Werror=format=] xc_sr_save_x86_pv.c:413:17: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘long long unsigned int’ [-Werror=format=] ERROR("Bad mfn %#lx during page table walk for vaddr %#lx at level %d of p2m list",
^
cc1: all warnings being treated as errors
/local/scratch/ianc/devel/committer-i686.git/tools/libxc/../../tools/Rules.mk:163: recipe for target 'xc_sr_save_x86_pv.o' failed
Quoted 4 lines
(quoted diff) +0
-0@@ -1,5 +1,5 @@% Migration
-% Revision 1
+% Revision 2
Well done on this, I predict it will get forgotten more often than not ;-)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v3 4/4] libxc: set flag for support of linear p2m list in domain builder
Quoted 10 lines · Ian Campbell
Quoted 9 lines · Juergen Gross
Set the
SIF_VIRT_P2M_4TOOLSflag for pv-domUs in the domain builder to indicate the Xen tools have full support for the virtual mapped linear p2m list.This will enable pv-domUs to drop support of the 3 level p2m tree and use the linear list only. Without setting this flag some kernels might limit themselves to 512 GB memory size in order not to break migration.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Andrew Cooper <[email protected]>Acked-by Ian Campbell <[email protected]>I would have applied all 4 on the basis of Andy's other Reviewed-by to the patches purely touching migration v2 files, except for this on 32-bit:
Ouch. Will correct.
Juergen
Quoted 30 lines
xc_sr_save_x86_pv.c:328:9: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’ [-Werror=format=]
ERROR("Bad p2m_cr3 value %#lx", p2m_cr3); ^xc_sr_save_x86_pv.c:350:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘xen_vaddr_t’ [-Werror=format=]
ERROR("Bad virtual p2m address range %#lx-%#lx",
^
xc_sr_save_x86_pv.c:350:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘xen_vaddr_t’ [-Werror=format=] xc_sr_save_x86_pv.c:363:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘xen_vaddr_t’ [-Werror=format=]
ERROR("Bad virtual p2m address range %#lx-%#lx",
^
xc_sr_save_x86_pv.c:363:13: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘xen_vaddr_t’ [-Werror=format=] xc_sr_save_x86_pv.c:370:5: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘xen_vaddr_t’ [-Werror=format=]DPRINTF("p2m list from %#lx to %#lx, root at %#lx", p2m_vaddr, p2m_end, ^xc_sr_save_x86_pv.c:370:5: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘xen_vaddr_t’ [-Werror=format=] xc_sr_save_x86_pv.c:413:17: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘long long unsigned int’ [-Werror=format=]
ERROR("Bad mfn %#lx during page table walk for vaddr %#lx at level %d of p2m list",
^
cc1: all warnings being treated as errors
/local/scratch/ianc/devel/committer-i686.git/tools/libxc/../../tools/Rules.mk:163: recipe for target 'xc_sr_save_x86_pv.o' faileddocs/features/migration.pandoc line 2
Quoted 4 lines
docs/features/migration.pandoc +1
-1@@ -1,5 +1,5 @@ % Migration -% Revision 1 +% Revision 2Well done on this, I predict it will get forgotten more often than not ;-)
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel