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

Re: [Xen-devel] [PATCH for-4.11] x86/SVM: Fix intercepted {RD, WR}MSR for the SYS{CALL, ENTER} MSRs

On 24/04/18 20:51, Andrew Cooper wrote:
> By default, the SYSCALL MSRs are not intercepted, and accesses are completed
> by hardware.  The SYSENTER MSRs are intercepted for cross-vendor
> purposes (albeit needlessly in the common case), and are fully emulated.
> However, {RD,WR}MSR instructions which happen to be emulated (FEP,
> introspection, or older versions of Xen which intercepted #UD), or when the
> MSRs are explicitly intercepted (introspection), will be completed
> incorrectly.
> svm_msr_read_intercept() appears to return the correct values, but only
> because of the default read-everything case (which is going to disappear), and
> that in vcpu context, hardware should have the guest values in context.
> Update the read path to explicitly sync the VMCB and complete the accesses,
> rather than falling all the way through to the default case.
> svm_msr_write_intercept() silently discard all updates.  Synchronise the VMCB
> for all applicable MSRs, and implement suitable checks.  The actual behaviour
> of AMD hardware is to truncate the SYSENTER and SFMASK MSRs at 32 bits, but
> this isn't implemented yet to remain compatible with the cross-vendor case.
> Drop one bit of trailing whitespace while modifing this area of the code.
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Juergen Gross <jgross@xxxxxxxx>
> CC: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> CC: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> CC: Brian Woods <brian.woods@xxxxxxx>
> Juergen: As this patch probably wants backporting to the stable branches, it
> probably wants to go into 4.11 at this point.

Release-acked-by: Juergen Gross <jgross@xxxxxxxx>


Xen-devel mailing list



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