From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] apic: fix kvm build on UP without IOAPIC Date: Sun, 01 Jul 2012 10:10:53 -0700 Message-ID: <4FF0849D.5080406@zytor.com> References: <20120701150506.GA31304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120701150506.GA31304@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: "Michael S. Tsirkin" Cc: Avi Kivity , Randy Dunlap , Stephen Rothwell , mtosatti@redhat.com, x86@kernel.org, kvm@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar List-Id: linux-next.vger.kernel.org On 07/01/2012 08:05 AM, Michael S. Tsirkin wrote: > On UP i386, when APIC is disabled > # CONFIG_X86_UP_APIC is not set > # CONFIG_PCI_IOAPIC is not set > > code looking at apicdrivers never has any effect but it > still gets compiled in. In particular, this causes > build failures with kvm, but it generally bloats the kernel > unnecessarily. > > Fix by defining both __apicdrivers and __apicdrivers_end > to be NULL when CONFIG_X86_LOCAL_APIC is unset: I verified > that as the result any loop scanning __apicdrivers gets optimized out by > the compiler. > > Warning: a .config with apic disabled doesn't seem to boot > for me (even without this patch). Still verifying why, > meanwhile this patch is compile-tested only. > > Signed-off-by: Michael S. Tsirkin > --- > > Note: if this patch makes sense, can x86 maintainers > please ACK applying it through the kvm tree, since that is > where we see the issue that it addresses? > Avi, Marcelo, maybe you can carry this in kvm/linux-next as a temporary > measure so that linux-next builds? > I'm not happy about that as a workflow, but since you guys have an immediate problem I guess we can do that. Acked-by: H. Peter Anvin -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.