Keir, From r17037, hvm_{get|set}_segment_register are used to save/restore the VMCS segment register. But they introduce new compat image format for xx_arbytes, i.e. reg->attr.bytes = (attr & 0xff) | ((attr >> 4) & 0xf00); This caused wrong VMCS setting for arbytes when restore old image on new changeset. How to fix it? Can we determine it''s old format if bit 12~15 of cs_arbytes is not zero, and then translate it? Thanks, edwin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2009-Feb-12 13:45 UTC
[Xen-devel] [PATCH] Handle older Xen save files where arbytes are in the wrong format.
At 08:39 -0500 on 12 Feb (1234427949), Zhai, Edwin wrote:> From r17037, hvm_{get|set}_segment_register are used to save/restore > the VMCS segment register. But they introduce new compat image format > for xx_arbytes, i.e. > reg->attr.bytes = (attr & 0xff) | ((attr >> 4) & 0xf00); > > This caused wrong VMCS setting for arbytes when restore old image on > new changeset. > > How to fix it? Can we determine it''s old format if bit 12~15 of > cs_arbytes is not zero, and then translate it?Yes -- sorry, I thought I''d already sent this patch. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
John Levon
2009-Feb-12 18:04 UTC
Re: [Xen-devel] [PATCH] Handle older Xen save files where arbytes are in the wrong format.
On Thu, Feb 12, 2009 at 01:45:50PM +0000, Tim Deegan wrote:> Yes -- sorry, I thought I''d already sent this patch.What happens with a new-format image on an old Xen? regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Feb-12 18:17 UTC
Re: [Xen-devel] [PATCH] Handle older Xen save files where arbytes are in the wrong format.
On 12/02/2009 18:04, "John Levon" <levon@movementarian.org> wrote:> On Thu, Feb 12, 2009 at 01:45:50PM +0000, Tim Deegan wrote: > >> Yes -- sorry, I thought I''d already sent this patch. > > What happens with a new-format image on an old Xen?Doesn''t work, but we don''t support that anyway. You''d be scuppered by various other save-format upgrades quite apart from this unintentional one. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
John Levon
2009-Feb-12 18:20 UTC
Re: [Xen-devel] [PATCH] Handle older Xen save files where arbytes are in the wrong format.
On Thu, Feb 12, 2009 at 06:17:04PM +0000, Keir Fraser wrote:> > On Thu, Feb 12, 2009 at 01:45:50PM +0000, Tim Deegan wrote: > > > >> Yes -- sorry, I thought I''d already sent this patch. > > > > What happens with a new-format image on an old Xen? > > Doesn''t workSure, but doesn''t work how? There''s a world of difference between "crashes mysteriously" and "useful error message". regards, john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Feb-12 18:41 UTC
Re: [Xen-devel] [PATCH] Handle older Xen save files where arbytes are in the wrong format.
On 12/02/2009 18:20, "John Levon" <levon@movementarian.org> wrote:>>> What happens with a new-format image on an old Xen? >> >> Doesn''t work > > Sure, but doesn''t work how? There''s a world of difference between > "crashes mysteriously" and "useful error message".Mmm.. Most of the changes will cause restore failure rather than apparently successful restore but you end up with a broken guest. I suppose this segmentation change may act like the latter. I don''t think there''s been much conscious effort to make new-on-old fail cleanly though. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2009-Feb-13 09:18 UTC
Re: [Xen-devel] [PATCH] Handle older Xen save files where arbytes are in the wrong format.
At 13:41 -0500 on 12 Feb (1234446081), Keir Fraser wrote:> On 12/02/2009 18:20, "John Levon" <levon@movementarian.org> wrote: > > >>> What happens with a new-format image on an old Xen? > >> > >> Doesn''t work > > > > Sure, but doesn''t work how? There''s a world of difference between > > "crashes mysteriously" and "useful error message". > > Mmm.. Most of the changes will cause restore failure rather than apparently > successful restore but you end up with a broken guest. I suppose this > segmentation change may act like the latter. I don''t think there''s been much > conscious effort to make new-on-old fail cleanly though.There is some code in there that checks that the changeset of Xen is the same as the one the image was saved on -- it only works if hg was available when Xen was built, and is certainly too strict. It could be replaced with something more useful like the Xen version number. Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel