[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86/PV: fix/generalize guest nul selector handling
>>> On 29.09.17 at 17:17, <roger.pau@xxxxxxxxxx> wrote: > On Thu, Sep 28, 2017 at 08:41:28AM +0000, Jan Beulich wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -1237,6 +1237,18 @@ arch_do_vcpu_op( >> return rc; >> } >> >> +/* >> + * Loading a nul selector does not clear bases and limits on AMD CPUs. Be on >> + * the safe side and re-initialize both to flat segment values before >> loading >> + * a nul selector. >> + */ >> +#define preload_segment(seg, value) do { \ >> + if ( !((value) & ~3) && \ >> + boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) \ >> + asm volatile ( "movl %k0, %%" #seg \ > > Shouldn't this be a movw? Segment selectors are 16b, not 32b, but I > might be missing something here. Ideally it would be "mov" (i.e. without any suffix), but ... > I see loadsegment is also using movl, so yes, I guess I'm missing > something. ... my primary goal was to make the two match up in this regard. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |