diff mbox series

[09/13] KVM: SVM: Explicitly check max SEV ASID during sev_hardware_setup()

Message ID 20210109004714.1341275-10-seanjc@google.com (mailing list archive)
State New, archived
Headers show
Series KVM: SVM: Misc SEV cleanups | expand

Commit Message

Sean Christopherson Jan. 9, 2021, 12:47 a.m. UTC
Query max_sev_asid directly after setting it instead of bouncing through
its wrapper, svm_sev_enabled().  Using the wrapper is unnecessary

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
 arch/x86/kvm/svm/sev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index a024edabaca5..3d25d24bcb48 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -1272,8 +1272,7 @@  void __init sev_hardware_setup(void)
 	/* Maximum number of encrypted guests supported simultaneously */
 	max_sev_asid = ecx;
-	if (!svm_sev_enabled())
+	if (!max_sev_asid)
 		goto out;
 	/* Minimum ASID value that should be used for SEV guest */