From: Randy Dunlap <rdunlap@infradead.org>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>
Cc: David Rientjes <rientjes@google.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@redhat.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
"x86@kernel.org" <x86@kernel.org>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
KVM <kvm@vger.kernel.org>
Subject: Re: [patch] x86, kvm: fix build failure with CONFIG_SMP disabled
Date: Wed, 17 Apr 2013 17:47:07 -0700 [thread overview]
Message-ID: <516F428B.7010900@infradead.org> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E09A13B08@SHSMSX101.ccr.corp.intel.com>
On 04/17/13 17:35, Zhang, Yang Z wrote:
> David Rientjes wrote on 2013-04-18:
>> On Wed, 17 Apr 2013, Randy Dunlap wrote:
>>
>>> On 04/17/13 16:12, David Rientjes wrote:
>>>> The build fails when CONFIG_SMP is disabled:
>>>>
>>>> arch/x86/kvm/vmx.c: In function 'vmx_deliver_posted_interrupt':
>>>> arch/x86/kvm/vmx.c:3950:3: error: 'apic' undeclared (first use in
>>>> this function)
>>>>
>>>> Fix it by including the necessary header.
>>>
>>> Sorry, i386 build still fails with the same error message plus this one:
>>>
>>> ERROR: "apic" [arch/x86/kvm/kvm-intel.ko] undefined!
>>>
>>
>> Ahh, that's because you don't have CONFIG_X86_LOCAL_APIC as you already
>> mentioned. So it looks like this error can manifest in two different ways
>> and we got different reports.
>>
>> This failure came from "KVM: VMX: Add the deliver posted interrupt
>> algorithm", so adding Yang to the cc to specify the dependency this has on
>> apic and how it can be protected without CONFIG_X86_LOCAL_APIC on i386.
> How about the follow patch?
>
> commit a49dd819f502c1029c5a857e87201ef25ec06ce6
> Author: Yang Zhang <yang.z.zhang@Intel.com>
> Date: Wed Apr 17 05:34:07 2013 -0400
>
> KVM: x86: Don't sending posted interrupt if not config CONFIG_SMP
>
> In UP, posted interrupt logic will not work. So we should not send
> posted interrupt and let vcpu to pick the pending interrupt before
> vmentry.
>
> Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Missing Reported-by: and the patch does not apply cleanly (looks like
lots of spaces instead of tabs in it)... but it does build now after
massaging the patch.
Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org>
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 52b21da..d5c6b95 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -3946,10 +3946,12 @@ static void vmx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector)
>
> r = pi_test_and_set_on(&vmx->pi_desc);
> kvm_make_request(KVM_REQ_EVENT, vcpu);
> +#ifdef CONFIG_SMP
> if (!r && (vcpu->mode == IN_GUEST_MODE))
> apic->send_IPI_mask(get_cpu_mask(vcpu->cpu),
> POSTED_INTR_VECTOR);
> else
> +#endif
> kvm_vcpu_kick(vcpu);
> }
>
> Best regards,
> Yang
>
>
--
~Randy
next prev parent reply other threads:[~2013-04-18 0:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 7:04 linux-next: Tree for Apr 17 Stephen Rothwell
2013-04-17 7:04 ` Stephen Rothwell
[not found] ` <20130417170450.5dd6e5f450de4d5bf197d997-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2013-04-17 18:06 ` linux-next: Tree for Apr 17 (infiniband/rdma) Randy Dunlap
2013-04-17 18:06 ` Randy Dunlap
[not found] ` <516EE4BD.3000200-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-04-17 18:13 ` Roland Dreier
2013-04-17 18:13 ` Roland Dreier
2013-04-17 18:15 ` Or Gerlitz
2013-04-17 18:44 ` Nicholas A. Bellinger
2013-04-17 18:10 ` linux-next: Tree for Apr 17 (kvm) Randy Dunlap
2013-04-17 22:55 ` David Rientjes
2013-04-17 23:12 ` [patch] x86, kvm: fix build failure with CONFIG_SMP disabled David Rientjes
2013-04-18 0:02 ` Randy Dunlap
2013-04-18 0:09 ` David Rientjes
2013-04-18 0:35 ` Zhang, Yang Z
2013-04-18 0:47 ` Randy Dunlap [this message]
2013-04-18 0:50 ` Zhang, Yang Z
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=516F428B.7010900@infradead.org \
--to=rdunlap@infradead.org \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=rientjes@google.com \
--cc=sfr@canb.auug.org.au \
--cc=x86@kernel.org \
--cc=yang.z.zhang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.