From patchwork Fri Jan 31 16:42:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11360273 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 111F0139A for ; Fri, 31 Jan 2020 16:43:44 +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 EA9E8206F0 for ; Fri, 31 Jan 2020 16:43:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA9E8206F0 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 1ixZNC-0008BX-UH; Fri, 31 Jan 2020 16:42:26 +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 1ixZNC-0008BS-3O for xen-devel@lists.xenproject.org; Fri, 31 Jan 2020 16:42:26 +0000 X-Inumbo-ID: a88dd706-4448-11ea-8bec-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a88dd706-4448-11ea-8bec-12813bfff9fa; Fri, 31 Jan 2020 16:42: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 B5565AD3C; Fri, 31 Jan 2020 16:42:23 +0000 (UTC) From: Jan Beulich To: "xen-devel@lists.xenproject.org" References: Message-ID: Date: Fri, 31 Jan 2020 17:42:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Subject: [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h 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 , Kevin Tian , Tamas K Lengyel , Wei Liu , Paul Durrant , George Dunlap , Andrew Cooper , Tim Deegan , Jun Nakajima , Alexandru Isaila , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" It's not needed there and introduces a needless, almost global dependency. Include the file (or in some cases just xen/err.h) where actually needed, or - in one case - simply forward-declare a struct. In microcode*.c take the opportunity and also re-order a few other #include-s. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Reviewed-by: Alexandru Isaila Reviewed-by: Paul Durrant Reviewed-by: Kevin Tian --- v4: New. --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include --- a/xen/arch/x86/hvm/svm/emulate.c +++ b/xen/arch/x86/hvm/svm/emulate.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include --- a/xen/arch/x86/hvm/vm_event.c +++ b/xen/arch/x86/hvm/vm_event.c @@ -22,6 +22,7 @@ #include #include +#include #include #include --- a/xen/arch/x86/microcode.c +++ b/xen/arch/x86/microcode.c @@ -22,9 +22,10 @@ */ #include -#include -#include +#include #include +#include +#include #include #include #include --- a/xen/arch/x86/microcode_amd.c +++ b/xen/arch/x86/microcode_amd.c @@ -14,9 +14,10 @@ * License version 2. See file COPYING for details. */ -#include -#include +#include #include +#include +#include #include #include #include --- a/xen/arch/x86/microcode_intel.c +++ b/xen/arch/x86/microcode_intel.c @@ -21,9 +21,10 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include +#include #include +#include +#include #include #include #include --- a/xen/arch/x86/mm/shadow/hvm.c +++ b/xen/arch/x86/mm/shadow/hvm.c @@ -28,6 +28,7 @@ #include #include +#include #include #include "private.h" --- a/xen/arch/x86/pv/emul-gate-op.c +++ b/xen/arch/x86/pv/emul-gate-op.c @@ -19,6 +19,7 @@ * along with this program; If not, see . */ +#include #include #include #include --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -20,8 +20,6 @@ #define __ASM_X86_HVM_SVM_VMCB_H__ #include -#include - /* general 1 intercepts */ enum GenericIntercept1bits --- a/xen/include/asm-x86/hvm/vmx/vmx.h +++ b/xen/include/asm-x86/hvm/vmx/vmx.h @@ -97,6 +97,7 @@ void vmx_asm_do_vmentry(void); void vmx_intr_assist(void); void noreturn vmx_do_resume(struct vcpu *); void vmx_vlapic_msr_changed(struct vcpu *v); +struct hvm_emulate_ctxt; void vmx_realmode_emulate_one(struct hvm_emulate_ctxt *hvmemul_ctxt); void vmx_realmode(struct cpu_user_regs *regs); void vmx_update_debug_state(struct vcpu *v);