lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] KVM: SVM: Extend host physical APIC ID field to support more than 8-bit
From


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

\
 
 \ /
  Last update: 2021-11-16 11:31    [W:0.203 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site