]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Check CR3 GPA for validity regardless of vCPU mode
authorSean Christopherson <seanjc@google.com>
Thu, 22 Apr 2021 02:21:21 +0000 (19:21 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Apr 2021 09:27:11 +0000 (05:27 -0400)
commit7120eaeec9ab37a6523c22e01c648ffc4aeebea8
tree73892f0d6d69a5d50170e01a3e235634fb436129
parentc439ed4668607a6530b15e0c225989124ab336eb
KVM: x86: Check CR3 GPA for validity regardless of vCPU mode

Check CR3 for an invalid GPA even if the vCPU isn't in long mode.  For
bigger emulation flows, notably RSM, the vCPU mode may not be accurate
if CR0/CR4 are loaded after CR3.  For MOV CR3 and similar flows, the
caller is responsible for truncating the value.

Fixes: ff72cf22cee1 ("KVM: x86: save/load state on SMM switch")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422022128.3464144-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c