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

Re: [Xen-devel] [PATCH v1 5/5] x86/msr: introduce guest_wrmsr()



On 30/08/17 11:34, Sergey Dyasli wrote:
> The new function is responsible for handling WRMSR from both HVM and PV
> guests. Currently it handles only 2 MSRs:
>
>     MSR_INTEL_PLATFORM_INFO
>     MSR_INTEL_MISC_FEATURES_ENABLES
>
> It has a different behaviour compared to the old MSR handlers: if MSR
> is being handled by guest_wrmsr() then WRMSR will either succeed (if
> a guest is allowed to access it and provided a correct value based on
> its MSR policy) or produce a GP fault. A guest will never see
> a successful WRMSR of some MSR unknown to this function.
>
> guest_wrmsr() unifies and replaces the handling code from
> vmx_msr_write_intercept() and priv_op_write_msr().
>
> Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>

You should also note that this fixes a bug on AMD hardware where a guest
which tries to enable CPUID faulting via a direct write to
MSR_INTEL_MISC_FEATURES_ENABLES will observe it appearing to succeed,
but because Xen actually ignored the write.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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