[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34b8a586-d64e-01d0-eb95-93b7be241a4f@amd.com>
Date: Tue, 16 Nov 2021 02:29:46 -0800
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@....com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, x86@...nel.org,
pbonzini@...hat.com, joro@...tes.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, peterz@...radead.org,
hpa@...or.com, thomas.lendacky@....com, jon.grimm@....com
Subject: Re: [PATCH 2/2] KVM: SVM: Extend host physical APIC ID field to
support more than 8-bit
On 11/10/2021 11:48 AM, Sean Christopherson wrote:
> Wed, Nov 10, 2021, Suravee Suthikulpanit wrote:
>> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
>> index 989685098b3e..0b066bb5149d 100644
>> --- a/arch/x86/kvm/svm/svm.c
>> +++ b/arch/x86/kvm/svm/svm.c
>> @@ -1031,6 +1031,12 @@ static __init int svm_hardware_setup(void)
>> nrips = false;
>> }
>>
>> + if (avic) {
>> + r = avic_init_host_physical_apicid_mask();
>> + if (r)
>> + avic = false;
>> + }
> Haven't yet dedicated any brain cells to the rest of the patch, but this can be
> written as
>
> if (avic && avic_init_host_physical_apicid_mask())
> avic = false;
>
> or
>
> avic = avic && !avic_init_host_physical_apicid_mask();
>
> But looking at the context below, combining everything would be preferable. I
> would say split out the enable_apicv part to make it more obvious that enable_apicv
> is merely a reflection of avic.
>
> avic = avic && npt_enabled && boot_cpu_has(X86_FEATURE_AVIC) &&
> !avic_init_host_physical_apicid_mask();
> enable_apicv = avic;
>
Yes, we can do that. I'll update the logic in V2.
Thanks,
Suravee
Powered by blists - more mailing lists