[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <635d08f4-08a4-9dc3-241b-1ac07a53b096@amd.com>
Date: Tue, 5 Apr 2022 16:36:23 +0700
From: Suravee Suthikulpanit <suravee.suthikulpanit@....com>
To: Maxim Levitsky <mlevitsk@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: pbonzini@...hat.com, seanjc@...gle.com, joro@...tes.org,
jon.grimm@....com, wei.huang2@....com, terry.bowman@....com
Subject: Re: [RFCv2 PATCH 07/12] KVM: SVM: Introduce helper function
kvm_get_apic_id
Maxim
On 4/5/22 10:58 AM, Suravee Suthikulpanit wrote:
>>
>>
>>
>>> avic_invalidate_logical_id_entry(vcpu);
>>> if (ldr)
>>> @@ -464,7 +471,12 @@ static int avic_handle_apic_id_update(struct kvm_vcpu *vcpu)
>>> {
>>> u64 *old, *new;
>>> struct vcpu_svm *svm = to_svm(vcpu);
>>> - u32 id = kvm_xapic_id(vcpu->arch.apic);
>>> + u32 id;
>>> + int ret;
>>> +
>>> + ret = kvm_get_apic_id(vcpu, &id);
>>> + if (ret)
>>> + return 1;
>>
>> Well this function is totally broken anyway and I woudn't even bother touching it,
>> maximum, just stick 'return 0' in the very start of this function if the apic is
>> in x2apic mode now.
>>
>> Oh well...
>>
>
> Sorry, I'm not sure if I understand what you mean by "broken".
>
> This function setup/update the AVIC physical APIC ID table, whenever the APIC ID is
> initialize or updated. It is needed in both xAPIC and x2APIC cases.
Actually, I will rework this part and send out change in the next revision.
Thanks,
Suravee
Powered by blists - more mailing lists