From patchwork Fri Mar 13 11:14:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436711 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B078292C for ; Fri, 13 Mar 2020 11:15:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B9EF2072C for ; Fri, 13 Mar 2020 11:15:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B9EF2072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiGt-0005yG-EY; Fri, 13 Mar 2020 11:14:31 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiGr-0005yB-VG for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:14:29 +0000 X-Inumbo-ID: ce2f3696-651b-11ea-b2c1-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ce2f3696-651b-11ea-b2c1-12813bfff9fa; Fri, 13 Mar 2020 11:14:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3CFFBAC9A; Fri, 13 Mar 2020 11:14:28 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <3b3a00a4-ca54-c9ce-d3e1-0382e20c6dac@suse.com> Date: Fri, 13 Mar 2020 12:14:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 1/9] x86/HVM: reduce domain.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Petre Pircalabu , Tamas K Lengyel , Wei Liu , Andrew Cooper , Alexandru Isaila , Daniel de Graaf , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop #include-s not needed by the header itself. Put the ones needed into whichever other files actually need them. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant --- v3: Also make things build with all{yes,no}config. v2: Also make things build with XSM=y. --- a/xen/arch/x86/cpu/mcheck/vmce.c +++ b/xen/arch/x86/cpu/mcheck/vmce.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include --- a/xen/arch/x86/hvm/dm.c +++ b/xen/arch/x86/hvm/dm.c @@ -27,6 +27,8 @@ #include +#include + struct dmop_args { domid_t domid; unsigned int nr_bufs; --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -38,6 +38,7 @@ #include #include #include +#include /* * Have the TSS cover the ISA port range, which makes it --- a/xen/arch/x86/hvm/hpet.c +++ b/xen/arch/x86/hvm/hpet.c @@ -26,6 +26,7 @@ #include #include #include +#include #define domain_vhpet(x) (&(x)->arch.hvm.pl_time->vhpet) #define vcpu_vhpet(x) (domain_vhpet((x)->domain)) --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -24,6 +24,9 @@ #include +#include +#include + static long hvm_memory_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { const struct vcpu *curr = current; --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -34,6 +34,7 @@ #include #include +#include static void set_ioreq_server(struct domain *d, unsigned int id, struct hvm_ioreq_server *s) --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -26,6 +26,7 @@ #include #include #include +#include bool hvm_domain_use_pirq(const struct domain *d, const struct pirq *pirq) { --- a/xen/arch/x86/hvm/rtc.c +++ b/xen/arch/x86/hvm/rtc.c @@ -28,6 +28,7 @@ #include #include #include +#include #define USEC_PER_SEC 1000000UL #define NS_PER_USEC 1000UL --- a/xen/arch/x86/hvm/viridian/private.h +++ b/xen/arch/x86/hvm/viridian/private.h @@ -4,6 +4,7 @@ #define X86_HVM_VIRIDIAN_PRIVATE_H #include +#include int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val); int viridian_synic_rdmsr(const struct vcpu *v, uint32_t idx, uint64_t *val); --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -22,6 +22,7 @@ #include #include #include +#include #define mode_is(d, name) \ ((d)->arch.hvm.params[HVM_PARAM_TIMER_MODE] == HVMPTM_##name) --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -28,6 +28,8 @@ #include #include +#include + DEFINE_PER_CPU(uint32_t, tsc_aux); struct msr_policy __read_mostly raw_msr_policy, --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -35,6 +35,7 @@ #include #include +#include #include --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -29,6 +29,7 @@ #include #include #include +#include /* for public/io/ring.h macros */ #define xen_mb() smp_mb() --- a/xen/drivers/char/xen_pv_console.c +++ b/xen/drivers/char/xen_pv_console.c @@ -28,6 +28,7 @@ #include #include +#include #include static struct xencons_interface *cons_ring; --- a/xen/include/asm-x86/hvm/domain.h +++ b/xen/include/asm-x86/hvm/domain.h @@ -20,20 +20,14 @@ #ifndef __ASM_X86_HVM_DOMAIN_H__ #define __ASM_X86_HVM_DOMAIN_H__ -#include -#include -#include -#include -#include +#include +#include +#include + #include -#include #include #include -#include -#include -#include -#include -#include + #include struct hvm_ioreq_page { --- a/xen/include/asm-x86/hvm/nestedhvm.h +++ b/xen/include/asm-x86/hvm/nestedhvm.h @@ -22,6 +22,7 @@ #include /* for uintNN_t */ #include /* for struct vcpu, struct domain */ #include /* for vcpu_nestedhvm */ +#include enum nestedhvm_vmexits { NESTEDHVM_VMEXIT_ERROR = 0, /* inject VMEXIT w/ invalid VMCB */ --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -17,6 +17,7 @@ #include #include +#include /* Cannot use BUILD_BUG_ON here because the expressions we check are not * considered constant at compile time. Instead, rely on constant propagation to --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -28,7 +28,7 @@ #include #include #include - +#include #include #include From patchwork Fri Mar 13 11:15:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436717 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 448E81668 for ; Fri, 13 Mar 2020 11:15:56 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B6E72072C for ; Fri, 13 Mar 2020 11:15:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B6E72072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiHO-000611-OU; Fri, 13 Mar 2020 11:15:02 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiHM-00060t-Sr for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:15:00 +0000 X-Inumbo-ID: e09ac67f-651b-11ea-b2c1-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e09ac67f-651b-11ea-b2c1-12813bfff9fa; Fri, 13 Mar 2020 11:15:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A1C0AAAC7; Fri, 13 Mar 2020 11:14:59 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: Date: Fri, 13 Mar 2020 12:15:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 2/9] x86/HVM: reduce vcpu.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop #include-s not needed by the header itself. Put the ones needed into whichever other files actually need them. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant --- v2: Re-base over changes to previous patch. --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -23,6 +23,7 @@ #include #include +#include #include #include --- a/xen/arch/x86/hvm/viridian/private.h +++ b/xen/arch/x86/hvm/viridian/private.h @@ -4,6 +4,7 @@ #define X86_HVM_VIRIDIAN_PRIVATE_H #include +#include #include int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val); --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -25,6 +25,7 @@ #include #include +#include #include #include --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -20,9 +20,7 @@ #define __ASM_X86_HVM_VCPU_H__ #include -#include #include -#include #include #include #include From patchwork Fri Mar 13 11:15:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436721 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C78C92C for ; Fri, 13 Mar 2020 11:16:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12F1F20749 for ; Fri, 13 Mar 2020 11:16:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12F1F20749 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiHo-00064q-1W; Fri, 13 Mar 2020 11:15:28 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiHm-00064e-1O for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:15:26 +0000 X-Inumbo-ID: efe7b510-651b-11ea-92cf-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id efe7b510-651b-11ea-92cf-bc764e2007e4; Fri, 13 Mar 2020 11:15:25 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B5AEBAAC7; Fri, 13 Mar 2020 11:15:24 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: Date: Fri, 13 Mar 2020 12:15:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 3/9] x86/HVM: reduce vpt.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop #include-s not needed by the header itself. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vpt.h +++ b/xen/include/asm-x86/hvm/vpt.h @@ -19,16 +19,9 @@ #ifndef __ASM_X86_HVM_VPT_H__ #define __ASM_X86_HVM_VPT_H__ -#include -#include -#include -#include -#include #include #include -#include -#include -#include +#include /* * Abstract layer of periodic time, one short time. @@ -145,6 +138,7 @@ struct pl_time { /* platform time */ void pt_save_timer(struct vcpu *v); void pt_restore_timer(struct vcpu *v); int pt_update_irq(struct vcpu *v); +struct hvm_intack; void pt_intr_post(struct vcpu *v, struct hvm_intack intack); void pt_migrate(struct vcpu *v); From patchwork Fri Mar 13 11:15:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436723 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA83692A for ; Fri, 13 Mar 2020 11:16:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0EB520749 for ; Fri, 13 Mar 2020 11:16:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0EB520749 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiIA-00069C-Ac; Fri, 13 Mar 2020 11:15:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiI9-000690-Ej for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:15:49 +0000 X-Inumbo-ID: fdde0ca0-651b-11ea-a6c1-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fdde0ca0-651b-11ea-a6c1-bc764e2007e4; Fri, 13 Mar 2020 11:15:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 56F16AC9A; Fri, 13 Mar 2020 11:15:48 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <99735c3a-2cc8-d552-7595-56ea6db25d18@suse.com> Date: Fri, 13 Mar 2020 12:15:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 4/9] x86/HVM: reduce vpic.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop an #include not needed by the header itself. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vpic.h +++ b/xen/include/asm-x86/hvm/vpic.h @@ -27,7 +27,8 @@ #ifndef __ASM_X86_HVM_VPIC_H__ #define __ASM_X86_HVM_VPIC_H__ -#include +struct domain; +struct vcpu; void vpic_irq_positive_edge(struct domain *d, int irq); void vpic_irq_negative_edge(struct domain *d, int irq); From patchwork Fri Mar 13 11:16:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436725 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FFFF92C for ; Fri, 13 Mar 2020 11:16:59 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 052802072C for ; Fri, 13 Mar 2020 11:16:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 052802072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiIT-0006DH-J1; Fri, 13 Mar 2020 11:16:09 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiIS-0006D4-CU for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:16:08 +0000 X-Inumbo-ID: 09075bb8-651c-11ea-b2c4-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 09075bb8-651c-11ea-b2c4-12813bfff9fa; Fri, 13 Mar 2020 11:16:07 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 15ACBAAC7; Fri, 13 Mar 2020 11:16:07 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <00ca439e-b6a6-160e-fc5d-8c51da2a0987@suse.com> Date: Fri, 13 Mar 2020 12:16:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 5/9] x86/HVM: reduce vioapic.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop an #include not needed by the header itself. While verifying the header (now) builds standalone, I noticed an omission in a public header which gets taken care of here as well. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vioapic.h +++ b/xen/include/asm-x86/hvm/vioapic.h @@ -25,7 +25,6 @@ #define __ASM_X86_HVM_VIOAPIC_H__ #include -#include #include #define VIOAPIC_VERSION_ID 0x11 /* IOAPIC version */ --- a/xen/include/public/arch-x86/hvm/save.h +++ b/xen/include/public/arch-x86/hvm/save.h @@ -26,6 +26,8 @@ #ifndef __XEN_PUBLIC_HVM_SAVE_X86_H__ #define __XEN_PUBLIC_HVM_SAVE_X86_H__ +#include "../../xen.h" + /* * Save/restore header: general info about the save file. */ From patchwork Fri Mar 13 11:16:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436727 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A5D192C for ; Fri, 13 Mar 2020 11:17:16 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 103F82072C for ; Fri, 13 Mar 2020 11:17:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 103F82072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiIl-0006IV-S6; Fri, 13 Mar 2020 11:16:27 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiIk-0006IG-TP for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:16:26 +0000 X-Inumbo-ID: 142936e3-651c-11ea-b2c4-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 142936e3-651c-11ea-b2c4-12813bfff9fa; Fri, 13 Mar 2020 11:16:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B9520AC9A; Fri, 13 Mar 2020 11:16:25 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <81c97480-ca7c-1a86-8fb4-c8308c7a9589@suse.com> Date: Fri, 13 Mar 2020 12:16:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 6/9] x86/HVM: reduce vlapic.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop #include-s not needed by the header itself. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/vlapic.h +++ b/xen/include/asm-x86/hvm/vlapic.h @@ -21,8 +21,6 @@ #define __ASM_X86_HVM_VLAPIC_H__ #include -#include -#include #include #define vcpu_vlapic(x) (&(x)->arch.hvm.vlapic) From patchwork Fri Mar 13 11:17:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436729 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 366C392A for ; Fri, 13 Mar 2020 11:18:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CBAE2072C for ; Fri, 13 Mar 2020 11:18:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CBAE2072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiJS-0006SR-62; Fri, 13 Mar 2020 11:17:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiJR-0006Rv-38 for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:17:09 +0000 X-Inumbo-ID: 2d51ef1a-651c-11ea-a6c1-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2d51ef1a-651c-11ea-a6c1-bc764e2007e4; Fri, 13 Mar 2020 11:17:08 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EDC52AAC7; Fri, 13 Mar 2020 11:17:07 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <675a13a0-9dd8-0df1-4f0c-7265d2b328cc@suse.com> Date: Fri, 13 Mar 2020 12:17:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 7/9] x86/HVM: reduce io.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop #include-s not needed by the header itself as well as one include of the header which isn't needed. Put the one needed into the file actually requiring it. Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian --- a/xen/include/asm-x86/hvm/io.h +++ b/xen/include/asm-x86/hvm/io.h @@ -19,12 +19,8 @@ #ifndef __ASM_X86_HVM_IO_H__ #define __ASM_X86_HVM_IO_H__ -#include #include -#include -#include #include -#include #define NR_IO_HANDLERS 32 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -26,6 +26,7 @@ #include #include #include +#include enum hvm_io_completion { HVMIO_no_completion, --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -18,8 +18,6 @@ #ifndef __ASM_X86_HVM_VMX_VMCS_H__ #define __ASM_X86_HVM_VMX_VMCS_H__ -#include - extern void vmcs_dump_vcpu(struct vcpu *v); extern void setup_vmcs_dump(void); extern int vmx_cpu_up_prepare(unsigned int cpu); From patchwork Fri Mar 13 11:17:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436731 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F47792C for ; Fri, 13 Mar 2020 11:18:47 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7484A2072C for ; Fri, 13 Mar 2020 11:18:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7484A2072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiJw-0006ZS-Jz; Fri, 13 Mar 2020 11:17:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiJv-0006ZE-Cu for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:17:39 +0000 X-Inumbo-ID: 3f5c2d7e-651c-11ea-92cf-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3f5c2d7e-651c-11ea-92cf-bc764e2007e4; Fri, 13 Mar 2020 11:17:38 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E471BAAC7; Fri, 13 Mar 2020 11:17:37 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <741ed63a-f100-d011-218c-74e4265cd3c3@suse.com> Date: Fri, 13 Mar 2020 12:17:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 8/9] x86/HVM: reduce hvm.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop #include-s not needed by the header itself, and add smaller scope ones instead. Put the ones needed into whichever other files actually need them. Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant Reviewed-by: Kevin Tian --- v2: Also make things build with PV_SHIM_EXCLUSIVE=y. --- a/xen/include/asm-x86/hvm/emulate.h +++ b/xen/include/asm-x86/hvm/emulate.h @@ -13,6 +13,7 @@ #define __ASM_X86_HVM_EMULATE_H__ #include +#include #include #include --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -20,12 +20,11 @@ #ifndef __ASM_X86_HVM_HVM_H__ #define __ASM_X86_HVM_HVM_H__ +#include +#include #include #include #include -#include -#include -#include #ifdef CONFIG_HVM_FEP /* Permit use of the Forced Emulation Prefix in HVM guests */ @@ -326,6 +325,7 @@ int hvm_debug_op(struct vcpu *v, int32_t void hvm_toggle_singlestep(struct vcpu *v); void hvm_fast_singlestep(struct vcpu *v, uint16_t p2midx); +struct npfec; int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla, struct npfec npfec); --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -18,6 +18,8 @@ #ifndef __ASM_X86_HVM_VMX_VMCS_H__ #define __ASM_X86_HVM_VMX_VMCS_H__ +#include + extern void vmcs_dump_vcpu(struct vcpu *v); extern void setup_vmcs_dump(void); extern int vmx_cpu_up_prepare(unsigned int cpu); --- a/xen/include/asm-x86/hvm/vpt.h +++ b/xen/include/asm-x86/hvm/vpt.h @@ -21,6 +21,7 @@ #include #include +#include #include /* From patchwork Fri Mar 13 11:18:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11436733 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9366692A for ; Fri, 13 Mar 2020 11:19:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A13C2072C for ; Fri, 13 Mar 2020 11:19:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A13C2072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiKT-0006gb-Ug; Fri, 13 Mar 2020 11:18:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiKS-0006gN-Ux for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:18:12 +0000 X-Inumbo-ID: 534cb4ac-651c-11ea-bec1-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 534cb4ac-651c-11ea-bec1-bc764e2007e4; Fri, 13 Mar 2020 11:18:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A99EFAC9A; Fri, 13 Mar 2020 11:18:11 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Message-ID: <77e1ded3-b69c-a089-62dd-623f6f89ea92@suse.com> Date: Fri, 13 Mar 2020 12:18:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9b64e44c-1050-4f64-1ead-86761f7b7fa2@suse.com> Content-Language: en-US Subject: [Xen-devel] [PATCH v3 9/9] x86: reduce mce.h include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drop the public header #include as not needed by the header itself. Add one that was missing, and move all inside the inclusion guard. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/mce.h +++ b/xen/include/asm-x86/mce.h @@ -1,8 +1,9 @@ -#include -#include #ifndef _XEN_X86_MCE_H #define _XEN_X86_MCE_H +#include +#include + /* * Emulate 2 banks for guest * Bank0: reserved for 'bank0 quirk' occur at some very old processors: @@ -32,6 +33,9 @@ struct vmce { struct vmce_bank bank[GUEST_MC_BANK_NUM]; }; +struct domain; +struct vcpu; + /* Guest vMCE MSRs virtualization */ extern void vmce_init_vcpu(struct vcpu *); extern int vmce_restore_vcpu(struct vcpu *, const struct hvm_vmce_vcpu *);