diff mbox series

[v2,3/4] xen: Drop includes of xen/hvm/params.h

Message ID 20190618112341.513-4-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series Fix build of Xen support + cleanup | expand

Commit Message

Anthony PERARD June 18, 2019, 11:23 a.m. UTC
xen-mapcache.c doesn't needs params.h.

xen-hvm.c uses defines available in params.h but so is xen_common.h
which is included before. HVM_PARAM_* flags are only needed to make
xc_hvm_param_{get,set} calls so including only xenctrl.h, which is
where the definition the function is, should be enough.
(xenctrl.h does include params.h)

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    v2:
    - new patch replacing "xen: Import Xen public headers used by xen-hvm.c"
    - only drop includes of params.h, and don't import the other two;
    ioreq.h is an interface with Xen; e820.h is just used by QEMU to figure
    out the guest memory layout without proper communication with the Xen
    toolstacks or something like that.

 hw/i386/xen/xen-hvm.c      | 1 -
 hw/i386/xen/xen-mapcache.c | 2 --
 2 files changed, 3 deletions(-)

Comments

Paul Durrant June 18, 2019, 11:51 a.m. UTC | #1
> -----Original Message-----
> From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> Sent: 18 June 2019 12:24
> To: qemu-devel@nongnu.org
> Cc: Anthony Perard <anthony.perard@citrix.com>; Paul Durrant <Paul.Durrant@citrix.com>; Stefano
> Stabellini <sstabellini@kernel.org>; xen-devel@lists.xenproject.org
> Subject: [PATCH v2 3/4] xen: Drop includes of xen/hvm/params.h
> 
> xen-mapcache.c doesn't needs params.h.
> 
> xen-hvm.c uses defines available in params.h but so is xen_common.h
> which is included before. HVM_PARAM_* flags are only needed to make
> xc_hvm_param_{get,set} calls so including only xenctrl.h, which is
> where the definition the function is, should be enough.
> (xenctrl.h does include params.h)
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
diff mbox series

Patch

diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 2939122e7c..ae3deb4ef3 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -27,7 +27,6 @@ 
 #include "exec/address-spaces.h"
 
 #include <xen/hvm/ioreq.h>
-#include <xen/hvm/params.h>
 #include <xen/hvm/e820.h>
 
 //#define DEBUG_XEN_HVM
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c
index 254759f776..dc73c86c61 100644
--- a/hw/i386/xen/xen-mapcache.c
+++ b/hw/i386/xen/xen-mapcache.c
@@ -17,8 +17,6 @@ 
 #include "hw/xen/xen-legacy-backend.h"
 #include "qemu/bitmap.h"
 
-#include <xen/hvm/params.h>
-
 #include "sysemu/xen-mapcache.h"
 #include "trace.h"