From patchwork Fri May 19 15:47:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 9737475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5B3AB6020B for ; Fri, 19 May 2017 15:50:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BD4A28929 for ; Fri, 19 May 2017 15:50:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E2C528948; Fri, 19 May 2017 15:50:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 80CD328946 for ; Fri, 19 May 2017 15:50:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBk8F-0008DR-D9; Fri, 19 May 2017 15:47:59 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBk8E-0008CU-7I for xen-devel@lists.xenproject.org; Fri, 19 May 2017 15:47:58 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id 07/7B-03620-DA31F195; Fri, 19 May 2017 15:47:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVyuP0Ov+4aYfl Ig/vtuhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b1L81sBT/FK7pvLGNuYHwp0sXIySEhYCTx duI/pi5GLg4hgYWMEh0HnjOCJNgEVCU2XD/FCmKLCNRJHFx+iBmkiFngHKPE8xerwBLCAnESt 2ZPYAOxWYAaTl+8wAJi8wqYSDyfuIYFYoO8xKJNM8BsTgFTic3zfoMtEAKqufK0k2UCI/cCRo ZVjBrFqUVlqUW6hkZ6SUWZ6RkluYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxiBHmYAgh2Mlzc GHGKU5GBSEuV1PCwXKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC10FIPlJIsCg1PbUiLTMHGGow aQkOHiUR3iMgad7igsTc4sx0iNQpRkUpcd4skIQASCKjNA+uDRbelxhlpYR5GYEOEeIpSC3Kz SxBlX/FKM7BqCTMmwAyhSczrwRu+iugxUxAi5sfSIMsLklESEk1MB7XWjRZhjXa792fP15Pz9 04ei1ulWO9Q5ftlB/T/eQULGZxP97Y++GOMqd73+dr29k31+/bKLmh3n31xtAV/fNOyj4IcI3 Vmt72YMXFnSe7tdhmiGo6WN4TLtqy8MA/o21Nixflb/+g2pDZ1HB5ea3b1zz9P5k6HqrzhKZf z5rdK/S2X5Ir+JgSS3FGoqEWc1FxIgDGdnjqagIAAA== X-Env-Sender: jgross@suse.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1495208876!62981917!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59712 invoked from network); 19 May 2017 15:47:56 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-10.tower-21.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 19 May 2017 15:47:56 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D4A45AD2C; Fri, 19 May 2017 15:47:55 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org, virtualization@lists.linux-foundation.org Date: Fri, 19 May 2017 17:47:39 +0200 Message-Id: <20170519154746.29389-4-jgross@suse.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170519154746.29389-1-jgross@suse.com> References: <20170519154746.29389-1-jgross@suse.com> Cc: Juergen Gross , jeremy@goop.org, rusty@rustcorp.com.au, chrisw@sous-sol.org, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, akataria@vmware.com, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH 03/10] xen: move interrupt handling for pv guests under CONFIG_XEN_PV umbrella X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP There is no need to include pv-guest only object files in a kernel not configured to support those. Move Xen's irq.o, xen-asm*.o and pv parts of entry_*.o into CONFIG_XEN_PV sections. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S | 4 +++- arch/x86/entry/entry_64.S | 6 ++++-- arch/x86/xen/Makefile | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 50bc26949e9e..37ae4a7809d9 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -789,7 +789,7 @@ ENTRY(spurious_interrupt_bug) jmp common_exception END(spurious_interrupt_bug) -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_PV ENTRY(xen_hypervisor_callback) pushl $-1 /* orig_ax = -1 => not a system call */ SAVE_ALL @@ -870,7 +870,9 @@ ENTRY(xen_failsafe_callback) _ASM_EXTABLE(3b, 8b) _ASM_EXTABLE(4b, 9b) ENDPROC(xen_failsafe_callback) +#endif /* CONFIG_XEN_PV */ +#ifdef CONFIG_XEN BUILD_INTERRUPT3(xen_hvm_callback_vector, HYPERVISOR_CALLBACK_VECTOR, xen_evtchn_do_upcall) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 607d72c4a485..cd47214ff402 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -902,7 +902,7 @@ ENTRY(do_softirq_own_stack) ret END(do_softirq_own_stack) -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_PV idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0 /* @@ -983,7 +983,9 @@ ENTRY(xen_failsafe_callback) ENCODE_FRAME_POINTER jmp error_exit END(xen_failsafe_callback) +#endif /* CONFIG_XEN_PV */ +#ifdef CONFIG_XEN apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \ xen_hvm_callback_vector xen_evtchn_do_upcall @@ -998,7 +1000,7 @@ idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK idtentry stack_segment do_stack_segment has_error_code=1 -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_PV idtentry xen_debug do_debug has_error_code=0 idtentry xen_int3 do_int3 has_error_code=0 idtentry xen_stack_segment do_stack_segment has_error_code=1 diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index fffb0a16f9e3..5fc463eaafff 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -10,13 +10,13 @@ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_enlighten_pv.o := $(nostackp) CFLAGS_mmu_pv.o := $(nostackp) -obj-y := enlighten.o multicalls.o mmu.o irq.o \ - time.o xen-asm.o xen-asm_$(BITS).o \ +obj-y := enlighten.o multicalls.o mmu.o time.o \ grant-table.o suspend.o platform-pci-unplug.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o -obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o \ - p2m.o enlighten_pv.o mmu_pv.o +obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o irq.o \ + p2m.o enlighten_pv.o mmu_pv.o \ + xen-asm.o xen-asm_$(BITS).o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o