Skip to contentSkip to conversation

tools/libs: merge xenctrl_dom.h into xenguest.h

PATCH Superseded Juergen Gross 2 participants 3 messages Sep 9, 2020 Arm/actions semi architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/libs: merge xenctrl_dom.h into xenguest.h

Today xenctrl_dom.h is part of libxenctrl as it is included by xc_private.c. This seems not to be needed, so merge xenctrl_dom.h into xenguest.h where its contents really should be.

Replace all #includes of xenctrl_dom.h by xenguest.h ones or drop them if xenguest.h is already included.

---
To be applied on top of my "tools: move most libraries into tools/libs" series.

---
 stubdom/grub/kexec.c                        |   2 +-
 tools/helpers/init-xenstore-domain.c        |   2 +-
 tools/libs/ctrl/Makefile                    |   2 +-
 tools/libs/ctrl/include/xenctrl_dom.h       | 455 --------------------
 tools/libs/ctrl/xc_private.c                |   1 -
 tools/libs/guest/include/xenguest.h         | 426 +++++++++++++++++-
 tools/libs/guest/xg_dom_arm.c               |   1 -
 tools/libs/guest/xg_dom_armzimageloader.c   |   1 -
 tools/libs/guest/xg_dom_binloader.c         |   1 -
 tools/libs/guest/xg_dom_boot.c              |   1 -
 tools/libs/guest/xg_dom_compat_linux.c      |   1 -
 tools/libs/guest/xg_dom_core.c              |   1 -
 tools/libs/guest/xg_dom_decompress.h        |   4 +-
 tools/libs/guest/xg_dom_decompress_unsafe.h |   2 -
 tools/libs/guest/xg_dom_elfloader.c         |   1 -
 tools/libs/guest/xg_dom_hvmloader.c         |   1 -
 tools/libs/guest/xg_dom_x86.c               |   1 -
 tools/libs/guest/xg_offline_page.c          |   1 -
 tools/libs/guest/xg_sr_common.h             |   1 -
 tools/libs/light/libxl_arm.c                |   1 -
 tools/libs/light/libxl_arm.h                |   2 -
 tools/libs/light/libxl_create.c             |   1 -
 tools/libs/light/libxl_dm.c                 |   1 -
 tools/libs/light/libxl_dom.c                |   1 -
 tools/libs/light/libxl_internal.h           |   1 -
 tools/libs/light/libxl_vnuma.c              |   2 -
 tools/libs/light/libxl_x86.c                |   2 -
 tools/libs/light/libxl_x86_acpi.c           |   2 -
 tools/python/xen/lowlevel/xc/xc.c           |   2 +-
 29 files changed, 430 insertions(+), 490 deletions(-)
 delete mode 100644 tools/libs/ctrl/include/xenctrl_dom.h
stubdom/grub/kexec.c +1 -1
index 24001220a9..e9a69d2a32 100644
@@ -20,7 +20,7 @@
 #include <sys/mman.h>
 
 #include <xenctrl.h>
-#include <xenctrl_dom.h>
+#include <xenguest.h>
 
 #include <kernel.h>
 #include <console.h>
tools/helpers/init-xenstore-domain.c +1 -1
index 5bdb48dc80..bcaa0e6fa9 100644
@@ -8,7 +8,7 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <xenctrl.h>
-#include <xenctrl_dom.h>
+#include <xenguest.h>
 #include <xenstore.h>
 #include <xen/sys/xenbus_dev.h>
 #include <xen-xsm/flask/flask.h>
tools/libs/ctrl/Makefile +1 -1
index ec93fb5b73..0071226d2a 100644
@@ -49,7 +49,7 @@ CFLAGS += -include $(XEN_ROOT)/tools/config.h
 # Needed for posix_fadvise64() in xc_linux.c
 CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
 
-LIBHEADER := xenctrl.h xenctrl_compat.h xenctrl_dom.h
+LIBHEADER := xenctrl.h xenctrl_compat.h
 PKG_CONFIG := xencontrol.pc
 PKG_CONFIG_NAME := Xencontrol
 
tools/libs/ctrl/include/xenctrl_dom.h deleted +0 -455

455 lines not on this page · raw message

tools/libs/ctrl/xc_private.c +0 -1
index 8af96b1b7e..ef3ef53fbd 100644
@@ -18,7 +18,6 @@
  */
 
 #include "xc_private.h"
-#include "xenctrl_dom.h"
 #include <stdarg.h>
 #include <stdlib.h>
 #include <unistd.h>
tools/libs/guest/include/xenguest.h +425 -1

438 lines not on this page · raw message

tools/libs/guest/xg_dom_arm.c +0 -1
index 3f66f1d890..615fc109b9 100644
@@ -24,7 +24,6 @@
 #include <xen-tools/libs.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 
 #define NR_MAGIC_PAGES 4
 #define CONSOLE_PFN_OFFSET 0
tools/libs/guest/xg_dom_armzimageloader.c +0 -1
index 4246c8e5fa..ec42036ad2 100644
@@ -25,7 +25,6 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 
 #include <arpa/inet.h> /* XXX ntohl is not the right function... */
 
tools/libs/guest/xg_dom_binloader.c +0 -1
index 870a921427..ccc23b388f 100644
@@ -83,7 +83,6 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 
 #define round_pgup(_p)    (((_p)+(PAGE_SIZE_X86-1))&PAGE_MASK_X86)
 #define round_pgdown(_p)  ((_p)&PAGE_MASK_X86)
tools/libs/guest/xg_dom_boot.c +0 -1
index 1e31e92244..827f1ffccd 100644
@@ -31,7 +31,6 @@
 #include <zlib.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 #include "xc_core.h"
 #include <xen/hvm/params.h>
 #include <xen/grant_table.h>
tools/libs/guest/xg_dom_compat_linux.c +0 -1
index b645f0b14b..a0d9c7a04e 100644
@@ -30,7 +30,6 @@
 
 #include "xenctrl.h"
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 
 /* ------------------------------------------------------------------------ */
 
tools/libs/guest/xg_dom_core.c +0 -1
index 1c91cce315..c0d4a0aa2f 100644
@@ -32,7 +32,6 @@
 #include <assert.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 #include "_paths.h"
 
 /* ------------------------------------------------------------------------ */
tools/libs/guest/xg_dom_decompress.h +1 -3
index c5ab2e59eb..d7a45f730d 100644
@@ -1,6 +1,4 @@
-#ifndef __MINIOS__
-# include "xenctrl_dom.h"
-#else
+#ifdef __MINIOS__
 # include "xg_dom_decompress_unsafe.h"
 #endif
 
tools/libs/guest/xg_dom_decompress_unsafe.h +0 -2
index fb84b6add8..5dc18c896e 100644
@@ -1,5 +1,3 @@
-#include "xenctrl_dom.h"
-
 typedef int decompress_fn(unsigned char *inbuf, unsigned int len,
                           int (*fill)(void*, unsigned int),
                           int (*flush)(void*, unsigned int),
tools/libs/guest/xg_dom_elfloader.c +0 -1
index 7043c3bbba..851930f039 100644
@@ -26,7 +26,6 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 #include "xc_bitops.h"
 
 #define XEN_VER "xen-3.0"
tools/libs/guest/xg_dom_hvmloader.c +0 -1
index 995a0f3dc3..f3deedec41 100644
@@ -26,7 +26,6 @@
 #include <assert.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 #include "xc_bitops.h"
 
 /* ------------------------------------------------------------------------ */
tools/libs/guest/xg_dom_x86.c +0 -1
index 842dbcccdd..876802e2ed 100644
@@ -38,7 +38,6 @@
 #include <xen-tools/libs.h>
 
 #include "xg_private.h"
-#include "xenctrl_dom.h"
 #include "xenctrl.h"
 
 /* ------------------------------------------------------------------------ */
tools/libs/guest/xg_offline_page.c +0 -1
index 77e8889b11..d4722f0e8c 100644
@@ -28,7 +28,6 @@
 #include <xc_core.h>
 
 #include "xc_private.h"
-#include "xenctrl_dom.h"
 #include "xg_private.h"
 #include "xg_save_restore.h"
 
tools/libs/guest/xg_sr_common.h +0 -1
index 13fcc47420..cc3ad1c394 100644
@@ -5,7 +5,6 @@
 
 #include "xg_private.h"
 #include "xg_save_restore.h"
-#include "xenctrl_dom.h"
 #include "xc_bitops.h"
 
 #include "xg_sr_stream_format.h"
tools/libs/light/libxl_arm.c +0 -1
index 975a4d730a..66e8a065fe 100644
@@ -3,7 +3,6 @@
 #include "libxl_libfdt_compat.h"
 #include "libxl_arm.h"
 
-#include <xenctrl_dom.h>
 #include <stdbool.h>
 #include <libfdt.h>
 #include <assert.h>
tools/libs/light/libxl_arm.h +0 -2
index 52c2ab5e3a..4feca217ee 100644
@@ -17,8 +17,6 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xenctrl_dom.h>
-
 _hidden
 int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
                         struct xc_dom_image *dom);
tools/libs/light/libxl_create.c +0 -1
index 1031b75159..9a6e92b3a5 100644
@@ -20,7 +20,6 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xenctrl_dom.h>
 #include <xenguest.h>
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/e820.h>
tools/libs/light/libxl_dm.c +0 -1
index fec4e0fbe5..a944181781 100644
@@ -19,7 +19,6 @@
 
 #include "libxl_internal.h"
 
-#include <xenctrl_dom.h>
 #include <xen/hvm/e820.h>
 #include <sys/types.h>
 #include <pwd.h>
tools/libs/light/libxl_dom.c +0 -1
index e2dca64aa1..12647b169b 100644
@@ -20,7 +20,6 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xenctrl_dom.h>
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/hvm_xs_strings.h>
 #include <xen/hvm/e820.h>
tools/libs/light/libxl_internal.h +0 -1
index e16ae9630b..2b69b8e9d9 100644
@@ -57,7 +57,6 @@
 #include <xenctrl.h>
 #include <xenguest.h>
 #include <xenhypfs.h>
-#include <xenctrl_dom.h>
 
 #include <xen-tools/libs.h>
 
tools/libs/light/libxl_vnuma.c +0 -2
index c2e144ceae..d181574782 100644
@@ -17,8 +17,6 @@
 #include "libxl_arch.h"
 #include <stdlib.h>
 
-#include <xenctrl_dom.h>
-
 bool libxl__vnuma_configured(const libxl_domain_build_info *b_info)
 {
     return b_info->num_vnuma_nodes != 0;
tools/libs/light/libxl_x86.c +0 -2
index 7d95506e00..6ec6c27c83 100644
@@ -1,8 +1,6 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xenctrl_dom.h>
-
 int libxl__arch_domain_prepare_config(libxl__gc *gc,
                                       libxl_domain_config *d_config,
                                       struct xen_domctl_createdomain *config)
tools/libs/light/libxl_x86_acpi.c +0 -2
index 3df86c7be5..1a4e9e98de 100644
@@ -18,8 +18,6 @@
 #include <xen/hvm/e820.h>
 #include "libacpi/libacpi.h"
 
-#include <xenctrl_dom.h>
-
  /* Number of pages holding ACPI tables */
 #define NUM_ACPI_PAGES 16
 
tools/python/xen/lowlevel/xc/xc.c +1 -1
index 8c7b184f0b..4f97ec28c7 100644
@@ -7,6 +7,7 @@
 #include <Python.h>
 #define XC_WANT_COMPAT_MAP_FOREIGN_API
 #include <xenctrl.h>
+#include <xenguest.h>
 #include <fcntl.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
@@ -17,7 +18,6 @@
 #include <arpa/inet.h>
 
 #include <xen/elfnote.h>
-#include "xenctrl_dom.h"
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/params.h>
 
Signature · 1 line
2.26.2
#1 lore raw
Quoted 3 lines · Juergen Gross

+++ b/tools/libs/guest/include/xenguest.h

+#include <xen/libelf/libelf.h>

In case this file will be installed via make install:

Does any of the pending patches create that file?

Olaf

#2 lore raw
Quoted 9 lines · Olaf Hering
Quoted 3 lines · Juergen Gross

+++ b/tools/libs/guest/include/xenguest.h

+#include <xen/libelf/libelf.h>

In case this file will be installed via make install:

Does any of the pending patches create that file?

No. This include was in xenctrl_dom.h previously and has just been moved to xenguest.h.

Juergen