Subject: Re: [Xen-devel] printk from softirq on xen: hard lockup

From: David Vrabel <[email-masked]>
Date: Thu, 6 Aug 2015 17:10:17 +0100

On 06/08/15 16:58, Jason A. Donenfeld wrote:
> On Thu, Aug 6, 2015 at 12:02 PM, David Vrabel <[email-masked]> wrote:
>> Linux PV guests must use the "Xen PV" APIC driver.  You need to
>> investigate why your PV guest is not using this (although I'm surprised
>> it works at all with the wrong one).
> 
> Actually it appears this PV Guest is using the "flat" APIC driver
> instead of the Xen APIC driver.
> 
> But upon further investigation into why:
> 
> arch/x86/xen/Makefile:
>     obj-$(CONFIG_XEN_DOM0)          += apic.o vga.o
> 
> It would appear that only dom0 gets to use the Xen APIC driver.
> 
> What gives?

Looks like the Makefile is wrong.

Try this:

8<------------------
x86/xen: build "Xen PV" APIC driver for domU as well

A PV domU also needs the Xen PV APIC driver but it was only built for
CONFIG_XEN_DOM0=y.

Signed-off-by: David Vrabel <[email-masked]>
Cc: <[email-masked]>
---
 arch/x86/xen/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index 7322755..4b6e29a 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -13,13 +13,13 @@ CFLAGS_mmu.o			:= $(nostackp)
 obj-y		:= enlighten.o setup.o multicalls.o mmu.o irq.o \
 			time.o xen-asm.o xen-asm_$(BITS).o \
 			grant-table.o suspend.o platform-pci-unplug.o \
-			p2m.o
+			p2m.o apic.o

 obj-$(CONFIG_EVENT_TRACING) += trace.o

 obj-$(CONFIG_SMP)		+= smp.o
 obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
 obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
-obj-$(CONFIG_XEN_DOM0)		+= apic.o vga.o
+obj-$(CONFIG_XEN_DOM0)		+= vga.o
 obj-$(CONFIG_SWIOTLB_XEN)	+= pci-swiotlb-xen.o
 obj-$(CONFIG_XEN_EFI)		+= efi.o
-- 
2.1.4