From patchwork Thu Aug 6 16:29:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 504765 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DC60E14027C for ; Fri, 7 Aug 2015 02:30:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=zx2c4.com header.i=@zx2c4.com header.b=ciVW0rCa; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755326AbbHFQ3q (ORCPT ); Thu, 6 Aug 2015 12:29:46 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:54304 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755161AbbHFQ3o (ORCPT ); Thu, 6 Aug 2015 12:29:44 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 76dcccf6; Thu, 6 Aug 2015 16:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=mail; bh=zbBW +IB+JjqkWNiYCfPYHp+SS4s=; b=ciVW0rCahqIqUcAGXRIQGZqxA7w9PLUBpE7v QDIhwqL/eDimWbWtq+WuPkBOHuiYA/yil74DXb6nGfN3z0zea7QVooWLOuxWJbO6 n6pdyveTXCb65rV9+w47l0aAxSchVcKcUULsN6WmV73kNA/Y2g4Dl8FKl8PqcDWl x1+Rk9/UiYIt9VzXctGKyRg0pimaqjt1MLkqbq11XxCWg7u7+xdKBuclFoflpLSx o+ZgI+Qb1GtIs8timfMhjujlA+omepdRjLwNfWThOcoSyhJ/cdXlyPg/4VO0tMHd kqkN3GDG4u8NyRTOsE6V68kEE68DycPxL2KGrflLTKC8Es6IcQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 45196ceb TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 6 Aug 2015 16:29:42 +0000 (UTC) From: "Jason A. Donenfeld" To: David Vrabel , Ian Campbell , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org Cc: "Jason A. Donenfeld" , Subject: [PATCH] xen-apic: Enable on domU as well Date: Thu, 6 Aug 2015 18:29:39 +0200 Message-Id: <1438878579-26856-1-git-send-email-Jason@zx2c4.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org It turns out that domU also requires the Xen APIC driver. Otherwise we get stuck in busy loops that never exit, such as in this stack trace: (gdb) target remote localhost:9999 Remote debugging using localhost:9999 __xapic_wait_icr_idle () at ./arch/x86/include/asm/ipi.h:56 56 while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY) (gdb) bt #0 __xapic_wait_icr_idle () at ./arch/x86/include/asm/ipi.h:56 #1 __default_send_IPI_shortcut (shortcut=, dest=, vector=) at ./arch/x86/include/asm/ipi.h:75 #2 apic_send_IPI_self (vector=246) at arch/x86/kernel/apic/probe_64.c:54 #3 0xffffffff81011336 in arch_irq_work_raise () at arch/x86/kernel/irq_work.c:47 #4 0xffffffff8114990c in irq_work_queue (work=0xffff88000fc0e400) at kernel/irq_work.c:100 #5 0xffffffff8110c29d in wake_up_klogd () at kernel/printk/printk.c:2633 #6 0xffffffff8110ca60 in vprintk_emit (facility=0, level=, dict=0x0 , dictlen=, fmt=, args=) at kernel/printk/printk.c:1778 #7 0xffffffff816010c8 in printk (fmt=) at kernel/printk/printk.c:1868 #8 0xffffffffc00013ea in ?? () #9 0x0000000000000000 in ?? () Mailing-list-thread: https://lkml.org/lkml/2015/8/4/755 Signed-off-by: Jason A. Donenfeld Cc: David Vrabel Cc: Ian Campbell Cc: --- arch/x86/xen/Makefile | 4 ++-- arch/x86/xen/xen-ops.h | 10 ---------- 2 files changed, 2 insertions(+), 12 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 diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h index c20fe29..7363e1b 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h @@ -99,18 +99,8 @@ static inline void xen_uninit_lock_cpu(int cpu) struct dom0_vga_console_info; -#ifdef CONFIG_XEN_DOM0 void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size); void __init xen_init_apic(void); -#else -static inline void __init xen_init_vga(const struct dom0_vga_console_info *info, - size_t size) -{ -} -static inline void __init xen_init_apic(void) -{ -} -#endif #ifdef CONFIG_XEN_EFI extern void xen_efi_init(void);