]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
KVM: SVM: Disable SEV/SEV-ES if NPT is disabled
authorSean Christopherson <seanjc@google.com>
Thu, 22 Apr 2021 02:11:13 +0000 (19:11 -0700)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:43 +0000 (17:46 -0600)
commit73dae69cc47bb98cd51f4b3a07677eaa0b7b85e8
treed6a49f69994def5ef997b2eaeedd73a062b10fe4
parent03c8af9bf9ce630c5bf613f877b6da55f92cde03
KVM: SVM: Disable SEV/SEV-ES if NPT is disabled

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit fa13680f5668cff05302a2f4753c49334a83a064 ]

Disable SEV and SEV-ES if NPT is disabled.  While the APM doesn't clearly
state that NPT is mandatory, it's alluded to by:

  The guest page tables, managed by the guest, may mark data memory pages
  as either private or shared, thus allowing selected pages to be shared
  outside the guest.

And practically speaking, shadow paging can't work since KVM can't read
the guest's page tables.

Fixes: e9df09428996 ("KVM: SVM: Add sev module_param")
Cc: Brijesh Singh <brijesh.singh@amd.com
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422021125.3417167-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
arch/x86/kvm/svm/svm.c