[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c49ebd5-26ae-4a06-85e8-9f90777a904b@amd.com>
Date: Wed, 29 May 2024 16:13:28 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Paolo Bonzini <pbonzini@...hat.com>, seanjc@...gle.com,
nikunj.dadhania@....com
Cc: thomas.lendacky@....com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
michael.roth@....com, pankaj.gupta@....com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, santosh.shukla@....com, ravi.bangoria@....com
Subject: Re: [PATCH v3 2/3] KVM: SEV-ES: Disallow SEV-ES guests when
X86_FEATURE_LBRV is absent
On 5/28/2024 10:03 PM, Paolo Bonzini wrote:
> On 5/23/24 14:18, Ravi Bangoria wrote:
>> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
>> index 489b0183f37d..dcb5eb00a4f5 100644
>> --- a/arch/x86/kvm/svm/svm.c
>> +++ b/arch/x86/kvm/svm/svm.c
>> @@ -5308,11 +5308,17 @@ static __init int svm_hardware_setup(void)
>> nrips = nrips && boot_cpu_has(X86_FEATURE_NRIPS);
>> + if (lbrv) {
>> + if (!boot_cpu_has(X86_FEATURE_LBRV))
>> + lbrv = false;
>> + else
>> + pr_info("LBR virtualization supported\n");
>> + }
>> /*
>> * Note, SEV setup consumes npt_enabled and enable_mmio_caching (which
>> * may be modified by svm_adjust_mmio_mask()), as well as nrips.
>> */
>
> Since it consumes nrips, just make lbrv non-static:
Sure.
Thanks,
Ravi
Powered by blists - more mailing lists