[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h



> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of Jan
> Beulich
> Sent: 31 January 2020 16:42
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>; Kevin Tian
> <kevin.tian@xxxxxxxxx>; Tamas K Lengyel <tamas@xxxxxxxxxxxxx>; Wei Liu
> <wl@xxxxxxx>; Paul Durrant <paul@xxxxxxx>; George Dunlap
> <George.Dunlap@xxxxxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>;
> Tim Deegan <tim@xxxxxxx>; Jun Nakajima <jun.nakajima@xxxxxxxxx>; Alexandru
> Isaila <aisaila@xxxxxxxxxxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Subject: [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion
> from vmcb.h
> 
> 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 <jbeulich@xxxxxxxx>

Reviewed-by: Paul Durrant <pdurrant@xxxxxxxxxx>

> ---
> v4: New.
> 
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -55,6 +55,7 @@
>  #include <asm/mc146818rtc.h>
>  #include <asm/mce.h>
>  #include <asm/monitor.h>
> +#include <asm/hvm/emulate.h>
>  #include <asm/hvm/hvm.h>
>  #include <asm/hvm/vpt.h>
>  #include <asm/hvm/support.h>
> --- a/xen/arch/x86/hvm/ioreq.c
> +++ b/xen/arch/x86/hvm/ioreq.c
> @@ -28,6 +28,7 @@
>  #include <xen/paging.h>
>  #include <xen/vpci.h>
> 
> +#include <asm/hvm/emulate.h>
>  #include <asm/hvm/hvm.h>
>  #include <asm/hvm/ioreq.h>
>  #include <asm/hvm/vmx/vmx.h>
> --- a/xen/arch/x86/hvm/svm/emulate.c
> +++ b/xen/arch/x86/hvm/svm/emulate.c
> @@ -20,6 +20,7 @@
>  #include <xen/lib.h>
>  #include <xen/trace.h>
>  #include <asm/msr.h>
> +#include <asm/hvm/emulate.h>
>  #include <asm/hvm/hvm.h>
>  #include <asm/hvm/support.h>
>  #include <asm/hvm/svm/svm.h>
> --- a/xen/arch/x86/hvm/vm_event.c
> +++ b/xen/arch/x86/hvm/vm_event.c
> @@ -22,6 +22,7 @@
> 
>  #include <xen/sched.h>
>  #include <xen/vm_event.h>
> +#include <asm/hvm/emulate.h>
>  #include <asm/hvm/support.h>
>  #include <asm/vm_event.h>
> 
> --- a/xen/arch/x86/microcode.c
> +++ b/xen/arch/x86/microcode.c
> @@ -22,9 +22,10 @@
>   */
> 
>  #include <xen/cpu.h>
> -#include <xen/lib.h>
> -#include <xen/kernel.h>
> +#include <xen/err.h>
>  #include <xen/init.h>
> +#include <xen/kernel.h>
> +#include <xen/lib.h>
>  #include <xen/notifier.h>
>  #include <xen/sched.h>
>  #include <xen/smp.h>
> --- 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 <xen/lib.h>
> -#include <xen/kernel.h>
> +#include <xen/err.h>
>  #include <xen/init.h>
> +#include <xen/kernel.h>
> +#include <xen/lib.h>
>  #include <xen/sched.h>
>  #include <xen/smp.h>
>  #include <xen/spinlock.h>
> --- 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 <xen/lib.h>
> -#include <xen/kernel.h>
> +#include <xen/err.h>
>  #include <xen/init.h>
> +#include <xen/kernel.h>
> +#include <xen/lib.h>
>  #include <xen/sched.h>
>  #include <xen/smp.h>
>  #include <xen/spinlock.h>
> --- a/xen/arch/x86/mm/shadow/hvm.c
> +++ b/xen/arch/x86/mm/shadow/hvm.c
> @@ -28,6 +28,7 @@
>  #include <xen/trace.h>
> 
>  #include <asm/current.h>
> +#include <asm/hvm/emulate.h>
>  #include <asm/shadow.h>
> 
>  #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 <http://www.gnu.org/licenses/>.
>   */
> 
> +#include <xen/err.h>
>  #include <xen/errno.h>
>  #include <xen/event.h>
>  #include <xen/guest_access.h>
> --- 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 <xen/types.h>
> -#include <asm/hvm/emulate.h>
> -
> 
>  /* 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);
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.