Message ID | 20230222120023.3004624-5-burzalodowa@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/hvm: {svm,vmx}.{c,h} cleanup | expand |
On 22.02.2023 13:00, Xenia Ragiadakou wrote: > Do not include the headers: > asm/i387.h > asm/hvm/trace.h > asm/processor.h > asm/regs.h > because none of the declarations and macro definitions in them is used in > this file. Sort the rest of the headers alphabetically. > Fix build by including asm/i387.h in vmx.c, needed for vcpu_restore_fpu_lazy(). Nit: You don't really "fix" the build, you keep it working. > Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> In principle Reviewed-by: Jan Beulich <jbeulich@suse.com> but ... > --- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h > +++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h > @@ -19,14 +19,11 @@ > #define __ASM_X86_HVM_VMX_VMX_H__ > > #include <xen/sched.h> > -#include <asm/types.h> > -#include <asm/regs.h> > + > #include <asm/asm_defns.h> > -#include <asm/processor.h> > -#include <asm/p2m.h> > -#include <asm/i387.h> > -#include <asm/hvm/trace.h> > #include <asm/hvm/vmx/vmcs.h> > +#include <asm/p2m.h> > +#include <asm/types.h> ... can this please become xen/types.h (and move up accordingly), so things won't break here when my further work in that area lands? Jan
On 2/23/23 12:29, Jan Beulich wrote: > On 22.02.2023 13:00, Xenia Ragiadakou wrote: >> Do not include the headers: >> asm/i387.h >> asm/hvm/trace.h >> asm/processor.h >> asm/regs.h >> because none of the declarations and macro definitions in them is used in >> this file. Sort the rest of the headers alphabetically. >> Fix build by including asm/i387.h in vmx.c, needed for vcpu_restore_fpu_lazy(). > > Nit: You don't really "fix" the build, you keep it working. Ok I will rephrase it in v3. > >> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> > > In principle > Reviewed-by: Jan Beulich <jbeulich@suse.com> > but ... > >> --- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h >> +++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h >> @@ -19,14 +19,11 @@ >> #define __ASM_X86_HVM_VMX_VMX_H__ >> >> #include <xen/sched.h> >> -#include <asm/types.h> >> -#include <asm/regs.h> >> + >> #include <asm/asm_defns.h> >> -#include <asm/processor.h> >> -#include <asm/p2m.h> >> -#include <asm/i387.h> >> -#include <asm/hvm/trace.h> >> #include <asm/hvm/vmx/vmcs.h> >> +#include <asm/p2m.h> >> +#include <asm/types.h> > > ... can this please become xen/types.h (and move up accordingly), so > things won't break here when my further work in that area lands? Sure. > > Jan
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 0ec33bcc18..a0297e8c6c 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -43,6 +43,7 @@ #include <asm/hvm/vmx/vmcs.h> #include <public/sched.h> #include <public/hvm/ioreq.h> +#include <asm/i387.h> #include <asm/hvm/vpic.h> #include <asm/hvm/vlapic.h> #include <asm/x86_emulate.h> diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h index 97d6b810ec..c0ca6d10e3 100644 --- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h +++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h @@ -19,14 +19,11 @@ #define __ASM_X86_HVM_VMX_VMX_H__ #include <xen/sched.h> -#include <asm/types.h> -#include <asm/regs.h> + #include <asm/asm_defns.h> -#include <asm/processor.h> -#include <asm/p2m.h> -#include <asm/i387.h> -#include <asm/hvm/trace.h> #include <asm/hvm/vmx/vmcs.h> +#include <asm/p2m.h> +#include <asm/types.h> extern int8_t opt_ept_exec_sp;
Do not include the headers: asm/i387.h asm/hvm/trace.h asm/processor.h asm/regs.h because none of the declarations and macro definitions in them is used in this file. Sort the rest of the headers alphabetically. Fix build by including asm/i387.h in vmx.c, needed for vcpu_restore_fpu_lazy(). Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> --- Changes in v2: -add a blank line between different types of headers, reported by Andrew -fix english in commit message, reported by Andrew xen/arch/x86/hvm/vmx/vmx.c | 1 + xen/arch/x86/include/asm/hvm/vmx/vmx.h | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-)