public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, rkrcmar@redhat.com
Subject: Re: [PATCH] KVM: SVM: compile out AVIC if !CONFIG_X86_LOCAL_APIC
Date: Tue, 14 Jun 2016 17:22:24 -0400 (EDT)	[thread overview]
Message-ID: <29661011.22418691.1465939344668.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <573935ff-2310-b64f-d3c9-260a89de6752@amd.com>



----- Original Message -----
> From: "Suravee Suthikulanit" <suravee.suthikulpanit@amd.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>, linux-kernel@vger.kernel.org, kvm@vger.kernel.org
> Cc: rkrcmar@redhat.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.

> As for disabling AVIC, I think we can also do:
> 
>      if (!IS_ENABLED(CONFIG_X86_LOCAL_APIC))
>          avic = false;

Yes, we'll need to do that once AVIC is enabled by default; or

static bool avic = IS_ENABLED(CONFIG_X86_LOCAL_APIC);

In any case the module parameter must be hidden if there's no
support in the kernel for the local APIC.

Paolo

  reply	other threads:[~2016-06-14 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 16:40 [PATCH] KVM: SVM: compile out AVIC if !CONFIG_X86_LOCAL_APIC Paolo Bonzini
2016-06-14 18:20 ` Suravee Suthikulanit
2016-06-14 21:22   ` Paolo Bonzini [this message]
2016-06-14 21:44     ` Suravee Suthikulanit
2016-06-14 22:01       ` Paolo Bonzini
2016-06-14 22:09         ` Suravee Suthikulanit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29661011.22418691.1465939344668.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=suravee.suthikulpanit@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox