Skip to contentSkip to conversation

tools: move most libraries into tools/libs

PATCH Superseded Juergen Gross 2 participants 48 messages Aug 28, 2020 – Oct 1, 2020 Arm/actions semi architecture

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover tools: move most libraries into tools/libs

Move most remaining libraries under tools/libs, including libxenctrl and libxl. This is resulting in a lot of cleanup work regarding building libs and restructuring of the tools directory.

After this huge cleanup all dependencies between libraries are defined in a single rather small file tools/libs/uselibs.mk, which is used to create the needed make variables and to control the stubdom build dependencies as well.

Another bonus of the rework is the automation of setting the versions of unstable libraries. This removes the need to bump those versions manually for each Xen release.

libfsimage is not moved by this series, as IMO there are some open questions:
- should it really be unstable?
- is the support of adding external fs-support used in practice, i.e. shouldn't the fs-specific sub-libraries be just included into libfsimage instead of being loaded dynamically?

The complete series is available via:

git://xenbits.xen.org/people/jgross/xen.git libbuild-v4

Changes in V4:
- removed already applied patches (1-8, 10)
- added new patches 1, 29
- replaced (old) patch 37 with new patch 30
- especially fixed qemu build and parallel make
- rebased to current staging

Changes in V3:
- more cleanup added
- added moving libxenguest, libxl and libxlutil
- split out dependencies into uselibs.mk
- use uselibs.mk for stubdoms build

Juergen Gross (31):
tools: generate pkg-config files from make variables
tools: drop explicit path specifications for qemu build tools/python: drop libxenguest from setup.py
tools: fix pkg-config file for libxenguest
tools: don't assume libxenguest and libxenctrl to be in same directory tools/misc: don't use libxenctrl internals from xen-hptool tools/misc: don't include xg_save_restore.h from xen-mfndump.c tools/misc: replace PAGE_SIZE with XC_PAGE_SIZE in xen-mfndump.c tools/misc: drop all libxc internals from xen-mfndump.c tools/libxc: remove unused headers xc_efi.h and xc_elf.h tools/libxc: move xc_[un]map_domain_meminfo() into new source
xg_domain.c
tools/libxc: rename all libxenguest sources to xg_* tools/libxc: rename libxenguest internal headers tools/misc: rename xc_dom.h do xenctrl_dom.h
tools/libxc: untangle libxenctrl from libxenguest tools/xcutils: use official headers in readnotes tools/xenpaging: remove libxc internals
tools: move libxenctrl below tools/libs
tools/libxc: move libxenguest to tools/libs/guest
tools: split libxenstore into new tools/libs/store directory
tools: split libxenvchan into new tools/libs/vchan directory
tools: split libxenstat into new tools/libs/stat directory tools/libxl: fix dependencies of libxl tests
tools/libxl: don't include libxl_osdeps.h from libxlutil sources tools/libxl: add missing items to clean target tools/libxl: move xl parsing checks to tools/xl
tools/xl: don't assume libxl and libxlutil are in one directory tools/libxl: move libxenlight to tools/libs/light
tools: rename global libxlutil make variables
tools/libs: add option for library names not starting with libxen
tools: move libxlutil to tools/libs/util

 .gitignore                                    |  74 ++--
 MAINTAINERS                                   |   2 +-
 stubdom/Makefile                              |  36 +-
 stubdom/grub/Makefile                         |   4 +-
 stubdom/grub/kexec.c                          |   2 +-
 stubdom/mini-os.mk                            |   6 +-
 tools/Makefile                                |  34 +-
 tools/Rules.mk                                | 102 ++---
 tools/configure                               |   2 +-
 tools/configure.ac                            |   2 +-
 tools/helpers/init-xenstore-domain.c          |   2 +-
 tools/libs/Makefile                           |   7 +
 tools/libs/call/xencall.pc.in                 |  10 -
 tools/libs/ctrl/Makefile                      |  72 ++++
 tools/{libxc => libs/ctrl}/include/xenctrl.h  |   0
 .../ctrl}/include/xenctrl_compat.h            |   0
 .../ctrl/include/xenctrl_dom.h}               |  10 +-
 tools/{libxc => libs/ctrl}/xc_altp2m.c        |   0
 tools/{libxc => libs/ctrl}/xc_arinc653.c      |   0
 tools/{libxc => libs/ctrl}/xc_bitops.h        |   0
 tools/{libxc => libs/ctrl}/xc_core.c          |   5 +-
 tools/{libxc => libs/ctrl}/xc_core.h          |   2 +-
 tools/{libxc => libs/ctrl}/xc_core_arm.c      |   2 +-
 tools/{libxc => libs/ctrl}/xc_core_arm.h      |   0
 tools/{libxc => libs/ctrl}/xc_core_x86.c      |   6 +-
 tools/{libxc => libs/ctrl}/xc_core_x86.h      |   0
 tools/{libxc => libs/ctrl}/xc_cpu_hotplug.c   |   0
 tools/{libxc => libs/ctrl}/xc_cpupool.c       |   0
 tools/{libxc => libs/ctrl}/xc_csched.c        |   0
 tools/{libxc => libs/ctrl}/xc_csched2.c       |   0
 .../ctrl}/xc_devicemodel_compat.c             |   0
 tools/{libxc => libs/ctrl}/xc_domain.c        | 129 +-----
 tools/{libxc => libs/ctrl}/xc_evtchn.c        |   0
 tools/{libxc => libs/ctrl}/xc_evtchn_compat.c |   0
 tools/{libxc => libs/ctrl}/xc_flask.c         |   0
 .../{libxc => libs/ctrl}/xc_foreign_memory.c  |   0
 tools/{libxc => libs/ctrl}/xc_freebsd.c       |   0
 tools/{libxc => libs/ctrl}/xc_gnttab.c        |   0
 tools/{libxc => libs/ctrl}/xc_gnttab_compat.c |   0
 tools/{libxc => libs/ctrl}/xc_hcall_buf.c     |   1 -
 tools/{libxc => libs/ctrl}/xc_kexec.c         |   0
 tools/{libxc => libs/ctrl}/xc_linux.c         |   0
 tools/{libxc => libs/ctrl}/xc_mem_access.c    |   0
 tools/{libxc => libs/ctrl}/xc_mem_paging.c    |   0
 tools/{libxc => libs/ctrl}/xc_memshr.c        |   0
 tools/{libxc => libs/ctrl}/xc_minios.c        |   0
 tools/{libxc => libs/ctrl}/xc_misc.c          |   0
 tools/{libxc => libs/ctrl}/xc_monitor.c       |   0
 tools/{libxc => libs/ctrl}/xc_msr_x86.h       |   0
 tools/{libxc => libs/ctrl}/xc_netbsd.c        |   0
 tools/{libxc => libs/ctrl}/xc_pagetab.c       |   0
 tools/{libxc => libs/ctrl}/xc_physdev.c       |   0
 tools/{libxc => libs/ctrl}/xc_pm.c            |   0
 tools/{libxc => libs/ctrl}/xc_private.c       |   3 +-
 tools/{libxc => libs/ctrl}/xc_private.h       |  36 ++
 tools/{libxc => libs/ctrl}/xc_psr.c           |   0
 tools/{libxc => libs/ctrl}/xc_resource.c      |   0
 tools/{libxc => libs/ctrl}/xc_resume.c        |   2 -
 tools/{libxc => libs/ctrl}/xc_rt.c            |   0
 tools/{libxc => libs/ctrl}/xc_solaris.c       |   0
 tools/{libxc => libs/ctrl}/xc_tbuf.c          |   0
 tools/{libxc => libs/ctrl}/xc_vm_event.c      |   0
 tools/libs/devicemodel/xendevicemodel.pc.in   |  10 -
 tools/libs/evtchn/xenevtchn.pc.in             |  10 -
 .../libs/foreignmemory/xenforeignmemory.pc.in |  10 -
 tools/libs/gnttab/xengnttab.pc.in             |  10 -
 tools/{libxc => libs/guest}/COPYING           |   0
 tools/libs/guest/Makefile                     | 121 ++++++
 .../{libxc => libs/guest}/include/xenguest.h  |   8 +-
 .../guest/xg_cpuid_x86.c}                     |   0
 .../xc_dom_arm.c => libs/guest/xg_dom_arm.c}  |   2 +-
 .../guest/xg_dom_armzimageloader.c}           |   2 +-
 .../guest/xg_dom_binloader.c}                 |   2 +-
 .../guest/xg_dom_boot.c}                      |   2 +-
 .../guest/xg_dom_bzimageloader.c}             |   2 +-
 .../guest/xg_dom_compat_linux.c}              |   2 +-
 .../guest/xg_dom_core.c}                      |   2 +-
 .../guest/xg_dom_decompress.h}                |   4 +-
 .../guest/xg_dom_decompress_lz4.c}            |   2 +-
 .../guest/xg_dom_decompress_unsafe.c}         |   2 +-
 .../guest/xg_dom_decompress_unsafe.h}         |   2 +-
 .../guest/xg_dom_decompress_unsafe_bzip2.c}   |   2 +-
 .../guest/xg_dom_decompress_unsafe_lzma.c}    |   2 +-
 .../guest/xg_dom_decompress_unsafe_lzo1x.c}   |   2 +-
 .../guest/xg_dom_decompress_unsafe_xz.c}      |   2 +-
 .../guest/xg_dom_elfloader.c}                 |   2 +-
 .../guest/xg_dom_hvmloader.c}                 |   2 +-
 .../xc_dom_x86.c => libs/guest/xg_dom_x86.c}  |   2 +-
 tools/libs/guest/xg_domain.c                  | 149 +++++++
 .../guest/xg_nomigrate.c}                     |   0
 .../guest/xg_offline_page.c}                  |   2 +-
 tools/{libxc => libs/guest}/xg_private.c      |   0
 tools/{libxc => libs/guest}/xg_private.h      |  22 -
 tools/{libxc => libs/guest}/xg_save_restore.h |  13 -
 .../guest/xg_sr_common.c}                     |   2 +-
 .../guest/xg_sr_common.h}                     |   4 +-
 .../guest/xg_sr_common_x86.c}                 |   2 +-
 .../guest/xg_sr_common_x86.h}                 |   2 +-
 .../guest/xg_sr_common_x86_pv.c}              |   2 +-
 .../guest/xg_sr_common_x86_pv.h}              |   2 +-
 .../guest/xg_sr_restore.c}                    |   2 +-
 .../guest/xg_sr_restore_x86_hvm.c}            |   2 +-
 .../guest/xg_sr_restore_x86_pv.c}             |   2 +-
 .../xc_sr_save.c => libs/guest/xg_sr_save.c}  |   2 +-
 .../guest/xg_sr_save_x86_hvm.c}               |   2 +-
 .../guest/xg_sr_save_x86_pv.c}                |   2 +-
 .../guest/xg_sr_stream_format.h}              |   0
 .../xc_suspend.c => libs/guest/xg_suspend.c}  |   0
 tools/libs/hypfs/xenhypfs.pc.in               |  10 -
 tools/libs/libs.mk                            |  47 ++-
 tools/{libxl => libs/light}/CODING_STYLE      |   0
 tools/libs/light/Makefile                     | 291 ++++++++++++++
 .../light}/check-libxl-api-rules              |   0
 tools/{libxl => libs/light}/flexarray.c       |   0
 tools/{libxl => libs/light}/flexarray.h       |   0
 tools/{libxl => libs/light}/gentest.py        |   0
 tools/{libxl => libs/light}/gentypes.py       |   0
 tools/{libxl => libs/light}/idl.py            |   0
 tools/{libxl => libs/light}/idl.txt           |   0
 tools/{libxl => libs/light/include}/libxl.h   |   0
 .../light/include}/libxl_event.h              |   0
 .../light/include}/libxl_json.h               |   0
 .../light/include}/libxl_utils.h              |   0
 .../light/include}/libxl_uuid.h               |   0
 tools/{libxl => libs/light}/libxl.c           |   0
 tools/{libxl => libs/light}/libxl_9pfs.c      |   0
 tools/{libxl => libs/light}/libxl_aoutils.c   |   0
 tools/{libxl => libs/light}/libxl_arch.h      |   0
 tools/{libxl => libs/light}/libxl_arm.c       |   2 +-
 tools/{libxl => libs/light}/libxl_arm.h       |   2 +-
 tools/{libxl => libs/light}/libxl_arm_acpi.c  |   0
 .../{libxl => libs/light}/libxl_arm_no_acpi.c |   0
 .../{libxl => libs/light}/libxl_bootloader.c  |   0
 .../light}/libxl_checkpoint_device.c          |   0
 tools/{libxl => libs/light}/libxl_colo.h      |   0
 tools/{libxl => libs/light}/libxl_colo_nic.c  |   0
 .../{libxl => libs/light}/libxl_colo_proxy.c  |   0
 .../{libxl => libs/light}/libxl_colo_qdisk.c  |   0
 .../light}/libxl_colo_restore.c               |   0
 tools/{libxl => libs/light}/libxl_colo_save.c |   0
 tools/{libxl => libs/light}/libxl_console.c   |   0
 .../light}/libxl_convert_callout.c            |   0
 tools/{libxl => libs/light}/libxl_cpuid.c     |   0
 tools/{libxl => libs/light}/libxl_cpupool.c   |   0
 tools/{libxl => libs/light}/libxl_create.c    |   2 +-
 tools/{libxl => libs/light}/libxl_device.c    |   0
 tools/{libxl => libs/light}/libxl_disk.c      |   0
 tools/{libxl => libs/light}/libxl_dm.c        |   2 +-
 tools/{libxl => libs/light}/libxl_dom.c       |   2 +-
 tools/{libxl => libs/light}/libxl_dom_save.c  |   0
 .../{libxl => libs/light}/libxl_dom_suspend.c |   0
 tools/{libxl => libs/light}/libxl_domain.c    |   0
 tools/{libxl => libs/light}/libxl_event.c     |   0
 tools/{libxl => libs/light}/libxl_exec.c      |   0
 tools/{libxl => libs/light}/libxl_flask.c     |   0
 tools/{libxl => libs/light}/libxl_fork.c      |   0
 tools/{libxl => libs/light}/libxl_freebsd.c   |   0
 tools/{libxl => libs/light}/libxl_genid.c     |   0
 tools/{libxl => libs/light}/libxl_internal.c  |   0
 tools/{libxl => libs/light}/libxl_internal.h  |   2 +-
 tools/{libxl => libs/light}/libxl_json.c      |   0
 .../light}/libxl_libfdt_compat.c              |   0
 .../light}/libxl_libfdt_compat.h              |   0
 tools/{libxl => libs/light}/libxl_linux.c     |   0
 tools/{libxl => libs/light}/libxl_mem.c       |   0
 tools/{libxl => libs/light}/libxl_netbsd.c    |   0
 tools/{libxl => libs/light}/libxl_netbuffer.c |   0
 tools/{libxl => libs/light}/libxl_nic.c       |   0
 tools/{libxl => libs/light}/libxl_no_colo.c   |   0
 .../light}/libxl_no_convert_callout.c         |   0
 tools/{libxl => libs/light}/libxl_nocpuid.c   |   0
 .../{libxl => libs/light}/libxl_nonetbuffer.c |   0
 tools/{libxl => libs/light}/libxl_numa.c      |   0
 tools/{libxl => libs/light}/libxl_osdeps.h    |   0
 tools/{libxl => libs/light}/libxl_paths.c     |   0
 tools/{libxl => libs/light}/libxl_pci.c       |   0
 tools/{libxl => libs/light}/libxl_psr.c       |   0
 tools/{libxl => libs/light}/libxl_pvcalls.c   |   0
 tools/{libxl => libs/light}/libxl_qmp.c       |   0
 tools/{libxl => libs/light}/libxl_remus.c     |   0
 .../light}/libxl_remus_disk_drbd.c            |   0
 .../light}/libxl_save_callout.c               |   0
 .../{libxl => libs/light}/libxl_save_helper.c |   0
 .../light}/libxl_save_msgs_gen.pl             |   0
 tools/{libxl => libs/light}/libxl_sched.c     |   0
 .../light}/libxl_sr_stream_format.h           |   0
 .../{libxl => libs/light}/libxl_stream_read.c |   0
 .../light}/libxl_stream_write.c               |   0
 .../light}/libxl_test_fdevent.c               |   0
 .../light}/libxl_test_fdevent.h               |   0
 .../light}/libxl_test_timedereg.c             |   0
 .../light}/libxl_test_timedereg.h             |   0
 tools/{libxl => libs/light}/libxl_tmem.c      |   0
 tools/{libxl => libs/light}/libxl_types.idl   |   0
 .../light}/libxl_types_internal.idl           |   0
 tools/{libxl => libs/light}/libxl_usb.c       |   0
 tools/{libxl => libs/light}/libxl_utils.c     |   0
 tools/{libxl => libs/light}/libxl_uuid.c      |   0
 tools/{libxl => libs/light}/libxl_vdispl.c    |   0
 tools/{libxl => libs/light}/libxl_vkb.c       |   0
 tools/{libxl => libs/light}/libxl_vnuma.c     |   2 +-
 tools/{libxl => libs/light}/libxl_vsnd.c      |   0
 tools/{libxl => libs/light}/libxl_vtpm.c      |   0
 tools/{libxl => libs/light}/libxl_x86.c       |   2 +-
 tools/{libxl => libs/light}/libxl_x86_acpi.c  |   2 +-
 tools/{libxl => libs/light}/libxl_x86_acpi.h  |   0
 tools/{libxl => libs/light}/libxl_xshelp.c    |   0
 tools/{libxl => libs/light}/osdeps.c          |   0
 tools/{libxl => libs/light}/test_common.c     |   0
 tools/{libxl => libs/light}/test_common.h     |   0
 .../{libxl => libs/light}/test_fdderegrace.c  |   0
 tools/{libxl => libs/light}/test_timedereg.c  |   0
 .../{xenstat/libxenstat => libs/stat}/COPYING |   0
 .../libxenstat => libs/stat}/Makefile         | 100 +----
 .../stat}/bindings/swig/perl/.empty           |   0
 .../stat}/bindings/swig/python/.empty         |   0
 .../stat}/bindings/swig/xenstat.i             |   0
 .../src => libs/stat/include}/xenstat.h       |   3 +
 .../libxenstat/src => libs/stat}/xenstat.c    |   0
 .../src => libs/stat}/xenstat_freebsd.c       |   0
 .../src => libs/stat}/xenstat_linux.c         |   4 +-
 .../src => libs/stat}/xenstat_netbsd.c        |   0
 .../src => libs/stat}/xenstat_priv.h          |   0
 .../src => libs/stat}/xenstat_qmp.c           |   0
 .../src => libs/stat}/xenstat_solaris.c       |   0
 tools/libs/store/Makefile                     |  64 +++
 .../store}/include/compat/xs.h                |   0
 .../store}/include/compat/xs_lib.h            |   0
 .../store}/include/xenstore.h                 |   0
 tools/libs/store/libxenstore.map              |  49 +++
 tools/{xenstore => libs/store}/xs.c           |   0
 tools/libs/toolcore/Makefile                  |   1 +
 tools/libs/toolcore/xentoolcore.pc.in         |   9 -
 tools/libs/toollog/xentoollog.pc.in           |   9 -
 tools/libs/uselibs.mk                         |  15 +
 tools/libs/util/CODING_STYLE                  | 330 +++++++++++++++
 tools/libs/util/Makefile                      |  63 +++
 .../{libxl => libs/util/include}/libxlutil.h  |   0
 tools/{libxl => libs/util}/libxlu_cfg.c       |   3 +-
 tools/{libxl => libs/util}/libxlu_cfg_i.h     |   1 -
 tools/{libxl => libs/util}/libxlu_cfg_l.c     |   0
 tools/{libxl => libs/util}/libxlu_cfg_l.h     |   0
 tools/{libxl => libs/util}/libxlu_cfg_l.l     |   0
 tools/{libxl => libs/util}/libxlu_cfg_y.c     |   0
 tools/{libxl => libs/util}/libxlu_cfg_y.h     |   0
 tools/{libxl => libs/util}/libxlu_cfg_y.y     |   0
 tools/{libxl => libs/util}/libxlu_disk.c      |   1 -
 tools/{libxl => libs/util}/libxlu_disk_i.h    |   0
 tools/{libxl => libs/util}/libxlu_disk_l.c    |  14 +-
 tools/{libxl => libs/util}/libxlu_disk_l.h    |   8 +-
 tools/{libxl => libs/util}/libxlu_disk_l.l    |   2 +-
 tools/{libxl => libs/util}/libxlu_internal.h  |   0
 tools/{libxl => libs/util}/libxlu_pci.c       |   3 +-
 tools/{libxl => libs/util}/libxlu_vif.c       |   3 +-
 tools/libs/vchan/Makefile                     |  20 +
 .../vchan/include}/libxenvchan.h              |   0
 tools/{libvchan => libs/vchan}/init.c         |   0
 tools/{libvchan => libs/vchan}/io.c           |   0
 tools/libvchan/Makefile                       |  95 -----
 tools/libvchan/xenvchan.pc.in                 |  10 -
 tools/libxc/Makefile                          | 280 -------------
 tools/libxc/xc_efi.h                          | 158 --------
 tools/libxc/xc_elf.h                          |  16 -
 tools/libxc/xencontrol.pc.in                  |  10 -
 tools/libxc/xenguest.pc.in                    |  10 -
 tools/libxl/Makefile                          | 375 ------------------
 tools/libxl/xenlight.pc.in                    |  12 -
 tools/libxl/xlutil.pc.in                      |  10 -
 tools/misc/Makefile                           |   5 +-
 tools/misc/xen-hptool.c                       |   8 +-
 tools/misc/xen-mfndump.c                      |  44 +-
 tools/ocaml/libs/xl/Makefile                  |   8 +-
 tools/ocaml/xenstored/Makefile                |   2 +-
 tools/python/Makefile                         |   2 +-
 tools/python/setup.py                         |  12 +-
 tools/python/xen/lowlevel/xc/xc.c             |   2 +-
 tools/vchan/Makefile                          |  37 ++
 tools/{libvchan => vchan}/node-select.c       |   0
 tools/{libvchan => vchan}/node.c              |   0
 .../{libvchan => vchan}/vchan-socket-proxy.c  |   0
 tools/xcutils/Makefile                        |   3 +-
 tools/xcutils/readnotes.c                     |   5 +-
 tools/xenpaging/Makefile                      |   3 +-
 tools/xenpaging/file_ops.c                    |   8 +-
 tools/xenpaging/pagein.c                      |   2 +-
 tools/xenpaging/policy_default.c              |   2 +-
 tools/xenpaging/xenpaging.c                   |  32 +-
 tools/xenpaging/xenpaging.h                   |  70 +++-
 tools/xenstat/Makefile                        |  10 -
 tools/xenstat/libxenstat/xenstat.pc.in        |  10 -
 tools/xenstore/Makefile                       |  82 +---
 tools/xenstore/xenstore.pc.in                 |  11 -
 tools/xenstore/{include => }/xenstore_lib.h   |   0
 tools/{xenstat => }/xentop/Makefile           |   2 +-
 tools/{xenstat => }/xentop/TODO               |   0
 tools/{xenstat => }/xentop/xentop.c           |   0
 tools/xl/Makefile                             |   3 +-
 tools/{libxl => xl}/check-xl-disk-parse       |   0
 tools/{libxl => xl}/check-xl-vcpupin-parse    |   0
 .../check-xl-vcpupin-parse.data-example       |   0
 tools/{libxl => xl}/check-xl-vif-parse        |   0
 301 files changed, 1643 insertions(+), 1734 deletions(-)
 delete mode 100644 tools/libs/call/xencall.pc.in
 create mode 100644 tools/libs/ctrl/Makefile
 rename tools/{libxc => libs/ctrl}/include/xenctrl.h (100%)
 rename tools/{libxc => libs/ctrl}/include/xenctrl_compat.h (100%)
 rename tools/{libxc/include/xc_dom.h => libs/ctrl/include/xenctrl_dom.h} (98%)
 rename tools/{libxc => libs/ctrl}/xc_altp2m.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_arinc653.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_bitops.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_core.c (99%)
 rename tools/{libxc => libs/ctrl}/xc_core.h (99%)
 rename tools/{libxc => libs/ctrl}/xc_core_arm.c (99%)
 rename tools/{libxc => libs/ctrl}/xc_core_arm.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_core_x86.c (98%)
 rename tools/{libxc => libs/ctrl}/xc_core_x86.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_cpu_hotplug.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_cpupool.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_csched.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_csched2.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_devicemodel_compat.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_domain.c (94%)
 rename tools/{libxc => libs/ctrl}/xc_evtchn.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_evtchn_compat.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_flask.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_foreign_memory.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_freebsd.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_gnttab.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_gnttab_compat.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_hcall_buf.c (99%)
 rename tools/{libxc => libs/ctrl}/xc_kexec.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_linux.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_mem_access.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_mem_paging.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_memshr.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_minios.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_misc.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_monitor.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_msr_x86.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_netbsd.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_pagetab.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_physdev.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_pm.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_private.c (99%)
 rename tools/{libxc => libs/ctrl}/xc_private.h (91%)
 rename tools/{libxc => libs/ctrl}/xc_psr.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_resource.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_resume.c (99%)
 rename tools/{libxc => libs/ctrl}/xc_rt.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_solaris.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_tbuf.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_vm_event.c (100%)
 delete mode 100644 tools/libs/devicemodel/xendevicemodel.pc.in
 delete mode 100644 tools/libs/evtchn/xenevtchn.pc.in
 delete mode 100644 tools/libs/foreignmemory/xenforeignmemory.pc.in
 delete mode 100644 tools/libs/gnttab/xengnttab.pc.in
 rename tools/{libxc => libs/guest}/COPYING (100%)
 create mode 100644 tools/libs/guest/Makefile
 rename tools/{libxc => libs/guest}/include/xenguest.h (99%)
 rename tools/{libxc/xc_cpuid_x86.c => libs/guest/xg_cpuid_x86.c} (100%)
 rename tools/{libxc/xc_dom_arm.c => libs/guest/xg_dom_arm.c} (99%)
 rename tools/{libxc/xc_dom_armzimageloader.c => libs/guest/xg_dom_armzimageloader.c} (99%)
 rename tools/{libxc/xc_dom_binloader.c => libs/guest/xg_dom_binloader.c} (99%)
 rename tools/{libxc/xc_dom_boot.c => libs/guest/xg_dom_boot.c} (99%)
 rename tools/{libxc/xc_dom_bzimageloader.c => libs/guest/xg_dom_bzimageloader.c} (99%)
 rename tools/{libxc/xc_dom_compat_linux.c => libs/guest/xg_dom_compat_linux.c} (99%)
 rename tools/{libxc/xc_dom_core.c => libs/guest/xg_dom_core.c} (99%)
 rename tools/{libxc/xc_dom_decompress.h => libs/guest/xg_dom_decompress.h} (62%)
 rename tools/{libxc/xc_dom_decompress_lz4.c => libs/guest/xg_dom_decompress_lz4.c} (98%)
 rename tools/{libxc/xc_dom_decompress_unsafe.c => libs/guest/xg_dom_decompress_unsafe.c} (96%)
 rename tools/{libxc/xc_dom_decompress_unsafe.h => libs/guest/xg_dom_decompress_unsafe.h} (97%)
 rename tools/{libxc/xc_dom_decompress_unsafe_bzip2.c => libs/guest/xg_dom_decompress_unsafe_bzip2.c} (87%)
 rename tools/{libxc/xc_dom_decompress_unsafe_lzma.c => libs/guest/xg_dom_decompress_unsafe_lzma.c} (87%)
 rename tools/{libxc/xc_dom_decompress_unsafe_lzo1x.c => libs/guest/xg_dom_decompress_unsafe_lzo1x.c} (96%)
 rename tools/{libxc/xc_dom_decompress_unsafe_xz.c => libs/guest/xg_dom_decompress_unsafe_xz.c} (95%)
 rename tools/{libxc/xc_dom_elfloader.c => libs/guest/xg_dom_elfloader.c} (99%)
 rename tools/{libxc/xc_dom_hvmloader.c => libs/guest/xg_dom_hvmloader.c} (99%)
 rename tools/{libxc/xc_dom_x86.c => libs/guest/xg_dom_x86.c} (99%)
 create mode 100644 tools/libs/guest/xg_domain.c
 rename tools/{libxc/xc_nomigrate.c => libs/guest/xg_nomigrate.c} (100%)
 rename tools/{libxc/xc_offline_page.c => libs/guest/xg_offline_page.c} (99%)
 rename tools/{libxc => libs/guest}/xg_private.c (100%)
 rename tools/{libxc => libs/guest}/xg_private.h (81%)
 rename tools/{libxc => libs/guest}/xg_save_restore.h (91%)
 rename tools/{libxc/xc_sr_common.c => libs/guest/xg_sr_common.c} (99%)
 rename tools/{libxc/xc_sr_common.h => libs/guest/xg_sr_common.h} (99%)
 rename tools/{libxc/xc_sr_common_x86.c => libs/guest/xg_sr_common_x86.c} (99%)
 rename tools/{libxc/xc_sr_common_x86.h => libs/guest/xg_sr_common_x86.h} (98%)
 rename tools/{libxc/xc_sr_common_x86_pv.c => libs/guest/xg_sr_common_x86_pv.c} (99%)
 rename tools/{libxc/xc_sr_common_x86_pv.h => libs/guest/xg_sr_common_x86_pv.h} (98%)
 rename tools/{libxc/xc_sr_restore.c => libs/guest/xg_sr_restore.c} (99%)
 rename tools/{libxc/xc_sr_restore_x86_hvm.c => libs/guest/xg_sr_restore_x86_hvm.c} (99%)
 rename tools/{libxc/xc_sr_restore_x86_pv.c => libs/guest/xg_sr_restore_x86_pv.c} (99%)
 rename tools/{libxc/xc_sr_save.c => libs/guest/xg_sr_save.c} (99%)
 rename tools/{libxc/xc_sr_save_x86_hvm.c => libs/guest/xg_sr_save_x86_hvm.c} (99%)
 rename tools/{libxc/xc_sr_save_x86_pv.c => libs/guest/xg_sr_save_x86_pv.c} (99%)
 rename tools/{libxc/xc_sr_stream_format.h => libs/guest/xg_sr_stream_format.h} (100%)
 rename tools/{libxc/xc_suspend.c => libs/guest/xg_suspend.c} (100%)
 delete mode 100644 tools/libs/hypfs/xenhypfs.pc.in
 rename tools/{libxl => libs/light}/CODING_STYLE (100%)
 create mode 100644 tools/libs/light/Makefile
 rename tools/{libxl => libs/light}/check-libxl-api-rules (100%)
 rename tools/{libxl => libs/light}/flexarray.c (100%)
 rename tools/{libxl => libs/light}/flexarray.h (100%)
 rename tools/{libxl => libs/light}/gentest.py (100%)
 rename tools/{libxl => libs/light}/gentypes.py (100%)
 rename tools/{libxl => libs/light}/idl.py (100%)
 rename tools/{libxl => libs/light}/idl.txt (100%)
 rename tools/{libxl => libs/light/include}/libxl.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_event.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_json.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_utils.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_uuid.h (100%)
 rename tools/{libxl => libs/light}/libxl.c (100%)
 rename tools/{libxl => libs/light}/libxl_9pfs.c (100%)
 rename tools/{libxl => libs/light}/libxl_aoutils.c (100%)
 rename tools/{libxl => libs/light}/libxl_arch.h (100%)
 rename tools/{libxl => libs/light}/libxl_arm.c (99%)
 rename tools/{libxl => libs/light}/libxl_arm.h (98%)
 rename tools/{libxl => libs/light}/libxl_arm_acpi.c (100%)
 rename tools/{libxl => libs/light}/libxl_arm_no_acpi.c (100%)
 rename tools/{libxl => libs/light}/libxl_bootloader.c (100%)
 rename tools/{libxl => libs/light}/libxl_checkpoint_device.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo.h (100%)
 rename tools/{libxl => libs/light}/libxl_colo_nic.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_proxy.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_qdisk.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_restore.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_save.c (100%)
 rename tools/{libxl => libs/light}/libxl_console.c (100%)
 rename tools/{libxl => libs/light}/libxl_convert_callout.c (100%)
 rename tools/{libxl => libs/light}/libxl_cpuid.c (100%)
 rename tools/{libxl => libs/light}/libxl_cpupool.c (100%)
 rename tools/{libxl => libs/light}/libxl_create.c (99%)
 rename tools/{libxl => libs/light}/libxl_device.c (100%)
 rename tools/{libxl => libs/light}/libxl_disk.c (100%)
 rename tools/{libxl => libs/light}/libxl_dm.c (99%)
 rename tools/{libxl => libs/light}/libxl_dom.c (99%)
 rename tools/{libxl => libs/light}/libxl_dom_save.c (100%)
 rename tools/{libxl => libs/light}/libxl_dom_suspend.c (100%)
 rename tools/{libxl => libs/light}/libxl_domain.c (100%)
 rename tools/{libxl => libs/light}/libxl_event.c (100%)
 rename tools/{libxl => libs/light}/libxl_exec.c (100%)
 rename tools/{libxl => libs/light}/libxl_flask.c (100%)
 rename tools/{libxl => libs/light}/libxl_fork.c (100%)
 rename tools/{libxl => libs/light}/libxl_freebsd.c (100%)
 rename tools/{libxl => libs/light}/libxl_genid.c (100%)
 rename tools/{libxl => libs/light}/libxl_internal.c (100%)
 rename tools/{libxl => libs/light}/libxl_internal.h (99%)
 rename tools/{libxl => libs/light}/libxl_json.c (100%)
 rename tools/{libxl => libs/light}/libxl_libfdt_compat.c (100%)
 rename tools/{libxl => libs/light}/libxl_libfdt_compat.h (100%)
 rename tools/{libxl => libs/light}/libxl_linux.c (100%)
 rename tools/{libxl => libs/light}/libxl_mem.c (100%)
 rename tools/{libxl => libs/light}/libxl_netbsd.c (100%)
 rename tools/{libxl => libs/light}/libxl_netbuffer.c (100%)
 rename tools/{libxl => libs/light}/libxl_nic.c (100%)
 rename tools/{libxl => libs/light}/libxl_no_colo.c (100%)
 rename tools/{libxl => libs/light}/libxl_no_convert_callout.c (100%)
 rename tools/{libxl => libs/light}/libxl_nocpuid.c (100%)
 rename tools/{libxl => libs/light}/libxl_nonetbuffer.c (100%)
 rename tools/{libxl => libs/light}/libxl_numa.c (100%)
 rename tools/{libxl => libs/light}/libxl_osdeps.h (100%)
 rename tools/{libxl => libs/light}/libxl_paths.c (100%)
 rename tools/{libxl => libs/light}/libxl_pci.c (100%)
 rename tools/{libxl => libs/light}/libxl_psr.c (100%)
 rename tools/{libxl => libs/light}/libxl_pvcalls.c (100%)
 rename tools/{libxl => libs/light}/libxl_qmp.c (100%)
 rename tools/{libxl => libs/light}/libxl_remus.c (100%)
 rename tools/{libxl => libs/light}/libxl_remus_disk_drbd.c (100%)
 rename tools/{libxl => libs/light}/libxl_save_callout.c (100%)
 rename tools/{libxl => libs/light}/libxl_save_helper.c (100%)
 rename tools/{libxl => libs/light}/libxl_save_msgs_gen.pl (100%)
 rename tools/{libxl => libs/light}/libxl_sched.c (100%)
 rename tools/{libxl => libs/light}/libxl_sr_stream_format.h (100%)
 rename tools/{libxl => libs/light}/libxl_stream_read.c (100%)
 rename tools/{libxl => libs/light}/libxl_stream_write.c (100%)
 rename tools/{libxl => libs/light}/libxl_test_fdevent.c (100%)
 rename tools/{libxl => libs/light}/libxl_test_fdevent.h (100%)
 rename tools/{libxl => libs/light}/libxl_test_timedereg.c (100%)
 rename tools/{libxl => libs/light}/libxl_test_timedereg.h (100%)
 rename tools/{libxl => libs/light}/libxl_tmem.c (100%)
 rename tools/{libxl => libs/light}/libxl_types.idl (100%)
 rename tools/{libxl => libs/light}/libxl_types_internal.idl (100%)
 rename tools/{libxl => libs/light}/libxl_usb.c (100%)
 rename tools/{libxl => libs/light}/libxl_utils.c (100%)
 rename tools/{libxl => libs/light}/libxl_uuid.c (100%)
 rename tools/{libxl => libs/light}/libxl_vdispl.c (100%)
 rename tools/{libxl => libs/light}/libxl_vkb.c (100%)
 rename tools/{libxl => libs/light}/libxl_vnuma.c (99%)
 rename tools/{libxl => libs/light}/libxl_vsnd.c (100%)
 rename tools/{libxl => libs/light}/libxl_vtpm.c (100%)
 rename tools/{libxl => libs/light}/libxl_x86.c (99%)
 rename tools/{libxl => libs/light}/libxl_x86_acpi.c (99%)
 rename tools/{libxl => libs/light}/libxl_x86_acpi.h (100%)
 rename tools/{libxl => libs/light}/libxl_xshelp.c (100%)
 rename tools/{libxl => libs/light}/osdeps.c (100%)
 rename tools/{libxl => libs/light}/test_common.c (100%)
 rename tools/{libxl => libs/light}/test_common.h (100%)
 rename tools/{libxl => libs/light}/test_fdderegrace.c (100%)
 rename tools/{libxl => libs/light}/test_timedereg.c (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/COPYING (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/Makefile (55%)
 rename tools/{xenstat/libxenstat => libs/stat}/bindings/swig/perl/.empty (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/bindings/swig/python/.empty (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/bindings/swig/xenstat.i (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat/include}/xenstat.h (98%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_freebsd.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_linux.c (98%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_netbsd.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_priv.h (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_qmp.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_solaris.c (100%)
 create mode 100644 tools/libs/store/Makefile
 rename tools/{xenstore => libs/store}/include/compat/xs.h (100%)
 rename tools/{xenstore => libs/store}/include/compat/xs_lib.h (100%)
 rename tools/{xenstore => libs/store}/include/xenstore.h (100%)
 create mode 100644 tools/libs/store/libxenstore.map
 rename tools/{xenstore => libs/store}/xs.c (100%)
 delete mode 100644 tools/libs/toolcore/xentoolcore.pc.in
 delete mode 100644 tools/libs/toollog/xentoollog.pc.in
 create mode 100644 tools/libs/util/CODING_STYLE
 create mode 100644 tools/libs/util/Makefile
 rename tools/{libxl => libs/util/include}/libxlutil.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg.c (99%)
 rename tools/{libxl => libs/util}/libxlu_cfg_i.h (96%)
 rename tools/{libxl => libs/util}/libxlu_cfg_l.c (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_l.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_l.l (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_y.c (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_y.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_y.y (100%)
 rename tools/{libxl => libs/util}/libxlu_disk.c (97%)
 rename tools/{libxl => libs/util}/libxlu_disk_i.h (100%)
 rename tools/{libxl => libs/util}/libxlu_disk_l.c (99%)
 rename tools/{libxl => libs/util}/libxlu_disk_l.h (99%)
 rename tools/{libxl => libs/util}/libxlu_disk_l.l (99%)
 rename tools/{libxl => libs/util}/libxlu_internal.h (100%)
 rename tools/{libxl => libs/util}/libxlu_pci.c (99%)
 rename tools/{libxl => libs/util}/libxlu_vif.c (98%)
 create mode 100644 tools/libs/vchan/Makefile
 rename tools/{libvchan => libs/vchan/include}/libxenvchan.h (100%)
 rename tools/{libvchan => libs/vchan}/init.c (100%)
 rename tools/{libvchan => libs/vchan}/io.c (100%)
 delete mode 100644 tools/libvchan/Makefile
 delete mode 100644 tools/libvchan/xenvchan.pc.in
 delete mode 100644 tools/libxc/Makefile
 delete mode 100644 tools/libxc/xc_efi.h
 delete mode 100644 tools/libxc/xc_elf.h
 delete mode 100644 tools/libxc/xencontrol.pc.in
 delete mode 100644 tools/libxc/xenguest.pc.in
 delete mode 100644 tools/libxl/Makefile
 delete mode 100644 tools/libxl/xenlight.pc.in
 delete mode 100644 tools/libxl/xlutil.pc.in
 create mode 100644 tools/vchan/Makefile
 rename tools/{libvchan => vchan}/node-select.c (100%)
 rename tools/{libvchan => vchan}/node.c (100%)
 rename tools/{libvchan => vchan}/vchan-socket-proxy.c (100%)
 delete mode 100644 tools/xenstat/Makefile
 delete mode 100644 tools/xenstat/libxenstat/xenstat.pc.in
 delete mode 100644 tools/xenstore/xenstore.pc.in
 rename tools/xenstore/{include => }/xenstore_lib.h (100%)
 rename tools/{xenstat => }/xentop/Makefile (97%)
 rename tools/{xenstat => }/xentop/TODO (100%)
 rename tools/{xenstat => }/xentop/xentop.c (100%)
 rename tools/{libxl => xl}/check-xl-disk-parse (100%)
 rename tools/{libxl => xl}/check-xl-vcpupin-parse (100%)
 rename tools/{libxl => xl}/check-xl-vcpupin-parse.data-example (100%)
 rename tools/{libxl => xl}/check-xl-vif-parse (100%)
Signature · 1 line
2.26.2
#1 lore raw

PATCH v4 1/31 tools: generate pkg-config files from make variables

For each library built two variants of pkg-config files are created from a per-library template: an "official" one for installation on the user's system, and one used for building internal tools, like e.g. qemu.

Instead of the template which is looking very similar for all libraries generate the pkg-config files directly from make variables.

This will reduce the need to specify some pkg-config file entries in the templates, as the contents can easily be generated from available data (e.g. "Version:" and "Requires.private:" entries).

Especially the variant used for building internal tools needs to gain additional runtime link parameters for the internally used libraries, as otherwise those won't be found by the users (e.g. qemu).

---
 stubdom/Makefile                              |  1 -
 tools/Rules.mk                                | 52 +++++++++++--------
 tools/libs/call/xencall.pc.in                 | 10 ----
 tools/libs/devicemodel/xendevicemodel.pc.in   | 10 ----
 tools/libs/evtchn/xenevtchn.pc.in             | 10 ----
 .../libs/foreignmemory/xenforeignmemory.pc.in | 10 ----
 tools/libs/gnttab/xengnttab.pc.in             | 10 ----
 tools/libs/hypfs/xenhypfs.pc.in               | 10 ----
 tools/libs/libs.mk                            |  8 +++
 tools/libs/toolcore/Makefile                  |  1 +
 tools/libs/toolcore/xentoolcore.pc.in         |  9 ----
 tools/libs/toollog/xentoollog.pc.in           |  9 ----
 tools/libvchan/Makefile                       |  5 ++
 tools/libvchan/xenvchan.pc.in                 | 10 ----
 tools/libxc/Makefile                          | 22 ++++++++
 tools/libxc/xencontrol.pc.in                  | 10 ----
 tools/libxc/xenguest.pc.in                    | 10 ----
 tools/libxl/Makefile                          | 22 ++++++++
 tools/libxl/xenlight.pc.in                    | 12 -----
 tools/libxl/xlutil.pc.in                      | 10 ----
 tools/xenstat/libxenstat/Makefile             |  5 ++
 tools/xenstat/libxenstat/xenstat.pc.in        | 10 ----
 tools/xenstore/Makefile                       |  8 ++-
 tools/xenstore/xenstore.pc.in                 | 11 ----
 24 files changed, 98 insertions(+), 177 deletions(-)
 delete mode 100644 tools/libs/call/xencall.pc.in
 delete mode 100644 tools/libs/devicemodel/xendevicemodel.pc.in
 delete mode 100644 tools/libs/evtchn/xenevtchn.pc.in
 delete mode 100644 tools/libs/foreignmemory/xenforeignmemory.pc.in
 delete mode 100644 tools/libs/gnttab/xengnttab.pc.in
 delete mode 100644 tools/libs/hypfs/xenhypfs.pc.in
 delete mode 100644 tools/libs/toolcore/xentoolcore.pc.in
 delete mode 100644 tools/libs/toollog/xentoollog.pc.in
 delete mode 100644 tools/libvchan/xenvchan.pc.in
 delete mode 100644 tools/libxc/xencontrol.pc.in
 delete mode 100644 tools/libxc/xenguest.pc.in
 delete mode 100644 tools/libxl/xenlight.pc.in
 delete mode 100644 tools/libxl/xlutil.pc.in
 delete mode 100644 tools/xenstat/libxenstat/xenstat.pc.in
 delete mode 100644 tools/xenstore/xenstore.pc.in
stubdom/Makefile +0 -1
index 4fd86dd44b..c466858db0 100644
@@ -342,7 +342,6 @@ define do_links
   cd $(dir $@); \
   ln -sf $(dir $<)include/*.h include/; \
   ln -sf $(dir $<)*.[ch] .; \
-  ln -sf $(dir $<)*.pc.in .; \
   ln -sf $(dir $<)Makefile .
   touch $@
 endef
tools/Rules.mk +29 -23

56 lines not on this page · raw message

tools/libs/call/xencall.pc.in deleted +0 -10
deleted file mode 100644
index 409773e535..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xencall
-Description: The Xencall library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxencall
-Requires.private: xentoollog,xentoolcore
tools/libs/devicemodel/xendevicemodel.pc.in deleted +0 -10
deleted file mode 100644
index 8bd04faf47..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xendevicemodel
-Description: The Xendevicemodel library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxendevicemodel
-Requires.private: xentoolcore,xentoollog,xencall
tools/libs/evtchn/xenevtchn.pc.in deleted +0 -10
deleted file mode 100644
index c74af1ece4..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenevtchn
-Description: The Xenevtchn library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxenevtchn
-Requires.private: xentoollog
tools/libs/foreignmemory/xenforeignmemory.pc.in deleted +0 -10
deleted file mode 100644
index 61c9def69c..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenforeignmemory
-Description: The Xenforeignmemory library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenforeignmemory
-Requires.private: xentoollog,xentoolcore
tools/libs/gnttab/xengnttab.pc.in deleted +0 -10
deleted file mode 100644
index 4c3beed5dc..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xengnttab
-Description: The Xengnttab library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxengnttab
-Requires.private: xentoollog,xentoolcore
tools/libs/hypfs/xenhypfs.pc.in deleted +0 -10
deleted file mode 100644
index ef9fcc87bf..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenhypfs
-Description: The Xenhypfs library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenhypfs
-Requires.private: xentoolcore,xentoollog,xencall,zlib
tools/libs/libs.mk +8 -0
index 8b1ca2aa62..4679268fc2 100644
@@ -25,8 +25,16 @@ ifneq ($(nosharedlibs),y)
 LIB += libxen$(LIBNAME).so
 endif
 
+comma:= ,
+empty:=
+space:= $(empty) $(empty)
 PKG_CONFIG ?= xen$(LIBNAME).pc
+PKG_CONFIG_NAME ?= Xen$(LIBNAME)
+PKG_CONFIG_DESC ?= The $(PKG_CONFIG_NAME) library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxen$(LIBNAME))
+PKG_CONFIG_LIB := xen$(LIBNAME)
+PKG_CONFIG_REQPRIV := $(subst $(space),$(comma),$(strip $(foreach lib,$(USELIBS_$(LIBNAME)),xen$(lib))))
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
tools/libs/toolcore/Makefile +1 -0
index 34b08a4236..5819bbc8ee 100644
@@ -9,6 +9,7 @@ SRCS-y	+= handlereg.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
+PKG_CONFIG_DESC := Central support for Xen Hypervisor userland libraries
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxentoolcore)/include
 
 $(LIB_OBJS): $(AUTOINCS)
tools/libs/toolcore/xentoolcore.pc.in deleted +0 -9
deleted file mode 100644
index 55ff4e25e4..0000000000
@@ -1,9 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xentoolcore
-Description: Central support for Xen Hypervisor userland libraries
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxentoolcore
tools/libs/toollog/xentoollog.pc.in deleted +0 -9
deleted file mode 100644
index 554e4d5b34..0000000000
@@ -1,9 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xentoollog
-Description: The Xentoollog library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxentoollog
tools/libvchan/Makefile +5 -0
index a5441162a0..e718447977 100644
@@ -23,7 +23,12 @@ CFLAGS += -I../include -I.
 io.o io.opic: CFLAGS += $(CFLAGS_libxenctrl) # for xen_mb et al
 
 PKG_CONFIG := xenvchan.pc
+PKG_CONFIG_NAME := Xenvchan
+PKG_CONFIG_DESC := The Xenvchan library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxenvchan)
+PKG_CONFIG_LIB := xenvchan
+PKG_CONFIG_REQPRIV := xentoollog,xenstore,xenevtchn,xengnttab
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
tools/libvchan/xenvchan.pc.in deleted +0 -10
deleted file mode 100644
index 6fd13108d2..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenvchan
-Description: The Xenvchan library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenvchan
-Requires.private: xentoollog,xenstore,xenevtchn,xengnttab
tools/libxc/Makefile +22 -0
index c1e41a8ee9..315ac0b4f3 100644
@@ -158,6 +158,28 @@ $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): xc_private.h
 PKG_CONFIG := xencontrol.pc xenguest.pc
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
+xencontrol.pc: PKG_CONFIG_NAME = Xencontrol
+xencontrol.pc: PKG_CONFIG_DESC = The Xencontrol library for Xen hypervisor
+xencontrol.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenctrl)
+xencontrol.pc: PKG_CONFIG_LIB = xenctrl
+xencontrol.pc: PKG_CONFIG_REQPRIV = xenevtchn,xengnttab,xencall,xenforeignmemory,xendevicemodel,xentoollog
+xenguest.pc: PKG_CONFIG_NAME = Xenguest
+xenguest.pc: PKG_CONFIG_DESC = The Xenguest library for Xen hypervisor
+xenguest.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenguest)
+xenguest.pc: PKG_CONFIG_LIB = xenguest
+xenguest.pc: PKG_CONFIG_REQPRIV = xentoollog,xencall,xenforeignmemory,xenevtchn
+
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_NAME = Xencontrol
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_DESC = The Xencontrol library for Xen hypervisor
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenctrl)
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_LIB = xenctrl
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_REQPRIV = xenevtchn,xengnttab,xencall,xenforeignmemory,xendevicemodel,xentoollog
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_NAME = Xenguest
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_DESC = The Xenguest library for Xen hypervisor
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenguest)
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_LIB = xenguest
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_REQPRIV = xentoollog,xencall,xenforeignmemory,xenevtchn
+
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
 $(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix)
tools/libxc/xencontrol.pc.in deleted +0 -10
deleted file mode 100644
index e653ba2543..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xencontrol
-Description: The Xencontrol library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenctrl
-Requires.private: xenevtchn,xengnttab,xencall,xenforeignmemory,xendevicemodel,xentoollog
tools/libxc/xenguest.pc.in deleted +0 -10
deleted file mode 100644
index 225ac0b9c8..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenguest
-Description: The Xenguest library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxenguest
-Requires.private: xentoollog,xencall,xenforeignmemory,xenevtchn
tools/libxl/Makefile +22 -0
index 0e8dfc6193..684da32a5b 100644
@@ -195,8 +195,19 @@ PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
+xenlight.pc: PKG_CONFIG_NAME = Xenlight
+xenlight.pc: PKG_CONFIG_DESC = The Xenlight library for Xen hypervisor
 xenlight.pc: PKG_CONFIG_VERSION = $(MAJOR).$(MINOR)
+xenlight.pc: PKG_CONFIG_VARS = xenfirmwaredir=$(XENFIRMWAREDIR) libexec_bin=$(LIBEXEC_BIN)
+xenlight.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenlight)
+xenlight.pc: PKG_CONFIG_LIB = xenlight
+xenlight.pc: PKG_CONFIG_REQPRIV = xentoollog,xenevtchn,xencontrol,xenguest,xenstore,xenhypfs
+xlutil.pc: PKG_CONFIG_NAME = Xlutil
+xlutil.pc: PKG_CONFIG_DESC = The xl utility library for Xen hypervisor
 xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
+xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxlutil)
+xlutil.pc: PKG_CONFIG_LIB = xlutil
+xlutil.pc: PKG_CONFIG_REQPRIV = xenlight
 $(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix)
 $(PKG_CONFIG_INST): PKG_CONFIG_INCDIR = $(includedir)
 $(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR = $(libdir)
@@ -204,8 +215,19 @@ endif
 
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_NAME = Xenlight
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_DESC = The Xenlight library for Xen hypervisor
 $(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_VERSION = $(MAJOR).$(MINOR)
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_VARS = xenfirmwaredir=$(XENFIRMWAREDIR) libexec_bin=$(LIBEXEC_BIN)
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenlight)
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_LIB = xenlight
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_REQPRIV = xentoollog,xenevtchn,xencontrol,xenguest,xenstore,xenhypfs
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_NAME = Xlutil
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_DESC = The xl utility library for Xen hypervisor
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxlutil)
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_LIB = xlutil
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_REQPRIV = xenlight
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(CURDIR)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
tools/libxl/xenlight.pc.in deleted +0 -12
deleted file mode 100644
index 6b351ba096..0000000000
@@ -1,12 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-xenfirmwaredir=@@firmwaredir@@
-libexec_bin=@@libexecbin@@
-
-Name: Xenlight
-Description: The Xenlight library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxenlight
-Requires.private: xentoollog,xenevtchn,xencontrol,xenguest,xenstore,xenhypfs
tools/libxl/xlutil.pc.in deleted +0 -10
deleted file mode 100644
index cdd98fba74..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xlutil
-Description: The xl utility library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxlutil
-Requires.private: xenlight
tools/xenstat/libxenstat/Makefile +5 -0
index b5e623b155..bdd5a0f469 100644
@@ -38,7 +38,12 @@ LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) -lyajl
 LDLIBS-$(CONFIG_SunOS) += -lkstat
 
 PKG_CONFIG := xenstat.pc
+PKG_CONFIG_NAME := Xenstat
+PKG_CONFIG_DESC := The Xenstat library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxenstat)
+PKG_CONFIG_LIB := xenstat
+PKG_CONFIG_REQPRIV := xencontrol,xenstore
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
tools/xenstat/libxenstat/xenstat.pc.in deleted +0 -10
deleted file mode 100644
index ad00577c89..0000000000
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenstat
-Description: The Xenstat library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxenstat
-Requires.private: xencontrol,xenstore
tools/xenstore/Makefile +6 -2
index 0a64ac1571..574be8d15c 100644
@@ -105,8 +105,7 @@ xs.opic: CFLAGS += -DUSE_PTHREAD
 ifeq ($(CONFIG_Linux),y)
 xs.opic: CFLAGS += -DUSE_DLSYM
 libxenstore.so.$(MAJOR).$(MINOR): APPEND_LDFLAGS += -ldl
-else
-PKG_CONFIG_REMOVE += -ldl
+PKG_CONFIG_LIBSPRIV := -ldl
 endif
 
 libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
@@ -116,7 +115,12 @@ libxenstore.a: xs.o xs_lib.o
 	$(AR) rcs $@ $^
 
 PKG_CONFIG := xenstore.pc
+PKG_CONFIG_NAME := Xenstore
+PKG_CONFIG_DESC := The Xenstore library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxenstore)
+PKG_CONFIG_LIB := xenstore
+PKG_CONFIG_REQPRIV := xenevtchn,xencontrol,xengnttab,xentoolcore
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
tools/xenstore/xenstore.pc.in deleted +0 -11
deleted file mode 100644
index 2f64a6b824..0000000000
@@ -1,11 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenstore
-Description: The Xenstore library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenstore
-Libs.private: -ldl
-Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore
Signature · 1 line
2.26.2
#2 lore raw

Re: [PATCH v4 01/31] tools: generate pkg-config files from make variables

Quoted 12 lines · Juergen Gross

For each library built two variants of pkg-config files are created from a per-library template: an "official" one for installation on the user's system, and one used for building internal tools, like e.g. qemu.

Instead of the template which is looking very similar for all libraries generate the pkg-config files directly from make variables.

This will reduce the need to specify some pkg-config file entries in the templates, as the contents can easily be generated from available data (e.g. "Version:" and "Requires.private:" entries).

Quoted 5 lines

Especially the variant used for building internal tools needs to gain additional runtime link parameters for the internally used libraries, as otherwise those won't be found by the users (e.g. qemu).

Do you have the new generated files handy so that I can eyeball them a bit?

If you don't already have them, I can find some time to apply this patch to generate them myself.

Wei.

#3 lore raw

Re: [PATCH v4 01/31] tools: generate pkg-config files from make variables

Quoted 13 lines · Wei Liu
Quoted 12 lines · Juergen Gross

For each library built two variants of pkg-config files are created from a per-library template: an "official" one for installation on the user's system, and one used for building internal tools, like e.g. qemu.

Instead of the template which is looking very similar for all libraries generate the pkg-config files directly from make variables.

This will reduce the need to specify some pkg-config file entries in the templates, as the contents can easily be generated from available data (e.g. "Version:" and "Requires.private:" entries).

Quoted 8 lines
Quoted 5 lines

Especially the variant used for building internal tools needs to gain additional runtime link parameters for the internally used libraries, as otherwise those won't be found by the users (e.g. qemu).

Do you have the new generated files handy so that I can eyeball them a bit?

Attached (both, the local and the installed ones, with the complete series applied).

Juergen

Acked-by
#4 lore raw

Re: [PATCH v4 01/31] tools: generate pkg-config files from make variables

Quoted 18 lines · Jürgen Groß
Quoted 17 lines · Wei Liu
Quoted 16 lines · Juergen Gross

For each library built two variants of pkg-config files are created from a per-library template: an "official" one for installation on the user's system, and one used for building internal tools, like e.g. qemu.

Instead of the template which is looking very similar for all libraries generate the pkg-config files directly from make variables.

This will reduce the need to specify some pkg-config file entries in the templates, as the contents can easily be generated from available data (e.g. "Version:" and "Requires.private:" entries).

Especially the variant used for building internal tools needs to gain additional runtime link parameters for the internally used libraries, as otherwise those won't be found by the users (e.g. qemu).

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Do you have the new generated files handy so that I can eyeball them a bit?

Attached (both, the local and the installed ones, with the complete series applied).

Thanks. They look correct to me.

Wei.

#5 lore raw

PATCH v4 2/31 tools: drop explicit path specifications for qemu build

In reply to Juergen Gross

Since more than three years now qemu is capable to set the needed include and library paths for the Xen libraries via pkg-config.

So drop the specification of those paths in tools/Makefile. This will enable to move libxenctrl away from tools/libxc, as qemu's configure script has special treatment of this path.

---
 tools/Makefile | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)
tools/Makefile +1 -25
index 198b239edc..7c9f9fc900 100644
@@ -245,32 +245,8 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 		-DXC_WANT_COMPAT_GNTTAB_API=1 \
 		-DXC_WANT_COMPAT_MAP_FOREIGN_API=1 \
 		-DXC_WANT_COMPAT_DEVICEMODEL_API=1 \
-		-I$(XEN_ROOT)/tools/include \
-		-I$(XEN_ROOT)/tools/libs/toolcore/include \
-		-I$(XEN_ROOT)/tools/libs/toollog/include \
-		-I$(XEN_ROOT)/tools/libs/evtchn/include \
-		-I$(XEN_ROOT)/tools/libs/gnttab/include \
-		-I$(XEN_ROOT)/tools/libs/foreignmemory/include \
-		-I$(XEN_ROOT)/tools/libs/devicemodel/include \
-		-I$(XEN_ROOT)/tools/libxc/include \
-		-I$(XEN_ROOT)/tools/xenstore/include \
-		-I$(XEN_ROOT)/tools/xenstore/compat/include \
 		$(EXTRA_CFLAGS_QEMU_XEN)" \
-		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
-		-L$(XEN_ROOT)/tools/xenstore \
-		-L$(XEN_ROOT)/tools/libs/toolcore \
-		-L$(XEN_ROOT)/tools/libs/evtchn \
-		-L$(XEN_ROOT)/tools/libs/gnttab \
-		-L$(XEN_ROOT)/tools/libs/foreignmemory \
-		-L$(XEN_ROOT)/tools/libs/devicemodel \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/evtchn \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/gnttab \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory \
-		-Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel \
-		$(QEMU_UPSTREAM_RPATH)" \
+		--extra-ldflags="$(QEMU_UPSTREAM_RPATH)" \
 		--bindir=$(LIBEXEC_BIN) \
 		--datadir=$(SHAREDIR)/qemu-xen \
 		--localstatedir=$(localstatedir) \
Signature · 1 line
2.26.2
Acked-by on v4 2/31
#6 lore raw

Re: [PATCH v4 02/31] tools: drop explicit path specifications for qemu build

Quoted 8 lines · Juergen Gross

Since more than three years now qemu is capable to set the needed include and library paths for the Xen libraries via pkg-config.

So drop the specification of those paths in tools/Makefile. This will enable to move libxenctrl away from tools/libxc, as qemu's configure script has special treatment of this path.

#7 lore raw

PATCH v4 3/31 tools/python: drop libxenguest from setup.py

In reply to Juergen Gross

There is not a single wrapper for a libxenguest function defined. So drop libxenguest from tools/python/setup.py.

---
 tools/python/setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/python/setup.py +2 -2
index 8faf1c0ddc..44696b3998 100644
@@ -21,8 +21,8 @@ xc = Extension("xc",
                                       PATH_LIBXC + "/include",
                                       "xen/lowlevel/xc" ],
                library_dirs       = [ PATH_LIBXC ],
-               libraries          = [ "xenctrl", "xenguest" ],
-               depends            = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ],
+               libraries          = [ "xenctrl" ],
+               depends            = [ PATH_LIBXC + "/libxenctrl.so" ],
                extra_link_args    = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
                sources            = [ "xen/lowlevel/xc/xc.c" ])
 
Signature · 1 line
2.26.2
#8 lore raw

PATCH v4 4/31 tools: fix pkg-config file for libxenguest

In reply to Juergen Gross

The pkg-config file for libxenguest is missing the private dependency on libxenctrl.

---
 tools/libxc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxc/Makefile +1 -1
index 315ac0b4f3..763231065c 100644
@@ -178,7 +178,7 @@ $(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_NAME = Xenguest
 $(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_DESC = The Xenguest library for Xen hypervisor
 $(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenguest)
 $(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_LIB = xenguest
-$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_REQPRIV = xentoollog,xencall,xenforeignmemory,xenevtchn
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_REQPRIV = xentoollog,xencall,xenforeignmemory,xenevtchn,xencontrol
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
Signature · 1 line
2.26.2
#9 lore raw

PATCH v4 5/31 tools: don't assume libxenguest and libxenctrl to be in same directory

In reply to Juergen Gross

There are quite some places in Makefiles assuming libxenguest and libxenctrl being built in the same directory via a single Makefile.

Drop this assumption by specifying the dependencies and path variables for both libraries correctly.

---
 tools/Rules.mk       | 7 +++----
 tools/libxl/Makefile | 2 +-
 tools/misc/Makefile  | 1 +
 3 files changed, 5 insertions(+), 5 deletions(-)
tools/Rules.mk +3 -4
index 7ad72bebd3..4f3aaaacd3 100644
@@ -16,8 +16,7 @@ XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 include $(XEN_ROOT)/tools/libs/uselibs.mk
 
 XEN_libxenctrl     = $(XEN_ROOT)/tools/libxc
-# Currently libxenguest lives in the same directory as libxenctrl
-XEN_libxenguest    = $(XEN_libxenctrl)
+XEN_libxenguest    = $(XEN_ROOT)/tools/libxc
 XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
 XEN_libxlutil      = $(XEN_libxenlight)
@@ -117,7 +116,7 @@ LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxenguest$(libex
 SHLIB_libxenguest  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_libxenguest)
 
 CFLAGS_libxenstore = -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude)
-SHDEPS_libxenstore = $(SHLIB_libxentoolcore)
+SHDEPS_libxenstore = $(SHLIB_libxentoolcore) $(SHLIB_libxenctrl)
 LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_libxenstore)/libxenstore$(libextension)
 SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_libxenstore)
 ifeq ($(CONFIG_Linux),y)
@@ -144,7 +143,7 @@ CFLAGS += -O2 -fomit-frame-pointer
 endif
 
 CFLAGS_libxenlight = -I$(XEN_libxenlight) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
-SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libxenhypfs)
+SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libxenhypfs) $(SHLIB_libxenguest)
 LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_libxenlight)/libxenlight$(libextension)
 SHLIB_libxenlight  = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_libxenlight)
 
tools/libxl/Makefile +1 -1
index 684da32a5b..b815c548de 100644
@@ -188,7 +188,7 @@ libxl_dom.o: CFLAGS += -I$(XEN_ROOT)/tools  # include libacpi/x86.h
 libxl_x86_acpi.o: CFLAGS += -I$(XEN_ROOT)/tools
 
 SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o
-$(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn)
+$(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenguest)
 
 PKG_CONFIG = xenlight.pc xlutil.pc
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
tools/misc/Makefile +1 -0
index 9fdb13597f..e7e74db85f 100644
@@ -6,6 +6,7 @@ CFLAGS += -Werror
 CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += $(CFLAGS_libxenevtchn)
 CFLAGS += $(CFLAGS_libxenctrl)
+CFLAGS += $(CFLAGS_libxenguest)
 CFLAGS += $(CFLAGS_xeninclude)
 CFLAGS += $(CFLAGS_libxenstore)
 
Signature · 1 line
2.26.2
#10 lore raw

PATCH v4 6/31 tools/misc: don't use libxenctrl internals from xen-hptool

In reply to Juergen Gross

xen-hptool is including private headers from tools/libxc without any need. Switch it to use official headers only.

---
 tools/misc/Makefile     | 2 --
 tools/misc/xen-hptool.c | 8 +++++---
 2 files changed, 5 insertions(+), 5 deletions(-)
tools/misc/Makefile +0 -2
index e7e74db85f..2a7f2ec42d 100644
@@ -94,8 +94,6 @@ xenhypfs: xenhypfs.o
 xenlockprof: xenlockprof.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
-# xen-hptool incorrectly uses libxc internals
-xen-hptool.o: CFLAGS += -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall)
 xen-hptool: xen-hptool.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(APPEND_LDFLAGS)
 
tools/misc/xen-hptool.c +5 -3
index 6e27d9cf43..7f17f24942 100644
@@ -1,9 +1,11 @@
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include <xenevtchn.h>
 #include <xenctrl.h>
-#include <xc_private.h>
-#include <xc_core.h>
+#include <xenguest.h>
 #include <xenstore.h>
-#include <unistd.h>
+#include <xen-tools/libs.h>
 
 static xc_interface *xch;
 
Signature · 1 line
2.26.2
#11 lore raw

PATCH v4 7/31 tools/misc: don't include xg_save_restore.h from xen-mfndump.c

In reply to Juergen Gross

xen-mfndump.c is including the libxc private header xg_save_restore.h. Avoid that by moving the definition of is_mapped() to xen-mfndump.c (it is used there only) and by duplicating the definition of M2P_SIZE() in xen-mfndump.c.

---
 tools/libxc/xg_save_restore.h | 4 ----
 tools/misc/xen-mfndump.c      | 5 ++++-
 2 files changed, 4 insertions(+), 5 deletions(-)
tools/libxc/xg_save_restore.h +0 -4
index 303081df0d..b904296997 100644
@@ -109,10 +109,6 @@ static inline int get_platform_info(xc_interface *xch, uint32_t dom,
 #define M2P_SIZE(_m)    ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
 #define M2P_CHUNKS(_m)  (M2P_SIZE((_m)) >> M2P_SHIFT)
 
-/* Returns TRUE if the PFN is currently mapped */
-#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
-
-
 #define GET_FIELD(_p, _f, _w) (((_w) == 8) ? ((_p)->x64._f) : ((_p)->x32._f))
 
 #define SET_FIELD(_p, _f, _v, _w) do {          \
tools/misc/xen-mfndump.c +4 -1
index 858bd0e26b..cb15d08c7e 100644
@@ -5,7 +5,10 @@
 #include <unistd.h>
 #include <inttypes.h>
 
-#include "xg_save_restore.h"
+#include <xen-tools/libs.h>
+
+#define M2P_SIZE(_m)    ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21)
+#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
 
 static xc_interface *xch;
 
Signature · 1 line
2.26.2
#12 lore raw

PATCH v4 8/31 tools/misc: replace PAGE_SIZE with XC_PAGE_SIZE in xen-mfndump.c

In reply to Juergen Gross

The definition of PAGE_SIZE comes from xc_private.h, which shouldn't be used by xen-mfndump.c. Replace PAGE_SIZE by XC_PAGE_SIZE, as xc_private.h contains:

#define PAGE_SIZE XC_PAGE_SIZE

For the same reason PAGE_SHIFT_X86 needs to replaced with XC_PAGE_SHIFT.

---
 tools/misc/xen-mfndump.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
tools/misc/xen-mfndump.c +13 -13
index cb15d08c7e..92bc954ce0 100644
@@ -207,7 +207,7 @@ int dump_ptes_func(int argc, char *argv[])
         goto out;
     }
 
-    page = xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ,
+    page = xc_map_foreign_range(xch, domid, XC_PAGE_SIZE, PROT_READ,
                                 minfo.p2m_table[pfn]);
     if ( !page )
     {
@@ -216,7 +216,7 @@ int dump_ptes_func(int argc, char *argv[])
         goto out;
     }
 
-    pte_num = PAGE_SIZE / 8;
+    pte_num = XC_PAGE_SIZE / 8;
 
     printf(" --- Dumping %d PTEs for domain %d ---\n", pte_num, domid);
     printf(" Guest Width: %u, PT Levels: %u P2M size: = %lu\n",
@@ -252,7 +252,7 @@ int dump_ptes_func(int argc, char *argv[])
 
  out:
     if ( page )
-        munmap(page, PAGE_SIZE);
+        munmap(page, XC_PAGE_SIZE);
     xc_unmap_domain_meminfo(xch, &minfo);
     munmap(m2p_table, M2P_SIZE(max_mfn));
     return rc;
@@ -290,7 +290,7 @@ int lookup_pte_func(int argc, char *argv[])
         return -1;
     }
 
-    pte_num = PAGE_SIZE / 8;
+    pte_num = XC_PAGE_SIZE / 8;
 
     printf(" --- Lookig for PTEs mapping mfn 0x%lx for domain %d ---\n",
            mfn, domid);
@@ -302,7 +302,7 @@ int lookup_pte_func(int argc, char *argv[])
         if ( !(minfo.pfn_type[i] & XEN_DOMCTL_PFINFO_LTABTYPE_MASK) )
             continue;
 
-        page = xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ,
+        page = xc_map_foreign_range(xch, domid, XC_PAGE_SIZE, PROT_READ,
                                     minfo.p2m_table[i]);
         if ( !page )
             continue;
@@ -312,15 +312,15 @@ int lookup_pte_func(int argc, char *argv[])
             uint64_t pte = ((const uint64_t*)page)[j];
 
 #define __MADDR_BITS_X86  ((minfo.guest_width == 8) ? 52 : 44)
-#define __MFN_MASK_X86    ((1ULL << (__MADDR_BITS_X86 - PAGE_SHIFT_X86)) - 1)
-            if ( ((pte >> PAGE_SHIFT_X86) & __MFN_MASK_X86) == mfn)
+#define __MFN_MASK_X86    ((1ULL << (__MADDR_BITS_X86 - XC_PAGE_SHIFT)) - 1)
+            if ( ((pte >> XC_PAGE_SHIFT) & __MFN_MASK_X86) == mfn)
                 printf("  0x%lx <-- [0x%lx][%lu]: 0x%"PRIx64"\n",
                        mfn, minfo.p2m_table[i], j, pte);
 #undef __MADDR_BITS_X86
 #undef __MFN_MASK_X8
         }
 
-        munmap(page, PAGE_SIZE);
+        munmap(page, XC_PAGE_SIZE);
         page = NULL;
     }
 
@@ -355,8 +355,8 @@ int memcmp_mfns_func(int argc, char *argv[])
         return -1;
     }
 
-    page1 = xc_map_foreign_range(xch, domid1, PAGE_SIZE, PROT_READ, mfn1);
-    page2 = xc_map_foreign_range(xch, domid2, PAGE_SIZE, PROT_READ, mfn2);
+    page1 = xc_map_foreign_range(xch, domid1, XC_PAGE_SIZE, PROT_READ, mfn1);
+    page2 = xc_map_foreign_range(xch, domid2, XC_PAGE_SIZE, PROT_READ, mfn2);
     if ( !page1 || !page2 )
     {
         ERROR("Failed to map either 0x%lx[dom %d] or 0x%lx[dom %d]\n",
@@ -368,13 +368,13 @@ int memcmp_mfns_func(int argc, char *argv[])
     printf(" --- Comparing the content of 2 MFNs ---\n");
     printf(" 1: 0x%lx[dom %d], 2: 0x%lx[dom %d]\n",
            mfn1, domid1, mfn2, domid2);
-    printf("  memcpy(1, 2) = %d\n", memcmp(page1, page2, PAGE_SIZE));
+    printf("  memcpy(1, 2) = %d\n", memcmp(page1, page2, XC_PAGE_SIZE));
 
  out:
     if ( page1 )
-        munmap(page1, PAGE_SIZE);
+        munmap(page1, XC_PAGE_SIZE);
     if ( page2 )
-        munmap(page2, PAGE_SIZE);
+        munmap(page2, XC_PAGE_SIZE);
     return rc;
 }
 
Signature · 1 line
2.26.2
#13 lore raw

PATCH v4 9/31 tools/misc: drop all libxc internals from xen-mfndump.c

In reply to Juergen Gross

The last libxc internal used by xen-mfndump.c is the ERROR() macro. Add a simple definition for that macro to xen-mfndump.c and replace the libxc private header includes by official ones.

---
 tools/misc/Makefile      |  2 --
 tools/misc/xen-mfndump.c | 13 +++++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)
tools/misc/Makefile +0 -2
index 2a7f2ec42d..7d37f297a9 100644
@@ -99,8 +99,6 @@ xen-hptool: xen-hptool.o
 
 xenhypfs.o: CFLAGS += $(CFLAGS_libxenhypfs)
 
-# xen-mfndump incorrectly uses libxc internals
-xen-mfndump.o: CFLAGS += -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall)
 xen-mfndump: xen-mfndump.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
 
tools/misc/xen-mfndump.c +9 -4
index 92bc954ce0..62121bd241 100644
@@ -1,15 +1,20 @@
-#define XC_WANT_COMPAT_MAP_FOREIGN_API
-#include <xenctrl.h>
-#include <xc_private.h>
-#include <xc_core.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
 #include <unistd.h>
 #include <inttypes.h>
 
+#define XC_WANT_COMPAT_MAP_FOREIGN_API
+#include <xenctrl.h>
+#include <xenguest.h>
+
 #include <xen-tools/libs.h>
 
 #define M2P_SIZE(_m)    ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21)
 #define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
 
+#define ERROR(msg, args...) fprintf(stderr, msg, ## args)
+
 static xc_interface *xch;
 
 int help_func(int argc, char *argv[])
Signature · 1 line
2.26.2
#14 lore raw

PATCH v4 10/31 tools/libxc: remove unused headers xc_efi.h and xc_elf.h

In reply to Juergen Gross

Remove xc_efi.h and xc_elf.h as they aren't used anywhere.

---
 tools/libxc/xc_efi.h | 158 -------------------------------------------
 tools/libxc/xc_elf.h |  16 -----
 2 files changed, 174 deletions(-)
 delete mode 100644 tools/libxc/xc_efi.h
 delete mode 100644 tools/libxc/xc_elf.h
tools/libxc/xc_efi.h deleted +0 -158
deleted file mode 100644
index dbe105be8f..0000000000
@@ -1,158 +0,0 @@
-/*
- * Extensible Firmware Interface
- * Based on 'Extensible Firmware Interface Specification' version 0.9, April 30, 1999
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; If not, see <http://www.gnu.org/licenses/>.
- *
- * Copyright (C) 1999 VA Linux Systems
- * Copyright (C) 1999 Walt Drummond <[email protected]>
- * Copyright (C) 1999, 2002-2003 Hewlett-Packard Co.
- *      David Mosberger-Tang <[email protected]>
- *      Stephane Eranian <[email protected]>
- */
-
-#ifndef XC_EFI_H
-#define XC_EFI_H
-
-/* definitions from xen/include/asm-ia64/linux-xen/linux/efi.h */
-
-typedef struct {
-        uint8_t b[16];
-} efi_guid_t;
-
-#define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
-((efi_guid_t) \
-{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
-  (b) & 0xff, ((b) >> 8) & 0xff, \
-  (c) & 0xff, ((c) >> 8) & 0xff, \
-  (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
-
-/*
- * Generic EFI table header
- */
-typedef struct {
-	uint64_t signature;
-	uint32_t revision;
-	uint32_t headersize;
-	uint32_t crc32;
-	uint32_t reserved;
-} efi_table_hdr_t;
-
-/*
- * Memory map descriptor:
- */
-
-/* Memory types: */
-#define EFI_RESERVED_TYPE                0
-#define EFI_LOADER_CODE                  1
-#define EFI_LOADER_DATA                  2
-#define EFI_BOOT_SERVICES_CODE           3
-#define EFI_BOOT_SERVICES_DATA           4
-#define EFI_RUNTIME_SERVICES_CODE        5
-#define EFI_RUNTIME_SERVICES_DATA        6
-#define EFI_CONVENTIONAL_MEMORY          7
-#define EFI_UNUSABLE_MEMORY              8
-#define EFI_ACPI_RECLAIM_MEMORY          9
-#define EFI_ACPI_MEMORY_NVS             10
-#define EFI_MEMORY_MAPPED_IO            11
-#define EFI_MEMORY_MAPPED_IO_PORT_SPACE 12
-#define EFI_PAL_CODE                    13
-#define EFI_MAX_MEMORY_TYPE             14
-
-/* Attribute values: */
-#define EFI_MEMORY_UC           ((uint64_t)0x0000000000000001ULL)    /* uncached */
-#define EFI_MEMORY_WC           ((uint64_t)0x0000000000000002ULL)    /* write-coalescing */
-#define EFI_MEMORY_WT           ((uint64_t)0x0000000000000004ULL)    /* write-through */
-#define EFI_MEMORY_WB           ((uint64_t)0x0000000000000008ULL)    /* write-back */
-#define EFI_MEMORY_WP           ((uint64_t)0x0000000000001000ULL)    /* write-protect */
-#define EFI_MEMORY_RP           ((uint64_t)0x0000000000002000ULL)    /* read-protect */
-#define EFI_MEMORY_XP           ((uint64_t)0x0000000000004000ULL)    /* execute-protect */
-#define EFI_MEMORY_RUNTIME      ((uint64_t)0x8000000000000000ULL)    /* range requires runtime mapping */
-#define EFI_MEMORY_DESCRIPTOR_VERSION   1
-
-#define EFI_PAGE_SHIFT          12
-
-/*
- * For current x86 implementations of EFI, there is
- * additional padding in the mem descriptors.  This is not
- * the case in ia64.  Need to have this fixed in the f/w.
- */
-typedef struct {
-        uint32_t type;
-        uint32_t pad;
-        uint64_t phys_addr;
-        uint64_t virt_addr;
-        uint64_t num_pages;
-        uint64_t attribute;
-#if defined (__i386__)
-        uint64_t pad1;
-#endif
-} efi_memory_desc_t;
-
-/*
- * EFI Runtime Services table
- */
-#define EFI_RUNTIME_SERVICES_SIGNATURE	((uint64_t)0x5652453544e5552ULL)
-#define EFI_RUNTIME_SERVICES_REVISION	0x00010000
-
-typedef struct {
-	efi_table_hdr_t hdr;
-	unsigned long get_time;
-	unsigned long set_time;
-	unsigned long get_wakeup_time;
-	unsigned long set_wakeup_time;
-	unsigned long set_virtual_address_map;
-	unsigned long convert_pointer;
-	unsigned long get_variable;
-	unsigned long get_next_variable;
-	unsigned long set_variable;
-	unsigned long get_next_high_mono_count;
-	unsigned long reset_system;
-} efi_runtime_services_t;
-
-/*
- *  EFI Configuration Table and GUID definitions
- */
-#define NULL_GUID \
-    EFI_GUID(  0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 )
-#define ACPI_20_TABLE_GUID    \
-    EFI_GUID(  0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 )
-#define SAL_SYSTEM_TABLE_GUID    \
-    EFI_GUID(  0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
-
-typedef struct {
-	efi_guid_t guid;
-	unsigned long table;
-} efi_config_table_t;
-
-#define EFI_SYSTEM_TABLE_SIGNATURE ((uint64_t)0x5453595320494249ULL)
-#define EFI_SYSTEM_TABLE_REVISION  ((1 << 16) | 00)
-
-typedef struct {
-	efi_table_hdr_t hdr;
-	unsigned long fw_vendor;	/* physical addr of CHAR16 vendor string */
-	uint32_t fw_revision;
-	unsigned long con_in_handle;
-	unsigned long con_in;
-	unsigned long con_out_handle;
-	unsigned long con_out;
-	unsigned long stderr_handle;
-	unsigned long stderr;
-	efi_runtime_services_t *runtime;
-	unsigned long boottime;
-	unsigned long nr_tables;
-	unsigned long tables;
-} efi_system_table_t;
-
-#endif /* XC_EFI_H */
tools/libxc/xc_elf.h deleted +0 -16
deleted file mode 100644
index acbc0280bd..0000000000
@@ -1,16 +0,0 @@
-/*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <xen/libelf/elfstructs.h>
Signature · 1 line
2.26.2
#15 lore raw

PATCH v4 11/31 tools/libxc: move xc_[un]map_domain_meminfo() into new source xg_domain.c

In reply to Juergen Gross

Move xc_[un]map_domain_meminfo() functions to new source xg_domain.c as they are defined in include/xenguest.h and should be in libxenguest.

---
 tools/libxc/Makefile    |   4 +-
 tools/libxc/xc_domain.c | 126 ---------------------------------
 tools/libxc/xg_domain.c | 149 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+), 127 deletions(-)
 create mode 100644 tools/libxc/xg_domain.c
tools/libxc/Makefile +3 -1
index 763231065c..7b81f8c193 100644
@@ -52,7 +52,9 @@ CTRL_SRCS-y       += xc_gnttab_compat.c
 CTRL_SRCS-y       += xc_devicemodel_compat.c
 
 GUEST_SRCS-y :=
-GUEST_SRCS-y += xg_private.c xc_suspend.c
+GUEST_SRCS-y += xg_private.c
+GUEST_SRCS-y += xg_domain.c
+GUEST_SRCS-y += xc_suspend.c
 ifeq ($(CONFIG_MIGRATE),y)
 GUEST_SRCS-y += xc_sr_common.c
 GUEST_SRCS-$(CONFIG_X86) += xc_sr_common_x86.c
tools/libxc/xc_domain.c +0 -126

132 lines not on this page · raw message

tools/libxc/xg_domain.c new file +149 -0

149 lines not on this page · raw message

Signature · 1 line
2.26.2
#16 lore raw

PATCH v4 12/31 tools/libxc: rename all libxenguest sources to xg_*

In reply to Juergen Gross

Some sources of libxenguest are named xg_*.c and some xc_*.c. Rename the xc_*.c files to xg_*.c.

---
 tools/libxc/Makefile                          | 59 ++++++++++---------
 .../libxc/{xc_cpuid_x86.c => xg_cpuid_x86.c}  |  0
 tools/libxc/{xc_dom_arm.c => xg_dom_arm.c}    |  0
 ...imageloader.c => xg_dom_armzimageloader.c} |  0
 ...{xc_dom_binloader.c => xg_dom_binloader.c} |  0
 tools/libxc/{xc_dom_boot.c => xg_dom_boot.c}  |  0
 ...bzimageloader.c => xg_dom_bzimageloader.c} |  0
 ...m_compat_linux.c => xg_dom_compat_linux.c} |  0
 tools/libxc/{xc_dom_core.c => xg_dom_core.c}  |  0
 ...compress_lz4.c => xg_dom_decompress_lz4.c} |  0
 ...ss_unsafe.c => xg_dom_decompress_unsafe.c} |  0
 ...ip2.c => xg_dom_decompress_unsafe_bzip2.c} |  0
 ...lzma.c => xg_dom_decompress_unsafe_lzma.c} |  0
 ...o1x.c => xg_dom_decompress_unsafe_lzo1x.c} |  0
 ...afe_xz.c => xg_dom_decompress_unsafe_xz.c} |  0
 ...{xc_dom_elfloader.c => xg_dom_elfloader.c} |  0
 ...{xc_dom_hvmloader.c => xg_dom_hvmloader.c} |  0
 tools/libxc/{xc_dom_x86.c => xg_dom_x86.c}    |  0
 .../libxc/{xc_nomigrate.c => xg_nomigrate.c}  |  0
 .../{xc_offline_page.c => xg_offline_page.c}  |  0
 .../libxc/{xc_sr_common.c => xg_sr_common.c}  |  0
 ...{xc_sr_common_x86.c => xg_sr_common_x86.c} |  0
 ..._common_x86_pv.c => xg_sr_common_x86_pv.c} |  0
 .../{xc_sr_restore.c => xg_sr_restore.c}      |  0
 ...tore_x86_hvm.c => xg_sr_restore_x86_hvm.c} |  0
 ...estore_x86_pv.c => xg_sr_restore_x86_pv.c} |  0
 tools/libxc/{xc_sr_save.c => xg_sr_save.c}    |  0
 ...sr_save_x86_hvm.c => xg_sr_save_x86_hvm.c} |  0
 ...c_sr_save_x86_pv.c => xg_sr_save_x86_pv.c} |  0
 tools/libxc/{xc_suspend.c => xg_suspend.c}    |  0
 30 files changed, 30 insertions(+), 29 deletions(-)
 rename tools/libxc/{xc_cpuid_x86.c => xg_cpuid_x86.c} (100%)
 rename tools/libxc/{xc_dom_arm.c => xg_dom_arm.c} (100%)
 rename tools/libxc/{xc_dom_armzimageloader.c => xg_dom_armzimageloader.c} (100%)
 rename tools/libxc/{xc_dom_binloader.c => xg_dom_binloader.c} (100%)
 rename tools/libxc/{xc_dom_boot.c => xg_dom_boot.c} (100%)
 rename tools/libxc/{xc_dom_bzimageloader.c => xg_dom_bzimageloader.c} (100%)
 rename tools/libxc/{xc_dom_compat_linux.c => xg_dom_compat_linux.c} (100%)
 rename tools/libxc/{xc_dom_core.c => xg_dom_core.c} (100%)
 rename tools/libxc/{xc_dom_decompress_lz4.c => xg_dom_decompress_lz4.c} (100%)
 rename tools/libxc/{xc_dom_decompress_unsafe.c => xg_dom_decompress_unsafe.c} (100%)
 rename tools/libxc/{xc_dom_decompress_unsafe_bzip2.c => xg_dom_decompress_unsafe_bzip2.c} (100%)
 rename tools/libxc/{xc_dom_decompress_unsafe_lzma.c => xg_dom_decompress_unsafe_lzma.c} (100%)
 rename tools/libxc/{xc_dom_decompress_unsafe_lzo1x.c => xg_dom_decompress_unsafe_lzo1x.c} (100%)
 rename tools/libxc/{xc_dom_decompress_unsafe_xz.c => xg_dom_decompress_unsafe_xz.c} (100%)
 rename tools/libxc/{xc_dom_elfloader.c => xg_dom_elfloader.c} (100%)
 rename tools/libxc/{xc_dom_hvmloader.c => xg_dom_hvmloader.c} (100%)
 rename tools/libxc/{xc_dom_x86.c => xg_dom_x86.c} (100%)
 rename tools/libxc/{xc_nomigrate.c => xg_nomigrate.c} (100%)
 rename tools/libxc/{xc_offline_page.c => xg_offline_page.c} (100%)
 rename tools/libxc/{xc_sr_common.c => xg_sr_common.c} (100%)
 rename tools/libxc/{xc_sr_common_x86.c => xg_sr_common_x86.c} (100%)
 rename tools/libxc/{xc_sr_common_x86_pv.c => xg_sr_common_x86_pv.c} (100%)
 rename tools/libxc/{xc_sr_restore.c => xg_sr_restore.c} (100%)
 rename tools/libxc/{xc_sr_restore_x86_hvm.c => xg_sr_restore_x86_hvm.c} (100%)
 rename tools/libxc/{xc_sr_restore_x86_pv.c => xg_sr_restore_x86_pv.c} (100%)
 rename tools/libxc/{xc_sr_save.c => xg_sr_save.c} (100%)
 rename tools/libxc/{xc_sr_save_x86_hvm.c => xg_sr_save_x86_hvm.c} (100%)
 rename tools/libxc/{xc_sr_save_x86_pv.c => xg_sr_save_x86_pv.c} (100%)
 rename tools/libxc/{xc_suspend.c => xg_suspend.c} (100%)
tools/libxc/Makefile +30 -29
index 7b81f8c193..0fd5511143 100644
@@ -54,20 +54,20 @@ CTRL_SRCS-y       += xc_devicemodel_compat.c
 GUEST_SRCS-y :=
 GUEST_SRCS-y += xg_private.c
 GUEST_SRCS-y += xg_domain.c
-GUEST_SRCS-y += xc_suspend.c
+GUEST_SRCS-y += xg_suspend.c
 ifeq ($(CONFIG_MIGRATE),y)
-GUEST_SRCS-y += xc_sr_common.c
-GUEST_SRCS-$(CONFIG_X86) += xc_sr_common_x86.c
-GUEST_SRCS-$(CONFIG_X86) += xc_sr_common_x86_pv.c
-GUEST_SRCS-$(CONFIG_X86) += xc_sr_restore_x86_pv.c
-GUEST_SRCS-$(CONFIG_X86) += xc_sr_restore_x86_hvm.c
-GUEST_SRCS-$(CONFIG_X86) += xc_sr_save_x86_pv.c
-GUEST_SRCS-$(CONFIG_X86) += xc_sr_save_x86_hvm.c
-GUEST_SRCS-y += xc_sr_restore.c
-GUEST_SRCS-y += xc_sr_save.c
-GUEST_SRCS-y += xc_offline_page.c
+GUEST_SRCS-y += xg_sr_common.c
+GUEST_SRCS-$(CONFIG_X86) += xg_sr_common_x86.c
+GUEST_SRCS-$(CONFIG_X86) += xg_sr_common_x86_pv.c
+GUEST_SRCS-$(CONFIG_X86) += xg_sr_restore_x86_pv.c
+GUEST_SRCS-$(CONFIG_X86) += xg_sr_restore_x86_hvm.c
+GUEST_SRCS-$(CONFIG_X86) += xg_sr_save_x86_pv.c
+GUEST_SRCS-$(CONFIG_X86) += xg_sr_save_x86_hvm.c
+GUEST_SRCS-y += xg_sr_restore.c
+GUEST_SRCS-y += xg_sr_save.c
+GUEST_SRCS-y += xg_offline_page.c
 else
-GUEST_SRCS-y += xc_nomigrate.c
+GUEST_SRCS-y += xg_nomigrate.c
 endif
 
 vpath %.c ../../xen/common/libelf
@@ -88,25 +88,26 @@ GUEST_SRCS-y                 += cpuid.c msr.c
 endif
 
 # new domain builder
-GUEST_SRCS-y                 += xc_dom_core.c xc_dom_boot.c
-GUEST_SRCS-y                 += xc_dom_elfloader.c
-GUEST_SRCS-$(CONFIG_X86)     += xc_dom_bzimageloader.c
-GUEST_SRCS-$(CONFIG_X86)     += xc_dom_decompress_lz4.c
-GUEST_SRCS-$(CONFIG_X86)     += xc_dom_hvmloader.c
-GUEST_SRCS-$(CONFIG_ARM)     += xc_dom_armzimageloader.c
-GUEST_SRCS-y                 += xc_dom_binloader.c
-GUEST_SRCS-y                 += xc_dom_compat_linux.c
-
-GUEST_SRCS-$(CONFIG_X86)     += xc_dom_x86.c
-GUEST_SRCS-$(CONFIG_X86)     += xc_cpuid_x86.c
-GUEST_SRCS-$(CONFIG_ARM)     += xc_dom_arm.c
+GUEST_SRCS-y                 += xg_dom_core.c
+GUEST_SRCS-y                 += xg_dom_boot.c
+GUEST_SRCS-y                 += xg_dom_elfloader.c
+GUEST_SRCS-$(CONFIG_X86)     += xg_dom_bzimageloader.c
+GUEST_SRCS-$(CONFIG_X86)     += xg_dom_decompress_lz4.c
+GUEST_SRCS-$(CONFIG_X86)     += xg_dom_hvmloader.c
+GUEST_SRCS-$(CONFIG_ARM)     += xg_dom_armzimageloader.c
+GUEST_SRCS-y                 += xg_dom_binloader.c
+GUEST_SRCS-y                 += xg_dom_compat_linux.c
+
+GUEST_SRCS-$(CONFIG_X86)     += xg_dom_x86.c
+GUEST_SRCS-$(CONFIG_X86)     += xg_cpuid_x86.c
+GUEST_SRCS-$(CONFIG_ARM)     += xg_dom_arm.c
 
 ifeq ($(CONFIG_LIBXC_MINIOS),y)
-GUEST_SRCS-y                 += xc_dom_decompress_unsafe.c
-GUEST_SRCS-y                 += xc_dom_decompress_unsafe_bzip2.c
-GUEST_SRCS-y                 += xc_dom_decompress_unsafe_lzma.c
-GUEST_SRCS-y                 += xc_dom_decompress_unsafe_lzo1x.c
-GUEST_SRCS-y                 += xc_dom_decompress_unsafe_xz.c
+GUEST_SRCS-y                 += xg_dom_decompress_unsafe.c
+GUEST_SRCS-y                 += xg_dom_decompress_unsafe_bzip2.c
+GUEST_SRCS-y                 += xg_dom_decompress_unsafe_lzma.c
+GUEST_SRCS-y                 += xg_dom_decompress_unsafe_lzo1x.c
+GUEST_SRCS-y                 += xg_dom_decompress_unsafe_xz.c
 endif
 
 -include $(XEN_TARGET_ARCH)/Makefile
tools/libxc/xg_cpuid_x86.c renamed from tools/libxc/xc_cpuid_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xc_cpuid_x86.c
rename to tools/libxc/xg_cpuid_x86.c
tools/libxc/xg_dom_arm.c renamed from tools/libxc/xc_dom_arm.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_arm.c
rename to tools/libxc/xg_dom_arm.c
tools/libxc/xg_dom_armzimageloader.c renamed from tools/libxc/xc_dom_armzimageloader.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_armzimageloader.c
rename to tools/libxc/xg_dom_armzimageloader.c
tools/libxc/xg_dom_binloader.c renamed from tools/libxc/xc_dom_binloader.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_binloader.c
rename to tools/libxc/xg_dom_binloader.c
tools/libxc/xg_dom_boot.c renamed from tools/libxc/xc_dom_boot.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_boot.c
rename to tools/libxc/xg_dom_boot.c
tools/libxc/xg_dom_bzimageloader.c renamed from tools/libxc/xc_dom_bzimageloader.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_bzimageloader.c
rename to tools/libxc/xg_dom_bzimageloader.c
tools/libxc/xg_dom_compat_linux.c renamed from tools/libxc/xc_dom_compat_linux.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_compat_linux.c
rename to tools/libxc/xg_dom_compat_linux.c
tools/libxc/xg_dom_core.c renamed from tools/libxc/xc_dom_core.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_core.c
rename to tools/libxc/xg_dom_core.c
tools/libxc/xg_dom_decompress_lz4.c renamed from tools/libxc/xc_dom_decompress_lz4.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_lz4.c
rename to tools/libxc/xg_dom_decompress_lz4.c
tools/libxc/xg_dom_decompress_unsafe.c renamed from tools/libxc/xc_dom_decompress_unsafe.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_unsafe.c
rename to tools/libxc/xg_dom_decompress_unsafe.c
tools/libxc/xg_dom_decompress_unsafe_bzip2.c renamed from tools/libxc/xc_dom_decompress_unsafe_bzip2.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_unsafe_bzip2.c
rename to tools/libxc/xg_dom_decompress_unsafe_bzip2.c
tools/libxc/xg_dom_decompress_unsafe_lzma.c renamed from tools/libxc/xc_dom_decompress_unsafe_lzma.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_unsafe_lzma.c
rename to tools/libxc/xg_dom_decompress_unsafe_lzma.c
tools/libxc/xg_dom_decompress_unsafe_lzo1x.c renamed from tools/libxc/xc_dom_decompress_unsafe_lzo1x.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_unsafe_lzo1x.c
rename to tools/libxc/xg_dom_decompress_unsafe_lzo1x.c
tools/libxc/xg_dom_decompress_unsafe_xz.c renamed from tools/libxc/xc_dom_decompress_unsafe_xz.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_unsafe_xz.c
rename to tools/libxc/xg_dom_decompress_unsafe_xz.c
tools/libxc/xg_dom_elfloader.c renamed from tools/libxc/xc_dom_elfloader.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_elfloader.c
rename to tools/libxc/xg_dom_elfloader.c
tools/libxc/xg_dom_hvmloader.c renamed from tools/libxc/xc_dom_hvmloader.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_hvmloader.c
rename to tools/libxc/xg_dom_hvmloader.c
tools/libxc/xg_dom_x86.c renamed from tools/libxc/xc_dom_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_x86.c
rename to tools/libxc/xg_dom_x86.c
tools/libxc/xg_nomigrate.c renamed from tools/libxc/xc_nomigrate.c +0 -0
similarity index 100%
rename from tools/libxc/xc_nomigrate.c
rename to tools/libxc/xg_nomigrate.c
tools/libxc/xg_offline_page.c renamed from tools/libxc/xc_offline_page.c +0 -0
similarity index 100%
rename from tools/libxc/xc_offline_page.c
rename to tools/libxc/xg_offline_page.c
tools/libxc/xg_sr_common.c renamed from tools/libxc/xc_sr_common.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_common.c
rename to tools/libxc/xg_sr_common.c
tools/libxc/xg_sr_common_x86.c renamed from tools/libxc/xc_sr_common_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_common_x86.c
rename to tools/libxc/xg_sr_common_x86.c
tools/libxc/xg_sr_common_x86_pv.c renamed from tools/libxc/xc_sr_common_x86_pv.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_common_x86_pv.c
rename to tools/libxc/xg_sr_common_x86_pv.c
tools/libxc/xg_sr_restore.c renamed from tools/libxc/xc_sr_restore.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_restore.c
rename to tools/libxc/xg_sr_restore.c
tools/libxc/xg_sr_restore_x86_hvm.c renamed from tools/libxc/xc_sr_restore_x86_hvm.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_restore_x86_hvm.c
rename to tools/libxc/xg_sr_restore_x86_hvm.c
tools/libxc/xg_sr_restore_x86_pv.c renamed from tools/libxc/xc_sr_restore_x86_pv.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_restore_x86_pv.c
rename to tools/libxc/xg_sr_restore_x86_pv.c
tools/libxc/xg_sr_save.c renamed from tools/libxc/xc_sr_save.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_save.c
rename to tools/libxc/xg_sr_save.c
tools/libxc/xg_sr_save_x86_hvm.c renamed from tools/libxc/xc_sr_save_x86_hvm.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_save_x86_hvm.c
rename to tools/libxc/xg_sr_save_x86_hvm.c
tools/libxc/xg_sr_save_x86_pv.c renamed from tools/libxc/xc_sr_save_x86_pv.c +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_save_x86_pv.c
rename to tools/libxc/xg_sr_save_x86_pv.c
tools/libxc/xg_suspend.c renamed from tools/libxc/xc_suspend.c +0 -0
similarity index 100%
rename from tools/libxc/xc_suspend.c
rename to tools/libxc/xg_suspend.c
Signature · 1 line
2.26.2
#17 lore raw

PATCH v4 13/31 tools/libxc: rename libxenguest internal headers

In reply to Juergen Gross

Rename the header files private to libxenguest from xc_*.h to xg_*.h.

---
 tools/libxc/xg_dom_bzimageloader.c                              | 2 +-
 tools/libxc/{xc_dom_decompress.h => xg_dom_decompress.h}        | 2 +-
 tools/libxc/xg_dom_decompress_lz4.c                             | 2 +-
 tools/libxc/xg_dom_decompress_unsafe.c                          | 2 +-
 .../{xc_dom_decompress_unsafe.h => xg_dom_decompress_unsafe.h}  | 0
 tools/libxc/xg_dom_decompress_unsafe_bzip2.c                    | 2 +-
 tools/libxc/xg_dom_decompress_unsafe_lzma.c                     | 2 +-
 tools/libxc/xg_dom_decompress_unsafe_lzo1x.c                    | 2 +-
 tools/libxc/xg_dom_decompress_unsafe_xz.c                       | 2 +-
 tools/libxc/xg_sr_common.c                                      | 2 +-
 tools/libxc/{xc_sr_common.h => xg_sr_common.h}                  | 2 +-
 tools/libxc/xg_sr_common_x86.c                                  | 2 +-
 tools/libxc/{xc_sr_common_x86.h => xg_sr_common_x86.h}          | 2 +-
 tools/libxc/xg_sr_common_x86_pv.c                               | 2 +-
 tools/libxc/{xc_sr_common_x86_pv.h => xg_sr_common_x86_pv.h}    | 2 +-
 tools/libxc/xg_sr_restore.c                                     | 2 +-
 tools/libxc/xg_sr_restore_x86_hvm.c                             | 2 +-
 tools/libxc/xg_sr_restore_x86_pv.c                              | 2 +-
 tools/libxc/xg_sr_save.c                                        | 2 +-
 tools/libxc/xg_sr_save_x86_hvm.c                                | 2 +-
 tools/libxc/xg_sr_save_x86_pv.c                                 | 2 +-
 tools/libxc/{xc_sr_stream_format.h => xg_sr_stream_format.h}    | 0
 22 files changed, 20 insertions(+), 20 deletions(-)
 rename tools/libxc/{xc_dom_decompress.h => xg_dom_decompress.h} (77%)
 rename tools/libxc/{xc_dom_decompress_unsafe.h => xg_dom_decompress_unsafe.h} (100%)
 rename tools/libxc/{xc_sr_common.h => xg_sr_common.h} (99%)
 rename tools/libxc/{xc_sr_common_x86.h => xg_sr_common_x86.h} (98%)
 rename tools/libxc/{xc_sr_common_x86_pv.h => xg_sr_common_x86_pv.h} (98%)
 rename tools/libxc/{xc_sr_stream_format.h => xg_sr_stream_format.h} (100%)
tools/libxc/xg_dom_bzimageloader.c +1 -1
index a7d70cc7c6..f959a77602 100644
@@ -32,7 +32,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress.h"
+#include "xg_dom_decompress.h"
 
 #include <xen-tools/libs.h>
 
tools/libxc/xg_dom_decompress.h renamed from tools/libxc/xc_dom_decompress.h +1 -1
similarity index 77%
rename from tools/libxc/xc_dom_decompress.h
rename to tools/libxc/xg_dom_decompress.h
index 42cefa3f0e..d9a21cf297 100644
@@ -1,7 +1,7 @@
 #ifndef __MINIOS__
 # include "xc_dom.h"
 #else
-# include "xc_dom_decompress_unsafe.h"
+# include "xg_dom_decompress_unsafe.h"
 #endif
 
 int xc_try_lz4_decode(struct xc_dom_image *dom, void **blob, size_t *size);
tools/libxc/xg_dom_decompress_lz4.c +1 -1
index b6a33f27a8..97ba620d86 100644
@@ -4,7 +4,7 @@
 #include <stdint.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress.h"
+#include "xg_dom_decompress.h"
 
 #define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
tools/libxc/xg_dom_decompress_unsafe.c +1 -1
index 164e35558f..21d964787d 100644
@@ -3,7 +3,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress_unsafe.h"
+#include "xg_dom_decompress_unsafe.h"
 
 static struct xc_dom_image *unsafe_dom;
 static unsigned char *output_blob;
tools/libxc/xg_dom_decompress_unsafe.h renamed from tools/libxc/xc_dom_decompress_unsafe.h +0 -0
similarity index 100%
rename from tools/libxc/xc_dom_decompress_unsafe.h
rename to tools/libxc/xg_dom_decompress_unsafe.h
tools/libxc/xg_dom_decompress_unsafe_bzip2.c +1 -1
index 4dcabe4061..9d3709e6cc 100644
@@ -3,7 +3,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress_unsafe.h"
+#include "xg_dom_decompress_unsafe.h"
 
 #include "../../xen/common/bunzip2.c"
 
tools/libxc/xg_dom_decompress_unsafe_lzma.c +1 -1
index 4ee8cdbab1..5d178f0c43 100644
@@ -3,7 +3,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress_unsafe.h"
+#include "xg_dom_decompress_unsafe.h"
 
 #include "../../xen/common/unlzma.c"
 
tools/libxc/xg_dom_decompress_unsafe_lzo1x.c +1 -1
index 59888b9da2..a4f8ebd42d 100644
@@ -5,7 +5,7 @@
 #include <stdint.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress_unsafe.h"
+#include "xg_dom_decompress_unsafe.h"
 
 typedef uint8_t u8;
 typedef uint32_t u32;
tools/libxc/xg_dom_decompress_unsafe_xz.c +1 -1
index fe7a7f49b4..ff6824b38d 100644
@@ -6,7 +6,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom_decompress_unsafe.h"
+#include "xg_dom_decompress_unsafe.h"
 
 // TODO
 #define XZ_DEC_X86
tools/libxc/xg_sr_common.c +1 -1
index 7c54b03414..17567ab133 100644
@@ -1,6 +1,6 @@
 #include <assert.h>
 
-#include "xc_sr_common.h"
+#include "xg_sr_common.h"
 
 #include <xen-tools/libs.h>
 
tools/libxc/xg_sr_common.h renamed from tools/libxc/xc_sr_common.h +1 -1
similarity index 99%
rename from tools/libxc/xc_sr_common.h
rename to tools/libxc/xg_sr_common.h
index f3bdea8006..35f23fabb5 100644
@@ -8,7 +8,7 @@
 #include "xc_dom.h"
 #include "xc_bitops.h"
 
-#include "xc_sr_stream_format.h"
+#include "xg_sr_stream_format.h"
 
 /* String representation of Domain Header types. */
 const char *dhdr_type_to_str(uint32_t type);
tools/libxc/xg_sr_common_x86.c +1 -1
index 77ea044a74..6f12483907 100644
@@ -1,4 +1,4 @@
-#include "xc_sr_common_x86.h"
+#include "xg_sr_common_x86.h"
 
 int write_x86_tsc_info(struct xc_sr_context *ctx)
 {
tools/libxc/xg_sr_common_x86.h renamed from tools/libxc/xc_sr_common_x86.h +1 -1
similarity index 98%
rename from tools/libxc/xc_sr_common_x86.h
rename to tools/libxc/xg_sr_common_x86.h
index e08d81e0e7..b55758c96d 100644
@@ -1,7 +1,7 @@
 #ifndef __COMMON_X86__H
 #define __COMMON_X86__H
 
-#include "xc_sr_common.h"
+#include "xg_sr_common.h"
 
 /*
  * Obtains a domains TSC information from Xen and writes a X86_TSC_INFO record
tools/libxc/xg_sr_common_x86_pv.c +1 -1
index d3d425cb82..cd33406aab 100644
@@ -1,6 +1,6 @@
 #include <assert.h>
 
-#include "xc_sr_common_x86_pv.h"
+#include "xg_sr_common_x86_pv.h"
 
 xen_pfn_t mfn_to_pfn(struct xc_sr_context *ctx, xen_pfn_t mfn)
 {
tools/libxc/xg_sr_common_x86_pv.h renamed from tools/libxc/xc_sr_common_x86_pv.h +1 -1
similarity index 98%
rename from tools/libxc/xc_sr_common_x86_pv.h
rename to tools/libxc/xg_sr_common_x86_pv.h
index 2ed03309af..953b5bfb8d 100644
@@ -1,7 +1,7 @@
 #ifndef __COMMON_X86_PV_H
 #define __COMMON_X86_PV_H
 
-#include "xc_sr_common_x86.h"
+#include "xg_sr_common_x86.h"
 
 /* Virtual address ranges reserved for hypervisor. */
 #define HYPERVISOR_VIRT_START_X86_64 0xFFFF800000000000ULL
tools/libxc/xg_sr_restore.c +1 -1
index bc811e6e3a..b57a787519 100644
@@ -2,7 +2,7 @@
 
 #include <assert.h>
 
-#include "xc_sr_common.h"
+#include "xg_sr_common.h"
 
 /*
  * Read and validate the Image and Domain headers.
tools/libxc/xg_sr_restore_x86_hvm.c +1 -1
index a77624cc9d..d6ea6f3012 100644
@@ -1,7 +1,7 @@
 #include <assert.h>
 #include <arpa/inet.h>
 
-#include "xc_sr_common_x86.h"
+#include "xg_sr_common_x86.h"
 
 /*
  * Process an HVM_CONTEXT record from the stream.
tools/libxc/xg_sr_restore_x86_pv.c +1 -1
index d086271efb..dc50b0f5a8 100644
@@ -1,6 +1,6 @@
 #include <assert.h>
 
-#include "xc_sr_common_x86_pv.h"
+#include "xg_sr_common_x86_pv.h"
 
 static xen_pfn_t pfn_to_mfn(const struct xc_sr_context *ctx, xen_pfn_t pfn)
 {
tools/libxc/xg_sr_save.c +1 -1
index 80b1d5de1f..d74c72cba6 100644
@@ -1,7 +1,7 @@
 #include <assert.h>
 #include <arpa/inet.h>
 
-#include "xc_sr_common.h"
+#include "xg_sr_common.h"
 
 /*
  * Writes an Image header and Domain header into the stream.
tools/libxc/xg_sr_save_x86_hvm.c +1 -1
index 0b2abb26bd..1634a7bc43 100644
@@ -1,6 +1,6 @@
 #include <assert.h>
 
-#include "xc_sr_common_x86.h"
+#include "xg_sr_common_x86.h"
 
 #include <xen/hvm/params.h>
 
tools/libxc/xg_sr_save_x86_pv.c +1 -1
index c7e246ef4f..4964f1f7b8 100644
@@ -1,7 +1,7 @@
 #include <assert.h>
 #include <limits.h>
 
-#include "xc_sr_common_x86_pv.h"
+#include "xg_sr_common_x86_pv.h"
 
 /* Check a 64 bit virtual address for being canonical. */
 static inline bool is_canonical_address(xen_vaddr_t vaddr)
tools/libxc/xg_sr_stream_format.h renamed from tools/libxc/xc_sr_stream_format.h +0 -0
similarity index 100%
rename from tools/libxc/xc_sr_stream_format.h
rename to tools/libxc/xg_sr_stream_format.h
Signature · 1 line
2.26.2
#18 lore raw

PATCH v4 14/31 tools/misc: rename xc_dom.h do xenctrl_dom.h

In reply to Juergen Gross

For being able to disentangle lixenctrl and libxenguest headers xc_dom.h will need to be public. Prepare that by renaming xc_dom.h to xenctrl_dom.h.

---
 stubdom/grub/kexec.c                            | 2 +-
 tools/helpers/init-xenstore-domain.c            | 2 +-
 tools/libxc/include/{xc_dom.h => xenctrl_dom.h} | 0
 tools/libxc/xc_core.c                           | 2 +-
 tools/libxc/xc_private.c                        | 2 +-
 tools/libxc/xg_dom_arm.c                        | 2 +-
 tools/libxc/xg_dom_armzimageloader.c            | 2 +-
 tools/libxc/xg_dom_binloader.c                  | 2 +-
 tools/libxc/xg_dom_boot.c                       | 2 +-
 tools/libxc/xg_dom_compat_linux.c               | 2 +-
 tools/libxc/xg_dom_core.c                       | 2 +-
 tools/libxc/xg_dom_decompress.h                 | 2 +-
 tools/libxc/xg_dom_decompress_unsafe.h          | 2 +-
 tools/libxc/xg_dom_elfloader.c                  | 2 +-
 tools/libxc/xg_dom_hvmloader.c                  | 2 +-
 tools/libxc/xg_dom_x86.c                        | 2 +-
 tools/libxc/xg_offline_page.c                   | 2 +-
 tools/libxc/xg_sr_common.h                      | 2 +-
 tools/libxl/libxl_arm.c                         | 2 +-
 tools/libxl/libxl_arm.h                         | 2 +-
 tools/libxl/libxl_create.c                      | 2 +-
 tools/libxl/libxl_dm.c                          | 2 +-
 tools/libxl/libxl_dom.c                         | 2 +-
 tools/libxl/libxl_internal.h                    | 2 +-
 tools/libxl/libxl_vnuma.c                       | 2 +-
 tools/libxl/libxl_x86.c                         | 2 +-
 tools/libxl/libxl_x86_acpi.c                    | 2 +-
 tools/python/xen/lowlevel/xc/xc.c               | 2 +-
 tools/xcutils/readnotes.c                       | 2 +-
 29 files changed, 28 insertions(+), 28 deletions(-)
 rename tools/libxc/include/{xc_dom.h => xenctrl_dom.h} (100%)
stubdom/grub/kexec.c +1 -1
index 0e68b969a2..24001220a9 100644
@@ -20,7 +20,7 @@
 #include <sys/mman.h>
 
 #include <xenctrl.h>
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 
 #include <kernel.h>
 #include <console.h>
tools/helpers/init-xenstore-domain.c +1 -1
index 4ce8299c3c..5bdb48dc80 100644
@@ -8,7 +8,7 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <xenctrl.h>
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 #include <xenstore.h>
 #include <xen/sys/xenbus_dev.h>
 #include <xen-xsm/flask/flask.h>
tools/libxc/include/xenctrl_dom.h renamed from tools/libxc/include/xc_dom.h +0 -0
similarity index 100%
rename from tools/libxc/include/xc_dom.h
rename to tools/libxc/include/xenctrl_dom.h
tools/libxc/xc_core.c +1 -1
index 2ee1d205b4..7df1fccd62 100644
@@ -62,7 +62,7 @@
 
 #include "xg_private.h"
 #include "xc_core.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include <stdlib.h>
 #include <unistd.h>
 
tools/libxc/xc_private.c +1 -1
index 90974d572e..6ecdf6953f 100644
@@ -19,7 +19,7 @@
 
 #include "xc_private.h"
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include <stdarg.h>
 #include <stdlib.h>
 #include <unistd.h>
tools/libxc/xg_dom_arm.c +1 -1
index 931404c222..3f66f1d890 100644
@@ -24,7 +24,7 @@
 #include <xen-tools/libs.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 
 #define NR_MAGIC_PAGES 4
 #define CONSOLE_PFN_OFFSET 0
tools/libxc/xg_dom_armzimageloader.c +1 -1
index 0df8c2a4b1..4246c8e5fa 100644
@@ -25,7 +25,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 
 #include <arpa/inet.h> /* XXX ntohl is not the right function... */
 
tools/libxc/xg_dom_binloader.c +1 -1
index d6f7f2a500..870a921427 100644
@@ -83,7 +83,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom.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/libxc/xg_dom_boot.c +1 -1
index bb599b33ba..1e31e92244 100644
@@ -31,7 +31,7 @@
 #include <zlib.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "xc_core.h"
 #include <xen/hvm/params.h>
 #include <xen/grant_table.h>
tools/libxc/xg_dom_compat_linux.c +1 -1
index b3d43feed9..b645f0b14b 100644
@@ -30,7 +30,7 @@
 
 #include "xenctrl.h"
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 
 /* ------------------------------------------------------------------------ */
 
tools/libxc/xg_dom_core.c +1 -1
index 327c8a8575..1c91cce315 100644
@@ -32,7 +32,7 @@
 #include <assert.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "_paths.h"
 
 /* ------------------------------------------------------------------------ */
tools/libxc/xg_dom_decompress.h +1 -1
index d9a21cf297..c5ab2e59eb 100644
@@ -1,5 +1,5 @@
 #ifndef __MINIOS__
-# include "xc_dom.h"
+# include "xenctrl_dom.h"
 #else
 # include "xg_dom_decompress_unsafe.h"
 #endif
tools/libxc/xg_dom_decompress_unsafe.h +1 -1
index 64f68864b1..fb84b6add8 100644
@@ -1,4 +1,4 @@
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 
 typedef int decompress_fn(unsigned char *inbuf, unsigned int len,
                           int (*fill)(void*, unsigned int),
tools/libxc/xg_dom_elfloader.c +1 -1
index b327db219d..7043c3bbba 100644
@@ -26,7 +26,7 @@
 #include <inttypes.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "xc_bitops.h"
 
 #define XEN_VER "xen-3.0"
tools/libxc/xg_dom_hvmloader.c +1 -1
index 3f0bd65547..995a0f3dc3 100644
@@ -26,7 +26,7 @@
 #include <assert.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "xc_bitops.h"
 
 /* ------------------------------------------------------------------------ */
tools/libxc/xg_dom_x86.c +1 -1
index 9439805eaa..842dbcccdd 100644
@@ -38,7 +38,7 @@
 #include <xen-tools/libs.h>
 
 #include "xg_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "xenctrl.h"
 
 /* ------------------------------------------------------------------------ */
tools/libxc/xg_offline_page.c +1 -1
index 19538fc436..77e8889b11 100644
@@ -28,7 +28,7 @@
 #include <xc_core.h>
 
 #include "xc_private.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "xg_private.h"
 #include "xg_save_restore.h"
 
tools/libxc/xg_sr_common.h +1 -1
index 35f23fabb5..13fcc47420 100644
@@ -5,7 +5,7 @@
 
 #include "xg_private.h"
 #include "xg_save_restore.h"
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include "xc_bitops.h"
 
 #include "xg_sr_stream_format.h"
tools/libxl/libxl_arm.c +1 -1
index 34f8a29056..975a4d730a 100644
@@ -3,7 +3,7 @@
 #include "libxl_libfdt_compat.h"
 #include "libxl_arm.h"
 
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 #include <stdbool.h>
 #include <libfdt.h>
 #include <assert.h>
tools/libxl/libxl_arm.h +1 -1
index 8aef210d4c..52c2ab5e3a 100644
@@ -17,7 +17,7 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 
 _hidden
 int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
tools/libxl/libxl_create.c +1 -1
index 2814818e34..1031b75159 100644
@@ -20,7 +20,7 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 #include <xenguest.h>
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/e820.h>
tools/libxl/libxl_dm.c +1 -1
index f2dc5696b9..fec4e0fbe5 100644
@@ -19,7 +19,7 @@
 
 #include "libxl_internal.h"
 
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 #include <xen/hvm/e820.h>
 #include <sys/types.h>
 #include <pwd.h>
tools/libxl/libxl_dom.c +1 -1
index f8661e90d4..e2dca64aa1 100644
@@ -20,7 +20,7 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xc_dom.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/libxl/libxl_internal.h +1 -1
index c63d0686fd..e16ae9630b 100644
@@ -57,7 +57,7 @@
 #include <xenctrl.h>
 #include <xenguest.h>
 #include <xenhypfs.h>
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 
 #include <xen-tools/libs.h>
 
tools/libxl/libxl_vnuma.c +1 -1
index 8ec2abb2e6..c2e144ceae 100644
@@ -17,7 +17,7 @@
 #include "libxl_arch.h"
 #include <stdlib.h>
 
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 
 bool libxl__vnuma_configured(const libxl_domain_build_info *b_info)
 {
tools/libxl/libxl_x86.c +1 -1
index e57f63282e..7d95506e00 100644
@@ -1,7 +1,7 @@
 #include "libxl_internal.h"
 #include "libxl_arch.h"
 
-#include <xc_dom.h>
+#include <xenctrl_dom.h>
 
 int libxl__arch_domain_prepare_config(libxl__gc *gc,
                                       libxl_domain_config *d_config,
tools/libxl/libxl_x86_acpi.c +1 -1
index ed6610c84e..3df86c7be5 100644
@@ -18,7 +18,7 @@
 #include <xen/hvm/e820.h>
 #include "libacpi/libacpi.h"
 
-#include <xc_dom.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 8fde5f311f..8c7b184f0b 100644
@@ -17,7 +17,7 @@
 #include <arpa/inet.h>
 
 #include <xen/elfnote.h>
-#include "xc_dom.h"
+#include "xenctrl_dom.h"
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/params.h>
 
tools/xcutils/readnotes.c +1 -1
index e682dd1a21..a6b7358e70 100644
@@ -12,7 +12,7 @@
 #include <sys/mman.h>
 
 #include <xg_private.h>
-#include <xc_dom.h> /* gunzip bits */
+#include <xenctrl_dom.h> /* gunzip bits */
 
 #include <xen/libelf/libelf.h>
 
Signature · 1 line
2.26.2
#19 lore raw

PATCH v4 15/31 tools/libxc: untangle libxenctrl from libxenguest

In reply to Juergen Gross

Sources of libxenctrl and libxenguest are completely entangled. In practice libxenguest is a user of libxenctrl, so don't let any source libxenctrl include xg_private.h.

This can be achieved by moving all definitions used by libxenctrl from xg_private.h to xc_private.h.

Export xenctrl_dom.h as it will now be included by other public headers.

---
 tools/libxc/Makefile              |  3 ++-
 tools/libxc/include/xenctrl_dom.h | 10 +++++++--
 tools/libxc/include/xenguest.h    |  8 ++-----
 tools/libxc/xc_core.c             |  5 +++--
 tools/libxc/xc_core.h             |  2 +-
 tools/libxc/xc_core_arm.c         |  2 +-
 tools/libxc/xc_core_x86.c         |  6 ++----
 tools/libxc/xc_domain.c           |  3 +--
 tools/libxc/xc_hcall_buf.c        |  1 -
 tools/libxc/xc_private.c          |  1 -
 tools/libxc/xc_private.h          | 36 +++++++++++++++++++++++++++++++
 tools/libxc/xc_resume.c           |  2 --
 tools/libxc/xg_private.h          | 22 -------------------
 tools/libxc/xg_save_restore.h     |  9 --------
 14 files changed, 56 insertions(+), 54 deletions(-)
tools/libxc/Makefile +2 -1
index 0fd5511143..faf2639894 100644
@@ -215,7 +215,7 @@ install: build
 	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir)
 	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenctrl.so
-	$(INSTALL_DATA) include/xenctrl.h include/xenctrl_compat.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) include/xenctrl.h include/xenctrl_compat.h include/xenctrl_dom.h $(DESTDIR)$(includedir)
 	$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
 	$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(libdir)
 	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR)
@@ -235,6 +235,7 @@ uninstall:
 	rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xencontrol.pc
 	rm -f $(DESTDIR)$(includedir)/xenctrl.h
 	rm -f $(DESTDIR)$(includedir)/xenctrl_compat.h
+	rm -f $(DESTDIR)$(includedir)/xenctrl_dom.h
 	rm -f $(DESTDIR)$(libdir)/libxenctrl.so
 	rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR)
 	rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR).$(MINOR)
tools/libxc/include/xenctrl_dom.h +8 -2
index 52a4d6c8c0..40b85b7755 100644
@@ -17,9 +17,7 @@
 #define _XC_DOM_H
 
 #include <xen/libelf/libelf.h>
-#include <xenguest.h>
 
-#define INVALID_PFN ((xen_pfn_t)-1)
 #define X86_HVM_NR_SPECIAL_PAGES    8
 #define X86_HVM_END_SPECIAL_REGION  0xff000u
 #define XG_MAX_MODULES 2
@@ -38,6 +36,12 @@ struct xc_dom_seg {
     xen_pfn_t pages;
 };
 
+struct xc_hvm_firmware_module {
+    uint8_t  *data;
+    uint32_t  length;
+    uint64_t  guest_addr_out;
+};
+
 struct xc_dom_mem {
     struct xc_dom_mem *next;
     void *ptr;
@@ -255,6 +259,8 @@ struct xc_dom_arch {
     int (*setup_pgtables) (struct xc_dom_image * dom);
 
     /* arch-specific data structs setup */
+    /* in Mini-OS environment start_info might be a macro, avoid collision. */
+#undef start_info
     int (*start_info) (struct xc_dom_image * dom);
     int (*shared_info) (struct xc_dom_image * dom, void *shared_info);
     int (*vcpu) (struct xc_dom_image * dom);
tools/libxc/include/xenguest.h +2 -6
index 7a12d21ff2..4643384790 100644
@@ -22,6 +22,8 @@
 #ifndef XENGUEST_H
 #define XENGUEST_H
 
+#include <xenctrl_dom.h>
+
 #define XC_NUMA_NO_NODE   (~0U)
 
 #define XCFLAGS_LIVE      (1 << 0)
@@ -249,12 +251,6 @@ int xc_linux_build(xc_interface *xch,
                    unsigned int console_evtchn,
                    unsigned long *console_mfn);
 
-struct xc_hvm_firmware_module {
-    uint8_t  *data;
-    uint32_t  length;
-    uint64_t  guest_addr_out;
-};
-
 /*
  * Sets *lockfd to -1.
  * Has deallocated everything even on error.
tools/libxc/xc_core.c +3 -2
index 7df1fccd62..e8c6fb96f9 100644
@@ -60,12 +60,13 @@
  *
  */
 
-#include "xg_private.h"
+#include "xc_private.h"
 #include "xc_core.h"
-#include "xenctrl_dom.h"
 #include <stdlib.h>
 #include <unistd.h>
 
+#include <xen/libelf/libelf.h>
+
 /* number of pages to write at a time */
 #define DUMP_INCREMENT (4 * 1024)
 
tools/libxc/xc_core.h +1 -1
index ed7ed53ca5..36fb755da2 100644
@@ -21,7 +21,7 @@
 #define XC_CORE_H
 
 #include "xen/version.h"
-#include "xg_private.h"
+#include "xc_private.h"
 #include "xen/libelf/elfstructs.h"
 
 /* section names */
tools/libxc/xc_core_arm.c +1 -1
index c3c492c971..7b587b4cc5 100644
@@ -16,7 +16,7 @@
  *
  */
 
-#include "xg_private.h"
+#include "xc_private.h"
 #include "xc_core.h"
 
 #include <xen-tools/libs.h>
tools/libxc/xc_core_x86.c +2 -4
index 54852a2d1a..cb76e6207b 100644
@@ -17,12 +17,10 @@
  *
  */
 
-#include "xg_private.h"
+#include "xc_private.h"
 #include "xc_core.h"
 #include <xen/hvm/e820.h>
 
-#define GET_FIELD(_p, _f) ((dinfo->guest_width==8) ? ((_p)->x64._f) : ((_p)->x32._f))
-
 int
 xc_core_arch_gpfn_may_present(struct xc_core_arch_context *arch_ctxt,
                               unsigned long pfn)
@@ -98,7 +96,7 @@ xc_core_arch_map_p2m_rw(xc_interface *xch, struct domain_info_context *dinfo, xc
 
     live_p2m_frame_list_list =
         xc_map_foreign_range(xch, dom, PAGE_SIZE, PROT_READ,
-                             GET_FIELD(live_shinfo, arch.pfn_to_mfn_frame_list_list));
+                             GET_FIELD(live_shinfo, arch.pfn_to_mfn_frame_list_list, dinfo->guest_width));
 
     if ( !live_p2m_frame_list_list )
     {
tools/libxc/xc_domain.c +1 -2
index fbc22c4df6..43fab50c06 100644
@@ -21,8 +21,7 @@
 
 #include "xc_private.h"
 #include "xc_core.h"
-#include "xg_private.h"
-#include "xg_save_restore.h"
+#include "xc_private.h"
 #include <xen/memory.h>
 #include <xen/hvm/hvm_op.h>
 
tools/libxc/xc_hcall_buf.c +0 -1
index c1230a1e2b..200671f36f 100644
@@ -19,7 +19,6 @@
 #include <string.h>
 
 #include "xc_private.h"
-#include "xg_private.h"
 
 xc_hypercall_buffer_t XC__HYPERCALL_BUFFER_NAME(HYPERCALL_BUFFER_NULL) = {
     .hbuf = NULL,
tools/libxc/xc_private.c +0 -1
index 6ecdf6953f..8af96b1b7e 100644
@@ -18,7 +18,6 @@
  */
 
 #include "xc_private.h"
-#include "xg_private.h"
 #include "xenctrl_dom.h"
 #include <stdarg.h>
 #include <stdlib.h>
tools/libxc/xc_private.h +36 -0
index c77edb3c4c..f0b5f83ac8 100644
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdlib.h>
+#include <limits.h>
 #include <sys/ioctl.h>
 
 #include "_paths.h"
@@ -62,6 +63,39 @@ struct iovec {
 #include <sys/uio.h>
 #endif
 
+#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
+
+#define GET_FIELD(_p, _f, _w) (((_w) == 8) ? ((_p)->x64._f) : ((_p)->x32._f))
+
+#define SET_FIELD(_p, _f, _v, _w) do {          \
+    if ((_w) == 8)                              \
+        (_p)->x64._f = (_v);                    \
+    else                                        \
+        (_p)->x32._f = (_v);                    \
+} while (0)
+
+/* XXX SMH: following skanky macros rely on variable p2m_size being set */
+/* XXX TJD: also, "guest_width" should be the guest's sizeof(unsigned long) */
+
+struct domain_info_context {
+    unsigned int guest_width;
+    unsigned long p2m_size;
+};
+
+/* Number of xen_pfn_t in a page */
+#define FPP             (PAGE_SIZE/(dinfo->guest_width))
+
+/* Number of entries in the pfn_to_mfn_frame_list_list */
+#define P2M_FLL_ENTRIES (((dinfo->p2m_size)+(FPP*FPP)-1)/(FPP*FPP))
+
+/* Number of entries in the pfn_to_mfn_frame_list */
+#define P2M_FL_ENTRIES  (((dinfo->p2m_size)+FPP-1)/FPP)
+
+/* Size in bytes of the pfn_to_mfn_frame_list     */
+#define P2M_GUEST_FL_SIZE ((P2M_FL_ENTRIES) * (dinfo->guest_width))
+#define P2M_TOOLS_FL_SIZE ((P2M_FL_ENTRIES) *                           \
+                           max_t(size_t, sizeof(xen_pfn_t), dinfo->guest_width))
+
 #define DECLARE_DOMCTL struct xen_domctl domctl
 #define DECLARE_SYSCTL struct xen_sysctl sysctl
 #define DECLARE_PHYSDEV_OP struct physdev_op physdev_op
@@ -75,6 +109,8 @@ struct iovec {
 #define PAGE_SIZE               XC_PAGE_SIZE
 #define PAGE_MASK               XC_PAGE_MASK
 
+#define INVALID_PFN ((xen_pfn_t)-1)
+
 /*
 ** Define max dirty page cache to permit during save/restore -- need to balance 
 ** keeping cache usage down with CPU impact of invalidating too often.
tools/libxc/xc_resume.c +0 -2
index c169204fac..94c6c9fb31 100644
@@ -14,8 +14,6 @@
  */
 
 #include "xc_private.h"
-#include "xg_private.h"
-#include "xg_save_restore.h"
 
 #if defined(__i386__) || defined(__x86_64__)
 
tools/libxc/xg_private.h +0 -22
index 40b5baecde..0000b2b9b6 100644
@@ -97,15 +97,6 @@ typedef uint64_t x86_pgentry_t;
 
 #define NRPAGES(x) (ROUNDUP(x, PAGE_SHIFT) >> PAGE_SHIFT)
 
-
-/* XXX SMH: following skanky macros rely on variable p2m_size being set */
-/* XXX TJD: also, "guest_width" should be the guest's sizeof(unsigned long) */
-
-struct domain_info_context {
-    unsigned int guest_width;
-    unsigned long p2m_size;
-};
-
 static inline xen_pfn_t xc_pfn_to_mfn(xen_pfn_t pfn, xen_pfn_t *p2m,
                                       unsigned gwidth)
 {
@@ -121,19 +112,6 @@ static inline xen_pfn_t xc_pfn_to_mfn(xen_pfn_t pfn, xen_pfn_t *p2m,
     }
 }
 
-/* Number of xen_pfn_t in a page */
-#define FPP             (PAGE_SIZE/(dinfo->guest_width))
-
-/* Number of entries in the pfn_to_mfn_frame_list_list */
-#define P2M_FLL_ENTRIES (((dinfo->p2m_size)+(FPP*FPP)-1)/(FPP*FPP))
-
-/* Number of entries in the pfn_to_mfn_frame_list */
-#define P2M_FL_ENTRIES  (((dinfo->p2m_size)+FPP-1)/FPP)
-
-/* Size in bytes of the pfn_to_mfn_frame_list     */
-#define P2M_GUEST_FL_SIZE ((P2M_FL_ENTRIES) * (dinfo->guest_width))
-#define P2M_TOOLS_FL_SIZE ((P2M_FL_ENTRIES) *                           \
-                           max_t(size_t, sizeof(xen_pfn_t), dinfo->guest_width))
 
 /* Masks for PTE<->PFN conversions */
 #define MADDR_BITS_X86  ((dinfo->guest_width == 8) ? 52 : 44)
tools/libxc/xg_save_restore.h +0 -9
index b904296997..88120eb54b 100644
@@ -109,15 +109,6 @@ static inline int get_platform_info(xc_interface *xch, uint32_t dom,
 #define M2P_SIZE(_m)    ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
 #define M2P_CHUNKS(_m)  (M2P_SIZE((_m)) >> M2P_SHIFT)
 
-#define GET_FIELD(_p, _f, _w) (((_w) == 8) ? ((_p)->x64._f) : ((_p)->x32._f))
-
-#define SET_FIELD(_p, _f, _v, _w) do {          \
-    if ((_w) == 8)                              \
-        (_p)->x64._f = (_v);                    \
-    else                                        \
-        (_p)->x32._f = (_v);                    \
-} while (0)
-
 #define UNFOLD_CR3(_c)                                                  \
   ((uint64_t)((dinfo->guest_width == 8)                                 \
               ? ((_c) >> 12)                                            \
Signature · 1 line
2.26.2
#20 lore raw

PATCH v4 16/31 tools/xcutils: use official headers in readnotes

In reply to Juergen Gross

readnotes.c is including xg_private.h. Now that the xenctrl headers are structured better this is no longer needed.

---
 tools/xcutils/Makefile    | 3 +--
 tools/xcutils/readnotes.c | 5 +++--
 2 files changed, 4 insertions(+), 4 deletions(-)
tools/xcutils/Makefile +1 -2
index 2811893980..82d42624c8 100644
@@ -15,8 +15,7 @@ PROGRAMS = readnotes lsevtchn
 
 CFLAGS += -Werror
 
-# incorrectly uses libxc internals
-CFLAGS_readnotes.o  := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall)
+CFLAGS_readnotes.o  := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
 CFLAGS_lsevtchn.o   := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl)
 
 .PHONY: all
tools/xcutils/readnotes.c +3 -2
index a6b7358e70..ff684c7dcb 100644
@@ -11,8 +11,9 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-#include <xg_private.h>
-#include <xenctrl_dom.h> /* gunzip bits */
+#include <xen/xen.h>
+#include <xenctrl.h>
+#include <xenguest.h>
 
 #include <xen/libelf/libelf.h>
 
Signature · 1 line
2.26.2
#21 lore raw

PATCH v4 17/31 tools/xenpaging: remove libxc internals

In reply to Juergen Gross

xenpaging is using libxc internals. Fix that.

---
 tools/xenpaging/Makefile         |  3 +-
 tools/xenpaging/file_ops.c       |  8 ++--
 tools/xenpaging/pagein.c         |  2 +-
 tools/xenpaging/policy_default.c |  2 +-
 tools/xenpaging/xenpaging.c      | 32 +++++++--------
 tools/xenpaging/xenpaging.h      | 70 +++++++++++++++++++++++++++++++-
 6 files changed, 92 insertions(+), 25 deletions(-)
tools/xenpaging/Makefile +1 -2
index 968678c4e8..04743b335c 100644
@@ -1,8 +1,7 @@
 XEN_ROOT=$(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-# xenpaging.c and file_ops.c incorrectly use libxc internals
-CFLAGS += $(CFLAGS_libxentoollog) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS) -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall)
+CFLAGS += $(CFLAGS_libxentoollog) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS) $(CFLAGS_libxencall)
 LDLIBS += $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(PTHREAD_LIBS)
 LDFLAGS += $(PTHREAD_LDFLAGS)
 
tools/xenpaging/file_ops.c +4 -4
index 8210f426df..301fb3427c 100644
@@ -20,7 +20,7 @@
 
 
 #include <unistd.h>
-#include <xc_private.h>
+#include <xenctrl.h>
 
 static int file_op(int fd, void *page, int i,
                    ssize_t (*fn)(int, void *, size_t))
@@ -29,13 +29,13 @@ static int file_op(int fd, void *page, int i,
     int total = 0;
     int bytes;
 
-    offset = lseek(fd, offset << PAGE_SHIFT, SEEK_SET);
+    offset = lseek(fd, offset << XC_PAGE_SHIFT, SEEK_SET);
     if ( offset == (off_t)-1 )
         return -1;
 
-    while ( total < PAGE_SIZE )
+    while ( total < XC_PAGE_SIZE )
     {
-        bytes = fn(fd, page + total, PAGE_SIZE - total);
+        bytes = fn(fd, page + total, XC_PAGE_SIZE - total);
         if ( bytes <= 0 )
             return -1;
 
tools/xenpaging/pagein.c +1 -1
index 2a298b436c..1c8a7d983d 100644
@@ -43,7 +43,7 @@ static void *page_in(void *arg)
         /* Ignore errors */
         page = xc_map_foreign_pages(pia->xch, pia->dom, PROT_READ, gfns, num);
         if (page)
-            munmap(page, PAGE_SIZE * num);
+            munmap(page, XC_PAGE_SIZE * num);
     }
     page_in_possible = 0;
     pthread_exit(NULL);
tools/xenpaging/policy_default.c +1 -1
index 3324835957..979d251230 100644
@@ -18,8 +18,8 @@
  * along with this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <errno.h>
 
-#include "xc_bitops.h"
 #include "policy.h"
 
 
tools/xenpaging/xenpaging.c +16 -16
index d0571cabac..33098046c2 100644
@@ -30,7 +30,6 @@
 #include <xenstore.h>
 #include <getopt.h>
 
-#include "xc_bitops.h"
 #include "file_ops.h"
 #include "policy.h"
 #include "xenpaging.h"
@@ -183,12 +182,12 @@ static void *init_page(void)
     void *buffer;
 
     /* Allocated page memory */
-    errno = posix_memalign(&buffer, PAGE_SIZE, PAGE_SIZE);
+    errno = posix_memalign(&buffer, XC_PAGE_SIZE, XC_PAGE_SIZE);
     if ( errno != 0 )
         return NULL;
 
     /* Lock buffer in memory so it can't be paged out */
-    if ( mlock(buffer, PAGE_SIZE) < 0 )
+    if ( mlock(buffer, XC_PAGE_SIZE) < 0 )
     {
         free(buffer);
         buffer = NULL;
@@ -277,7 +276,6 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
     struct xenpaging *paging;
     xc_domaininfo_t domain_info;
     xc_interface *xch = NULL;
-    xentoollog_logger *dbg = NULL;
     char *p;
     int rc;
     unsigned long ring_pfn, mmap_pfn;
@@ -291,12 +289,11 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
     if ( xenpaging_getopts(paging, argc, argv) )
         goto err;
 
-    /* Enable debug output */
-    if ( paging->debug )
-        dbg = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, XTL_DEBUG, 0);
+    paging->logger = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr,
+                         paging->debug ? XTL_DEBUG : XTL_PROGRESS, 0);
 
     /* Open connection to xen */
-    paging->xc_handle = xch = xc_interface_open(dbg, NULL, 0);
+    paging->xc_handle = xch = xc_interface_open(paging->logger, NULL, 0);
     if ( !xch )
         goto err;
 
@@ -416,7 +413,7 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
     SHARED_RING_INIT((vm_event_sring_t *)paging->vm_event.ring_page);
     BACK_RING_INIT(&paging->vm_event.back_ring,
                    (vm_event_sring_t *)paging->vm_event.ring_page,
-                   PAGE_SIZE);
+                   XC_PAGE_SIZE);
 
     /* Now that the ring is set, remove it from the guest's physmap */
     if ( xc_domain_decrease_reservation_exact(xch, 
@@ -490,15 +487,17 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[])
             xs_close(paging->xs_handle);
         if ( xch )
             xc_interface_close(xch);
+        if ( paging->logger )
+            xtl_logger_destroy(paging->logger);
         if ( paging->paging_buffer )
         {
-            munlock(paging->paging_buffer, PAGE_SIZE);
+            munlock(paging->paging_buffer, XC_PAGE_SIZE);
             free(paging->paging_buffer);
         }
 
         if ( paging->vm_event.ring_page )
         {
-            munmap(paging->vm_event.ring_page, PAGE_SIZE);
+            munmap(paging->vm_event.ring_page, XC_PAGE_SIZE);
         }
 
         free(dom_path);
@@ -523,7 +522,7 @@ static void xenpaging_teardown(struct xenpaging *paging)
 
     paging->xc_handle = NULL;
     /* Tear down domain paging in Xen */
-    munmap(paging->vm_event.ring_page, PAGE_SIZE);
+    munmap(paging->vm_event.ring_page, XC_PAGE_SIZE);
     rc = xc_mem_paging_disable(xch, paging->vm_event.domain_id);
     if ( rc != 0 )
     {
@@ -551,6 +550,8 @@ static void xenpaging_teardown(struct xenpaging *paging)
 
     /* Close connection to Xen */
     xc_interface_close(xch);
+
+    xtl_logger_destroy(paging->logger);
 }
 
 static void get_request(struct vm_event *vm_event, vm_event_request_t *req)
@@ -598,8 +599,7 @@ static int xenpaging_evict_page(struct xenpaging *paging, unsigned long gfn, int
     void *page;
     xen_pfn_t victim = gfn;
     int ret;
-
-    DECLARE_DOMCTL;
+    struct xen_domctl domctl;
 
     /* Nominate page */
     ret = xc_mem_paging_nominate(xch, paging->vm_event.domain_id, gfn);
@@ -627,13 +627,13 @@ static int xenpaging_evict_page(struct xenpaging *paging, unsigned long gfn, int
     if ( ret < 0 )
     {
         PERROR("Error copying page %lx", gfn);
-        munmap(page, PAGE_SIZE);
+        munmap(page, XC_PAGE_SIZE);
         ret = -1;
         goto out;
     }
 
     /* Release page */
-    munmap(page, PAGE_SIZE);
+    munmap(page, XC_PAGE_SIZE);
 
     /* Tell Xen to evict page */
     ret = xc_mem_paging_evict(xch, paging->vm_event.domain_id, gfn);
tools/xenpaging/xenpaging.h +69 -1

95 lines not on this page · raw message

Signature · 1 line
2.26.2
#22 lore raw

PATCH v4 18/31 tools: move libxenctrl below tools/libs

In reply to Juergen Gross

Today tools/libxc needs to be built after tools/libs as libxenctrl is depending on some libraries in tools/libs. This in turn blocks moving other libraries depending on libxenctrl below tools/libs.

So carve out libxenctrl from tools/libxc and move it into tools/libs/ctrl.

---
 .gitignore                                    |   8 ++
 MAINTAINERS                                   |   2 +-
 stubdom/Makefile                              |   9 +-
 stubdom/grub/Makefile                         |   4 +-
 stubdom/mini-os.mk                            |   2 +-
 tools/Rules.mk                                |   8 +-
 tools/libs/Makefile                           |   1 +
 tools/libs/ctrl/Makefile                      |  72 ++++++++++++
 tools/{libxc => libs/ctrl}/include/xenctrl.h  |   0
 .../ctrl}/include/xenctrl_compat.h            |   0
 .../ctrl}/include/xenctrl_dom.h               |   0
 tools/{libxc => libs/ctrl}/xc_altp2m.c        |   0
 tools/{libxc => libs/ctrl}/xc_arinc653.c      |   0
 tools/{libxc => libs/ctrl}/xc_bitops.h        |   0
 tools/{libxc => libs/ctrl}/xc_core.c          |   0
 tools/{libxc => libs/ctrl}/xc_core.h          |   0
 tools/{libxc => libs/ctrl}/xc_core_arm.c      |   0
 tools/{libxc => libs/ctrl}/xc_core_arm.h      |   0
 tools/{libxc => libs/ctrl}/xc_core_x86.c      |   0
 tools/{libxc => libs/ctrl}/xc_core_x86.h      |   0
 tools/{libxc => libs/ctrl}/xc_cpu_hotplug.c   |   0
 tools/{libxc => libs/ctrl}/xc_cpupool.c       |   0
 tools/{libxc => libs/ctrl}/xc_csched.c        |   0
 tools/{libxc => libs/ctrl}/xc_csched2.c       |   0
 .../ctrl}/xc_devicemodel_compat.c             |   0
 tools/{libxc => libs/ctrl}/xc_domain.c        |   0
 tools/{libxc => libs/ctrl}/xc_evtchn.c        |   0
 tools/{libxc => libs/ctrl}/xc_evtchn_compat.c |   0
 tools/{libxc => libs/ctrl}/xc_flask.c         |   0
 .../{libxc => libs/ctrl}/xc_foreign_memory.c  |   0
 tools/{libxc => libs/ctrl}/xc_freebsd.c       |   0
 tools/{libxc => libs/ctrl}/xc_gnttab.c        |   0
 tools/{libxc => libs/ctrl}/xc_gnttab_compat.c |   0
 tools/{libxc => libs/ctrl}/xc_hcall_buf.c     |   0
 tools/{libxc => libs/ctrl}/xc_kexec.c         |   0
 tools/{libxc => libs/ctrl}/xc_linux.c         |   0
 tools/{libxc => libs/ctrl}/xc_mem_access.c    |   0
 tools/{libxc => libs/ctrl}/xc_mem_paging.c    |   0
 tools/{libxc => libs/ctrl}/xc_memshr.c        |   0
 tools/{libxc => libs/ctrl}/xc_minios.c        |   0
 tools/{libxc => libs/ctrl}/xc_misc.c          |   0
 tools/{libxc => libs/ctrl}/xc_monitor.c       |   0
 tools/{libxc => libs/ctrl}/xc_msr_x86.h       |   0
 tools/{libxc => libs/ctrl}/xc_netbsd.c        |   0
 tools/{libxc => libs/ctrl}/xc_pagetab.c       |   0
 tools/{libxc => libs/ctrl}/xc_physdev.c       |   0
 tools/{libxc => libs/ctrl}/xc_pm.c            |   0
 tools/{libxc => libs/ctrl}/xc_private.c       |   0
 tools/{libxc => libs/ctrl}/xc_private.h       |   0
 tools/{libxc => libs/ctrl}/xc_psr.c           |   0
 tools/{libxc => libs/ctrl}/xc_resource.c      |   0
 tools/{libxc => libs/ctrl}/xc_resume.c        |   0
 tools/{libxc => libs/ctrl}/xc_rt.c            |   0
 tools/{libxc => libs/ctrl}/xc_solaris.c       |   0
 tools/{libxc => libs/ctrl}/xc_tbuf.c          |   0
 tools/{libxc => libs/ctrl}/xc_vm_event.c      |   0
 tools/libs/uselibs.mk                         |   2 +
 tools/libxc/Makefile                          | 109 ++----------------
 tools/ocaml/xenstored/Makefile                |   2 +-
 tools/python/Makefile                         |   2 +-
 tools/python/setup.py                         |   8 +-
 61 files changed, 111 insertions(+), 118 deletions(-)
 create mode 100644 tools/libs/ctrl/Makefile
 rename tools/{libxc => libs/ctrl}/include/xenctrl.h (100%)
 rename tools/{libxc => libs/ctrl}/include/xenctrl_compat.h (100%)
 rename tools/{libxc => libs/ctrl}/include/xenctrl_dom.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_altp2m.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_arinc653.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_bitops.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_core.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_core.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_core_arm.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_core_arm.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_core_x86.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_core_x86.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_cpu_hotplug.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_cpupool.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_csched.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_csched2.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_devicemodel_compat.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_domain.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_evtchn.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_evtchn_compat.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_flask.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_foreign_memory.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_freebsd.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_gnttab.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_gnttab_compat.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_hcall_buf.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_kexec.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_linux.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_mem_access.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_mem_paging.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_memshr.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_minios.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_misc.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_monitor.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_msr_x86.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_netbsd.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_pagetab.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_physdev.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_pm.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_private.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_private.h (100%)
 rename tools/{libxc => libs/ctrl}/xc_psr.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_resource.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_resume.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_rt.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_solaris.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_tbuf.c (100%)
 rename tools/{libxc => libs/ctrl}/xc_vm_event.c (100%)
.gitignore +8 -0
index 823f4743dc..d22b031ed2 100644
@@ -114,6 +114,9 @@ tools/libs/hypfs/headers.chk
 tools/libs/hypfs/xenhypfs.pc
 tools/libs/call/headers.chk
 tools/libs/call/xencall.pc
+tools/libs/ctrl/_*.[ch]
+tools/libs/ctrl/libxenctrl.map
+tools/libs/ctrl/xencontrol.pc
 tools/libs/foreignmemory/headers.chk
 tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
@@ -195,6 +198,11 @@ tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
 tools/libvchan/xenvchan.pc
 tools/libxc/*.pc
+tools/libxc/xc_bitops.h
+tools/libxc/xc_core.h
+tools/libxc/xc_core_arm.h
+tools/libxc/xc_core_x86.h
+tools/libxc/xc_private.h
 tools/libxl/_libxl.api-for-check
 tools/libxl/*.api-ok
 tools/libxl/*.pc
MAINTAINERS +1 -1
index ffe2310294..26c5382075 100644
@@ -226,7 +226,7 @@ M:	Stewart Hildebrand <[email protected]>
 S:	Supported
 L:	[email protected]
 F:	xen/common/sched/arinc653.c
-F:	tools/libxc/xc_arinc653.c
+F:	tools/libs/ctrl/xc_arinc653.c
 
 ARM (W/ VIRTUALISATION EXTENSIONS) ARCHITECTURE
 M:	Stefano Stabellini <[email protected]>
stubdom/Makefile +4 -5
index c466858db0..961a9f8704 100644
@@ -331,7 +331,7 @@ endif
 # libraries under tools/libs
 #######
 
-STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel
+STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel ctrl
 
 #######
 # common handling
@@ -396,12 +396,11 @@ $(TARGETS_MINIOS): mini-os-%:
 #######
 
 .PHONY: libxc
-libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a
-libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: mk-headers-$(XEN_TARGET_ARCH) libxentoollog libxenevtchn libxengnttab libxencall libxenforeignmemory libxendevicemodel cross-zlib
+libxc: libxc-$(XEN_TARGET_ARCH)/libxenguest.a
+libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxenevtchn libxenctrl cross-zlib
+libxc-$(XEN_TARGET_ARCH)/libxenguest.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libxc-$(XEN_TARGET_ARCH)
 
- libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a
-
 #######
 # ioemu
 #######
stubdom/grub/Makefile +3 -1
index 26dff45a8f..d33fa2f71e 100644
@@ -6,7 +6,9 @@ vpath %.c ../grub-upstream
 BOOT=$(OBJ_DIR)/boot-$(XEN_TARGET_ARCH).o
 
 DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libs/toollog/include
-DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libxc/include -I$(XEN_ROOT)/tools/include -I.
+DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libs/ctrl/include
+DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libxc/include
+DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/include -I.
 DEF_CPPFLAGS += -I../grub-upstream/stage1
 DEF_CPPFLAGS += -I../grub-upstream/stage2
 DEF_CPPFLAGS += -I../grub-upstream/netboot
stubdom/mini-os.mk +1 -1
index 32528bb91f..b1387df3f8 100644
@@ -13,5 +13,5 @@ GNTTAB_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab
 CALL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call
 FOREIGNMEMORY_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory
 DEVICEMODEL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel
-CTRL_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)
+CTRL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/ctrl
 GUEST_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)
tools/Rules.mk +2 -6
index 4f3aaaacd3..1cc56e9ab8 100644
@@ -15,7 +15,6 @@ XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 
 include $(XEN_ROOT)/tools/libs/uselibs.mk
 
-XEN_libxenctrl     = $(XEN_ROOT)/tools/libxc
 XEN_libxenguest    = $(XEN_ROOT)/tools/libxc
 XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
@@ -105,13 +104,10 @@ $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib))))
 
 # code which compiles against libxenctrl get __XEN_TOOLS__ and
 # therefore sees the unstable hypercall interfaces.
-CFLAGS_libxenctrl = -I$(XEN_libxenctrl)/include $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) $(CFLAGS_xeninclude) -D__XEN_TOOLS__
-SHDEPS_libxenctrl = $(SHLIB_libxentoollog) $(SHLIB_libxenevtchn) $(SHLIB_libxengnttab) $(SHLIB_libxencall) $(SHLIB_libxenforeignmemory) $(SHLIB_libxendevicemodel)
-LDLIBS_libxenctrl = $(SHDEPS_libxenctrl) $(XEN_libxenctrl)/libxenctrl$(libextension)
-SHLIB_libxenctrl  = $(SHDEPS_libxenctrl) -Wl,-rpath-link=$(XEN_libxenctrl)
+CFLAGS_libxenctrl += $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) -D__XEN_TOOLS__
 
 CFLAGS_libxenguest = -I$(XEN_libxenguest)/include $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude)
-SHDEPS_libxenguest = $(SHLIB_libxenevtchn)
+SHDEPS_libxenguest = $(SHLIB_libxenevtchn) $(SHLIB_libxenctrl)
 LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxenguest$(libextension)
 SHLIB_libxenguest  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_libxenguest)
 
tools/libs/Makefile +1 -0
index 69cdfb5975..7648ea0e4c 100644
@@ -9,6 +9,7 @@ SUBDIRS-y += gnttab
 SUBDIRS-y += call
 SUBDIRS-y += foreignmemory
 SUBDIRS-y += devicemodel
+SUBDIRS-y += ctrl
 SUBDIRS-y += hypfs
 
 ifeq ($(CONFIG_RUMP),y)
tools/libs/ctrl/Makefile new file +72 -0

72 lines not on this page · raw message

tools/libs/ctrl/include/xenctrl.h renamed from tools/libxc/include/xenctrl.h +0 -0
similarity index 100%
rename from tools/libxc/include/xenctrl.h
rename to tools/libs/ctrl/include/xenctrl.h
tools/libs/ctrl/include/xenctrl_compat.h renamed from tools/libxc/include/xenctrl_compat.h +0 -0
similarity index 100%
rename from tools/libxc/include/xenctrl_compat.h
rename to tools/libs/ctrl/include/xenctrl_compat.h
tools/libs/ctrl/include/xenctrl_dom.h renamed from tools/libxc/include/xenctrl_dom.h +0 -0
similarity index 100%
rename from tools/libxc/include/xenctrl_dom.h
rename to tools/libs/ctrl/include/xenctrl_dom.h
tools/libs/ctrl/xc_altp2m.c renamed from tools/libxc/xc_altp2m.c +0 -0
similarity index 100%
rename from tools/libxc/xc_altp2m.c
rename to tools/libs/ctrl/xc_altp2m.c
tools/libs/ctrl/xc_arinc653.c renamed from tools/libxc/xc_arinc653.c +0 -0
similarity index 100%
rename from tools/libxc/xc_arinc653.c
rename to tools/libs/ctrl/xc_arinc653.c
tools/libs/ctrl/xc_bitops.h renamed from tools/libxc/xc_bitops.h +0 -0
similarity index 100%
rename from tools/libxc/xc_bitops.h
rename to tools/libs/ctrl/xc_bitops.h
tools/libs/ctrl/xc_core.c renamed from tools/libxc/xc_core.c +0 -0
similarity index 100%
rename from tools/libxc/xc_core.c
rename to tools/libs/ctrl/xc_core.c
tools/libs/ctrl/xc_core.h renamed from tools/libxc/xc_core.h +0 -0
similarity index 100%
rename from tools/libxc/xc_core.h
rename to tools/libs/ctrl/xc_core.h
tools/libs/ctrl/xc_core_arm.c renamed from tools/libxc/xc_core_arm.c +0 -0
similarity index 100%
rename from tools/libxc/xc_core_arm.c
rename to tools/libs/ctrl/xc_core_arm.c
tools/libs/ctrl/xc_core_arm.h renamed from tools/libxc/xc_core_arm.h +0 -0
similarity index 100%
rename from tools/libxc/xc_core_arm.h
rename to tools/libs/ctrl/xc_core_arm.h
tools/libs/ctrl/xc_core_x86.c renamed from tools/libxc/xc_core_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xc_core_x86.c
rename to tools/libs/ctrl/xc_core_x86.c
tools/libs/ctrl/xc_core_x86.h renamed from tools/libxc/xc_core_x86.h +0 -0
similarity index 100%
rename from tools/libxc/xc_core_x86.h
rename to tools/libs/ctrl/xc_core_x86.h
tools/libs/ctrl/xc_cpu_hotplug.c renamed from tools/libxc/xc_cpu_hotplug.c +0 -0
similarity index 100%
rename from tools/libxc/xc_cpu_hotplug.c
rename to tools/libs/ctrl/xc_cpu_hotplug.c
tools/libs/ctrl/xc_cpupool.c renamed from tools/libxc/xc_cpupool.c +0 -0
similarity index 100%
rename from tools/libxc/xc_cpupool.c
rename to tools/libs/ctrl/xc_cpupool.c
tools/libs/ctrl/xc_csched.c renamed from tools/libxc/xc_csched.c +0 -0
similarity index 100%
rename from tools/libxc/xc_csched.c
rename to tools/libs/ctrl/xc_csched.c
tools/libs/ctrl/xc_csched2.c renamed from tools/libxc/xc_csched2.c +0 -0
similarity index 100%
rename from tools/libxc/xc_csched2.c
rename to tools/libs/ctrl/xc_csched2.c
tools/libs/ctrl/xc_devicemodel_compat.c renamed from tools/libxc/xc_devicemodel_compat.c +0 -0
similarity index 100%
rename from tools/libxc/xc_devicemodel_compat.c
rename to tools/libs/ctrl/xc_devicemodel_compat.c
tools/libs/ctrl/xc_domain.c renamed from tools/libxc/xc_domain.c +0 -0
similarity index 100%
rename from tools/libxc/xc_domain.c
rename to tools/libs/ctrl/xc_domain.c
tools/libs/ctrl/xc_evtchn.c renamed from tools/libxc/xc_evtchn.c +0 -0
similarity index 100%
rename from tools/libxc/xc_evtchn.c
rename to tools/libs/ctrl/xc_evtchn.c
tools/libs/ctrl/xc_evtchn_compat.c renamed from tools/libxc/xc_evtchn_compat.c +0 -0
similarity index 100%
rename from tools/libxc/xc_evtchn_compat.c
rename to tools/libs/ctrl/xc_evtchn_compat.c
tools/libs/ctrl/xc_flask.c renamed from tools/libxc/xc_flask.c +0 -0
similarity index 100%
rename from tools/libxc/xc_flask.c
rename to tools/libs/ctrl/xc_flask.c
tools/libs/ctrl/xc_foreign_memory.c renamed from tools/libxc/xc_foreign_memory.c +0 -0
similarity index 100%
rename from tools/libxc/xc_foreign_memory.c
rename to tools/libs/ctrl/xc_foreign_memory.c
tools/libs/ctrl/xc_freebsd.c renamed from tools/libxc/xc_freebsd.c +0 -0
similarity index 100%
rename from tools/libxc/xc_freebsd.c
rename to tools/libs/ctrl/xc_freebsd.c
tools/libs/ctrl/xc_gnttab.c renamed from tools/libxc/xc_gnttab.c +0 -0
similarity index 100%
rename from tools/libxc/xc_gnttab.c
rename to tools/libs/ctrl/xc_gnttab.c
tools/libs/ctrl/xc_gnttab_compat.c renamed from tools/libxc/xc_gnttab_compat.c +0 -0
similarity index 100%
rename from tools/libxc/xc_gnttab_compat.c
rename to tools/libs/ctrl/xc_gnttab_compat.c
tools/libs/ctrl/xc_hcall_buf.c renamed from tools/libxc/xc_hcall_buf.c +0 -0
similarity index 100%
rename from tools/libxc/xc_hcall_buf.c
rename to tools/libs/ctrl/xc_hcall_buf.c
tools/libs/ctrl/xc_kexec.c renamed from tools/libxc/xc_kexec.c +0 -0
similarity index 100%
rename from tools/libxc/xc_kexec.c
rename to tools/libs/ctrl/xc_kexec.c
tools/libs/ctrl/xc_linux.c renamed from tools/libxc/xc_linux.c +0 -0
similarity index 100%
rename from tools/libxc/xc_linux.c
rename to tools/libs/ctrl/xc_linux.c
tools/libs/ctrl/xc_mem_access.c renamed from tools/libxc/xc_mem_access.c +0 -0
similarity index 100%
rename from tools/libxc/xc_mem_access.c
rename to tools/libs/ctrl/xc_mem_access.c
tools/libs/ctrl/xc_mem_paging.c renamed from tools/libxc/xc_mem_paging.c +0 -0
similarity index 100%
rename from tools/libxc/xc_mem_paging.c
rename to tools/libs/ctrl/xc_mem_paging.c
tools/libs/ctrl/xc_memshr.c renamed from tools/libxc/xc_memshr.c +0 -0
similarity index 100%
rename from tools/libxc/xc_memshr.c
rename to tools/libs/ctrl/xc_memshr.c
tools/libs/ctrl/xc_minios.c renamed from tools/libxc/xc_minios.c +0 -0
similarity index 100%
rename from tools/libxc/xc_minios.c
rename to tools/libs/ctrl/xc_minios.c
tools/libs/ctrl/xc_misc.c renamed from tools/libxc/xc_misc.c +0 -0
similarity index 100%
rename from tools/libxc/xc_misc.c
rename to tools/libs/ctrl/xc_misc.c
tools/libs/ctrl/xc_monitor.c renamed from tools/libxc/xc_monitor.c +0 -0
similarity index 100%
rename from tools/libxc/xc_monitor.c
rename to tools/libs/ctrl/xc_monitor.c
tools/libs/ctrl/xc_msr_x86.h renamed from tools/libxc/xc_msr_x86.h +0 -0
similarity index 100%
rename from tools/libxc/xc_msr_x86.h
rename to tools/libs/ctrl/xc_msr_x86.h
tools/libs/ctrl/xc_netbsd.c renamed from tools/libxc/xc_netbsd.c +0 -0
similarity index 100%
rename from tools/libxc/xc_netbsd.c
rename to tools/libs/ctrl/xc_netbsd.c
tools/libs/ctrl/xc_pagetab.c renamed from tools/libxc/xc_pagetab.c +0 -0
similarity index 100%
rename from tools/libxc/xc_pagetab.c
rename to tools/libs/ctrl/xc_pagetab.c
tools/libs/ctrl/xc_physdev.c renamed from tools/libxc/xc_physdev.c +0 -0
similarity index 100%
rename from tools/libxc/xc_physdev.c
rename to tools/libs/ctrl/xc_physdev.c
tools/libs/ctrl/xc_pm.c renamed from tools/libxc/xc_pm.c +0 -0
similarity index 100%
rename from tools/libxc/xc_pm.c
rename to tools/libs/ctrl/xc_pm.c
tools/libs/ctrl/xc_private.c renamed from tools/libxc/xc_private.c +0 -0
similarity index 100%
rename from tools/libxc/xc_private.c
rename to tools/libs/ctrl/xc_private.c
tools/libs/ctrl/xc_private.h renamed from tools/libxc/xc_private.h +0 -0
similarity index 100%
rename from tools/libxc/xc_private.h
rename to tools/libs/ctrl/xc_private.h
tools/libs/ctrl/xc_psr.c renamed from tools/libxc/xc_psr.c +0 -0
similarity index 100%
rename from tools/libxc/xc_psr.c
rename to tools/libs/ctrl/xc_psr.c
tools/libs/ctrl/xc_resource.c renamed from tools/libxc/xc_resource.c +0 -0
similarity index 100%
rename from tools/libxc/xc_resource.c
rename to tools/libs/ctrl/xc_resource.c
tools/libs/ctrl/xc_resume.c renamed from tools/libxc/xc_resume.c +0 -0
similarity index 100%
rename from tools/libxc/xc_resume.c
rename to tools/libs/ctrl/xc_resume.c
tools/libs/ctrl/xc_rt.c renamed from tools/libxc/xc_rt.c +0 -0
similarity index 100%
rename from tools/libxc/xc_rt.c
rename to tools/libs/ctrl/xc_rt.c
tools/libs/ctrl/xc_solaris.c renamed from tools/libxc/xc_solaris.c +0 -0
similarity index 100%
rename from tools/libxc/xc_solaris.c
rename to tools/libs/ctrl/xc_solaris.c
tools/libs/ctrl/xc_tbuf.c renamed from tools/libxc/xc_tbuf.c +0 -0
similarity index 100%
rename from tools/libxc/xc_tbuf.c
rename to tools/libs/ctrl/xc_tbuf.c
tools/libs/ctrl/xc_vm_event.c renamed from tools/libxc/xc_vm_event.c +0 -0
similarity index 100%
rename from tools/libxc/xc_vm_event.c
rename to tools/libs/ctrl/xc_vm_event.c
tools/libs/uselibs.mk +2 -0
index db73fe314e..8e45e8d917 100644
@@ -16,3 +16,5 @@ LIBS_LIBS += devicemodel
 USELIBS_devicemodel := toollog toolcore call
 LIBS_LIBS += hypfs
 USELIBS_hypfs := toollog toolcore call
+LIBS_LIBS += ctrl
+USELIBS_ctrl := toollog call evtchn gnttab foreignmemory devicemodel
tools/libxc/Makefile +11 -98

177 lines not on this page · raw message

tools/ocaml/xenstored/Makefile +1 -1
index 692a62584e..89ec3ec76a 100644
@@ -69,7 +69,7 @@ XENSTOREDLIBS = \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/xeneventchn.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xc $(OCAML_TOPLEVEL)/libs/xc/xenctrl.cmxa \
 	-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xb $(OCAML_TOPLEVEL)/libs/xb/xenbus.cmxa \
-	-ccopt -L -ccopt $(XEN_ROOT)/tools/libxc
+	-ccopt -L -ccopt $(XEN_ROOT)/tools/libs/ctrl
 
 PROGRAMS = oxenstored
 
tools/python/Makefile +1 -1
index 8d22c03676..8dc755d6e8 100644
@@ -33,7 +33,7 @@ uninstall:
 
 .PHONY: test
 test:
-	LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore) $(PYTHON) -m unittest discover
+	LD_LIBRARY_PATH=$$(readlink -f ../libs/ctrl):$$(readlink -f ../xenstore) $(PYTHON) -m unittest discover
 
 .PHONY: clean
 clean:
tools/python/setup.py +4 -4
index 44696b3998..24b284af39 100644
@@ -9,7 +9,7 @@ extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
 PATH_XEN      = XEN_ROOT + "/tools/include"
 PATH_LIBXENTOOLLOG = XEN_ROOT + "/tools/libs/toollog"
 PATH_LIBXENEVTCHN = XEN_ROOT + "/tools/libs/evtchn"
-PATH_LIBXC    = XEN_ROOT + "/tools/libxc"
+PATH_LIBXENCTRL = XEN_ROOT + "/tools/libs/ctrl"
 PATH_LIBXL    = XEN_ROOT + "/tools/libxl"
 PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"
 
@@ -18,11 +18,11 @@ xc = Extension("xc",
                include_dirs       = [ PATH_XEN,
                                       PATH_LIBXENTOOLLOG + "/include",
                                       PATH_LIBXENEVTCHN + "/include",
-                                      PATH_LIBXC + "/include",
+                                      PATH_LIBXENCTRL + "/include",
                                       "xen/lowlevel/xc" ],
-               library_dirs       = [ PATH_LIBXC ],
+               library_dirs       = [ PATH_LIBXENCTRL ],
                libraries          = [ "xenctrl" ],
-               depends            = [ PATH_LIBXC + "/libxenctrl.so" ],
+               depends            = [ PATH_LIBXENCTRL + "/libxenctrl.so" ],
                extra_link_args    = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
                sources            = [ "xen/lowlevel/xc/xc.c" ])
 
Signature · 1 line
2.26.2
#23 lore raw

PATCH v4 19/31 tools/libxc: move libxenguest to tools/libs/guest

In reply to Juergen Gross

tools/libxc now contains libxenguest only. Move it to tools/libs/guest.

When generating the pkg-config file for libxenguest a filter is now required for replacing "xenctrl" by "xencontrol" in the "Requires.private:" entry. Add this filter to tools/libs/libs.mk.

---
 .gitignore                                    |  16 +-
 stubdom/Makefile                              |  34 +--
 stubdom/grub/Makefile                         |   2 +-
 stubdom/mini-os.mk                            |   2 +-
 tools/Makefile                                |   3 +-
 tools/Rules.mk                                |   7 +-
 tools/libs/Makefile                           |   1 +
 tools/{libxc => libs/guest}/COPYING           |   0
 tools/libs/guest/Makefile                     | 121 ++++++++++
 .../{libxc => libs/guest}/include/xenguest.h  |   0
 tools/{libxc => libs/guest}/xg_cpuid_x86.c    |   0
 tools/{libxc => libs/guest}/xg_dom_arm.c      |   0
 .../guest}/xg_dom_armzimageloader.c           |   0
 .../{libxc => libs/guest}/xg_dom_binloader.c  |   0
 tools/{libxc => libs/guest}/xg_dom_boot.c     |   0
 .../guest}/xg_dom_bzimageloader.c             |   0
 .../guest}/xg_dom_compat_linux.c              |   0
 tools/{libxc => libs/guest}/xg_dom_core.c     |   0
 .../{libxc => libs/guest}/xg_dom_decompress.h |   0
 .../guest}/xg_dom_decompress_lz4.c            |   0
 .../guest}/xg_dom_decompress_unsafe.c         |   0
 .../guest}/xg_dom_decompress_unsafe.h         |   0
 .../guest}/xg_dom_decompress_unsafe_bzip2.c   |   0
 .../guest}/xg_dom_decompress_unsafe_lzma.c    |   0
 .../guest}/xg_dom_decompress_unsafe_lzo1x.c   |   0
 .../guest}/xg_dom_decompress_unsafe_xz.c      |   0
 .../{libxc => libs/guest}/xg_dom_elfloader.c  |   0
 .../{libxc => libs/guest}/xg_dom_hvmloader.c  |   0
 tools/{libxc => libs/guest}/xg_dom_x86.c      |   0
 tools/{libxc => libs/guest}/xg_domain.c       |   0
 tools/{libxc => libs/guest}/xg_nomigrate.c    |   0
 tools/{libxc => libs/guest}/xg_offline_page.c |   0
 tools/{libxc => libs/guest}/xg_private.c      |   0
 tools/{libxc => libs/guest}/xg_private.h      |   0
 tools/{libxc => libs/guest}/xg_save_restore.h |   0
 tools/{libxc => libs/guest}/xg_sr_common.c    |   0
 tools/{libxc => libs/guest}/xg_sr_common.h    |   0
 .../{libxc => libs/guest}/xg_sr_common_x86.c  |   0
 .../{libxc => libs/guest}/xg_sr_common_x86.h  |   0
 .../guest}/xg_sr_common_x86_pv.c              |   0
 .../guest}/xg_sr_common_x86_pv.h              |   0
 tools/{libxc => libs/guest}/xg_sr_restore.c   |   0
 .../guest}/xg_sr_restore_x86_hvm.c            |   0
 .../guest}/xg_sr_restore_x86_pv.c             |   0
 tools/{libxc => libs/guest}/xg_sr_save.c      |   0
 .../guest}/xg_sr_save_x86_hvm.c               |   0
 .../{libxc => libs/guest}/xg_sr_save_x86_pv.c |   0
 .../guest}/xg_sr_stream_format.h              |   0
 tools/{libxc => libs/guest}/xg_suspend.c      |   0
 tools/libs/libs.mk                            |   2 +-
 tools/libs/uselibs.mk                         |   2 +
 tools/libxc/Makefile                          | 219 ------------------
 52 files changed, 148 insertions(+), 261 deletions(-)
 rename tools/{libxc => libs/guest}/COPYING (100%)
 create mode 100644 tools/libs/guest/Makefile
 rename tools/{libxc => libs/guest}/include/xenguest.h (100%)
 rename tools/{libxc => libs/guest}/xg_cpuid_x86.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_arm.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_armzimageloader.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_binloader.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_boot.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_bzimageloader.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_compat_linux.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_core.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress.h (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_lz4.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_unsafe.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_unsafe.h (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_unsafe_bzip2.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_unsafe_lzma.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_unsafe_lzo1x.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_decompress_unsafe_xz.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_elfloader.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_hvmloader.c (100%)
 rename tools/{libxc => libs/guest}/xg_dom_x86.c (100%)
 rename tools/{libxc => libs/guest}/xg_domain.c (100%)
 rename tools/{libxc => libs/guest}/xg_nomigrate.c (100%)
 rename tools/{libxc => libs/guest}/xg_offline_page.c (100%)
 rename tools/{libxc => libs/guest}/xg_private.c (100%)
 rename tools/{libxc => libs/guest}/xg_private.h (100%)
 rename tools/{libxc => libs/guest}/xg_save_restore.h (100%)
 rename tools/{libxc => libs/guest}/xg_sr_common.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_common.h (100%)
 rename tools/{libxc => libs/guest}/xg_sr_common_x86.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_common_x86.h (100%)
 rename tools/{libxc => libs/guest}/xg_sr_common_x86_pv.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_common_x86_pv.h (100%)
 rename tools/{libxc => libs/guest}/xg_sr_restore.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_restore_x86_hvm.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_restore_x86_pv.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_save.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_save_x86_hvm.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_save_x86_pv.c (100%)
 rename tools/{libxc => libs/guest}/xg_sr_stream_format.h (100%)
 rename tools/{libxc => libs/guest}/xg_suspend.c (100%)
 delete mode 100644 tools/libxc/Makefile
.gitignore +8 -8
index d22b031ed2..eb637a98e9 100644
@@ -71,7 +71,6 @@ stubdom/include
 stubdom/ioemu
 stubdom/ioemu/
 stubdom/libs-*
-stubdom/libxc-*
 stubdom/libxencall-*
 stubdom/libxenevtchn-*
 stubdom/libxenforeignmemory-*
@@ -121,6 +120,14 @@ tools/libs/foreignmemory/headers.chk
 tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
 tools/libs/devicemodel/xendevicemodel.pc
+tools/libs/guest/_*.[ch]
+tools/libs/guest/libxenguest.map
+tools/libs/guest/xenguest.pc
+tools/libs/guest/xc_bitops.h
+tools/libs/guest/xc_core.h
+tools/libs/guest/xc_core_arm.h
+tools/libs/guest/xc_core_x86.h
+tools/libs/guest/xc_private.h
 tools/console/xenconsole
 tools/console/xenconsoled
 tools/console/client/_paths.h
@@ -197,12 +204,6 @@ tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
 tools/libvchan/xenvchan.pc
-tools/libxc/*.pc
-tools/libxc/xc_bitops.h
-tools/libxc/xc_core.h
-tools/libxc/xc_core_arm.h
-tools/libxc/xc_core_x86.h
-tools/libxc/xc_private.h
 tools/libxl/_libxl.api-for-check
 tools/libxl/*.api-ok
 tools/libxl/*.pc
@@ -370,7 +371,6 @@ tools/include/xen-foreign/arm64.h
 tools/misc/xen-hptool
 tools/misc/xen-mfndump
 tools/libs/toolcore/include/_*.h
-tools/libxc/_*.[ch]
 tools/libxl/_*.[ch]
 tools/libxl/testidl
 tools/libxl/testidl.c
stubdom/Makefile +11 -23
index 961a9f8704..de10281ca3 100644
@@ -331,7 +331,9 @@ endif
 # libraries under tools/libs
 #######
 
-STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel ctrl
+STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel ctrl guest
+
+LIBDEP_guest := cross-zlib
 
 #######
 # common handling
@@ -362,13 +364,10 @@ endef
 
 $(foreach lib,$(STUB_LIBS),$(eval $(call BUILD_lib,$(lib))))
 
-libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile
-	$(do_links)
-
 xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile
 	$(do_links)
 
-LINK_DIRS := libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(STUB_LIBS),libs-$(XEN_TARGET_ARCH)/$(dir))
+LINK_DIRS := xenstore $(foreach dir,$(STUB_LIBS),libs-$(XEN_TARGET_ARCH)/$(dir))
 LINK_STAMPS := $(foreach dir,$(LINK_DIRS),$(dir)/stamp)
 
 mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET) $(LINK_STAMPS)
@@ -391,16 +390,6 @@ $(TARGETS_MINIOS): mini-os-%:
                 mkdir -p $@/$$i ; \
 	done
 
-#######
-# libxc
-#######
-
-.PHONY: libxc
-libxc: libxc-$(XEN_TARGET_ARCH)/libxenguest.a
-libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxenevtchn libxenctrl cross-zlib
-libxc-$(XEN_TARGET_ARCH)/libxenguest.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libxc-$(XEN_TARGET_ARCH)
-
 #######
 # ioemu
 #######
@@ -409,7 +398,7 @@ ioemu-minios-config.mk: $(CURDIR)/ioemu-minios.cfg
 	MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C $(MINI_OS) config
 
 .PHONY: ioemu
-ioemu: cross-zlib cross-libpci libxc ioemu-minios-config.mk
+ioemu: cross-zlib cross-libpci libxenguest ioemu-minios-config.mk
 	[ -f ioemu/config-host.mak ] || \
 	  ( $(buildmakevars2shellvars); \
 	    cd ioemu ; \
@@ -503,15 +492,15 @@ xenstore: $(CROSS_ROOT) xenstore-minios-config.mk
 
 .PHONY: ioemu-stubdom
 ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/ioemu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a
-ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) libxc ioemu
+ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) libxenguest ioemu
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/ioemu-minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(APP_OBJS)"
 
 .PHONY: caml-stubdom
-caml-stubdom: mini-os-$(XEN_TARGET_ARCH)-caml lwip-$(XEN_TARGET_ARCH) libxc cross-ocaml caml
+caml-stubdom: mini-os-$(XEN_TARGET_ARCH)-caml lwip-$(XEN_TARGET_ARCH) libxenguest cross-ocaml caml
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/caml/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a"
 
 .PHONY: c-stubdom
-c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c
+c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxenguest c
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a
 
 .PHONY: vtpm-stubdom
@@ -523,11 +512,11 @@ vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"
 
 .PHONY: pv-grub
-pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
+pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxenguest grub
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a
 
 .PHONY: xenstore-stubdom
-xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
+xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxenguest xenstore
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/xenstore-minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/xenstore/xenstored.a
 
 #########
@@ -621,7 +610,6 @@ clean:
 	rm -f $(STUBDOMPATH)
 	rm -f *-minios-config.mk
 	rm -fr pkg-config
-	[ ! -e libxc-$(XEN_TARGET_ARCH)/Makefile ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean
 	-[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean
 	-[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean
 
@@ -632,7 +620,7 @@ crossclean: clean
 	rm -fr newlib-$(XEN_TARGET_ARCH)
 	rm -fr zlib-$(XEN_TARGET_ARCH) pciutils-$(XEN_TARGET_ARCH)
 	rm -fr libs-$(XEN_TARGET_ARCH)
-	rm -fr libxc-$(XEN_TARGET_ARCH) ioemu xenstore
+	rm -fr ioemu xenstore
 	rm -fr gmp-$(XEN_TARGET_ARCH)
 	rm -fr polarssl-$(XEN_TARGET_ARCH)
 	rm -fr openssl-$(XEN_TARGET_ARCH)
stubdom/grub/Makefile +1 -1
index d33fa2f71e..7397661c9b 100644
@@ -7,7 +7,7 @@ BOOT=$(OBJ_DIR)/boot-$(XEN_TARGET_ARCH).o
 
 DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libs/toollog/include
 DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libs/ctrl/include
-DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libxc/include
+DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/libs/guest/include
 DEF_CPPFLAGS += -I$(XEN_ROOT)/tools/include -I.
 DEF_CPPFLAGS += -I../grub-upstream/stage1
 DEF_CPPFLAGS += -I../grub-upstream/stage2
stubdom/mini-os.mk +1 -1
index b1387df3f8..e1640a7cbc 100644
@@ -14,4 +14,4 @@ CALL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call
 FOREIGNMEMORY_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory
 DEVICEMODEL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel
 CTRL_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/ctrl
-GUEST_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)
+GUEST_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/guest
tools/Makefile +1 -2
index 7c9f9fc900..f9b4012290 100644
@@ -6,7 +6,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y :=
 SUBDIRS-y += libs
-SUBDIRS-y += libxc
 SUBDIRS-y += flask
 SUBDIRS-y += fuzz
 SUBDIRS-y += xenstore
@@ -44,7 +43,7 @@ SUBDIRS-y += pygrub
 SUBDIRS-$(OCAML_TOOLS) += ocaml
 
 ifeq ($(CONFIG_RUMP),y)
-SUBDIRS-y := libs libxc xenstore
+SUBDIRS-y := libs xenstore
 endif
 
 # For the sake of linking, set the sys-root
tools/Rules.mk +1 -6
index 1cc56e9ab8..914c79bfb9 100644
@@ -15,7 +15,6 @@ XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 
 include $(XEN_ROOT)/tools/libs/uselibs.mk
 
-XEN_libxenguest    = $(XEN_ROOT)/tools/libxc
 XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
 XEN_libxlutil      = $(XEN_libxenlight)
@@ -105,11 +104,7 @@ $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib))))
 # code which compiles against libxenctrl get __XEN_TOOLS__ and
 # therefore sees the unstable hypercall interfaces.
 CFLAGS_libxenctrl += $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) -D__XEN_TOOLS__
-
-CFLAGS_libxenguest = -I$(XEN_libxenguest)/include $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude)
-SHDEPS_libxenguest = $(SHLIB_libxenevtchn) $(SHLIB_libxenctrl)
-LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxenguest$(libextension)
-SHLIB_libxenguest  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_libxenguest)
+CFLAGS_libxenguest += $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory)
 
 CFLAGS_libxenstore = -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenstore = $(SHLIB_libxentoolcore) $(SHLIB_libxenctrl)
tools/libs/Makefile +1 -0
index 7648ea0e4c..f15c1688f7 100644
@@ -10,6 +10,7 @@ SUBDIRS-y += call
 SUBDIRS-y += foreignmemory
 SUBDIRS-y += devicemodel
 SUBDIRS-y += ctrl
+SUBDIRS-y += guest
 SUBDIRS-y += hypfs
 
 ifeq ($(CONFIG_RUMP),y)
tools/libs/guest/COPYING renamed from tools/libxc/COPYING +0 -0
similarity index 100%
rename from tools/libxc/COPYING
rename to tools/libs/guest/COPYING
tools/libs/guest/Makefile new file +121 -0

121 lines not on this page · raw message

tools/libs/guest/include/xenguest.h renamed from tools/libxc/include/xenguest.h +0 -0
similarity index 100%
rename from tools/libxc/include/xenguest.h
rename to tools/libs/guest/include/xenguest.h
tools/libs/guest/xg_cpuid_x86.c renamed from tools/libxc/xg_cpuid_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xg_cpuid_x86.c
rename to tools/libs/guest/xg_cpuid_x86.c
tools/libs/guest/xg_dom_arm.c renamed from tools/libxc/xg_dom_arm.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_arm.c
rename to tools/libs/guest/xg_dom_arm.c
tools/libs/guest/xg_dom_armzimageloader.c renamed from tools/libxc/xg_dom_armzimageloader.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_armzimageloader.c
rename to tools/libs/guest/xg_dom_armzimageloader.c
tools/libs/guest/xg_dom_binloader.c renamed from tools/libxc/xg_dom_binloader.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_binloader.c
rename to tools/libs/guest/xg_dom_binloader.c
tools/libs/guest/xg_dom_boot.c renamed from tools/libxc/xg_dom_boot.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_boot.c
rename to tools/libs/guest/xg_dom_boot.c
tools/libs/guest/xg_dom_bzimageloader.c renamed from tools/libxc/xg_dom_bzimageloader.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_bzimageloader.c
rename to tools/libs/guest/xg_dom_bzimageloader.c
tools/libs/guest/xg_dom_compat_linux.c renamed from tools/libxc/xg_dom_compat_linux.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_compat_linux.c
rename to tools/libs/guest/xg_dom_compat_linux.c
tools/libs/guest/xg_dom_core.c renamed from tools/libxc/xg_dom_core.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_core.c
rename to tools/libs/guest/xg_dom_core.c
tools/libs/guest/xg_dom_decompress.h renamed from tools/libxc/xg_dom_decompress.h +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress.h
rename to tools/libs/guest/xg_dom_decompress.h
tools/libs/guest/xg_dom_decompress_lz4.c renamed from tools/libxc/xg_dom_decompress_lz4.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_lz4.c
rename to tools/libs/guest/xg_dom_decompress_lz4.c
tools/libs/guest/xg_dom_decompress_unsafe.c renamed from tools/libxc/xg_dom_decompress_unsafe.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_unsafe.c
rename to tools/libs/guest/xg_dom_decompress_unsafe.c
tools/libs/guest/xg_dom_decompress_unsafe.h renamed from tools/libxc/xg_dom_decompress_unsafe.h +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_unsafe.h
rename to tools/libs/guest/xg_dom_decompress_unsafe.h
tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c renamed from tools/libxc/xg_dom_decompress_unsafe_bzip2.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_unsafe_bzip2.c
rename to tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c
tools/libs/guest/xg_dom_decompress_unsafe_lzma.c renamed from tools/libxc/xg_dom_decompress_unsafe_lzma.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_unsafe_lzma.c
rename to tools/libs/guest/xg_dom_decompress_unsafe_lzma.c
tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c renamed from tools/libxc/xg_dom_decompress_unsafe_lzo1x.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_unsafe_lzo1x.c
rename to tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
tools/libs/guest/xg_dom_decompress_unsafe_xz.c renamed from tools/libxc/xg_dom_decompress_unsafe_xz.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_decompress_unsafe_xz.c
rename to tools/libs/guest/xg_dom_decompress_unsafe_xz.c
tools/libs/guest/xg_dom_elfloader.c renamed from tools/libxc/xg_dom_elfloader.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_elfloader.c
rename to tools/libs/guest/xg_dom_elfloader.c
tools/libs/guest/xg_dom_hvmloader.c renamed from tools/libxc/xg_dom_hvmloader.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_hvmloader.c
rename to tools/libs/guest/xg_dom_hvmloader.c
tools/libs/guest/xg_dom_x86.c renamed from tools/libxc/xg_dom_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xg_dom_x86.c
rename to tools/libs/guest/xg_dom_x86.c
tools/libs/guest/xg_domain.c renamed from tools/libxc/xg_domain.c +0 -0
similarity index 100%
rename from tools/libxc/xg_domain.c
rename to tools/libs/guest/xg_domain.c
tools/libs/guest/xg_nomigrate.c renamed from tools/libxc/xg_nomigrate.c +0 -0
similarity index 100%
rename from tools/libxc/xg_nomigrate.c
rename to tools/libs/guest/xg_nomigrate.c
tools/libs/guest/xg_offline_page.c renamed from tools/libxc/xg_offline_page.c +0 -0
similarity index 100%
rename from tools/libxc/xg_offline_page.c
rename to tools/libs/guest/xg_offline_page.c
tools/libs/guest/xg_private.c renamed from tools/libxc/xg_private.c +0 -0
similarity index 100%
rename from tools/libxc/xg_private.c
rename to tools/libs/guest/xg_private.c
tools/libs/guest/xg_private.h renamed from tools/libxc/xg_private.h +0 -0
similarity index 100%
rename from tools/libxc/xg_private.h
rename to tools/libs/guest/xg_private.h
tools/libs/guest/xg_save_restore.h renamed from tools/libxc/xg_save_restore.h +0 -0
similarity index 100%
rename from tools/libxc/xg_save_restore.h
rename to tools/libs/guest/xg_save_restore.h
tools/libs/guest/xg_sr_common.c renamed from tools/libxc/xg_sr_common.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_common.c
rename to tools/libs/guest/xg_sr_common.c
tools/libs/guest/xg_sr_common.h renamed from tools/libxc/xg_sr_common.h +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_common.h
rename to tools/libs/guest/xg_sr_common.h
tools/libs/guest/xg_sr_common_x86.c renamed from tools/libxc/xg_sr_common_x86.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_common_x86.c
rename to tools/libs/guest/xg_sr_common_x86.c
tools/libs/guest/xg_sr_common_x86.h renamed from tools/libxc/xg_sr_common_x86.h +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_common_x86.h
rename to tools/libs/guest/xg_sr_common_x86.h
tools/libs/guest/xg_sr_common_x86_pv.c renamed from tools/libxc/xg_sr_common_x86_pv.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_common_x86_pv.c
rename to tools/libs/guest/xg_sr_common_x86_pv.c
tools/libs/guest/xg_sr_common_x86_pv.h renamed from tools/libxc/xg_sr_common_x86_pv.h +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_common_x86_pv.h
rename to tools/libs/guest/xg_sr_common_x86_pv.h
tools/libs/guest/xg_sr_restore.c renamed from tools/libxc/xg_sr_restore.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_restore.c
rename to tools/libs/guest/xg_sr_restore.c
tools/libs/guest/xg_sr_restore_x86_hvm.c renamed from tools/libxc/xg_sr_restore_x86_hvm.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_restore_x86_hvm.c
rename to tools/libs/guest/xg_sr_restore_x86_hvm.c
tools/libs/guest/xg_sr_restore_x86_pv.c renamed from tools/libxc/xg_sr_restore_x86_pv.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_restore_x86_pv.c
rename to tools/libs/guest/xg_sr_restore_x86_pv.c
tools/libs/guest/xg_sr_save.c renamed from tools/libxc/xg_sr_save.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_save.c
rename to tools/libs/guest/xg_sr_save.c
tools/libs/guest/xg_sr_save_x86_hvm.c renamed from tools/libxc/xg_sr_save_x86_hvm.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_save_x86_hvm.c
rename to tools/libs/guest/xg_sr_save_x86_hvm.c
tools/libs/guest/xg_sr_save_x86_pv.c renamed from tools/libxc/xg_sr_save_x86_pv.c +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_save_x86_pv.c
rename to tools/libs/guest/xg_sr_save_x86_pv.c
tools/libs/guest/xg_sr_stream_format.h renamed from tools/libxc/xg_sr_stream_format.h +0 -0
similarity index 100%
rename from tools/libxc/xg_sr_stream_format.h
rename to tools/libs/guest/xg_sr_stream_format.h
tools/libs/guest/xg_suspend.c renamed from tools/libxc/xg_suspend.c +0 -0
similarity index 100%
rename from tools/libxc/xg_suspend.c
rename to tools/libs/guest/xg_suspend.c
tools/libs/libs.mk +1 -1
index 4679268fc2..9d0ed08846 100644
@@ -34,7 +34,7 @@ PKG_CONFIG_DESC ?= The $(PKG_CONFIG_NAME) library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 PKG_CONFIG_USELIBS := $(SHLIB_libxen$(LIBNAME))
 PKG_CONFIG_LIB := xen$(LIBNAME)
-PKG_CONFIG_REQPRIV := $(subst $(space),$(comma),$(strip $(foreach lib,$(USELIBS_$(LIBNAME)),xen$(lib))))
+PKG_CONFIG_REQPRIV := $(subst $(space),$(comma),$(strip $(foreach lib,$(patsubst ctrl,control,$(USELIBS_$(LIBNAME))),xen$(lib))))
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
tools/libs/uselibs.mk +2 -0
index 8e45e8d917..9619c576ba 100644
@@ -18,3 +18,5 @@ LIBS_LIBS += hypfs
 USELIBS_hypfs := toollog toolcore call
 LIBS_LIBS += ctrl
 USELIBS_ctrl := toollog call evtchn gnttab foreignmemory devicemodel
+LIBS_LIBS += guest
+USELIBS_guest := evtchn ctrl
tools/libxc/Makefile deleted +0 -219

219 lines not on this page · raw message

Signature · 1 line
2.26.2
#24 lore raw

PATCH v4 20/31 tools: split libxenstore into new tools/libs/store directory

In reply to Juergen Gross

There is no reason why libxenstore is not placed in the tools/libs directory.

The common files between libxenstore and xenstored are kept in the tools/xenstore directory to be easily accessible by xenstore-stubdom which needs the xenstored files to be built.

---
 .gitignore                                    |  7 +-
 stubdom/mini-os.mk                            |  2 +-
 tools/Makefile                                |  2 +-
 tools/Rules.mk                                |  5 --
 tools/libs/Makefile                           |  1 +
 tools/libs/store/Makefile                     | 64 ++++++++++++++
 .../store}/include/compat/xs.h                |  0
 .../store}/include/compat/xs_lib.h            |  0
 .../store}/include/xenstore.h                 |  0
 tools/libs/store/libxenstore.map              | 49 +++++++++++
 tools/{xenstore => libs/store}/xs.c           |  0
 tools/libs/uselibs.mk                         |  2 +
 tools/python/setup.py                         |  2 +-
 tools/xenstore/Makefile                       | 86 +------------------
 tools/xenstore/{include => }/xenstore_lib.h   |  0
 15 files changed, 129 insertions(+), 91 deletions(-)
 create mode 100644 tools/libs/store/Makefile
 rename tools/{xenstore => libs/store}/include/compat/xs.h (100%)
 rename tools/{xenstore => libs/store}/include/compat/xs_lib.h (100%)
 rename tools/{xenstore => libs/store}/include/xenstore.h (100%)
 create mode 100644 tools/libs/store/libxenstore.map
 rename tools/{xenstore => libs/store}/xs.c (100%)
 rename tools/xenstore/{include => }/xenstore_lib.h (100%)
.gitignore +6 -1
index eb637a98e9..1335034fd3 100644
@@ -128,6 +128,12 @@ tools/libs/guest/xc_core.h
 tools/libs/guest/xc_core_arm.h
 tools/libs/guest/xc_core_x86.h
 tools/libs/guest/xc_private.h
+tools/libs/store/headers.chk
+tools/libs/store/list.h
+tools/libs/store/utils.h
+tools/libs/store/xenstore.pc
+tools/libs/store/xs_lib.c
+tools/libs/store/include/xenstore_lib.h
 tools/console/xenconsole
 tools/console/xenconsoled
 tools/console/client/_paths.h
@@ -282,7 +288,6 @@ tools/xenstore/xenstore-control
 tools/xenstore/xenstore-ls
 tools/xenstore/xenstored
 tools/xenstore/xenstored_test
-tools/xenstore/xenstore.pc
 tools/xenstore/xs_tdb_dump
 tools/xentrace/xentrace_setsize
 tools/xentrace/tbctl
stubdom/mini-os.mk +1 -1
index e1640a7cbc..420e9a8771 100644
@@ -5,7 +5,7 @@
 # XEN_ROOT
 # MINIOS_TARGET_ARCH
 
-XENSTORE_CPPFLAGS = -isystem $(XEN_ROOT)/tools/xenstore/include
+XENSTORE_CPPFLAGS = -isystem $(XEN_ROOT)/tools/libs/store/include
 TOOLCORE_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore
 TOOLLOG_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog
 EVTCHN_PATH = $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn
tools/Makefile +1 -1
index f9b4012290..4a3646871c 100644
@@ -43,7 +43,7 @@ SUBDIRS-y += pygrub
 SUBDIRS-$(OCAML_TOOLS) += ocaml
 
 ifeq ($(CONFIG_RUMP),y)
-SUBDIRS-y := libs xenstore
+SUBDIRS-y := libs
 endif
 
 # For the sake of linking, set the sys-root
tools/Rules.mk +0 -5
index 914c79bfb9..557fd1e757 100644
@@ -18,7 +18,6 @@ include $(XEN_ROOT)/tools/libs/uselibs.mk
 XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
 XEN_libxlutil      = $(XEN_libxenlight)
-XEN_libxenstore    = $(XEN_ROOT)/tools/xenstore
 XEN_libxenstat     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
 XEN_libxenvchan    = $(XEN_ROOT)/tools/libvchan
 
@@ -106,10 +105,6 @@ $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib))))
 CFLAGS_libxenctrl += $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) -D__XEN_TOOLS__
 CFLAGS_libxenguest += $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory)
 
-CFLAGS_libxenstore = -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude)
-SHDEPS_libxenstore = $(SHLIB_libxentoolcore) $(SHLIB_libxenctrl)
-LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_libxenstore)/libxenstore$(libextension)
-SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_libxenstore)
 ifeq ($(CONFIG_Linux),y)
 LDLIBS_libxenstore += -ldl
 endif
tools/libs/Makefile +1 -0
index f15c1688f7..62bd8f5292 100644
@@ -12,6 +12,7 @@ SUBDIRS-y += devicemodel
 SUBDIRS-y += ctrl
 SUBDIRS-y += guest
 SUBDIRS-y += hypfs
+SUBDIRS-y += store
 
 ifeq ($(CONFIG_RUMP),y)
 SUBDIRS-y := toolcore
tools/libs/store/Makefile new file +64 -0

64 lines not on this page · raw message

tools/libs/store/include/compat/xs.h renamed from tools/xenstore/include/compat/xs.h +0 -0
similarity index 100%
rename from tools/xenstore/include/compat/xs.h
rename to tools/libs/store/include/compat/xs.h
tools/libs/store/include/compat/xs_lib.h renamed from tools/xenstore/include/compat/xs_lib.h +0 -0
similarity index 100%
rename from tools/xenstore/include/compat/xs_lib.h
rename to tools/libs/store/include/compat/xs_lib.h
tools/libs/store/include/xenstore.h renamed from tools/xenstore/include/xenstore.h +0 -0
similarity index 100%
rename from tools/xenstore/include/xenstore.h
rename to tools/libs/store/include/xenstore.h
tools/libs/store/libxenstore.map new file +49 -0

49 lines not on this page · raw message

tools/libs/store/xs.c renamed from tools/xenstore/xs.c +0 -0
similarity index 100%
rename from tools/xenstore/xs.c
rename to tools/libs/store/xs.c
tools/libs/uselibs.mk +2 -0
index 9619c576ba..a0fe0402ff 100644
@@ -20,3 +20,5 @@ LIBS_LIBS += ctrl
 USELIBS_ctrl := toollog call evtchn gnttab foreignmemory devicemodel
 LIBS_LIBS += guest
 USELIBS_guest := evtchn ctrl
+LIBS_LIBS += store
+USELIBS_store := toolcore
tools/python/setup.py +1 -1
index 24b284af39..8254464aff 100644
@@ -11,7 +11,7 @@ PATH_LIBXENTOOLLOG = XEN_ROOT + "/tools/libs/toollog"
 PATH_LIBXENEVTCHN = XEN_ROOT + "/tools/libs/evtchn"
 PATH_LIBXENCTRL = XEN_ROOT + "/tools/libs/ctrl"
 PATH_LIBXL    = XEN_ROOT + "/tools/libxl"
-PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"
+PATH_XENSTORE = XEN_ROOT + "/tools/libs/store"
 
 xc = Extension("xc",
                extra_compile_args = extra_compile_args,
tools/xenstore/Makefile +4 -82

125 lines not on this page · raw message

tools/xenstore/xenstore_lib.h renamed from tools/xenstore/include/xenstore_lib.h +0 -0
similarity index 100%
rename from tools/xenstore/include/xenstore_lib.h
rename to tools/xenstore/xenstore_lib.h
Signature · 1 line
2.26.2
#25 lore raw

PATCH v4 21/31 tools: split libxenvchan into new tools/libs/vchan directory

In reply to Juergen Gross

There is no reason why libvchan is not placed in the tools/libs directory.

At the same time move libxenvchan.h to a dedicated include directory in tools/libs/vchan in order to follow the same pattern as the other libraries in tools/libs.

As tools/libvchan now contains no library any longer rename it to tools/vchan.

---
 .gitignore                                    |   8 +-
 tools/Makefile                                |   2 +-
 tools/Rules.mk                                |   6 --
 tools/libs/Makefile                           |   1 +
 tools/libs/uselibs.mk                         |   2 +
 tools/libs/vchan/Makefile                     |  20 ++++
 .../vchan/include}/libxenvchan.h              |   0
 tools/{libvchan => libs/vchan}/init.c         |   0
 tools/{libvchan => libs/vchan}/io.c           |   0
 tools/libvchan/Makefile                       | 100 ------------------
 tools/vchan/Makefile                          |  37 +++++++
 tools/{libvchan => vchan}/node-select.c       |   0
 tools/{libvchan => vchan}/node.c              |   0
 .../{libvchan => vchan}/vchan-socket-proxy.c  |   0
 14 files changed, 66 insertions(+), 110 deletions(-)
 create mode 100644 tools/libs/vchan/Makefile
 rename tools/{libvchan => libs/vchan/include}/libxenvchan.h (100%)
 rename tools/{libvchan => libs/vchan}/init.c (100%)
 rename tools/{libvchan => libs/vchan}/io.c (100%)
 delete mode 100644 tools/libvchan/Makefile
 create mode 100644 tools/vchan/Makefile
 rename tools/{libvchan => vchan}/node-select.c (100%)
 rename tools/{libvchan => vchan}/node.c (100%)
 rename tools/{libvchan => vchan}/vchan-socket-proxy.c (100%)
.gitignore +5 -3
index 1335034fd3..364b09506b 100644
@@ -134,6 +134,9 @@ tools/libs/store/utils.h
 tools/libs/store/xenstore.pc
 tools/libs/store/xs_lib.c
 tools/libs/store/include/xenstore_lib.h
+tools/libs/vchan/headers.chk
+tools/libs/vchan/libxenvchan.map
+tools/libs/vchan/xenvchan.pc
 tools/console/xenconsole
 tools/console/xenconsoled
 tools/console/client/_paths.h
@@ -209,7 +212,6 @@ tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
-tools/libvchan/xenvchan.pc
 tools/libxl/_libxl.api-for-check
 tools/libxl/*.api-ok
 tools/libxl/*.pc
@@ -389,8 +391,8 @@ tools/misc/xenhypfs
 tools/misc/xenwatchdogd
 tools/misc/xen-hvmcrash
 tools/misc/xen-lowmemd
-tools/libvchan/vchan-node[12]
-tools/libvchan/vchan-socket-proxy
+tools/vchan/vchan-node[12]
+tools/vchan/vchan-socket-proxy
 tools/ocaml/*/.ocamldep.make
 tools/ocaml/*/*.cm[ixao]
 tools/ocaml/*/*.cmxa
tools/Makefile +1 -1
index 4a3646871c..0db01707a4 100644
@@ -20,7 +20,7 @@ SUBDIRS-y += xenmon
 SUBDIRS-y += xenstat
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
-SUBDIRS-$(CONFIG_Linux) += libvchan
+SUBDIRS-$(CONFIG_Linux) += vchan
 
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"
tools/Rules.mk +0 -6
index 557fd1e757..071fe364a3 100644
@@ -19,7 +19,6 @@ XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
 XEN_libxlutil      = $(XEN_libxenlight)
 XEN_libxenstat     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
-XEN_libxenvchan    = $(XEN_ROOT)/tools/libvchan
 
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
@@ -114,11 +113,6 @@ SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
 LDLIBS_libxenstat  = $(SHDEPS_libxenstat) $(XEN_libxenstat)/libxenstat$(libextension)
 SHLIB_libxenstat   = $(SHDEPS_libxenstat) -Wl,-rpath-link=$(XEN_libxenstat)
 
-CFLAGS_libxenvchan = -I$(XEN_libxenvchan) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
-SHDEPS_libxenvchan = $(SHLIB_libxentoollog) $(SHLIB_libxenstore) $(SHLIB_libxenevtchn) $(SHLIB_libxengnttab)
-LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_libxenvchan)/libxenvchan$(libextension)
-SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_libxenvchan)
-
 ifeq ($(debug),y)
 # Disable optimizations
 CFLAGS += -O0 -fno-omit-frame-pointer
tools/libs/Makefile +1 -0
index 62bd8f5292..756d059ee7 100644
@@ -13,6 +13,7 @@ SUBDIRS-y += ctrl
 SUBDIRS-y += guest
 SUBDIRS-y += hypfs
 SUBDIRS-y += store
+SUBDIRS-$(CONFIG_Linux) += vchan
 
 ifeq ($(CONFIG_RUMP),y)
 SUBDIRS-y := toolcore
tools/libs/uselibs.mk +2 -0
index a0fe0402ff..edb4b34256 100644
@@ -22,3 +22,5 @@ LIBS_LIBS += guest
 USELIBS_guest := evtchn ctrl
 LIBS_LIBS += store
 USELIBS_store := toolcore
+LIBS_LIBS += vchan
+USELIBS_vchan := toollog store gnttab evtchn
tools/libs/vchan/Makefile new file +20 -0
new file mode 100644
index 0000000000..87ff608f45
@@ -0,0 +1,20 @@
+XEN_ROOT = $(CURDIR)/../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+CFLAGS += $(CFLAGS_libxenctrl)
+
+LIBHEADER := libxenvchan.h
+
+SRCS-y += init.c
+SRCS-y += io.c
+
+include $(XEN_ROOT)/tools/libs/libs.mk
+
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenvchan)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
+clean: cleanlocal
+
+.PHONY: cleanlocal
+cleanlocal:
+	rm -f libxenvchan.map
tools/libs/vchan/include/libxenvchan.h renamed from tools/libvchan/libxenvchan.h +0 -0
similarity index 100%
rename from tools/libvchan/libxenvchan.h
rename to tools/libs/vchan/include/libxenvchan.h
tools/libs/vchan/init.c renamed from tools/libvchan/init.c +0 -0
similarity index 100%
rename from tools/libvchan/init.c
rename to tools/libs/vchan/init.c
tools/libs/vchan/io.c renamed from tools/libvchan/io.c +0 -0
similarity index 100%
rename from tools/libvchan/io.c
rename to tools/libs/vchan/io.c
tools/libvchan/Makefile deleted +0 -100

100 lines not on this page · raw message

tools/vchan/Makefile new file +37 -0
new file mode 100644
index 0000000000..a731e0e073
@@ -0,0 +1,37 @@
+#
+# tools/vchan/Makefile
+#
+
+XEN_ROOT = $(CURDIR)/../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+NODE_OBJS = node.o
+NODE2_OBJS = node-select.o
+
+$(NODE_OBJS) $(NODE2_OBJS): CFLAGS += $(CFLAGS_libxenvchan) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
+vchan-socket-proxy.o: CFLAGS += $(CFLAGS_libxenvchan) $(CFLAGS_libxenstore) $(CFLAGS_libxenctrl) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn)
+
+.PHONY: all
+all: vchan-node1 vchan-node2 vchan-socket-proxy
+
+vchan-node1: $(NODE_OBJS)
+	$(CC) $(LDFLAGS) -o $@ $(NODE_OBJS) $(LDLIBS_libxenvchan) $(APPEND_LDFLAGS)
+
+vchan-node2: $(NODE2_OBJS)
+	$(CC) $(LDFLAGS) -o $@ $(NODE2_OBJS) $(LDLIBS_libxenvchan) $(APPEND_LDFLAGS)
+
+vchan-socket-proxy: vchan-socket-proxy.o
+	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenvchan) $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
+
+.PHONY: install
+install: all
+	$(INSTALL_DIR) $(DESTDIR)$(bindir)
+	$(INSTALL_PROG) vchan-socket-proxy $(DESTDIR)$(bindir)
+
+.PHONY: clean
+clean:
+	$(RM) -f *.o vchan-node1 vchan-node2 $(DEPS_RM)
+
+distclean: clean
+
+-include $(DEPS_INCLUDE)
tools/vchan/node-select.c renamed from tools/libvchan/node-select.c +0 -0
similarity index 100%
rename from tools/libvchan/node-select.c
rename to tools/vchan/node-select.c
tools/vchan/node.c renamed from tools/libvchan/node.c +0 -0
similarity index 100%
rename from tools/libvchan/node.c
rename to tools/vchan/node.c
tools/vchan/vchan-socket-proxy.c renamed from tools/libvchan/vchan-socket-proxy.c +0 -0
similarity index 100%
rename from tools/libvchan/vchan-socket-proxy.c
rename to tools/vchan/vchan-socket-proxy.c
Signature · 1 line
2.26.2
#26 lore raw

PATCH v4 22/31 tools: split libxenstat into new tools/libs/stat directory

In reply to Juergen Gross

There is no reason why libxenstat is not placed in the tools/libs directory.

At the same time move xenstat.h to a dedicated include directory in tools/libs/stat in order to follow the same pattern as the other libraries in tools/libs.

As now xentop is the only left directory in xenstat move it directly under tools and get rid of tools/xenstat.

Fix some missing prototype errors (add one prototype and make two functions static).

---
 .gitignore                                    |   8 +-
 tools/Makefile                                |   2 +-
 tools/Rules.mk                                |   6 -
 tools/libs/Makefile                           |   1 +
 .../{xenstat/libxenstat => libs/stat}/COPYING |   0
 .../libxenstat => libs/stat}/Makefile         | 105 ++++--------------
 .../stat}/bindings/swig/perl/.empty           |   0
 .../stat}/bindings/swig/python/.empty         |   0
 .../stat}/bindings/swig/xenstat.i             |   0
 .../src => libs/stat/include}/xenstat.h       |   3 +
 .../libxenstat/src => libs/stat}/xenstat.c    |   0
 .../src => libs/stat}/xenstat_freebsd.c       |   0
 .../src => libs/stat}/xenstat_linux.c         |   4 +-
 .../src => libs/stat}/xenstat_netbsd.c        |   0
 .../src => libs/stat}/xenstat_priv.h          |   0
 .../src => libs/stat}/xenstat_qmp.c           |   0
 .../src => libs/stat}/xenstat_solaris.c       |   0
 tools/libs/uselibs.mk                         |   2 +
 tools/xenstat/Makefile                        |  10 --
 tools/{xenstat => }/xentop/Makefile           |   2 +-
 tools/{xenstat => }/xentop/TODO               |   0
 tools/{xenstat => }/xentop/xentop.c           |   0
 22 files changed, 36 insertions(+), 107 deletions(-)
 rename tools/{xenstat/libxenstat => libs/stat}/COPYING (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/Makefile (54%)
 rename tools/{xenstat/libxenstat => libs/stat}/bindings/swig/perl/.empty (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/bindings/swig/python/.empty (100%)
 rename tools/{xenstat/libxenstat => libs/stat}/bindings/swig/xenstat.i (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat/include}/xenstat.h (98%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_freebsd.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_linux.c (98%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_netbsd.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_priv.h (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_qmp.c (100%)
 rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat_solaris.c (100%)
 delete mode 100644 tools/xenstat/Makefile
 rename tools/{xenstat => }/xentop/Makefile (97%)
 rename tools/{xenstat => }/xentop/TODO (100%)
 rename tools/{xenstat => }/xentop/xentop.c (100%)
.gitignore +5 -3
index 364b09506b..5e8c47e2db 100644
@@ -128,6 +128,10 @@ tools/libs/guest/xc_core.h
 tools/libs/guest/xc_core_arm.h
 tools/libs/guest/xc_core_x86.h
 tools/libs/guest/xc_private.h
+tools/libs/stat/_paths.h
+tools/libs/stat/headers.chk
+tools/libs/stat/libxenstat.map
+tools/libs/stat/xenstat.pc
 tools/libs/store/headers.chk
 tools/libs/store/list.h
 tools/libs/store/utils.h
@@ -276,9 +280,6 @@ tools/xenmon/xentrace_setmask
 tools/xenmon/xenbaked
 tools/xenpaging/xenpaging
 tools/xenpmd/xenpmd
-tools/xenstat/libxenstat/src/_paths.h
-tools/xenstat/libxenstat/xenstat.pc
-tools/xenstat/xentop/xentop
 tools/xenstore/xenstore
 tools/xenstore/xenstore-chmod
 tools/xenstore/xenstore-exists
@@ -291,6 +292,7 @@ tools/xenstore/xenstore-ls
 tools/xenstore/xenstored
 tools/xenstore/xenstored_test
 tools/xenstore/xs_tdb_dump
+tools/xentop/xentop
 tools/xentrace/xentrace_setsize
 tools/xentrace/tbctl
 tools/xentrace/xenctx
tools/Makefile +1 -1
index 0db01707a4..ea69675cca 100644
@@ -17,7 +17,7 @@ SUBDIRS-$(CONFIG_XCUTILS) += xcutils
 SUBDIRS-$(CONFIG_X86) += firmware
 SUBDIRS-y += console
 SUBDIRS-y += xenmon
-SUBDIRS-y += xenstat
+SUBDIRS-y += xentop
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
 SUBDIRS-$(CONFIG_Linux) += vchan
tools/Rules.mk +0 -6
index 071fe364a3..fc121d0d75 100644
@@ -18,7 +18,6 @@ include $(XEN_ROOT)/tools/libs/uselibs.mk
 XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
 # Currently libxlutil lives in the same directory as libxenlight
 XEN_libxlutil      = $(XEN_libxenlight)
-XEN_libxenstat     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
 
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
@@ -108,11 +107,6 @@ ifeq ($(CONFIG_Linux),y)
 LDLIBS_libxenstore += -ldl
 endif
 
-CFLAGS_libxenstat  = -I$(XEN_libxenstat)
-SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
-LDLIBS_libxenstat  = $(SHDEPS_libxenstat) $(XEN_libxenstat)/libxenstat$(libextension)
-SHLIB_libxenstat   = $(SHDEPS_libxenstat) -Wl,-rpath-link=$(XEN_libxenstat)
-
 ifeq ($(debug),y)
 # Disable optimizations
 CFLAGS += -O0 -fno-omit-frame-pointer
tools/libs/Makefile +1 -0
index 756d059ee7..e8fcd59214 100644
@@ -13,6 +13,7 @@ SUBDIRS-y += ctrl
 SUBDIRS-y += guest
 SUBDIRS-y += hypfs
 SUBDIRS-y += store
+SUBDIRS-y += stat
 SUBDIRS-$(CONFIG_Linux) += vchan
 
 ifeq ($(CONFIG_RUMP),y)
tools/libs/stat/COPYING renamed from tools/xenstat/libxenstat/COPYING +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/COPYING
rename to tools/libs/stat/COPYING
tools/libs/stat/Makefile renamed from tools/xenstat/libxenstat/Makefile +21 -84

131 lines not on this page · raw message

tools/libs/stat/bindings/swig/perl/.empty renamed from tools/xenstat/libxenstat/bindings/swig/perl/.empty +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/bindings/swig/perl/.empty
rename to tools/libs/stat/bindings/swig/perl/.empty
tools/libs/stat/bindings/swig/python/.empty renamed from tools/xenstat/libxenstat/bindings/swig/python/.empty +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/bindings/swig/python/.empty
rename to tools/libs/stat/bindings/swig/python/.empty
tools/libs/stat/bindings/swig/xenstat.i renamed from tools/xenstat/libxenstat/bindings/swig/xenstat.i +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/bindings/swig/xenstat.i
rename to tools/libs/stat/bindings/swig/xenstat.i
tools/libs/stat/include/xenstat.h renamed from tools/xenstat/libxenstat/src/xenstat.h +3 -0
similarity index 98%
rename from tools/xenstat/libxenstat/src/xenstat.h
rename to tools/libs/stat/include/xenstat.h
index 76a660f321..c3b98909dd 100644
@@ -71,6 +71,9 @@ unsigned long long xenstat_node_tot_mem(xenstat_node * node);
 /* Get amount of free memory on a node */
 unsigned long long xenstat_node_free_mem(xenstat_node * node);
 
+/* Get amount of freeable memory on a node */
+long xenstat_node_freeable_mb(xenstat_node * node);
+
 /* Find the number of domains existing on a node */
 unsigned int xenstat_node_num_domains(xenstat_node * node);
 
tools/libs/stat/xenstat.c renamed from tools/xenstat/libxenstat/src/xenstat.c +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/src/xenstat.c
rename to tools/libs/stat/xenstat.c
tools/libs/stat/xenstat_freebsd.c renamed from tools/xenstat/libxenstat/src/xenstat_freebsd.c +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/src/xenstat_freebsd.c
rename to tools/libs/stat/xenstat_freebsd.c
tools/libs/stat/xenstat_linux.c renamed from tools/xenstat/libxenstat/src/xenstat_linux.c +2 -2
similarity index 98%
rename from tools/xenstat/libxenstat/src/xenstat_linux.c
rename to tools/libs/stat/xenstat_linux.c
index 7530349eee..793263f2b6 100644
@@ -64,7 +64,7 @@ static const char PROCNETDEV_HEADER[] =
 
 /* We need to get the name of the bridge interface for use with bonding interfaces */
 /* Use excludeName parameter to avoid adding bridges we don't care about, eg. virbr0 */
-void getBridge(char *excludeName, char *result, size_t resultLen)
+static void getBridge(char *excludeName, char *result, size_t resultLen)
 {
 	struct dirent *de;
 	DIR *d;
@@ -89,7 +89,7 @@ void getBridge(char *excludeName, char *result, size_t resultLen)
 
 /* parseNetLine provides regular expression based parsing for lines from /proc/net/dev, all the */
 /* information are parsed but not all are used in our case, ie. for xenstat */
-int parseNetDevLine(char *line, char *iface, unsigned long long *rxBytes, unsigned long long *rxPackets,
+static int parseNetDevLine(char *line, char *iface, unsigned long long *rxBytes, unsigned long long *rxPackets,
 		unsigned long long *rxErrs, unsigned long long *rxDrops, unsigned long long *rxFifo,
 		unsigned long long *rxFrames, unsigned long long *rxComp, unsigned long long *rxMcast,
 		unsigned long long *txBytes, unsigned long long *txPackets, unsigned long long *txErrs,
tools/libs/stat/xenstat_netbsd.c renamed from tools/xenstat/libxenstat/src/xenstat_netbsd.c +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/src/xenstat_netbsd.c
rename to tools/libs/stat/xenstat_netbsd.c
tools/libs/stat/xenstat_priv.h renamed from tools/xenstat/libxenstat/src/xenstat_priv.h +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/src/xenstat_priv.h
rename to tools/libs/stat/xenstat_priv.h
tools/libs/stat/xenstat_qmp.c renamed from tools/xenstat/libxenstat/src/xenstat_qmp.c +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/src/xenstat_qmp.c
rename to tools/libs/stat/xenstat_qmp.c
tools/libs/stat/xenstat_solaris.c renamed from tools/xenstat/libxenstat/src/xenstat_solaris.c +0 -0
similarity index 100%
rename from tools/xenstat/libxenstat/src/xenstat_solaris.c
rename to tools/libs/stat/xenstat_solaris.c
tools/libs/uselibs.mk +2 -0
index edb4b34256..a9dc2ce994 100644
@@ -24,3 +24,5 @@ LIBS_LIBS += store
 USELIBS_store := toolcore
 LIBS_LIBS += vchan
 USELIBS_vchan := toollog store gnttab evtchn
+LIBS_LIBS += stat
+USELIBS_stat := ctrl store
tools/xenstat/Makefile deleted +0 -10
deleted file mode 100644
index b300f31289..0000000000
@@ -1,10 +0,0 @@
-XEN_ROOT = $(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-SUBDIRS :=
-SUBDIRS += libxenstat
-SUBDIRS += xentop
-
-.PHONY: all install clean distclean uninstall
-
-all install clean distclean uninstall: %: subdirs-%
tools/xentop/Makefile renamed from tools/xenstat/xentop/Makefile +1 -1
similarity index 97%
rename from tools/xenstat/xentop/Makefile
rename to tools/xentop/Makefile
index ec612db2a2..0034114684 100644
@@ -10,7 +10,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 ifneq ($(XENSTAT_XENTOP),y)
tools/xentop/TODO renamed from tools/xenstat/xentop/TODO +0 -0
similarity index 100%
rename from tools/xenstat/xentop/TODO
rename to tools/xentop/TODO
tools/xentop/xentop.c renamed from tools/xenstat/xentop/xentop.c +0 -0
similarity index 100%
rename from tools/xenstat/xentop/xentop.c
rename to tools/xentop/xentop.c
Signature · 1 line
2.26.2
#27 lore raw

PATCH v4 23/31 tools/libxl: fix dependencies of libxl tests

In reply to Juergen Gross

Today building the libxl internal tests depends on libxlutil having been built, in spite of the tests not using any functionality of libxlutil. Fix this by dropping the dependency.

---
 tools/libxl/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/libxl/Makefile +3 -3
index b815c548de..d3dd9efadf 100644
@@ -339,14 +339,14 @@ libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(LIBXLU_OBJS) libxenlight.so
 libxlutil.a: $(LIBXLU_OBJS)
 	$(AR) rcs libxlutil.a $^
 
-test_%: test_%.o test_common.o libxlutil.so libxenlight_test.so
+test_%: test_%.o test_common.o libxenlight_test.so
 	$(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) -lyajl $(APPEND_LDFLAGS)
 
 libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so
 	$(CC) $(LDFLAGS) -o $@ $(SAVE_HELPER_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxentoolcore) $(APPEND_LDFLAGS)
 
-testidl: testidl.o libxlutil.so libxenlight.so
-	$(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) $(APPEND_LDFLAGS)
+testidl: testidl.o libxenlight.so
+	$(CC) $(LDFLAGS) -o $@ testidl.o $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) $(APPEND_LDFLAGS)
 
 .PHONY: install
 install: all
Signature · 1 line
2.26.2
#28 lore raw

PATCH v4 24/31 tools/libxl: don't include libxl_osdeps.h from libxlutil sources

In reply to Juergen Gross

There is no need for the sources of libxlutil to include libxl_osdeps.h as the only dependency is the leading

#define _GNU_SOURCE

in libxl_osdeps.h. So replace including libxl_osdeps.h by the needed define.

---
 tools/libxl/libxlu_cfg.c    |  3 +--
 tools/libxl/libxlu_cfg_i.h  |  1 -
 tools/libxl/libxlu_disk.c   |  1 -
 tools/libxl/libxlu_disk_l.c | 14 +++++++-------
 tools/libxl/libxlu_disk_l.h |  8 ++++----
 tools/libxl/libxlu_disk_l.l |  2 +-
 tools/libxl/libxlu_pci.c    |  3 ++-
 tools/libxl/libxlu_vif.c    |  3 ++-
 8 files changed, 17 insertions(+), 18 deletions(-)
tools/libxl/libxlu_cfg.c +1 -2
index f9e8aa2f3a..874f5abfb9 100644
@@ -15,8 +15,7 @@
  * GNU Lesser General Public License for more details.
  */
 
-
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
 
 #include <limits.h>
 
tools/libxl/libxlu_cfg_i.h +0 -1
index 87b19df311..4217f5b28d 100644
@@ -18,7 +18,6 @@
 #ifndef LIBXLU_CFG_I_H
 #define LIBXLU_CFG_I_H
 
-#include "libxl_osdeps.h" /* must come before any other headers */
 #include "libxlu_internal.h"
 #include "libxlu_cfg_y.h"
 
tools/libxl/libxlu_disk.c +0 -1
index 18fe386dbe..1de16a6a06 100644
@@ -1,4 +1,3 @@
-#include "libxl_osdeps.h" /* must come before any other headers */
 #include "libxlu_internal.h"
 #include "libxlu_disk_l.h"
 #include "libxlu_disk_i.h"
tools/libxl/libxlu_disk_l.c +7 -7
index 05f7ac74a0..32d4b74b58 100644
@@ -1,7 +1,7 @@
-#line 2 "libxlu_disk_l.c"
-#include "libxl_osdeps.h" /* must come before any other headers */
+#line 1 "libxlu_disk_l.c"
+#define _GNU_SOURCE
 
-#line 5 "libxlu_disk_l.c"
+#line 4 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -1199,9 +1199,9 @@ static int vdev_and_devtype(DiskParseContext *dpc, char *str) {
 #undef DPC /* needs to be defined differently the actual lexer */
 #define DPC ((DiskParseContext*)yyextra)
 
-#line 1203 "libxlu_disk_l.c"
+#line 1202 "libxlu_disk_l.c"
 
-#line 1205 "libxlu_disk_l.c"
+#line 1204 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1483,7 +1483,7 @@ YY_DECL
 #line 180 "libxlu_disk_l.l"
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1487 "libxlu_disk_l.c"
+#line 1486 "libxlu_disk_l.c"
 
 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
@@ -1836,7 +1836,7 @@ YY_RULE_SETUP
 #line 291 "libxlu_disk_l.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 1840 "libxlu_disk_l.c"
+#line 1839 "libxlu_disk_l.c"
 			case YY_STATE_EOF(INITIAL):
 			case YY_STATE_EOF(LEXERR):
 				yyterminate();
tools/libxl/libxlu_disk_l.h +4 -4
index 54f4662d7a..6abeecf279 100644
@@ -2,10 +2,10 @@
 #define xlu__disk_yyHEADER_H 1
 #define xlu__disk_yyIN_HEADER 1
 
-#line 6 "libxlu_disk_l.h"
-#include "libxl_osdeps.h" /* must come before any other headers */
+#line 5 "libxlu_disk_l.h"
+#define _GNU_SOURCE
 
-#line 9 "libxlu_disk_l.h"
+#line 8 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -696,6 +696,6 @@ extern int yylex (yyscan_t yyscanner);
 
 #line 291 "libxlu_disk_l.l"
 
-#line 700 "libxlu_disk_l.h"
+#line 699 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
tools/libxl/libxlu_disk_l.l +1 -1
index 7a46f4a30c..3bd639aab0 100644
@@ -28,7 +28,7 @@
  */
 
 %top{
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
 }
 
 %{
tools/libxl/libxlu_pci.c +2 -1
index e2709c5f89..12fc0b3a7f 100644
@@ -1,4 +1,5 @@
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
+
 #include "libxlu_internal.h"
 #include "libxlu_disk_l.h"
 #include "libxlu_disk_i.h"
tools/libxl/libxlu_vif.c +2 -1
index 0665e624dc..ccf0cbdf57 100644
@@ -1,4 +1,5 @@
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
+
 #include "libxlu_internal.h"
 
 static const char *vif_bytes_per_sec_re = "^[0-9]+[GMK]?[Bb]/s$";
Signature · 1 line
2.26.2
#29 lore raw

PATCH v4 25/31 tools/libxl: add missing items to clean target

In reply to Juergen Gross

Some generated files are not removed by "make clean". Add them.

---
 tools/libxl/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/libxl/Makefile +2 -0
index d3dd9efadf..3cc868d9e9 100644
@@ -385,8 +385,10 @@ clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS_RM)
 	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c *.api-ok
+	$(RM) -f $(TEST_PROGS)
 	$(RM) -f xenlight.pc
 	$(RM) -f xlutil.pc
+	$(RM) -rf __pycache__
 	$(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean
 
 distclean: clean
Signature · 1 line
2.26.2
#30 lore raw

PATCH v4 26/31 tools/libxl: move xl parsing checks to tools/xl

In reply to Juergen Gross

check-xl-* scripts and data are not libxl- but xl-specific. Move them from tools/libxl/ to tools/xl/.

---
 tools/{libxl => xl}/check-xl-disk-parse                 | 0
 tools/{libxl => xl}/check-xl-vcpupin-parse              | 0
 tools/{libxl => xl}/check-xl-vcpupin-parse.data-example | 0
 tools/{libxl => xl}/check-xl-vif-parse                  | 0
 4 files changed, 0 insertions(+), 0 deletions(-)
 rename tools/{libxl => xl}/check-xl-disk-parse (100%)
 rename tools/{libxl => xl}/check-xl-vcpupin-parse (100%)
 rename tools/{libxl => xl}/check-xl-vcpupin-parse.data-example (100%)
 rename tools/{libxl => xl}/check-xl-vif-parse (100%)
tools/xl/check-xl-disk-parse renamed from tools/libxl/check-xl-disk-parse +0 -0
similarity index 100%
rename from tools/libxl/check-xl-disk-parse
rename to tools/xl/check-xl-disk-parse
tools/xl/check-xl-vcpupin-parse renamed from tools/libxl/check-xl-vcpupin-parse +0 -0
similarity index 100%
rename from tools/libxl/check-xl-vcpupin-parse
rename to tools/xl/check-xl-vcpupin-parse
tools/xl/check-xl-vcpupin-parse.data-example renamed from tools/libxl/check-xl-vcpupin-parse.data-example +0 -0
similarity index 100%
rename from tools/libxl/check-xl-vcpupin-parse.data-example
rename to tools/xl/check-xl-vcpupin-parse.data-example
tools/xl/check-xl-vif-parse renamed from tools/libxl/check-xl-vif-parse +0 -0
similarity index 100%
rename from tools/libxl/check-xl-vif-parse
rename to tools/xl/check-xl-vif-parse
Signature · 1 line
2.26.2
#31 lore raw

PATCH v4 27/31 tools/xl: don't assume libxl and libxlutil are in one directory

In reply to Juergen Gross

Add the correct flags for both, libxenlight and libxlutil, when building xl.

---
 tools/xl/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/xl/Makefile +1 -0
index af4912e67a..407dd7554c 100644
@@ -13,6 +13,7 @@ CFLAGS += $(PTHREAD_CFLAGS)
 LDFLAGS += $(PTHREAD_LDFLAGS)
 
 CFLAGS_XL += $(CFLAGS_libxenlight)
+CFLAGS_XL += $(CFLAGS_libxlutil)
 CFLAGS_XL += -Wshadow
 
 XL_OBJS-$(CONFIG_X86) = xl_psr.o
Signature · 1 line
2.26.2
#32 lore raw

PATCH v4 28/31 tools/libxl: move libxenlight to tools/libs/light

In reply to Juergen Gross

Carve out all libxenlight related sources and move them to tools/libs/light in order to use the generic library build environment.

The closely related sources for libxl-save-helper and the libxl test environment are being moved, too.

---
 .gitignore                                    |  31 +-
 tools/Rules.mk                                |  11 +-
 tools/configure                               |   2 +-
 tools/configure.ac                            |   2 +-
 tools/libs/Makefile                           |   1 +
 tools/libs/light/CODING_STYLE                 | 330 ++++++++++++++++++
 tools/libs/light/Makefile                     | 291 +++++++++++++++
 .../light}/check-libxl-api-rules              |   0
 tools/{libxl => libs/light}/flexarray.c       |   0
 tools/{libxl => libs/light}/flexarray.h       |   0
 tools/{libxl => libs/light}/gentest.py        |   0
 tools/{libxl => libs/light}/gentypes.py       |   0
 tools/{libxl => libs/light}/idl.py            |   0
 tools/{libxl => libs/light}/idl.txt           |   0
 tools/{libxl => libs/light/include}/libxl.h   |   0
 .../light/include}/libxl_event.h              |   0
 .../light/include}/libxl_json.h               |   0
 .../light/include}/libxl_utils.h              |   0
 .../light/include}/libxl_uuid.h               |   0
 tools/{libxl => libs/light}/libxl.c           |   0
 tools/{libxl => libs/light}/libxl_9pfs.c      |   0
 tools/{libxl => libs/light}/libxl_aoutils.c   |   0
 tools/{libxl => libs/light}/libxl_arch.h      |   0
 tools/{libxl => libs/light}/libxl_arm.c       |   0
 tools/{libxl => libs/light}/libxl_arm.h       |   0
 tools/{libxl => libs/light}/libxl_arm_acpi.c  |   0
 .../{libxl => libs/light}/libxl_arm_no_acpi.c |   0
 .../{libxl => libs/light}/libxl_bootloader.c  |   0
 .../light}/libxl_checkpoint_device.c          |   0
 tools/{libxl => libs/light}/libxl_colo.h      |   0
 tools/{libxl => libs/light}/libxl_colo_nic.c  |   0
 .../{libxl => libs/light}/libxl_colo_proxy.c  |   0
 .../{libxl => libs/light}/libxl_colo_qdisk.c  |   0
 .../light}/libxl_colo_restore.c               |   0
 tools/{libxl => libs/light}/libxl_colo_save.c |   0
 tools/{libxl => libs/light}/libxl_console.c   |   0
 .../light}/libxl_convert_callout.c            |   0
 tools/{libxl => libs/light}/libxl_cpuid.c     |   0
 tools/{libxl => libs/light}/libxl_cpupool.c   |   0
 tools/{libxl => libs/light}/libxl_create.c    |   0
 tools/{libxl => libs/light}/libxl_device.c    |   0
 tools/{libxl => libs/light}/libxl_disk.c      |   0
 tools/{libxl => libs/light}/libxl_dm.c        |   0
 tools/{libxl => libs/light}/libxl_dom.c       |   0
 tools/{libxl => libs/light}/libxl_dom_save.c  |   0
 .../{libxl => libs/light}/libxl_dom_suspend.c |   0
 tools/{libxl => libs/light}/libxl_domain.c    |   0
 tools/{libxl => libs/light}/libxl_event.c     |   0
 tools/{libxl => libs/light}/libxl_exec.c      |   0
 tools/{libxl => libs/light}/libxl_flask.c     |   0
 tools/{libxl => libs/light}/libxl_fork.c      |   0
 tools/{libxl => libs/light}/libxl_freebsd.c   |   0
 tools/{libxl => libs/light}/libxl_genid.c     |   0
 tools/{libxl => libs/light}/libxl_internal.c  |   0
 tools/{libxl => libs/light}/libxl_internal.h  |   0
 tools/{libxl => libs/light}/libxl_json.c      |   0
 .../light}/libxl_libfdt_compat.c              |   0
 .../light}/libxl_libfdt_compat.h              |   0
 tools/{libxl => libs/light}/libxl_linux.c     |   0
 tools/{libxl => libs/light}/libxl_mem.c       |   0
 tools/{libxl => libs/light}/libxl_netbsd.c    |   0
 tools/{libxl => libs/light}/libxl_netbuffer.c |   0
 tools/{libxl => libs/light}/libxl_nic.c       |   0
 tools/{libxl => libs/light}/libxl_no_colo.c   |   0
 .../light}/libxl_no_convert_callout.c         |   0
 tools/{libxl => libs/light}/libxl_nocpuid.c   |   0
 .../{libxl => libs/light}/libxl_nonetbuffer.c |   0
 tools/{libxl => libs/light}/libxl_numa.c      |   0
 tools/{libxl => libs/light}/libxl_osdeps.h    |   0
 tools/{libxl => libs/light}/libxl_paths.c     |   0
 tools/{libxl => libs/light}/libxl_pci.c       |   0
 tools/{libxl => libs/light}/libxl_psr.c       |   0
 tools/{libxl => libs/light}/libxl_pvcalls.c   |   0
 tools/{libxl => libs/light}/libxl_qmp.c       |   0
 tools/{libxl => libs/light}/libxl_remus.c     |   0
 .../light}/libxl_remus_disk_drbd.c            |   0
 .../light}/libxl_save_callout.c               |   0
 .../{libxl => libs/light}/libxl_save_helper.c |   0
 .../light}/libxl_save_msgs_gen.pl             |   0
 tools/{libxl => libs/light}/libxl_sched.c     |   0
 .../light}/libxl_sr_stream_format.h           |   0
 .../{libxl => libs/light}/libxl_stream_read.c |   0
 .../light}/libxl_stream_write.c               |   0
 .../light}/libxl_test_fdevent.c               |   0
 .../light}/libxl_test_fdevent.h               |   0
 .../light}/libxl_test_timedereg.c             |   0
 .../light}/libxl_test_timedereg.h             |   0
 tools/{libxl => libs/light}/libxl_tmem.c      |   0
 tools/{libxl => libs/light}/libxl_types.idl   |   0
 .../light}/libxl_types_internal.idl           |   0
 tools/{libxl => libs/light}/libxl_usb.c       |   0
 tools/{libxl => libs/light}/libxl_utils.c     |   0
 tools/{libxl => libs/light}/libxl_uuid.c      |   0
 tools/{libxl => libs/light}/libxl_vdispl.c    |   0
 tools/{libxl => libs/light}/libxl_vkb.c       |   0
 tools/{libxl => libs/light}/libxl_vnuma.c     |   0
 tools/{libxl => libs/light}/libxl_vsnd.c      |   0
 tools/{libxl => libs/light}/libxl_vtpm.c      |   0
 tools/{libxl => libs/light}/libxl_x86.c       |   0
 tools/{libxl => libs/light}/libxl_x86_acpi.c  |   0
 tools/{libxl => libs/light}/libxl_x86_acpi.h  |   0
 tools/{libxl => libs/light}/libxl_xshelp.c    |   0
 tools/{libxl => libs/light}/osdeps.c          |   0
 tools/{libxl => libs/light}/test_common.c     |   0
 tools/{libxl => libs/light}/test_common.h     |   0
 .../{libxl => libs/light}/test_fdderegrace.c  |   0
 tools/{libxl => libs/light}/test_timedereg.c  |   0
 tools/libs/uselibs.mk                         |   2 +
 tools/libxl/Makefile                          | 293 +---------------
 tools/ocaml/libs/xl/Makefile                  |   8 +-
 110 files changed, 658 insertions(+), 313 deletions(-)
 create mode 100644 tools/libs/light/CODING_STYLE
 create mode 100644 tools/libs/light/Makefile
 rename tools/{libxl => libs/light}/check-libxl-api-rules (100%)
 rename tools/{libxl => libs/light}/flexarray.c (100%)
 rename tools/{libxl => libs/light}/flexarray.h (100%)
 rename tools/{libxl => libs/light}/gentest.py (100%)
 rename tools/{libxl => libs/light}/gentypes.py (100%)
 rename tools/{libxl => libs/light}/idl.py (100%)
 rename tools/{libxl => libs/light}/idl.txt (100%)
 rename tools/{libxl => libs/light/include}/libxl.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_event.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_json.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_utils.h (100%)
 rename tools/{libxl => libs/light/include}/libxl_uuid.h (100%)
 rename tools/{libxl => libs/light}/libxl.c (100%)
 rename tools/{libxl => libs/light}/libxl_9pfs.c (100%)
 rename tools/{libxl => libs/light}/libxl_aoutils.c (100%)
 rename tools/{libxl => libs/light}/libxl_arch.h (100%)
 rename tools/{libxl => libs/light}/libxl_arm.c (100%)
 rename tools/{libxl => libs/light}/libxl_arm.h (100%)
 rename tools/{libxl => libs/light}/libxl_arm_acpi.c (100%)
 rename tools/{libxl => libs/light}/libxl_arm_no_acpi.c (100%)
 rename tools/{libxl => libs/light}/libxl_bootloader.c (100%)
 rename tools/{libxl => libs/light}/libxl_checkpoint_device.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo.h (100%)
 rename tools/{libxl => libs/light}/libxl_colo_nic.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_proxy.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_qdisk.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_restore.c (100%)
 rename tools/{libxl => libs/light}/libxl_colo_save.c (100%)
 rename tools/{libxl => libs/light}/libxl_console.c (100%)
 rename tools/{libxl => libs/light}/libxl_convert_callout.c (100%)
 rename tools/{libxl => libs/light}/libxl_cpuid.c (100%)
 rename tools/{libxl => libs/light}/libxl_cpupool.c (100%)
 rename tools/{libxl => libs/light}/libxl_create.c (100%)
 rename tools/{libxl => libs/light}/libxl_device.c (100%)
 rename tools/{libxl => libs/light}/libxl_disk.c (100%)
 rename tools/{libxl => libs/light}/libxl_dm.c (100%)
 rename tools/{libxl => libs/light}/libxl_dom.c (100%)
 rename tools/{libxl => libs/light}/libxl_dom_save.c (100%)
 rename tools/{libxl => libs/light}/libxl_dom_suspend.c (100%)
 rename tools/{libxl => libs/light}/libxl_domain.c (100%)
 rename tools/{libxl => libs/light}/libxl_event.c (100%)
 rename tools/{libxl => libs/light}/libxl_exec.c (100%)
 rename tools/{libxl => libs/light}/libxl_flask.c (100%)
 rename tools/{libxl => libs/light}/libxl_fork.c (100%)
 rename tools/{libxl => libs/light}/libxl_freebsd.c (100%)
 rename tools/{libxl => libs/light}/libxl_genid.c (100%)
 rename tools/{libxl => libs/light}/libxl_internal.c (100%)
 rename tools/{libxl => libs/light}/libxl_internal.h (100%)
 rename tools/{libxl => libs/light}/libxl_json.c (100%)
 rename tools/{libxl => libs/light}/libxl_libfdt_compat.c (100%)
 rename tools/{libxl => libs/light}/libxl_libfdt_compat.h (100%)
 rename tools/{libxl => libs/light}/libxl_linux.c (100%)
 rename tools/{libxl => libs/light}/libxl_mem.c (100%)
 rename tools/{libxl => libs/light}/libxl_netbsd.c (100%)
 rename tools/{libxl => libs/light}/libxl_netbuffer.c (100%)
 rename tools/{libxl => libs/light}/libxl_nic.c (100%)
 rename tools/{libxl => libs/light}/libxl_no_colo.c (100%)
 rename tools/{libxl => libs/light}/libxl_no_convert_callout.c (100%)
 rename tools/{libxl => libs/light}/libxl_nocpuid.c (100%)
 rename tools/{libxl => libs/light}/libxl_nonetbuffer.c (100%)
 rename tools/{libxl => libs/light}/libxl_numa.c (100%)
 rename tools/{libxl => libs/light}/libxl_osdeps.h (100%)
 rename tools/{libxl => libs/light}/libxl_paths.c (100%)
 rename tools/{libxl => libs/light}/libxl_pci.c (100%)
 rename tools/{libxl => libs/light}/libxl_psr.c (100%)
 rename tools/{libxl => libs/light}/libxl_pvcalls.c (100%)
 rename tools/{libxl => libs/light}/libxl_qmp.c (100%)
 rename tools/{libxl => libs/light}/libxl_remus.c (100%)
 rename tools/{libxl => libs/light}/libxl_remus_disk_drbd.c (100%)
 rename tools/{libxl => libs/light}/libxl_save_callout.c (100%)
 rename tools/{libxl => libs/light}/libxl_save_helper.c (100%)
 rename tools/{libxl => libs/light}/libxl_save_msgs_gen.pl (100%)
 rename tools/{libxl => libs/light}/libxl_sched.c (100%)
 rename tools/{libxl => libs/light}/libxl_sr_stream_format.h (100%)
 rename tools/{libxl => libs/light}/libxl_stream_read.c (100%)
 rename tools/{libxl => libs/light}/libxl_stream_write.c (100%)
 rename tools/{libxl => libs/light}/libxl_test_fdevent.c (100%)
 rename tools/{libxl => libs/light}/libxl_test_fdevent.h (100%)
 rename tools/{libxl => libs/light}/libxl_test_timedereg.c (100%)
 rename tools/{libxl => libs/light}/libxl_test_timedereg.h (100%)
 rename tools/{libxl => libs/light}/libxl_tmem.c (100%)
 rename tools/{libxl => libs/light}/libxl_types.idl (100%)
 rename tools/{libxl => libs/light}/libxl_types_internal.idl (100%)
 rename tools/{libxl => libs/light}/libxl_usb.c (100%)
 rename tools/{libxl => libs/light}/libxl_utils.c (100%)
 rename tools/{libxl => libs/light}/libxl_uuid.c (100%)
 rename tools/{libxl => libs/light}/libxl_vdispl.c (100%)
 rename tools/{libxl => libs/light}/libxl_vkb.c (100%)
 rename tools/{libxl => libs/light}/libxl_vnuma.c (100%)
 rename tools/{libxl => libs/light}/libxl_vsnd.c (100%)
 rename tools/{libxl => libs/light}/libxl_vtpm.c (100%)
 rename tools/{libxl => libs/light}/libxl_x86.c (100%)
 rename tools/{libxl => libs/light}/libxl_x86_acpi.c (100%)
 rename tools/{libxl => libs/light}/libxl_x86_acpi.h (100%)
 rename tools/{libxl => libs/light}/libxl_xshelp.c (100%)
 rename tools/{libxl => libs/light}/osdeps.c (100%)
 rename tools/{libxl => libs/light}/test_common.c (100%)
 rename tools/{libxl => libs/light}/test_common.h (100%)
 rename tools/{libxl => libs/light}/test_fdderegrace.c (100%)
 rename tools/{libxl => libs/light}/test_timedereg.c (100%)
