[RFC PATCH v2 1/8] KVM: x86: raise the default maximum planes to two

Sriram Nambakam <[email protected]>
Newsgroups gmane.linux.kernel,gmane.comp.emulators.kvm.devel
Message-ID <[email protected]>
The default max-planes callback returns 1, which limits KVM_CAP_PLANES to a
single plane on VMX (and on SVM for non-SEV-SNP guests).  VBS needs a normal
plane (0) and one secure plane (1), so return 2 by default.  This is still
gated by irqchip=split in kvm_arch_max_planes().
---
 arch/x86/kvm/x86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 35fbe0776a3e..29766c19c289 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -478,7 +478,8 @@ static unsigned int num_msr_based_features;
 
 unsigned kvm_x86_default_max_planes(struct kvm *kvm)
 {
-	return 1;
+	/* Support a normal plane (0) and one secure plane (1) for VBS. */
+	return 2;
 }
 EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_x86_default_max_planes);
 
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.