[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2b82fb5-8249-7523-696c-23339b579e0f@redhat.com>
Date: Wed, 15 Jun 2016 00:01:17 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Suravee Suthikulanit <suravee.suthikulpanit@....com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
rkrcmar@...hat.com
Subject: Re: [PATCH] KVM: SVM: compile out AVIC if !CONFIG_X86_LOCAL_APIC
On 14/06/2016 23:44, Suravee Suthikulanit wrote:
> On 6/14/2016 4:22 PM, Paolo Bonzini wrote:
>> ----- Original Message -----
>>> From: "Suravee Suthikulanit" <suravee.suthikulpanit@....com>
>>> To: "Paolo Bonzini" <pbonzini@...hat.com>,
>>> linux-kernel@...r.kernel.org, kvm@...r.kernel.org
>>> Cc: rkrcmar@...hat.com
>>> Sent: Tuesday, June 14, 2016 8:20:30 PM
>>> Subject: Re: [PATCH] KVM: SVM: compile out AVIC if
>>> !CONFIG_X86_LOCAL_APIC
>>>
>>> Hi Paolo,
>>>
>>> On 6/14/2016 11:40 AM, Paolo Bonzini wrote:
>>>> AVIC needs __default_cpu_present_to_apicid. Stub out all functions
>>>> that use it, and disable the module parameter, if Linux is
>>>> compiled without local APIC support.
>>>
>>> I think you are right that we should disable AVIC #ifndef
>>> CONFIG_X86_LOCAL_APIC. However, do you think we should just use
>>> default_cpu_present_to_apicid() instead of the
>>> __default_cpu_present_to_apicid()?
>>
>> I'm not sure why that would help? default_cpu_present_to_apicid
>> is also declared only if CONFIG_X86_LOCAL_APIC is defined.
>
> Actually, I also meant to include the change that I sent out
> (https://lkml.org/lkml/2016/6/13/898), which declares a dummy for the
> case #ifndef CONFIG_X86_LOCAL_APIC. That should help with the issue here.
I think it is by design that default_cpu_present_to_apicid() is absent.
Perhaps you could create a kvm_cpu_get_apicid() function that is either
__default_cpu_present_to_apicid() or WARN_ON_ONCE(1)+return 0?
Paolo
Powered by blists - more mailing lists