.gitignore +16 -15
index 5e8c47e2db..f30550255f 100644
@@ -128,6 +128,22 @@ tools/libs/guest/xc_core.h
 tools/libs/guest/xc_core_arm.h
 tools/libs/guest/xc_core_x86.h
 tools/libs/guest/xc_private.h
+tools/libs/light/_*.[ch]
+tools/libs/light/*.pyc
+tools/libs/light/_libxl.api-for-check
+tools/libs/light/*.api-ok
+tools/libs/light/libxenlight.map
+tools/libs/light/libxl-save-helper
+tools/libs/light/dsdt*
+tools/libs/light/mk_dsdt
+tools/libs/light/ssdt*
+tools/libs/light/testidl
+tools/libs/light/testidl.c
+tools/libs/light/test_timedereg
+tools/libs/light/test_fdderegrace
+tools/libs/light/tmp.*
+tools/libs/light/xenlight.pc
+tools/libs/light/include/_*.h
 tools/libs/stat/_paths.h
 tools/libs/stat/headers.chk
 tools/libs/stat/libxenstat.map
@@ -216,16 +232,8 @@ tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
-tools/libxl/_libxl.api-for-check
-tools/libxl/*.api-ok
 tools/libxl/*.pc
-tools/libxl/dsdt*
 tools/libxl/libxlu_cfg_y.output
-tools/libxl/mk_dsdt
-tools/libxl/ssdt*
-tools/libxl/testenum
-tools/libxl/testenum.c
-tools/libxl/tmp.*
 tools/misc/cpuperf/cpuperf-perfcntr
 tools/misc/cpuperf/cpuperf-xen
 tools/misc/xc_shadow
@@ -380,13 +388,6 @@ tools/include/xen-foreign/arm64.h
 tools/misc/xen-hptool
 tools/misc/xen-mfndump
 tools/libs/toolcore/include/_*.h
-tools/libxl/_*.[ch]
-tools/libxl/testidl
-tools/libxl/testidl.c
-tools/libxl/*.pyc
-tools/libxl/libxl-save-helper
-tools/libxl/test_timedereg
-tools/libxl/test_fdderegrace
 tools/firmware/etherboot/eb-roms.h
 tools/firmware/etherboot/gpxe-git-snapshot.tar.gz
 tools/misc/xenhypfs
tools/Rules.mk +3 -8
index fc121d0d75..a80a633190 100644
@@ -15,9 +15,7 @@ XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 
 include $(XEN_ROOT)/tools/libs/uselibs.mk
 
-XEN_libxenlight    = $(XEN_ROOT)/tools/libxl
-# Currently libxlutil lives in the same directory as libxenlight
-XEN_libxlutil      = $(XEN_libxenlight)
+XEN_libxlutil      = $(XEN_ROOT)/tools/libxl
 
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
@@ -107,6 +105,8 @@ ifeq ($(CONFIG_Linux),y)
 LDLIBS_libxenstore += -ldl
 endif
 
+CFLAGS_libxenlight += $(CFLAGS_libxenctrl)
+
 ifeq ($(debug),y)
 # Disable optimizations
 CFLAGS += -O0 -fno-omit-frame-pointer
@@ -116,11 +116,6 @@ else
 CFLAGS += -O2 -fomit-frame-pointer
 endif
 
-CFLAGS_libxenlight = -I$(XEN_libxenlight) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
-SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libxenhypfs) $(SHLIB_libxenguest)
-LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_libxenlight)/libxenlight$(libextension)
-SHLIB_libxenlight  = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_libxenlight)
-
 CFLAGS_libxlutil = -I$(XEN_libxlutil)
 SHDEPS_libxlutil = $(SHLIB_libxenlight)
 LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_libxlutil)/libxlutil$(libextension)
tools/configure +1 -1
index edcdcf4f73..8a708e9baa 100755
@@ -585,7 +585,7 @@ PACKAGE_STRING='Xen Hypervisor Tools 4.15'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='https://www.xen.org/'
 
-ac_unique_file="libxl/libxl.c"
+ac_unique_file="libs/light/libxl.c"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
tools/configure.ac +1 -1
index 6614a4f130..ee8ba5ff24 100644
@@ -4,7 +4,7 @@
 AC_PREREQ([2.67])
 AC_INIT([Xen Hypervisor Tools], m4_esyscmd([../version.sh ../xen/Makefile]),
     [[email protected]], [xen], [https://www.xen.org/])
-AC_CONFIG_SRCDIR([libxl/libxl.c])
+AC_CONFIG_SRCDIR([libs/light/libxl.c])
 AC_CONFIG_FILES([
 ../config/Tools.mk
 hotplug/FreeBSD/rc.d/xencommons
tools/libs/Makefile +1 -0
index e8fcd59214..c41455c604 100644
@@ -15,6 +15,7 @@ SUBDIRS-y += hypfs
 SUBDIRS-y += store
 SUBDIRS-y += stat
 SUBDIRS-$(CONFIG_Linux) += vchan
+SUBDIRS-y += light
 
 ifeq ($(CONFIG_RUMP),y)
 SUBDIRS-y := toolcore
tools/libs/light/CODING_STYLE new file +330 -0

330 lines not on this page · raw message

tools/libs/light/Makefile new file +291 -0

291 lines not on this page · raw message

tools/libs/light/check-libxl-api-rules renamed from tools/libxl/check-libxl-api-rules +0 -0
similarity index 100%
rename from tools/libxl/check-libxl-api-rules
rename to tools/libs/light/check-libxl-api-rules
tools/libs/light/flexarray.c renamed from tools/libxl/flexarray.c +0 -0
similarity index 100%
rename from tools/libxl/flexarray.c
rename to tools/libs/light/flexarray.c
tools/libs/light/flexarray.h renamed from tools/libxl/flexarray.h +0 -0
similarity index 100%
rename from tools/libxl/flexarray.h
rename to tools/libs/light/flexarray.h
tools/libs/light/gentest.py renamed from tools/libxl/gentest.py +0 -0
similarity index 100%
rename from tools/libxl/gentest.py
rename to tools/libs/light/gentest.py
tools/libs/light/gentypes.py renamed from tools/libxl/gentypes.py +0 -0
similarity index 100%
rename from tools/libxl/gentypes.py
rename to tools/libs/light/gentypes.py
tools/libs/light/idl.py renamed from tools/libxl/idl.py +0 -0
similarity index 100%
rename from tools/libxl/idl.py
rename to tools/libs/light/idl.py
tools/libs/light/idl.txt renamed from tools/libxl/idl.txt +0 -0
similarity index 100%
rename from tools/libxl/idl.txt
rename to tools/libs/light/idl.txt
tools/libs/light/include/libxl.h renamed from tools/libxl/libxl.h +0 -0
similarity index 100%
rename from tools/libxl/libxl.h
rename to tools/libs/light/include/libxl.h
tools/libs/light/include/libxl_event.h renamed from tools/libxl/libxl_event.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_event.h
rename to tools/libs/light/include/libxl_event.h
tools/libs/light/include/libxl_json.h renamed from tools/libxl/libxl_json.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_json.h
rename to tools/libs/light/include/libxl_json.h
tools/libs/light/include/libxl_utils.h renamed from tools/libxl/libxl_utils.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_utils.h
rename to tools/libs/light/include/libxl_utils.h
tools/libs/light/include/libxl_uuid.h renamed from tools/libxl/libxl_uuid.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_uuid.h
rename to tools/libs/light/include/libxl_uuid.h
tools/libs/light/libxl.c renamed from tools/libxl/libxl.c +0 -0
similarity index 100%
rename from tools/libxl/libxl.c
rename to tools/libs/light/libxl.c
tools/libs/light/libxl_9pfs.c renamed from tools/libxl/libxl_9pfs.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_9pfs.c
rename to tools/libs/light/libxl_9pfs.c
tools/libs/light/libxl_aoutils.c renamed from tools/libxl/libxl_aoutils.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_aoutils.c
rename to tools/libs/light/libxl_aoutils.c
tools/libs/light/libxl_arch.h renamed from tools/libxl/libxl_arch.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_arch.h
rename to tools/libs/light/libxl_arch.h
tools/libs/light/libxl_arm.c renamed from tools/libxl/libxl_arm.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_arm.c
rename to tools/libs/light/libxl_arm.c
tools/libs/light/libxl_arm.h renamed from tools/libxl/libxl_arm.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_arm.h
rename to tools/libs/light/libxl_arm.h
tools/libs/light/libxl_arm_acpi.c renamed from tools/libxl/libxl_arm_acpi.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_arm_acpi.c
rename to tools/libs/light/libxl_arm_acpi.c
tools/libs/light/libxl_arm_no_acpi.c renamed from tools/libxl/libxl_arm_no_acpi.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_arm_no_acpi.c
rename to tools/libs/light/libxl_arm_no_acpi.c
tools/libs/light/libxl_bootloader.c renamed from tools/libxl/libxl_bootloader.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_bootloader.c
rename to tools/libs/light/libxl_bootloader.c
tools/libs/light/libxl_checkpoint_device.c renamed from tools/libxl/libxl_checkpoint_device.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_checkpoint_device.c
rename to tools/libs/light/libxl_checkpoint_device.c
tools/libs/light/libxl_colo.h renamed from tools/libxl/libxl_colo.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_colo.h
rename to tools/libs/light/libxl_colo.h
tools/libs/light/libxl_colo_nic.c renamed from tools/libxl/libxl_colo_nic.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_colo_nic.c
rename to tools/libs/light/libxl_colo_nic.c
tools/libs/light/libxl_colo_proxy.c renamed from tools/libxl/libxl_colo_proxy.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_colo_proxy.c
rename to tools/libs/light/libxl_colo_proxy.c
tools/libs/light/libxl_colo_qdisk.c renamed from tools/libxl/libxl_colo_qdisk.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_colo_qdisk.c
rename to tools/libs/light/libxl_colo_qdisk.c
tools/libs/light/libxl_colo_restore.c renamed from tools/libxl/libxl_colo_restore.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_colo_restore.c
rename to tools/libs/light/libxl_colo_restore.c
tools/libs/light/libxl_colo_save.c renamed from tools/libxl/libxl_colo_save.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_colo_save.c
rename to tools/libs/light/libxl_colo_save.c
tools/libs/light/libxl_console.c renamed from tools/libxl/libxl_console.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_console.c
rename to tools/libs/light/libxl_console.c
tools/libs/light/libxl_convert_callout.c renamed from tools/libxl/libxl_convert_callout.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_convert_callout.c
rename to tools/libs/light/libxl_convert_callout.c
tools/libs/light/libxl_cpuid.c renamed from tools/libxl/libxl_cpuid.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_cpuid.c
rename to tools/libs/light/libxl_cpuid.c
tools/libs/light/libxl_cpupool.c renamed from tools/libxl/libxl_cpupool.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_cpupool.c
rename to tools/libs/light/libxl_cpupool.c
tools/libs/light/libxl_create.c renamed from tools/libxl/libxl_create.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_create.c
rename to tools/libs/light/libxl_create.c
tools/libs/light/libxl_device.c renamed from tools/libxl/libxl_device.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_device.c
rename to tools/libs/light/libxl_device.c
tools/libs/light/libxl_disk.c renamed from tools/libxl/libxl_disk.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_disk.c
rename to tools/libs/light/libxl_disk.c
tools/libs/light/libxl_dm.c renamed from tools/libxl/libxl_dm.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_dm.c
rename to tools/libs/light/libxl_dm.c
tools/libs/light/libxl_dom.c renamed from tools/libxl/libxl_dom.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_dom.c
rename to tools/libs/light/libxl_dom.c
tools/libs/light/libxl_dom_save.c renamed from tools/libxl/libxl_dom_save.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_dom_save.c
rename to tools/libs/light/libxl_dom_save.c
tools/libs/light/libxl_dom_suspend.c renamed from tools/libxl/libxl_dom_suspend.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_dom_suspend.c
rename to tools/libs/light/libxl_dom_suspend.c
tools/libs/light/libxl_domain.c renamed from tools/libxl/libxl_domain.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_domain.c
rename to tools/libs/light/libxl_domain.c
tools/libs/light/libxl_event.c renamed from tools/libxl/libxl_event.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_event.c
rename to tools/libs/light/libxl_event.c
tools/libs/light/libxl_exec.c renamed from tools/libxl/libxl_exec.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_exec.c
rename to tools/libs/light/libxl_exec.c
tools/libs/light/libxl_flask.c renamed from tools/libxl/libxl_flask.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_flask.c
rename to tools/libs/light/libxl_flask.c
tools/libs/light/libxl_fork.c renamed from tools/libxl/libxl_fork.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_fork.c
rename to tools/libs/light/libxl_fork.c
tools/libs/light/libxl_freebsd.c renamed from tools/libxl/libxl_freebsd.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_freebsd.c
rename to tools/libs/light/libxl_freebsd.c
tools/libs/light/libxl_genid.c renamed from tools/libxl/libxl_genid.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_genid.c
rename to tools/libs/light/libxl_genid.c
tools/libs/light/libxl_internal.c renamed from tools/libxl/libxl_internal.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_internal.c
rename to tools/libs/light/libxl_internal.c
tools/libs/light/libxl_internal.h renamed from tools/libxl/libxl_internal.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_internal.h
rename to tools/libs/light/libxl_internal.h
tools/libs/light/libxl_json.c renamed from tools/libxl/libxl_json.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_json.c
rename to tools/libs/light/libxl_json.c
tools/libs/light/libxl_libfdt_compat.c renamed from tools/libxl/libxl_libfdt_compat.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_libfdt_compat.c
rename to tools/libs/light/libxl_libfdt_compat.c
tools/libs/light/libxl_libfdt_compat.h renamed from tools/libxl/libxl_libfdt_compat.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_libfdt_compat.h
rename to tools/libs/light/libxl_libfdt_compat.h
tools/libs/light/libxl_linux.c renamed from tools/libxl/libxl_linux.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_linux.c
rename to tools/libs/light/libxl_linux.c
tools/libs/light/libxl_mem.c renamed from tools/libxl/libxl_mem.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_mem.c
rename to tools/libs/light/libxl_mem.c
tools/libs/light/libxl_netbsd.c renamed from tools/libxl/libxl_netbsd.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_netbsd.c
rename to tools/libs/light/libxl_netbsd.c
tools/libs/light/libxl_netbuffer.c renamed from tools/libxl/libxl_netbuffer.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_netbuffer.c
rename to tools/libs/light/libxl_netbuffer.c
tools/libs/light/libxl_nic.c renamed from tools/libxl/libxl_nic.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_nic.c
rename to tools/libs/light/libxl_nic.c
tools/libs/light/libxl_no_colo.c renamed from tools/libxl/libxl_no_colo.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_no_colo.c
rename to tools/libs/light/libxl_no_colo.c
tools/libs/light/libxl_no_convert_callout.c renamed from tools/libxl/libxl_no_convert_callout.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_no_convert_callout.c
rename to tools/libs/light/libxl_no_convert_callout.c
tools/libs/light/libxl_nocpuid.c renamed from tools/libxl/libxl_nocpuid.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_nocpuid.c
rename to tools/libs/light/libxl_nocpuid.c
tools/libs/light/libxl_nonetbuffer.c renamed from tools/libxl/libxl_nonetbuffer.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_nonetbuffer.c
rename to tools/libs/light/libxl_nonetbuffer.c
tools/libs/light/libxl_numa.c renamed from tools/libxl/libxl_numa.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_numa.c
rename to tools/libs/light/libxl_numa.c
tools/libs/light/libxl_osdeps.h renamed from tools/libxl/libxl_osdeps.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_osdeps.h
rename to tools/libs/light/libxl_osdeps.h
tools/libs/light/libxl_paths.c renamed from tools/libxl/libxl_paths.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_paths.c
rename to tools/libs/light/libxl_paths.c
tools/libs/light/libxl_pci.c renamed from tools/libxl/libxl_pci.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_pci.c
rename to tools/libs/light/libxl_pci.c
tools/libs/light/libxl_psr.c renamed from tools/libxl/libxl_psr.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_psr.c
rename to tools/libs/light/libxl_psr.c
tools/libs/light/libxl_pvcalls.c renamed from tools/libxl/libxl_pvcalls.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_pvcalls.c
rename to tools/libs/light/libxl_pvcalls.c
tools/libs/light/libxl_qmp.c renamed from tools/libxl/libxl_qmp.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_qmp.c
rename to tools/libs/light/libxl_qmp.c
tools/libs/light/libxl_remus.c renamed from tools/libxl/libxl_remus.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_remus.c
rename to tools/libs/light/libxl_remus.c
tools/libs/light/libxl_remus_disk_drbd.c renamed from tools/libxl/libxl_remus_disk_drbd.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_remus_disk_drbd.c
rename to tools/libs/light/libxl_remus_disk_drbd.c
tools/libs/light/libxl_save_callout.c renamed from tools/libxl/libxl_save_callout.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_save_callout.c
rename to tools/libs/light/libxl_save_callout.c
tools/libs/light/libxl_save_helper.c renamed from tools/libxl/libxl_save_helper.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_save_helper.c
rename to tools/libs/light/libxl_save_helper.c
tools/libs/light/libxl_save_msgs_gen.pl renamed from tools/libxl/libxl_save_msgs_gen.pl +0 -0
similarity index 100%
rename from tools/libxl/libxl_save_msgs_gen.pl
rename to tools/libs/light/libxl_save_msgs_gen.pl
tools/libs/light/libxl_sched.c renamed from tools/libxl/libxl_sched.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_sched.c
rename to tools/libs/light/libxl_sched.c
tools/libs/light/libxl_sr_stream_format.h renamed from tools/libxl/libxl_sr_stream_format.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_sr_stream_format.h
rename to tools/libs/light/libxl_sr_stream_format.h
tools/libs/light/libxl_stream_read.c renamed from tools/libxl/libxl_stream_read.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_stream_read.c
rename to tools/libs/light/libxl_stream_read.c
tools/libs/light/libxl_stream_write.c renamed from tools/libxl/libxl_stream_write.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_stream_write.c
rename to tools/libs/light/libxl_stream_write.c
tools/libs/light/libxl_test_fdevent.c renamed from tools/libxl/libxl_test_fdevent.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_test_fdevent.c
rename to tools/libs/light/libxl_test_fdevent.c
tools/libs/light/libxl_test_fdevent.h renamed from tools/libxl/libxl_test_fdevent.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_test_fdevent.h
rename to tools/libs/light/libxl_test_fdevent.h
tools/libs/light/libxl_test_timedereg.c renamed from tools/libxl/libxl_test_timedereg.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_test_timedereg.c
rename to tools/libs/light/libxl_test_timedereg.c
tools/libs/light/libxl_test_timedereg.h renamed from tools/libxl/libxl_test_timedereg.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_test_timedereg.h
rename to tools/libs/light/libxl_test_timedereg.h
tools/libs/light/libxl_tmem.c renamed from tools/libxl/libxl_tmem.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_tmem.c
rename to tools/libs/light/libxl_tmem.c
tools/libs/light/libxl_types.idl renamed from tools/libxl/libxl_types.idl +0 -0
similarity index 100%
rename from tools/libxl/libxl_types.idl
rename to tools/libs/light/libxl_types.idl
tools/libs/light/libxl_types_internal.idl renamed from tools/libxl/libxl_types_internal.idl +0 -0
similarity index 100%
rename from tools/libxl/libxl_types_internal.idl
rename to tools/libs/light/libxl_types_internal.idl
tools/libs/light/libxl_usb.c renamed from tools/libxl/libxl_usb.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_usb.c
rename to tools/libs/light/libxl_usb.c
tools/libs/light/libxl_utils.c renamed from tools/libxl/libxl_utils.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_utils.c
rename to tools/libs/light/libxl_utils.c
tools/libs/light/libxl_uuid.c renamed from tools/libxl/libxl_uuid.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_uuid.c
rename to tools/libs/light/libxl_uuid.c
tools/libs/light/libxl_vdispl.c renamed from tools/libxl/libxl_vdispl.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_vdispl.c
rename to tools/libs/light/libxl_vdispl.c
tools/libs/light/libxl_vkb.c renamed from tools/libxl/libxl_vkb.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_vkb.c
rename to tools/libs/light/libxl_vkb.c
tools/libs/light/libxl_vnuma.c renamed from tools/libxl/libxl_vnuma.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_vnuma.c
rename to tools/libs/light/libxl_vnuma.c
tools/libs/light/libxl_vsnd.c renamed from tools/libxl/libxl_vsnd.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_vsnd.c
rename to tools/libs/light/libxl_vsnd.c
tools/libs/light/libxl_vtpm.c renamed from tools/libxl/libxl_vtpm.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_vtpm.c
rename to tools/libs/light/libxl_vtpm.c
tools/libs/light/libxl_x86.c renamed from tools/libxl/libxl_x86.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_x86.c
rename to tools/libs/light/libxl_x86.c
tools/libs/light/libxl_x86_acpi.c renamed from tools/libxl/libxl_x86_acpi.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_x86_acpi.c
rename to tools/libs/light/libxl_x86_acpi.c
tools/libs/light/libxl_x86_acpi.h renamed from tools/libxl/libxl_x86_acpi.h +0 -0
similarity index 100%
rename from tools/libxl/libxl_x86_acpi.h
rename to tools/libs/light/libxl_x86_acpi.h
tools/libs/light/libxl_xshelp.c renamed from tools/libxl/libxl_xshelp.c +0 -0
similarity index 100%
rename from tools/libxl/libxl_xshelp.c
rename to tools/libs/light/libxl_xshelp.c
tools/libs/light/osdeps.c renamed from tools/libxl/osdeps.c +0 -0
similarity index 100%
rename from tools/libxl/osdeps.c
rename to tools/libs/light/osdeps.c
tools/libs/light/test_common.c renamed from tools/libxl/test_common.c +0 -0
similarity index 100%
rename from tools/libxl/test_common.c
rename to tools/libs/light/test_common.c
tools/libs/light/test_common.h renamed from tools/libxl/test_common.h +0 -0
similarity index 100%
rename from tools/libxl/test_common.h
rename to tools/libs/light/test_common.h
tools/libs/light/test_fdderegrace.c renamed from tools/libxl/test_fdderegrace.c +0 -0
similarity index 100%
rename from tools/libxl/test_fdderegrace.c
rename to tools/libs/light/test_fdderegrace.c
tools/libs/light/test_timedereg.c renamed from tools/libxl/test_timedereg.c +0 -0
similarity index 100%
rename from tools/libxl/test_timedereg.c
rename to tools/libs/light/test_timedereg.c
tools/libs/uselibs.mk +2 -0
index a9dc2ce994..685f368aed 100644
@@ -26,3 +26,5 @@ LIBS_LIBS += vchan
 USELIBS_vchan := toollog store gnttab evtchn
 LIBS_LIBS += stat
 USELIBS_stat := ctrl store
+LIBS_LIBS += light
+USELIBS_light := toollog evtchn toolcore ctrl store hypfs guest
tools/libxl/Makefile +9 -284

375 lines not on this page · raw message

tools/ocaml/libs/xl/Makefile +4 -4
index 0d1549dd3a..cbe1569cc5 100644
@@ -50,10 +50,10 @@ xenlight.mli: xenlight.mli.in _libxl_types.mli.in
 	  < xenlight.mli.in > xenlight.mli.tmp
 	$(Q)mv xenlight.mli.tmp xenlight.mli
 
-_libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \
-                $(XEN_ROOT)/tools/libxl/idl.py
-	PYTHONPATH=$(XEN_ROOT)/tools/libxl $(PYTHON) genwrap.py \
-		$(XEN_ROOT)/tools/libxl/libxl_types.idl \
+_libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libs/light/libxl_types.idl \
+                $(XEN_ROOT)/tools/libs/light/idl.py
+	PYTHONPATH=$(XEN_ROOT)/tools/libs/light $(PYTHON) genwrap.py \
+		$(XEN_ROOT)/tools/libs/light/libxl_types.idl \
 		_libxl_types.mli.in _libxl_types.ml.in _libxl_types.inc
 
 libs: $(LIBS)
Signature · 1 line
2.26.2
#33 lore raw

Re: [PATCH v4 28/31] tools/libxl: move libxenlight to tools/libs/light

Quoted 8 lines · Juergen Gross

Carve out all libxenlight related sources and move them to tools/libs/light in order to use the generic library build environment.

The closely related sources for libxl-save-helper and the libxl test environment are being moved, too.

It occurs to me you may need to modify golang/xenlight/Makefile.

There is

    LIBXL_SRC_DIR = ../../libxl

in it.

I didn't hit any error perhaps due to I didn't have golang installed.

Wei.

#34 lore raw

Re: [PATCH v4 28/31] tools/libxl: move libxenlight to tools/libs/light

Quoted 12 lines · Wei Liu
Quoted 8 lines · Juergen Gross

Carve out all libxenlight related sources and move them to tools/libs/light in order to use the generic library build environment.

The closely related sources for libxl-save-helper and the libxl test environment are being moved, too.

It occurs to me you may need to modify golang/xenlight/Makefile.

Quoted 7 lines

There is

     LIBXL_SRC_DIR = ../../libxl

in it.

I didn't hit any error perhaps due to I didn't have golang installed.

Me neither.

Thanks for noticing that.

Juergen

#35 lore raw

Re: [PATCH v4 28/31] tools/libxl: move libxenlight to tools/libs/light

Quoted 17 lines · Jürgen Groß
Quoted 16 lines · Wei Liu
Quoted 8 lines · Juergen Gross

Carve out all libxenlight related sources and move them to tools/libs/light in order to use the generic library build environment.

The closely related sources for libxl-save-helper and the libxl test environment are being moved, too.

It occurs to me you may need to modify golang/xenlight/Makefile.

There is

     LIBXL_SRC_DIR = ../../libxl
Quoted 7 lines
Quoted 3 lines

in it.

I didn't hit any error perhaps due to I didn't have golang installed.

Me neither.

Thanks for noticing that.

No need to resend just for this. I can fix it up for you.

Wei.

#36 lore raw

Re: [PATCH v4 28/31] tools/libxl: move libxenlight to tools/libs/light

Quoted 20 lines · Wei Liu
Quoted 19 lines · Jürgen Groß
Quoted 18 lines · Wei Liu
Quoted 8 lines · Juergen Gross

Carve out all libxenlight related sources and move them to tools/libs/light in order to use the generic library build environment.

The closely related sources for libxl-save-helper and the libxl test environment are being moved, too.

It occurs to me you may need to modify golang/xenlight/Makefile.

There is

      LIBXL_SRC_DIR = ../../libxl

in it.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

I didn't hit any error perhaps due to I didn't have golang installed.

Me neither.

Thanks for noticing that.

No need to resend just for this. I can fix it up for you.

Sure? Did you consider ac7a21cf5c125810? I had to rebase in order to have a successful build.

Juergen

#37 lore raw

Re: [PATCH v4 28/31] tools/libxl: move libxenlight to tools/libs/light

Quoted 23 lines · Jürgen Groß
Quoted 22 lines · Wei Liu
Quoted 21 lines · Jürgen Groß
Quoted 19 lines · Wei Liu
Quoted 8 lines · Juergen Gross

Carve out all libxenlight related sources and move them to tools/libs/light in order to use the generic library build environment.

The closely related sources for libxl-save-helper and the libxl test environment are being moved, too.

It occurs to me you may need to modify golang/xenlight/Makefile.

There is

      LIBXL_SRC_DIR = ../../libxl

in it.

I didn't hit any error perhaps due to I didn't have golang installed.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Me neither.

Thanks for noticing that.

No need to resend just for this. I can fix it up for you.

Sure? Did you consider ac7a21cf5c125810? I had to rebase in order to have a successful build.

I have not tried to apply this series yet. I said "just for this" for a reason. :-)

Wei.

Quoted 3 lines

Juergen

#38 lore raw

PATCH v4 29/31 tools: rename global libxlutil make variables

In reply to Juergen Gross

Rename *_libxlutil make variables to *_libxenutil in order to avoid nasty indirections when moving libxlutil under the tools/libs infrastructure.

---
 tools/Rules.mk       | 10 +++++-----
 tools/libxl/Makefile |  4 ++--
 tools/xl/Makefile    |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
tools/Rules.mk +5 -5
index a80a633190..9b9db62fe5 100644
@@ -15,7 +15,7 @@ XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 
 include $(XEN_ROOT)/tools/libs/uselibs.mk
 
-XEN_libxlutil      = $(XEN_ROOT)/tools/libxl
+XEN_libxenutil     = $(XEN_ROOT)/tools/libxl
 
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
@@ -116,10 +116,10 @@ else
 CFLAGS += -O2 -fomit-frame-pointer
 endif
 
-CFLAGS_libxlutil = -I$(XEN_libxlutil)
-SHDEPS_libxlutil = $(SHLIB_libxenlight)
-LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_libxlutil)/libxlutil$(libextension)
-SHLIB_libxlutil  = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_libxlutil)
+CFLAGS_libxenutil = -I$(XEN_libxenutil)
+SHDEPS_libxenutil = $(SHLIB_libxenlight)
+LDLIBS_libxenutil = $(SHDEPS_libxenutil) $(XEN_libxenutil)/libxlutil$(libextension)
+SHLIB_libxenutil  = $(SHDEPS_libxenutil) -Wl,-rpath-link=$(XEN_libxenutil)
 
 CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
 
tools/libxl/Makefile +2 -2
index 8ab7c9d3f0..51da1d5be4 100644
@@ -42,7 +42,7 @@ PKG_CONFIG_INST := $(PKG_CONFIG)
 xlutil.pc: PKG_CONFIG_NAME = Xlutil
 xlutil.pc: PKG_CONFIG_DESC = The xl utility library for Xen hypervisor
 xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
-xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxlutil)
+xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenutil)
 xlutil.pc: PKG_CONFIG_LIB = xlutil
 xlutil.pc: PKG_CONFIG_REQPRIV = xenlight
 $(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix)
@@ -55,7 +55,7 @@ PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_NAME = Xlutil
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_DESC = The xl utility library for Xen hypervisor
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
-$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxlutil)
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenutil)
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_LIB = xlutil
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_REQPRIV = xenlight
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
tools/xl/Makefile +2 -2
index 407dd7554c..bdf67c8464 100644
@@ -13,7 +13,7 @@ CFLAGS += $(PTHREAD_CFLAGS)
 LDFLAGS += $(PTHREAD_LDFLAGS)
 
 CFLAGS_XL += $(CFLAGS_libxenlight)
-CFLAGS_XL += $(CFLAGS_libxlutil)
+CFLAGS_XL += $(CFLAGS_libxenutil)
 CFLAGS_XL += -Wshadow
 
 XL_OBJS-$(CONFIG_X86) = xl_psr.o
@@ -38,7 +38,7 @@ $(XL_OBJS): _paths.h
 all: xl
 
 xl: $(XL_OBJS)
-	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxlutil) $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
+	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxenutil) $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
 
 .PHONY: install
 install: all
Signature · 1 line
2.26.2
#39 lore raw

Re: [PATCH v4 29/31] tools: rename global libxlutil make variables

Quoted 3 lines · Juergen Gross

Rename *_libxlutil make variables to *_libxenutil in order to avoid nasty indirections when moving libxlutil under the tools/libs infrastructure.

xl means xenlight.

So I think the name should be libxenlightutil here.

Wei.

#40 lore raw

Re: [PATCH v4 29/31] tools: rename global libxlutil make variables

Quoted 8 lines · Wei Liu
Quoted 3 lines · Juergen Gross

Rename *_libxlutil make variables to *_libxenutil in order to avoid nasty indirections when moving libxlutil under the tools/libs infrastructure.

xl means xenlight.

So I think the name should be libxenlightutil here.

I don't really mind, but given that the name is completely internal to the build system I wonder whether the shorter name isn't more pleasant.

Juergen

Acked-by
#41 lore raw

Re: [PATCH v4 29/31] tools: rename global libxlutil make variables

Quoted 6 lines · Jürgen Groß
Quoted 5 lines · Wei Liu
Quoted 3 lines · Juergen Gross

Rename *_libxlutil make variables to *_libxenutil in order to avoid nasty indirections when moving libxlutil under the tools/libs infrastructure.

Quoted 7 lines
Quoted 3 lines

xl means xenlight.

So I think the name should be libxenlightutil here.

I don't really mind, but given that the name is completely internal to the build system I wonder whether the shorter name isn't more pleasant.

Oh, yes. It is just an internal name. That's fine then. There is no point in quibbling about this further.

Quoted 3 lines

Juergen

#42 lore raw

PATCH v4 30/31 tools/libs: add option for library names not starting with libxen

In reply to Juergen Gross

libxlutil doesn't follow the standard name pattern of all other Xen libraries, so add another make variable which can be used to allow other names.

---
 tools/Rules.mk     |  3 ++-
 tools/libs/libs.mk | 41 +++++++++++++++++++++--------------------
 2 files changed, 23 insertions(+), 21 deletions(-)
tools/Rules.mk +2 -1
index 9b9db62fe5..5ad17b313b 100644
@@ -87,10 +87,11 @@ endif
 # $(SHLIB_libfoo)
 
 define LIB_defs =
+ FILENAME_$(1) ?= xen$(1)
  XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
  CFLAGS_libxen$(1) = -I$$(XEN_libxen$(1))/include $$(CFLAGS_xeninclude)
  SHDEPS_libxen$(1) = $$(foreach use,$$(USELIBS_$(1)),$$(SHLIB_libxen$$(use)))
- LDLIBS_libxen$(1) = $$(SHDEPS_libxen$(1)) $$(XEN_libxen$(1))/libxen$(1)$$(libextension)
+ LDLIBS_libxen$(1) = $$(SHDEPS_libxen$(1)) $$(XEN_libxen$(1))/lib$$(FILENAME_$(1))$$(libextension)
  SHLIB_libxen$(1) = $$(SHDEPS_libxen$(1)) -Wl,-rpath-link=$$(XEN_libxen$(1))
 endef
 
tools/libs/libs.mk +21 -20

91 lines not on this page · raw message

Signature · 1 line
2.26.2
#43 lore raw

Re: [PATCH v4 30/31] tools/libs: add option for library names not starting with libxen

Quoted 5 lines · Juergen Gross

libxlutil doesn't follow the standard name pattern of all other Xen libraries, so add another make variable which can be used to allow other names.

Is this still needed?

Wei.

#44 lore raw

Re: [PATCH v4 30/31] tools/libs: add option for library names not starting with libxen

Quoted 8 lines · Wei Liu
Quoted 5 lines · Juergen Gross

libxlutil doesn't follow the standard name pattern of all other Xen libraries, so add another make variable which can be used to allow other names.

Is this still needed?

Yes. Its for the installed files, as those need to stay as they are today.

Juergen

Acked-by
#45 lore raw

Re: [PATCH v4 30/31] tools/libs: add option for library names not starting with libxen

Quoted 6 lines · Jürgen Groß
Quoted 5 lines · Wei Liu
Quoted 4 lines · Juergen Gross

libxlutil doesn't follow the standard name pattern of all other Xen libraries, so add another make variable which can be used to allow other names.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Is this still needed?

Yes. Its for the installed files, as those need to stay as they are today.

#46 lore raw

PATCH v4 31/31 tools: move libxlutil to tools/libs/util

In reply to Juergen Gross

Move the libxlutil source to tools/libs/util and delete tools/libxl.

---
 .gitignore                                    |   6 +-
 tools/Makefile                                |   1 -
 tools/Rules.mk                                |   7 -
 tools/libs/Makefile                           |   1 +
 tools/libs/uselibs.mk                         |   3 +
 tools/{libxl => libs/util}/CODING_STYLE       |   0
 tools/libs/util/Makefile                      |  63 +++++++++
 .../{libxl => libs/util/include}/libxlutil.h  |   0
 tools/{libxl => libs/util}/libxlu_cfg.c       |   0
 tools/{libxl => libs/util}/libxlu_cfg_i.h     |   0
 tools/{libxl => libs/util}/libxlu_cfg_l.c     |   0
 tools/{libxl => libs/util}/libxlu_cfg_l.h     |   0
 tools/{libxl => libs/util}/libxlu_cfg_l.l     |   0
 tools/{libxl => libs/util}/libxlu_cfg_y.c     |   0
 tools/{libxl => libs/util}/libxlu_cfg_y.h     |   0
 tools/{libxl => libs/util}/libxlu_cfg_y.y     |   0
 tools/{libxl => libs/util}/libxlu_disk.c      |   0
 tools/{libxl => libs/util}/libxlu_disk_i.h    |   0
 tools/{libxl => libs/util}/libxlu_disk_l.c    |   0
 tools/{libxl => libs/util}/libxlu_disk_l.h    |   0
 tools/{libxl => libs/util}/libxlu_disk_l.l    |   0
 tools/{libxl => libs/util}/libxlu_internal.h  |   0
 tools/{libxl => libs/util}/libxlu_pci.c       |   0
 tools/{libxl => libs/util}/libxlu_vif.c       |   0
 tools/libxl/Makefile                          | 124 ------------------
 25 files changed, 71 insertions(+), 134 deletions(-)
 rename tools/{libxl => libs/util}/CODING_STYLE (100%)
 create mode 100644 tools/libs/util/Makefile
 rename tools/{libxl => libs/util/include}/libxlutil.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg.c (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_i.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_l.c (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_l.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_l.l (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_y.c (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_y.h (100%)
 rename tools/{libxl => libs/util}/libxlu_cfg_y.y (100%)
 rename tools/{libxl => libs/util}/libxlu_disk.c (100%)
 rename tools/{libxl => libs/util}/libxlu_disk_i.h (100%)
 rename tools/{libxl => libs/util}/libxlu_disk_l.c (100%)
 rename tools/{libxl => libs/util}/libxlu_disk_l.h (100%)
 rename tools/{libxl => libs/util}/libxlu_disk_l.l (100%)
 rename tools/{libxl => libs/util}/libxlu_internal.h (100%)
 rename tools/{libxl => libs/util}/libxlu_pci.c (100%)
 rename tools/{libxl => libs/util}/libxlu_vif.c (100%)
 delete mode 100644 tools/libxl/Makefile
.gitignore +4 -2
index f30550255f..188495783e 100644
@@ -154,6 +154,10 @@ tools/libs/store/utils.h
 tools/libs/store/xenstore.pc
 tools/libs/store/xs_lib.c
 tools/libs/store/include/xenstore_lib.h
+tools/libs/util/*.pc
+tools/libs/util/_paths.h
+tools/libs/util/libxlu_cfg_y.output
+tools/libs/util/libxenutil.map
 tools/libs/vchan/headers.chk
 tools/libs/vchan/libxenvchan.map
 tools/libs/vchan/xenvchan.pc
@@ -232,8 +236,6 @@ tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
-tools/libxl/*.pc
-tools/libxl/libxlu_cfg_y.output
 tools/misc/cpuperf/cpuperf-perfcntr
 tools/misc/cpuperf/cpuperf-xen
 tools/misc/xc_shadow
tools/Makefile +0 -1
index ea69675cca..9c77ee6763 100644
@@ -29,7 +29,6 @@ SUBDIRS-$(CONFIG_QEMU_XEN) += qemu-xen-dir
 endif
 
 SUBDIRS-y += xenpmd
-SUBDIRS-y += libxl
 SUBDIRS-$(CONFIG_GOLANG) += golang
 SUBDIRS-y += xl
 SUBDIRS-y += helpers
tools/Rules.mk +0 -7
index 5ad17b313b..842b9daf92 100644
@@ -15,8 +15,6 @@ XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 
 include $(XEN_ROOT)/tools/libs/uselibs.mk
 
-XEN_libxenutil     = $(XEN_ROOT)/tools/libxl
-
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
 XENSTORE_XENSTORED ?= y
@@ -117,11 +115,6 @@ else
 CFLAGS += -O2 -fomit-frame-pointer
 endif
 
-CFLAGS_libxenutil = -I$(XEN_libxenutil)
-SHDEPS_libxenutil = $(SHLIB_libxenlight)
-LDLIBS_libxenutil = $(SHDEPS_libxenutil) $(XEN_libxenutil)/libxlutil$(libextension)
-SHLIB_libxenutil  = $(SHDEPS_libxenutil) -Wl,-rpath-link=$(XEN_libxenutil)
-
 CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
 
 # Get gcc to generate the dependencies for us.
tools/libs/Makefile +1 -0
index c41455c604..1afcd12e2b 100644
@@ -16,6 +16,7 @@ SUBDIRS-y += store
 SUBDIRS-y += stat
 SUBDIRS-$(CONFIG_Linux) += vchan
 SUBDIRS-y += light
+SUBDIRS-y += util
 
 ifeq ($(CONFIG_RUMP),y)
 SUBDIRS-y := toolcore
tools/libs/uselibs.mk +3 -0
index 685f368aed..efd7a475ba 100644
@@ -28,3 +28,6 @@ LIBS_LIBS += stat
 USELIBS_stat := ctrl store
 LIBS_LIBS += light
 USELIBS_light := toollog evtchn toolcore ctrl store hypfs guest
+LIBS_LIBS += util
+USELIBS_util := light
+FILENAME_util := xlutil
tools/libs/util/CODING_STYLE renamed from tools/libxl/CODING_STYLE +0 -0
similarity index 100%
rename from tools/libxl/CODING_STYLE
rename to tools/libs/util/CODING_STYLE
tools/libs/util/Makefile new file +63 -0

63 lines not on this page · raw message

tools/libs/util/include/libxlutil.h renamed from tools/libxl/libxlutil.h +0 -0
similarity index 100%
rename from tools/libxl/libxlutil.h
rename to tools/libs/util/include/libxlutil.h
tools/libs/util/libxlu_cfg.c renamed from tools/libxl/libxlu_cfg.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg.c
rename to tools/libs/util/libxlu_cfg.c
tools/libs/util/libxlu_cfg_i.h renamed from tools/libxl/libxlu_cfg_i.h +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_i.h
rename to tools/libs/util/libxlu_cfg_i.h
tools/libs/util/libxlu_cfg_l.c renamed from tools/libxl/libxlu_cfg_l.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_l.c
rename to tools/libs/util/libxlu_cfg_l.c
tools/libs/util/libxlu_cfg_l.h renamed from tools/libxl/libxlu_cfg_l.h +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_l.h
rename to tools/libs/util/libxlu_cfg_l.h
tools/libs/util/libxlu_cfg_l.l renamed from tools/libxl/libxlu_cfg_l.l +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_l.l
rename to tools/libs/util/libxlu_cfg_l.l
tools/libs/util/libxlu_cfg_y.c renamed from tools/libxl/libxlu_cfg_y.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_y.c
rename to tools/libs/util/libxlu_cfg_y.c
tools/libs/util/libxlu_cfg_y.h renamed from tools/libxl/libxlu_cfg_y.h +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_y.h
rename to tools/libs/util/libxlu_cfg_y.h
tools/libs/util/libxlu_cfg_y.y renamed from tools/libxl/libxlu_cfg_y.y +0 -0
similarity index 100%
rename from tools/libxl/libxlu_cfg_y.y
rename to tools/libs/util/libxlu_cfg_y.y
tools/libs/util/libxlu_disk.c renamed from tools/libxl/libxlu_disk.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_disk.c
rename to tools/libs/util/libxlu_disk.c
tools/libs/util/libxlu_disk_i.h renamed from tools/libxl/libxlu_disk_i.h +0 -0
similarity index 100%
rename from tools/libxl/libxlu_disk_i.h
rename to tools/libs/util/libxlu_disk_i.h
tools/libs/util/libxlu_disk_l.c renamed from tools/libxl/libxlu_disk_l.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_disk_l.c
rename to tools/libs/util/libxlu_disk_l.c
tools/libs/util/libxlu_disk_l.h renamed from tools/libxl/libxlu_disk_l.h +0 -0
similarity index 100%
rename from tools/libxl/libxlu_disk_l.h
rename to tools/libs/util/libxlu_disk_l.h
tools/libs/util/libxlu_disk_l.l renamed from tools/libxl/libxlu_disk_l.l +0 -0
similarity index 100%
rename from tools/libxl/libxlu_disk_l.l
rename to tools/libs/util/libxlu_disk_l.l
tools/libs/util/libxlu_internal.h renamed from tools/libxl/libxlu_internal.h +0 -0
similarity index 100%
rename from tools/libxl/libxlu_internal.h
rename to tools/libs/util/libxlu_internal.h
tools/libs/util/libxlu_pci.c renamed from tools/libxl/libxlu_pci.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_pci.c
rename to tools/libs/util/libxlu_pci.c
tools/libs/util/libxlu_vif.c renamed from tools/libxl/libxlu_vif.c +0 -0
similarity index 100%
rename from tools/libxl/libxlu_vif.c
rename to tools/libs/util/libxlu_vif.c
tools/libxl/Makefile deleted +0 -124

124 lines not on this page · raw message

Signature · 1 line
2.26.2