OSDN Git Service

KVM: VMX: Add non-canonical check on writes to RTIT address MSRs
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 10 Dec 2019 23:24:32 +0000 (15:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:30:00 +0000 (16:30 -0500)
commitf6e5b0409e186a15cced212580f55799c557d00d
tree95cfe05c00ec537bee33a051559f90167eae45c7
parent6694249470b31b6dcebcef5f4b0acdd2219ee1f3
KVM: VMX: Add non-canonical check on writes to RTIT address MSRs

[ Upstream commit fe6ed369fca98e99df55c932b85782a5687526b5 ]

Reject writes to RTIT address MSRs if the data being written is a
non-canonical address as the MSRs are subject to canonical checks, e.g.
KVM will trigger an unchecked #GP when loading the values to hardware
during pt_guest_enter().

Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/vmx/vmx.c [new file with mode: 0644]