]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Set the C-bit in the PDPTRs and LM pseudo-PDPTRs
authorSean Christopherson <seanjc@google.com>
Fri, 5 Mar 2021 01:10:54 +0000 (17:10 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:42:21 +0000 (04:42 -0400)
commitac946b46cf0f0ffd0005a12b107f5dd6567b1057
treec379643f89c9c86d55a1840e1ebf02e9a59c812b
parent131f76d6f3ce24d9e512a1589ae38680188d0215
KVM: x86/mmu: Set the C-bit in the PDPTRs and LM pseudo-PDPTRs

Set the C-bit in SPTEs that are set outside of the normal MMU flows,
specifically the PDPDTRs and the handful of special cased "LM root"
entries, all of which are shadow paging only.

Note, the direct-mapped-root PDPTR handling is needed for the scenario
where paging is disabled in the guest, in which case KVM uses a direct
mapped MMU even though TDP is disabled.

Fixes: 4d36118d3728 ("kvm/x86/svm: Support Secure Memory Encryption within KVM")
Cc: stable@vger.kernel.org
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210305011101.3597423-11-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c