lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 9 Feb 2015 22:44:07 +0100
From:	Radim Krčmář <rkrcmar@...hat.com>
To:	Jim Davis <jim.epost@...il.com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next <linux-next@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>, gleb@...nel.org,
	pbonzini@...hat.com, tglx <tglx@...utronix.de>, mingo@...hat.com,
	hpa <hpa@...or.com>, x86 <x86@...nel.org>, kvm@...r.kernel.org
Subject: Re: randconfig build error with next-20150209, in arch/x86/kvm/vmx.c

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@...il.com>
Signed-off-by: Radim Krčmář <rkrcmar@...hat.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"
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists