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:31:08 +0000 (16:31 -0500)
commitbd350d09215aa30f1197caddceae257cb85bfdba
treeb33e3b224381f29d7f45068784321a89b42da17b
parentfce8d95cfdb7b4bc5b8406ae992b7f3886be4a88
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]