[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 09/16] x86: don't setup PV hypercall stubs and entries when !CONFIG_PV



>>> On 19.10.18 at 17:59, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 19/10/18 15:28, Wei Liu wrote:
>> @@ -347,6 +352,7 @@ void subarch_percpu_traps_init(void)
>>      /* Common SYSCALL parameters. */
>>      wrmsrl(MSR_STAR, XEN_MSR_STAR);
>>      wrmsrl(MSR_SYSCALL_MASK, XEN_SYSCALL_MASK);
>> +#endif
> 
> It would be a wise precaution to initialise these MSRs to 0 in the !PV
> case, so we don't retain stale values.

If anything, EFER.SCE needs to be kept clear, as that's what
controls whether SYSCALL would raise #GP(0). But without a
PV domain around, nothing can access the host values of
these MSRs in the first place, so instead we could simplify
some context switching by never restoring host values, and
only ever loading guest ones. Except that, of course, VMLOAD
is an all-or-nothing insn, and we need to use to get TR loaded.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.