Brendan Cully
2009-Nov-04 21:03 UTC
[Xen-devel] [PATCH] xc_resume: fix modify_returncode when PV guest width != host width
It seems that xm save -c breaks PV guests when their address width does not match that of domain 0. It looks to me like modify_returncode is treating the guest VCPU context as native format, but honestly I don''t quite understand the purpose of vcpu_guest_context_any_t.c. I suspect I''m missing something obvious about how the compat code is supposed to work, but at any rate, the attached patch fixes things for me. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Nov-04 22:09 UTC
Re: [Xen-devel] [PATCH] xc_resume: fix modify_returncode when PV guest width != host width
On 04/11/2009 21:03, "Brendan Cully" <brendan@cs.ubc.ca> wrote:> It seems that xm save -c breaks PV guests when their address width > does not match that of domain 0. It looks to me like modify_returncode > is treating the guest VCPU context as native format, but honestly I > don''t quite understand the purpose of vcpu_guest_context_any_t.c. > > I suspect I''m missing something obvious about how the compat code is > supposed to work, but at any rate, the attached patch fixes things for > me.No, the code''s just stupid and broken. There''s a similar bug in xc_domain_resume_any(), accessing ctxt.c.user_regs.edx. I will fix both. Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Nov-04 22:33 UTC
Re: [Xen-devel] [PATCH] xc_resume: fix modify_returncode when PV guest width != host width
On 04/11/2009 22:09, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:>> I suspect I''m missing something obvious about how the compat code is >> supposed to work, but at any rate, the attached patch fixes things for >> me. > > No, the code''s just stupid and broken. There''s a similar bug in > xc_domain_resume_any(), accessing ctxt.c.user_regs.edx. I will fix both.See c/s 20399. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Brendan Cully
2009-Nov-04 23:14 UTC
Re: [Xen-devel] [PATCH] xc_resume: fix modify_returncode when PV guest width != host width
On Wednesday, 04 November 2009 at 22:33, Keir Fraser wrote:> On 04/11/2009 22:09, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote: > > >> I suspect I''m missing something obvious about how the compat code is > >> supposed to work, but at any rate, the attached patch fixes things for > >> me. > > > > No, the code''s just stupid and broken. There''s a similar bug in > > xc_domain_resume_any(), accessing ctxt.c.user_regs.edx. I will fix both. > > See c/s 20399.Works great, thanks! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel