summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-02-25 12:47:26 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-26 04:43:29 -0500
commit44ac5958a6c1fd91ac8810fbb37194e377d78db5 (patch)
tree2f8364163fcf233b0db88166b961f7611dfe34bf /arch/x86/kvm/x86.c
parent919f4ebc598701670e80e31573a58f1f2d2bf918 (diff)
downloadlwn-44ac5958a6c1fd91ac8810fbb37194e377d78db5.tar.gz
lwn-44ac5958a6c1fd91ac8810fbb37194e377d78db5.zip
KVM: x86/mmu: Set SPTE_AD_WRPROT_ONLY_MASK if and only if PML is enabled
Check that PML is actually enabled before setting the mask to force a SPTE to be write-protected. The bits used for the !AD_ENABLED case are in the upper half of the SPTE. With 64-bit paging and EPT, these bits are ignored, but with 32-bit PAE paging they are reserved. Setting them for L2 SPTEs without checking PML breaks NPT on 32-bit KVM. Fixes: 1f4e5fc83a42 ("KVM: x86: fix nested guest live migration with PML") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210225204749.1512652-2-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
0 files changed, 0 insertions, 0 deletions