linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Jim Davis <jim.epost@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next <linux-next@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	gleb@kernel.org, pbonzini@redhat.com, tglx <tglx@linutronix.de>,
	mingo@redhat.com, hpa <hpa@zytor.com>, x86 <x86@kernel.org>,
	kvm@vger.kernel.org
Subject: Re: randconfig build error with next-20150209, in arch/x86/kvm/vmx.c
Date: Mon, 9 Feb 2015 22:44:07 +0100	[thread overview]
Message-ID: <20150209214407.GC1804@potion.brq.redhat.com> (raw)
In-Reply-To: <CA+r1Zhi87M6c7DxJ-k-tn-kWeRJJsvfEM_JwfyA0A3f0toZA=A@mail.gmail.com>

2015-02-09 10:46-0700, Jim Davis:
> Building with the attached random configuration file,

Thank you for catching it!

> arch/x86/kvm/vmx.c: In function ‘vmx_deliver_nested_posted_interrupt’:
> arch/x86/kvm/vmx.c:4378:4: error: ‘apic’ undeclared (first use in this function)
>     apic->send_IPI_mask(get_cpu_mask(vcpu->cpu),
>     ^

---8<---
KVM: VMX: include <asm/apic.h> to fix build error

<asm/apic.h> isn't included directly and without CONFIG_SMP, an option
that automagically pulls it can't be enabled.

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 We could just #ifdef because the vcpu isn't running at that time,
 but I think that including the header instead of introducing an
 exception is worth the slowdown on UP.   #ifdef for comparison:
   @@ -4374,9 +4374,11 @@ static int vmx_deliver_nested_posted_interrupt(struct kvm_vcpu *vcpu,
    	if (is_guest_mode(vcpu) &&
    	    vector == vmx->nested.posted_intr_nv) {
    		/* the PIR and ON have been set by L1. */
   +#ifdef CONFIG_SMP
    		if (vcpu->mode == IN_GUEST_MODE)
    			apic->send_IPI_mask(get_cpu_mask(vcpu->cpu),
    				POSTED_INTR_VECTOR);
   +#endif
    		/*
    		 * If a posted intr is not recognized by hardware,
    		 * we will accomplish it in the next vmentry.
 
 arch/x86/kvm/vmx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6e112472b0b3..3f73bfad0349 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -45,6 +45,7 @@
 #include <asm/perf_event.h>
 #include <asm/debugreg.h>
 #include <asm/kexec.h>
+#include <asm/apic.h>
 
 #include "trace.h"
 

      reply	other threads:[~2015-02-09 21:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 17:46 randconfig build error with next-20150209, in arch/x86/kvm/vmx.c Jim Davis
2015-02-09 21:44 ` Radim Krčmář [this message]

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=20150209214407.GC1804@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=gleb@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jim.epost@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).