Paul Durrant
2012-Aug-21 15:54 UTC
[PATCH] Remove VM genearation ID device and incr_generationid from build_info
# HG changeset patch # User Paul Durrant <paul.durrant@citrix.com> # Date 1345564202 -3600 # Node ID 4b1f399193f5e363c2b47a3079ac4d3f61ee9a8f # Parent 6d56e31fe1e1dc793379d662a36ff1731760eb0c Remove VM genearation ID device and incr_generationid from build_info. Microsoft have now published their VM generation ID specification at https://www.microsoft.com/en-us/download/details.aspx?id=30707. It differs from the original specification upon which I based my implementation in several key areas. Particularly, it is no longer an incrementing 64-bit counter and so this patch is to remove the incr_generationid field from the build_info and also disable the ACPI device before 4.2 is released. I will follow up with further patches to implement the VM generation ID to the new specification. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/firmware/hvmloader/acpi/dsdt.asl --- a/tools/firmware/hvmloader/acpi/dsdt.asl Wed Aug 15 09:41:21 2012 +0100 +++ b/tools/firmware/hvmloader/acpi/dsdt.asl Tue Aug 21 16:50:02 2012 +0100 @@ -398,6 +398,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, }) } + /* Device(VGID) { Name(_HID, EisaID ("XEN0000")) Name(_UID, 0x00) @@ -422,6 +423,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, Return(PKG) } } + */ } } } diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Wed Aug 15 09:41:21 2012 +0100 +++ b/tools/libxl/libxl_create.c Tue Aug 21 16:50:02 2012 +0100 @@ -248,7 +248,6 @@ int libxl__domain_build_info_setdefault( libxl_defbool_setdefault(&b_info->u.hvm.hpet, true); libxl_defbool_setdefault(&b_info->u.hvm.vpt_align, true); libxl_defbool_setdefault(&b_info->u.hvm.nested_hvm, false); - libxl_defbool_setdefault(&b_info->u.hvm.incr_generationid, false); libxl_defbool_setdefault(&b_info->u.hvm.usb, false); libxl_defbool_setdefault(&b_info->u.hvm.xen_platform_pci, true); @@ -758,27 +757,24 @@ static void domcreate_bootloader_done(li /* read signature */ int hvm, pae, superpages; - int no_incr_generationid; switch (info->type) { case LIBXL_DOMAIN_TYPE_HVM: hvm = 1; superpages = 1; pae = libxl_defbool_val(info->u.hvm.pae); - no_incr_generationid = !libxl_defbool_val(info->u.hvm.incr_generationid); callbacks->toolstack_restore = libxl__toolstack_restore; break; case LIBXL_DOMAIN_TYPE_PV: hvm = 0; superpages = 0; pae = 1; - no_incr_generationid = 0; break; default: rc = ERROR_INVAL; goto out; } libxl__xc_domain_restore(egc, dcs, - hvm, pae, superpages, no_incr_generationid); + hvm, pae, superpages, 1); return; out: diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Wed Aug 15 09:41:21 2012 +0100 +++ b/tools/libxl/libxl_types.idl Tue Aug 21 16:50:02 2012 +0100 @@ -292,7 +292,6 @@ libxl_domain_build_info = Struct("domain ("vpt_align", libxl_defbool), ("timer_mode", libxl_timer_mode), ("nested_hvm", libxl_defbool), - ("incr_generationid",libxl_defbool), ("nographic", libxl_defbool), ("vga", libxl_vga_interface_info), ("vnc", libxl_vnc_info), diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Wed Aug 15 09:41:21 2012 +0100 +++ b/tools/libxl/xl_cmdimpl.c Tue Aug 21 16:50:02 2012 +0100 @@ -139,7 +139,6 @@ struct domain_create { const char *restore_file; int migrate_fd; /* -1 means none */ char **migration_domname_r; /* from malloc */ - int incr_generationid; }; @@ -1759,10 +1758,6 @@ static int create_domain(struct domain_c } } - if (d_config.c_info.type == LIBXL_DOMAIN_TYPE_HVM) - libxl_defbool_set(&d_config.b_info.u.hvm.incr_generationid, - dom_info->incr_generationid); - if (debug || dom_info->dryrun) printf_info(default_output_format, -1, &d_config); @@ -3183,7 +3178,6 @@ static void migrate_receive(int debug, i dom_info.paused = 1; dom_info.migrate_fd = recv_fd; dom_info.migration_domname_r = &migration_domname; - dom_info.incr_generationid = 0; rc = create_domain(&dom_info); if (rc < 0) { @@ -3364,7 +3358,6 @@ int main_restore(int argc, char **argv) dom_info.vnc = vnc; dom_info.vncautopass = vncautopass; dom_info.console_autoconnect = console_autoconnect; - dom_info.incr_generationid = 1; rc = create_domain(&dom_info); if (rc < 0) @@ -3766,7 +3759,6 @@ int main_create(int argc, char **argv) dom_info.vnc = vnc; dom_info.vncautopass = vncautopass; dom_info.console_autoconnect = console_autoconnect; - dom_info.incr_generationid = 0; rc = create_domain(&dom_info); if (rc < 0) diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/xl_sxp.c --- a/tools/libxl/xl_sxp.c Wed Aug 15 09:41:21 2012 +0100 +++ b/tools/libxl/xl_sxp.c Tue Aug 21 16:50:02 2012 +0100 @@ -108,8 +108,6 @@ void printf_info_sexp(int domid, libxl_d libxl_timer_mode_to_string(b_info->u.hvm.timer_mode)); printf("\t\t\t(nestedhvm %s)\n", libxl_defbool_to_string(b_info->u.hvm.nested_hvm)); - printf("\t\t\t(no_incr_generationid %s)\n", - libxl_defbool_to_string(b_info->u.hvm.incr_generationid)); printf("\t\t\t(stdvga %s)\n", b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_STD ? "True" : "False");
Ian Campbell
2012-Aug-23 08:40 UTC
Re: [PATCH] Remove VM genearation ID device and incr_generationid from build_info
On Tue, 2012-08-21 at 16:54 +0100, Paul Durrant wrote:> # HG changeset patch > # User Paul Durrant <paul.durrant@citrix.com> > # Date 1345564202 -3600 > # Node ID 4b1f399193f5e363c2b47a3079ac4d3f61ee9a8f > # Parent 6d56e31fe1e1dc793379d662a36ff1731760eb0c > Remove VM genearation ID device and incr_generationid from build_info. > > Microsoft have now published their VM generation ID specification at > https://www.microsoft.com/en-us/download/details.aspx?id=30707. > It differs from the original specification upon which I based my > implementation in several key areas. Particularly, it is no longer > an incrementing 64-bit counter and so this patch is to remove > the incr_generationid field from the build_info and also disable the > ACPI device before 4.2 is released. > > I will follow up with further patches to implement the VM generation > ID to the new specification. > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>Tools part looks ok to me: Acked-by: Ian Campbell <ian.campbell@citrix.com> Only thing I would change is to add a comment to the "1" parameter to libxl__xc_domain_restore, but I can do that as I commit. If Keir is happy with the hvmloader change then I''ll commit.> > diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/firmware/hvmloader/acpi/dsdt.asl > --- a/tools/firmware/hvmloader/acpi/dsdt.asl Wed Aug 15 09:41:21 2012 +0100 > +++ b/tools/firmware/hvmloader/acpi/dsdt.asl Tue Aug 21 16:50:02 2012 +0100 > @@ -398,6 +398,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, > }) > } > > + /* > Device(VGID) { > Name(_HID, EisaID ("XEN0000")) > Name(_UID, 0x00) > @@ -422,6 +423,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, > Return(PKG) > } > } > + */ > } > } > } > diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/libxl_create.c > --- a/tools/libxl/libxl_create.c Wed Aug 15 09:41:21 2012 +0100 > +++ b/tools/libxl/libxl_create.c Tue Aug 21 16:50:02 2012 +0100 > @@ -248,7 +248,6 @@ int libxl__domain_build_info_setdefault( > libxl_defbool_setdefault(&b_info->u.hvm.hpet, true); > libxl_defbool_setdefault(&b_info->u.hvm.vpt_align, true); > libxl_defbool_setdefault(&b_info->u.hvm.nested_hvm, false); > - libxl_defbool_setdefault(&b_info->u.hvm.incr_generationid, false); > libxl_defbool_setdefault(&b_info->u.hvm.usb, false); > libxl_defbool_setdefault(&b_info->u.hvm.xen_platform_pci, true); > > @@ -758,27 +757,24 @@ static void domcreate_bootloader_done(li > > /* read signature */ > int hvm, pae, superpages; > - int no_incr_generationid; > switch (info->type) { > case LIBXL_DOMAIN_TYPE_HVM: > hvm = 1; > superpages = 1; > pae = libxl_defbool_val(info->u.hvm.pae); > - no_incr_generationid = !libxl_defbool_val(info->u.hvm.incr_generationid); > callbacks->toolstack_restore = libxl__toolstack_restore; > break; > case LIBXL_DOMAIN_TYPE_PV: > hvm = 0; > superpages = 0; > pae = 1; > - no_incr_generationid = 0; > break; > default: > rc = ERROR_INVAL; > goto out; > } > libxl__xc_domain_restore(egc, dcs, > - hvm, pae, superpages, no_incr_generationid); > + hvm, pae, superpages, 1); > return; > > out: > diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/libxl_types.idl > --- a/tools/libxl/libxl_types.idl Wed Aug 15 09:41:21 2012 +0100 > +++ b/tools/libxl/libxl_types.idl Tue Aug 21 16:50:02 2012 +0100 > @@ -292,7 +292,6 @@ libxl_domain_build_info = Struct("domain > ("vpt_align", libxl_defbool), > ("timer_mode", libxl_timer_mode), > ("nested_hvm", libxl_defbool), > - ("incr_generationid",libxl_defbool), > ("nographic", libxl_defbool), > ("vga", libxl_vga_interface_info), > ("vnc", libxl_vnc_info), > diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/xl_cmdimpl.c > --- a/tools/libxl/xl_cmdimpl.c Wed Aug 15 09:41:21 2012 +0100 > +++ b/tools/libxl/xl_cmdimpl.c Tue Aug 21 16:50:02 2012 +0100 > @@ -139,7 +139,6 @@ struct domain_create { > const char *restore_file; > int migrate_fd; /* -1 means none */ > char **migration_domname_r; /* from malloc */ > - int incr_generationid; > }; > > > @@ -1759,10 +1758,6 @@ static int create_domain(struct domain_c > } > } > > - if (d_config.c_info.type == LIBXL_DOMAIN_TYPE_HVM) > - libxl_defbool_set(&d_config.b_info.u.hvm.incr_generationid, > - dom_info->incr_generationid); > - > if (debug || dom_info->dryrun) > printf_info(default_output_format, -1, &d_config); > > @@ -3183,7 +3178,6 @@ static void migrate_receive(int debug, i > dom_info.paused = 1; > dom_info.migrate_fd = recv_fd; > dom_info.migration_domname_r = &migration_domname; > - dom_info.incr_generationid = 0; > > rc = create_domain(&dom_info); > if (rc < 0) { > @@ -3364,7 +3358,6 @@ int main_restore(int argc, char **argv) > dom_info.vnc = vnc; > dom_info.vncautopass = vncautopass; > dom_info.console_autoconnect = console_autoconnect; > - dom_info.incr_generationid = 1; > > rc = create_domain(&dom_info); > if (rc < 0) > @@ -3766,7 +3759,6 @@ int main_create(int argc, char **argv) > dom_info.vnc = vnc; > dom_info.vncautopass = vncautopass; > dom_info.console_autoconnect = console_autoconnect; > - dom_info.incr_generationid = 0; > > rc = create_domain(&dom_info); > if (rc < 0) > diff -r 6d56e31fe1e1 -r 4b1f399193f5 tools/libxl/xl_sxp.c > --- a/tools/libxl/xl_sxp.c Wed Aug 15 09:41:21 2012 +0100 > +++ b/tools/libxl/xl_sxp.c Tue Aug 21 16:50:02 2012 +0100 > @@ -108,8 +108,6 @@ void printf_info_sexp(int domid, libxl_d > libxl_timer_mode_to_string(b_info->u.hvm.timer_mode)); > printf("\t\t\t(nestedhvm %s)\n", > libxl_defbool_to_string(b_info->u.hvm.nested_hvm)); > - printf("\t\t\t(no_incr_generationid %s)\n", > - libxl_defbool_to_string(b_info->u.hvm.incr_generationid)); > printf("\t\t\t(stdvga %s)\n", b_info->u.hvm.vga.kind => LIBXL_VGA_INTERFACE_TYPE_STD ? > "True" : "False"); > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Paul Durrant
2012-Aug-23 08:49 UTC
Re: [PATCH] Remove VM genearation ID device and incr_generationid from build_info
> -----Original Message----- > From: Ian Campbell > Sent: 23 August 2012 09:41 > To: Paul Durrant > Cc: xen-devel@lists.xen.org; Keir (Xen.org) > Subject: Re: [Xen-devel] [PATCH] Remove VM genearation ID device and > incr_generationid from build_info > > On Tue, 2012-08-21 at 16:54 +0100, Paul Durrant wrote: > > # HG changeset patch > > # User Paul Durrant <paul.durrant@citrix.com> # Date 1345564202 -3600 > > # Node ID 4b1f399193f5e363c2b47a3079ac4d3f61ee9a8f > > # Parent 6d56e31fe1e1dc793379d662a36ff1731760eb0c > > Remove VM genearation ID device and incr_generationid from build_info. > > > > Microsoft have now published their VM generation ID specification at > > https://www.microsoft.com/en-us/download/details.aspx?id=30707. > > It differs from the original specification upon which I based my > > implementation in several key areas. Particularly, it is no longer an > > incrementing 64-bit counter and so this patch is to remove the > > incr_generationid field from the build_info and also disable the ACPI > > device before 4.2 is released. > > > > I will follow up with further patches to implement the VM generation > > ID to the new specification. > > > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com> > > Tools part looks ok to me: > Acked-by: Ian Campbell <ian.campbell@citrix.com> > > Only thing I would change is to add a comment to the "1" parameter to > libxl__xc_domain_restore, but I can do that as I commit. >Sure. That sounds like a good idea.> If Keir is happy with the hvmloader change then I''ll commit. >Thanks, Paul
Ian Jackson
2012-Aug-30 15:17 UTC
Re: [PATCH] Remove VM genearation ID device and incr_generationid from build_info [and 1 more messages]
Paul Durrant writes ("[Xen-devel] [PATCH] Remove VM genearation ID device and incr_generationid from build_info"):> Remove VM genearation ID device and incr_generationid from build_info.Thanks. Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> for 4.2. Ian.
Ian Campbell
2012-Aug-31 09:42 UTC
Re: [PATCH] Remove VM genearation ID device and incr_generationid from build_info [and 1 more messages]
On Thu, 2012-08-30 at 16:17 +0100, Ian Jackson wrote:> Paul Durrant writes ("[Xen-devel] [PATCH] Remove VM genearation ID device and incr_generationid from build_info"): > > Remove VM genearation ID device and incr_generationid from build_info. > > Thanks. > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> > > for 4.2.Looks like Keir already took this one.