>>> On 05.04.17 at 19:33, <andrew.coop...@citrix.com> wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -5412,6 +5412,7 @@ int ptwr_do_page_fault(struct vcpu *v, unsigned long > addr, > .vendor = d->arch.cpuid->x86_vendor, > .addr_size = is_pv_32bit_domain(d) ? 32 : BITS_PER_LONG, > .sp_size = is_pv_32bit_domain(d) ? 32 : BITS_PER_LONG, > + .lma = true, > }, > }; > int rc; > @@ -5566,6 +5567,7 @@ int mmio_ro_do_page_fault(struct vcpu *v, unsigned long > addr, > .vendor = v->domain->arch.cpuid->x86_vendor, > .addr_size = addr_size, > .sp_size = addr_size, > + .lma = true,
As mentioned elsewhere already, I continue to consider this wrong for 32-bit PV guests. I don't think there is any requirement for them to be meaningfully aware of possibly running in long mode, at least as far as segmentation is concerned. While likely benign right now, this would become an active issue if any of the paths into x86_emulate() wanted to have call gate use emulated (once the function supports that). > --- a/xen/arch/x86/x86_emulate/x86_emulate.c > +++ b/xen/arch/x86/x86_emulate/x86_emulate.c Can x86_emulate_wrapper() please gain ASSERT(!mode_64bit() || ctxt->lma); or some equivalent? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel