tools: move more libraries into tools/libs
cover tools: move more libraries into tools/libs
[ NB: this patch series is actually from Juergen Gross.
It is being experiemntally handled as a Merge Reqeust in gitlab, in part to see what problems there are with that workflow that will need extra tooling or whatever.
I have manually generated this series using git-format-patch, scripts/add_maintainers.pl, and git-send-email. I expect that if we adopt this as a real workflow, we will want to make a robot do some of that.
I have set replies to go to the Gitlab comment thread and to xen-devel. Again this is experimental. We are likely to need something to automatically collect acks, at the very least.
Reviewers: for now, please review this series as normal. You may reply to the messages by email. Please, for now, send your replies to gitlab and to the mailing list. I think I have set the reply-to appropriately.
Alternatively you may review the code in the gitlab web UI. But please do not use the line-by-line comment system: write only to the main MR discussion thread.
Thanks, Ian ]
Move some more libraries under tools/libs, including libxenctrl. This is resulting in a lot of cleanup work regarding building libs and restructuring of the tools directory.
I have (for now) left out some more libraries like libxenguest and libxl, but I can have a try moving those, too, if wanted.
Please note that patch 8 ("tools: move libxenctrl below tools/libs") needs the related mini-os and qemu-trad patches applied in order to not break the build:
https://lists.xen.org/archives/html/xen-devel/2020-07/msg00548.html
https://lists.xen.org/archives/html/xen-devel/2020-07/msg00617.html
Juergen Gross (12):
stubdom: add stubdom/mini-os.mk for Xen paths used by Mini-OS
tools: switch XEN_LIBXEN* make variables to lower case (XEN_libxen*)
tools: add a copy of library headers in tools/include
tools: don't call make recursively from libs.mk
tools: define ROUNDUP() in tools/include/xen-tools/libs.h tools/misc: don't use libxenctrl internals from misc tools tools/libxc: untangle libxenctrl from libxenguest
tools: move libxenctrl below tools/libs
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: generate most contents of library make variables
.gitignore | 29 +++-
MAINTAINERS | 2 +-
stubdom/Makefile | 29 +++-
stubdom/grub/kexec.c | 2 +-
stubdom/mini-os.mk | 17 ++
tools/Makefile | 15 +-
tools/Rules.mk | 142 ++++++---------
tools/console/daemon/io.c | 6 +-
tools/golang/xenlight/Makefile | 4 +-
tools/helpers/init-xenstore-domain.c | 2 +-
tools/include/xen-tools/libs.h | 4 +
tools/libs/Makefile | 4 +
tools/libs/call/Makefile | 3 +-
tools/libs/call/buffer.c | 3 +-
tools/libs/ctrl/Makefile | 68 ++++++++
tools/{libxc => libs/ctrl}/include/xenctrl.h | 0
.../ctrl}/include/xenctrl_compat.h | 0
.../ctrl/include/xenctrl_dom.h} | 10 +-
tools/libs/ctrl/libxenctrl.map | 3 +
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
.../ctrl/xenctrl.pc.in} | 0
tools/libs/devicemodel/Makefile | 3 +-
tools/libs/evtchn/Makefile | 3 +-
tools/libs/foreignmemory/Makefile | 3 +-
tools/libs/foreignmemory/linux.c | 3 +-
tools/libs/gnttab/Makefile | 3 +-
tools/libs/gnttab/private.h | 3 -
tools/libs/hypfs/Makefile | 3 +-
tools/libs/libs.mk | 34 +++-
.../{xenstat/libxenstat => libs/stat}/COPYING | 0
.../libxenstat => libs/stat}/Makefile | 97 +++--------
.../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 +
tools/libs/stat/libxenstat.map | 54 ++++++
.../libxenstat/src => libs/stat}/xenstat.c | 0
.../libxenstat => libs/stat}/xenstat.pc.in | 2 +-
.../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 | 65 +++++++
.../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}/xenstore.pc.in | 0
tools/{xenstore => libs/store}/xs.c | 0
tools/libs/toolcore/Makefile | 2 +-
tools/libs/toollog/Makefile | 2 +-
tools/libs/vchan/Makefile | 18 ++
.../vchan/include}/libxenvchan.h | 0
tools/{libvchan => libs/vchan}/init.c | 0
tools/{libvchan => libs/vchan}/io.c | 0
tools/libs/vchan/libxenvchan.map | 16 ++
tools/{libvchan => libs/vchan}/xenvchan.pc.in | 0
tools/libvchan/Makefile | 95 -----------
tools/libxc/Makefile | 161 +++++-------------
tools/libxc/include/xenguest.h | 8 +-
tools/libxc/xc_efi.h | 158 -----------------
tools/libxc/xc_elf.h | 16 --
.../libxc/{xc_cpuid_x86.c => xg_cpuid_x86.c} | 0
tools/libxc/{xc_dom_arm.c => xg_dom_arm.c} | 2 +-
...imageloader.c => xg_dom_armzimageloader.c} | 2 +-
...{xc_dom_binloader.c => xg_dom_binloader.c} | 2 +-
tools/libxc/{xc_dom_boot.c => xg_dom_boot.c} | 2 +-
...bzimageloader.c => xg_dom_bzimageloader.c} | 2 +-
...m_compat_linux.c => xg_dom_compat_linux.c} | 2 +-
tools/libxc/{xc_dom_core.c => xg_dom_core.c} | 2 +-
...c_dom_decompress.h => xg_dom_decompress.h} | 4 +-
...compress_lz4.c => xg_dom_decompress_lz4.c} | 2 +-
...ss_unsafe.c => xg_dom_decompress_unsafe.c} | 2 +-
...ss_unsafe.h => xg_dom_decompress_unsafe.h} | 2 +-
...ip2.c => xg_dom_decompress_unsafe_bzip2.c} | 2 +-
...lzma.c => xg_dom_decompress_unsafe_lzma.c} | 2 +-
...o1x.c => xg_dom_decompress_unsafe_lzo1x.c} | 2 +-
...afe_xz.c => xg_dom_decompress_unsafe_xz.c} | 2 +-
...{xc_dom_elfloader.c => xg_dom_elfloader.c} | 2 +-
...{xc_dom_hvmloader.c => xg_dom_hvmloader.c} | 2 +-
tools/libxc/{xc_dom_x86.c => xg_dom_x86.c} | 2 +-
tools/libxc/xg_domain.c | 149 ++++++++++++++++
.../libxc/{xc_nomigrate.c => xg_nomigrate.c} | 0
.../{xc_offline_page.c => xg_offline_page.c} | 2 +-
tools/libxc/xg_private.h | 23 ---
tools/libxc/xg_save_restore.h | 13 --
.../libxc/{xc_sr_common.c => xg_sr_common.c} | 2 +-
.../libxc/{xc_sr_common.h => xg_sr_common.h} | 4 +-
...{xc_sr_common_x86.c => xg_sr_common_x86.c} | 2 +-
...{xc_sr_common_x86.h => xg_sr_common_x86.h} | 2 +-
..._common_x86_pv.c => xg_sr_common_x86_pv.c} | 2 +-
..._common_x86_pv.h => xg_sr_common_x86_pv.h} | 2 +-
.../{xc_sr_restore.c => xg_sr_restore.c} | 2 +-
...tore_x86_hvm.c => xg_sr_restore_x86_hvm.c} | 2 +-
...estore_x86_pv.c => xg_sr_restore_x86_pv.c} | 2 +-
tools/libxc/{xc_sr_save.c => xg_sr_save.c} | 2 +-
...sr_save_x86_hvm.c => xg_sr_save_x86_hvm.c} | 2 +-
...c_sr_save_x86_pv.c => xg_sr_save_x86_pv.c} | 2 +-
..._stream_format.h => xg_sr_stream_format.h} | 0
tools/libxc/{xc_suspend.c => xg_suspend.c} | 0
tools/libxl/Makefile | 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 | 5 +-
tools/libxl/libxl_vnuma.c | 2 +-
tools/libxl/libxl_x86.c | 2 +-
tools/libxl/libxl_x86_acpi.c | 2 +-
tools/misc/Makefile | 5 +-
tools/misc/xen-hptool.c | 8 +-
tools/misc/xen-mfndump.c | 70 ++++----
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/readnotes.c | 2 +-
tools/xenstat/Makefile | 10 --
tools/xenstore/Makefile | 82 +--------
tools/xenstore/{include => }/xenstore_lib.h | 0
tools/xenstore/xenstored_core.c | 2 -
tools/{xenstat => }/xentop/Makefile | 2 +-
tools/{xenstat => }/xentop/TODO | 0
tools/{xenstat => }/xentop/xentop.c | 0
174 files changed, 856 insertions(+), 986 deletions(-)
create mode 100644 stubdom/mini-os.mk
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%)
create mode 100644 tools/libs/ctrl/libxenctrl.map
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%)
rename tools/{libxc/xencontrol.pc.in => libs/ctrl/xenctrl.pc.in} (100%)
rename tools/{xenstat/libxenstat => libs/stat}/COPYING (100%)
rename tools/{xenstat/libxenstat => libs/stat}/Makefile (56%)
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%)
create mode 100644 tools/libs/stat/libxenstat.map
rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat.c (100%)
rename tools/{xenstat/libxenstat => libs/stat}/xenstat.pc.in (82%)
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}/xenstore.pc.in (100%)
rename tools/{xenstore => libs/store}/xs.c (100%)
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%)
create mode 100644 tools/libs/vchan/libxenvchan.map
rename tools/{libvchan => libs/vchan}/xenvchan.pc.in (100%)
delete mode 100644 tools/libvchan/Makefile
delete mode 100644 tools/libxc/xc_efi.h
delete mode 100644 tools/libxc/xc_elf.h
rename tools/libxc/{xc_cpuid_x86.c => xg_cpuid_x86.c} (100%)
rename tools/libxc/{xc_dom_arm.c => xg_dom_arm.c} (99%)
rename tools/libxc/{xc_dom_armzimageloader.c => xg_dom_armzimageloader.c} (99%)
rename tools/libxc/{xc_dom_binloader.c => xg_dom_binloader.c} (99%)
rename tools/libxc/{xc_dom_boot.c => xg_dom_boot.c} (99%)
rename tools/libxc/{xc_dom_bzimageloader.c => xg_dom_bzimageloader.c} (99%)
rename tools/libxc/{xc_dom_compat_linux.c => xg_dom_compat_linux.c} (99%)
rename tools/libxc/{xc_dom_core.c => xg_dom_core.c} (99%)
rename tools/libxc/{xc_dom_decompress.h => xg_dom_decompress.h} (62%)
rename tools/libxc/{xc_dom_decompress_lz4.c => xg_dom_decompress_lz4.c} (98%)
rename tools/libxc/{xc_dom_decompress_unsafe.c => xg_dom_decompress_unsafe.c} (96%)
rename tools/libxc/{xc_dom_decompress_unsafe.h => xg_dom_decompress_unsafe.h} (97%)
rename tools/libxc/{xc_dom_decompress_unsafe_bzip2.c => xg_dom_decompress_unsafe_bzip2.c} (87%)
rename tools/libxc/{xc_dom_decompress_unsafe_lzma.c => xg_dom_decompress_unsafe_lzma.c} (87%)
rename tools/libxc/{xc_dom_decompress_unsafe_lzo1x.c => xg_dom_decompress_unsafe_lzo1x.c} (96%)
rename tools/libxc/{xc_dom_decompress_unsafe_xz.c => xg_dom_decompress_unsafe_xz.c} (95%)
rename tools/libxc/{xc_dom_elfloader.c => xg_dom_elfloader.c} (99%)
rename tools/libxc/{xc_dom_hvmloader.c => xg_dom_hvmloader.c} (99%)
rename tools/libxc/{xc_dom_x86.c => xg_dom_x86.c} (99%)
create mode 100644 tools/libxc/xg_domain.c
rename tools/libxc/{xc_nomigrate.c => xg_nomigrate.c} (100%)
rename tools/libxc/{xc_offline_page.c => xg_offline_page.c} (99%)
rename tools/libxc/{xc_sr_common.c => xg_sr_common.c} (99%)
rename tools/libxc/{xc_sr_common.h => xg_sr_common.h} (99%)
rename tools/libxc/{xc_sr_common_x86.c => xg_sr_common_x86.c} (99%)
rename tools/libxc/{xc_sr_common_x86.h => xg_sr_common_x86.h} (98%)
rename tools/libxc/{xc_sr_common_x86_pv.c => xg_sr_common_x86_pv.c} (99%)
rename tools/libxc/{xc_sr_common_x86_pv.h => xg_sr_common_x86_pv.h} (98%)
rename tools/libxc/{xc_sr_restore.c => xg_sr_restore.c} (99%)
rename tools/libxc/{xc_sr_restore_x86_hvm.c => xg_sr_restore_x86_hvm.c} (99%)
rename tools/libxc/{xc_sr_restore_x86_pv.c => xg_sr_restore_x86_pv.c} (99%)
rename tools/libxc/{xc_sr_save.c => xg_sr_save.c} (99%)
rename tools/libxc/{xc_sr_save_x86_hvm.c => xg_sr_save_x86_hvm.c} (99%)
rename tools/libxc/{xc_sr_save_x86_pv.c => xg_sr_save_x86_pv.c} (99%)
rename tools/libxc/{xc_sr_stream_format.h => xg_sr_stream_format.h} (100%)
rename tools/libxc/{xc_suspend.c => xg_suspend.c} (100%)
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
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%)Signature · 1 line
2.20.1
PATCH 1/1 docs/process/branching-checklist: Get osstest branch right
The runes for this manual osstest were wrong. It needs to run as osstest, and cr-for-branches should be run from testing.git.
--- docs/process/branching-checklist.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
docs/process/branching-checklist.txt +2 -2
@@ -86,8 +86,8 @@ including turning off debug. Set off a manual osstest run, since the osstest cr-for-branches change will take a while to take effect: - ssh osstest.test-lab - cd branches/for-xen-$v-testing.git + ssh [email protected] + cd testing.git screen -S $v BRANCHES=xen-$v-testing ./cr-for-branches branches -w "./cr-daily-branch --real"
Signature · 1 line
2.20.1
Re: [PATCH 1/1] docs/process/branching-checklist: Get osstest branch right
Ian Jackson writes ("[PATCH 1/1] docs/process/branching-checklist: Get osstest branch right"):
Quoted 4 lines
The runes for this manual osstest were wrong. It needs to run as osstest, and cr-for-branches should be run from testing.git.
Signed-off-by Ian Jackson <[email protected]>
Not sure if I need an ack for this but one hasn't been forthcoming and there have been no naks, so I have pushed it.
Ian.
PATCH 1/12 stubdom: add stubdom/mini-os.mk for Xen paths used by Mini-OS
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
stubdom/mini-os.mk should contain paths used by Mini-OS when built as stubdom.
--- stubdom/mini-os.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 stubdom/mini-os.mk
stubdom/mini-os.mk new file +17 -0
@@ -0,0 +1,17 @@ +# Included by Mini-OS stubdom builds to set variables depending on Xen +# internal paths. +# +# Input variables are: +# XEN_ROOT +# MINIOS_TARGET_ARCH + +XENSTORE_CPPFLAGS = -isystem $(XEN_ROOT)/tools/xenstore/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 +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) +GUEST_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)
Signature · 1 line
2.20.1
Re: [PATCH 01/12] stubdom: add stubdom/mini-os.mk for Xen paths used by Mini-OS
Ian Jackson, le mer. 15 juil. 2020 17:25:00 +0100, a ecrit:
Quoted 6 lines
From: Juergen Gross <[email protected]>
stubdom/mini-os.mkshould contain paths used by Mini-OS when built as stubdom.Signed-off-by Juergen Gross <[email protected]>
Quoted 31 lines
--- stubdom/mini-os.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 stubdom/mini-os.mkstubdom/mini-os.mk new file +17
-0@@ -0,0 +1,17 @@ +# Included by Mini-OS stubdom builds to set variables depending on Xen +# internal paths. +# +# Input variables are: +# XEN_ROOT +# MINIOS_TARGET_ARCH + +XENSTORE_CPPFLAGS = -isystem $(XEN_ROOT)/tools/xenstore/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 +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) +GUEST_PATH = $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)Signature · 1 line
2.20.1
Signature · 4 lines
Samuel Créer une hiérarchie supplementaire pour remedier à un problème (?) de dispersion est d'une logique digne des Shadocks. * BT in: Guide du Cabaliste Usenet - La Cabale vote oui (les Shadocks aussi) *
PATCH 2/12 tools: switch XEN_LIBXEN* make variables to lower case (XEN_libxen*)
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
In order to harmonize names of library related make variables switch XEN_LIBXEN* names to XEN_libxen*, as all other related variables (e.g. CFLAGS_libxen*, SHDEPS_libxen*, ...) already use this pattern.
Rename XEN_LIBXC to XEN_libxenctrl, XEN_XENSTORE to XEN_libxenstore, XEN_XENLIGHT to XEN_libxenlight, XEN_XLUTIL to XEN_libxlutil, and XEN_LIBVCHAN to XEN_libxenvchan for the same reason.
Introduce XEN_libxenguest with the same value as XEN_libxenctrl.
No functional change.
--- tools/Rules.mk | 120 +++++++++++++++--------------- tools/golang/xenlight/Makefile | 4 +- tools/libs/call/Makefile | 2 +- tools/libs/devicemodel/Makefile | 2 +- tools/libs/evtchn/Makefile | 2 +- tools/libs/foreignmemory/Makefile | 2 +- tools/libs/gnttab/Makefile | 2 +- tools/libs/hypfs/Makefile | 2 +- tools/libs/toolcore/Makefile | 2 +- tools/libs/toollog/Makefile | 2 +- tools/libvchan/Makefile | 2 +- tools/libxc/Makefile | 2 +- tools/xenstat/libxenstat/Makefile | 2 +- tools/xenstore/Makefile | 2 +- 14 files changed, 75 insertions(+), 73 deletions(-)
tools/Rules.mk +61 -59
@@ -12,21 +12,23 @@ INSTALL = $(XEN_ROOT)/tools/cross-install LDFLAGS += $(PREPEND_LDFLAGS_XEN_TOOLS) XEN_INCLUDE = $(XEN_ROOT)/tools/include -XEN_LIBXENTOOLCORE = $(XEN_ROOT)/tools/libs/toolcore -XEN_LIBXENTOOLLOG = $(XEN_ROOT)/tools/libs/toollog -XEN_LIBXENEVTCHN = $(XEN_ROOT)/tools/libs/evtchn -XEN_LIBXENGNTTAB = $(XEN_ROOT)/tools/libs/gnttab -XEN_LIBXENCALL = $(XEN_ROOT)/tools/libs/call -XEN_LIBXENFOREIGNMEMORY = $(XEN_ROOT)/tools/libs/foreignmemory -XEN_LIBXENDEVICEMODEL = $(XEN_ROOT)/tools/libs/devicemodel -XEN_LIBXENHYPFS = $(XEN_ROOT)/tools/libs/hypfs -XEN_LIBXC = $(XEN_ROOT)/tools/libxc -XEN_XENLIGHT = $(XEN_ROOT)/tools/libxl +XEN_libxentoolcore = $(XEN_ROOT)/tools/libs/toolcore +XEN_libxentoollog = $(XEN_ROOT)/tools/libs/toollog +XEN_libxenevtchn = $(XEN_ROOT)/tools/libs/evtchn +XEN_libxengnttab = $(XEN_ROOT)/tools/libs/gnttab +XEN_libxencall = $(XEN_ROOT)/tools/libs/call +XEN_libxenforeignmemory = $(XEN_ROOT)/tools/libs/foreignmemory +XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel +XEN_libxenhypfs = $(XEN_ROOT)/tools/libs/hypfs +XEN_libxenctrl = $(XEN_ROOT)/tools/libxc +# Currently libxenguest lives in the same directory as libxenctrl +XEN_libxenguest = $(XEN_libxenctrl) +XEN_libxenlight = $(XEN_ROOT)/tools/libxl # Currently libxlutil lives in the same directory as libxenlight -XEN_XLUTIL = $(XEN_XENLIGHT) -XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore -XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src -XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan +XEN_libxlutil = $(XEN_libxenlight) +XEN_libxenstore = $(XEN_ROOT)/tools/xenstore +XEN_libxenstat = $(XEN_ROOT)/tools/xenstat/libxenstat/src +XEN_libxenvchan = $(XEN_ROOT)/tools/libvchan CFLAGS_xeninclude = -I$(XEN_INCLUDE)
@@ -97,75 +99,75 @@ endif # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or # $(SHLIB_libfoo) -CFLAGS_libxentoollog = -I$(XEN_LIBXENTOOLLOG)/include $(CFLAGS_xeninclude) +CFLAGS_libxentoollog = -I$(XEN_libxentoollog)/include $(CFLAGS_xeninclude) SHDEPS_libxentoollog = -LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_LIBXENTOOLLOG)/libxentoollog$(libextension) -SHLIB_libxentoollog = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_LIBXENTOOLLOG) +LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_libxentoollog)/libxentoollog$(libextension) +SHLIB_libxentoollog = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_libxentoollog) -CFLAGS_libxentoolcore = -I$(XEN_LIBXENTOOLCORE)/include $(CFLAGS_xeninclude) +CFLAGS_libxentoolcore = -I$(XEN_libxentoolcore)/include $(CFLAGS_xeninclude) SHDEPS_libxentoolcore = -LDLIBS_libxentoolcore = $(SHDEPS_libxentoolcore) $(XEN_LIBXENTOOLCORE)/libxentoolcore$(libextension) -SHLIB_libxentoolcore = $(SHDEPS_libxentoolcore) -Wl,-rpath-link=$(XEN_LIBXENTOOLCORE) +LDLIBS_libxentoolcore = $(SHDEPS_libxentoolcore) $(XEN_libxentoolcore)/libxentoolcore$(libextension) +SHLIB_libxentoolcore = $(SHDEPS_libxentoolcore) -Wl,-rpath-link=$(XEN_libxentoolcore) -CFLAGS_libxenevtchn = -I$(XEN_LIBXENEVTCHN)/include $(CFLAGS_xeninclude) +CFLAGS_libxenevtchn = -I$(XEN_libxenevtchn)/include $(CFLAGS_xeninclude) SHDEPS_libxenevtchn = $(SHLIB_libxentoolcore) -LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_LIBXENEVTCHN)/libxenevtchn$(libextension) -SHLIB_libxenevtchn = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_LIBXENEVTCHN) +LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_libxenevtchn)/libxenevtchn$(libextension) +SHLIB_libxenevtchn = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_libxenevtchn) -CFLAGS_libxengnttab = -I$(XEN_LIBXENGNTTAB)/include $(CFLAGS_xeninclude) +CFLAGS_libxengnttab = -I$(XEN_libxengnttab)/include $(CFLAGS_xeninclude) SHDEPS_libxengnttab = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) -LDLIBS_libxengnttab = $(SHDEPS_libxengnttab) $(XEN_LIBXENGNTTAB)/libxengnttab$(libextension) -SHLIB_libxengnttab = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_LIBXENGNTTAB) +LDLIBS_libxengnttab = $(SHDEPS_libxengnttab) $(XEN_libxengnttab)/libxengnttab$(libextension) +SHLIB_libxengnttab = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_libxengnttab) -CFLAGS_libxencall = -I$(XEN_LIBXENCALL)/include $(CFLAGS_xeninclude) +CFLAGS_libxencall = -I$(XEN_libxencall)/include $(CFLAGS_xeninclude) SHDEPS_libxencall = $(SHLIB_libxentoolcore) -LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_LIBXENCALL)/libxencall$(libextension) -SHLIB_libxencall = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_LIBXENCALL) +LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_libxencall)/libxencall$(libextension) +SHLIB_libxencall = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_libxencall) -CFLAGS_libxenforeignmemory = -I$(XEN_LIBXENFOREIGNMEMORY)/include $(CFLAGS_xeninclude) +CFLAGS_libxenforeignmemory = -I$(XEN_libxenforeignmemory)/include $(CFLAGS_xeninclude) SHDEPS_libxenforeignmemory = $(SHLIB_libxentoolcore) -LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_LIBXENFOREIGNMEMORY)/libxenforeignmemory$(libextension) -SHLIB_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_LIBXENFOREIGNMEMORY) +LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_libxenforeignmemory)/libxenforeignmemory$(libextension) +SHLIB_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_libxenforeignmemory) -CFLAGS_libxendevicemodel = -I$(XEN_LIBXENDEVICEMODEL)/include $(CFLAGS_xeninclude) +CFLAGS_libxendevicemodel = -I$(XEN_libxendevicemodel)/include $(CFLAGS_xeninclude) SHDEPS_libxendevicemodel = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall) -LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_LIBXENDEVICEMODEL)/libxendevicemodel$(libextension) -SHLIB_libxendevicemodel = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_LIBXENDEVICEMODEL) +LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_libxendevicemodel)/libxendevicemodel$(libextension) +SHLIB_libxendevicemodel = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_libxendevicemodel) -CFLAGS_libxenhypfs = -I$(XEN_LIBXENHYPFS)/include $(CFLAGS_xeninclude) +CFLAGS_libxenhypfs = -I$(XEN_libxenhypfs)/include $(CFLAGS_xeninclude) SHDEPS_libxenhypfs = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall) -LDLIBS_libxenhypfs = $(SHDEPS_libxenhypfs) $(XEN_LIBXENHYPFS)/libxenhypfs$(libextension) -SHLIB_libxenhypfs = $(SHDEPS_libxenhypfs) -Wl,-rpath-link=$(XEN_LIBXENHYPFS) +LDLIBS_libxenhypfs = $(SHDEPS_libxenhypfs) $(XEN_libxenhypfs)/libxenhypfs$(libextension) +SHLIB_libxenhypfs = $(SHDEPS_libxenhypfs) -Wl,-rpath-link=$(XEN_libxenhypfs) # code which compiles against libxenctrl get __XEN_TOOLS__ and # therefore sees the unstable hypercall interfaces. -CFLAGS_libxenctrl = -I$(XEN_LIBXC)/include $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) $(CFLAGS_xeninclude) -D__XEN_TOOLS__ +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_LIBXC)/libxenctrl$(libextension) -SHLIB_libxenctrl = $(SHDEPS_libxenctrl) -Wl,-rpath-link=$(XEN_LIBXC) +LDLIBS_libxenctrl = $(SHDEPS_libxenctrl) $(XEN_libxenctrl)/libxenctrl$(libextension) +SHLIB_libxenctrl = $(SHDEPS_libxenctrl) -Wl,-rpath-link=$(XEN_libxenctrl) -CFLAGS_libxenguest = -I$(XEN_LIBXC)/include $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude) +CFLAGS_libxenguest = -I$(XEN_libxenguest)/include $(CFLAGS_libxenevtchn) $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude) SHDEPS_libxenguest = $(SHLIB_libxenevtchn) -LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_LIBXC)/libxenguest$(libextension) -SHLIB_libxenguest = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_LIBXC) +LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxenguest$(libextension) +SHLIB_libxenguest = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_libxenguest) -CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude) +CFLAGS_libxenstore = -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude) SHDEPS_libxenstore = $(SHLIB_libxentoolcore) -LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension) -SHLIB_libxenstore = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE) +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 -CFLAGS_libxenstat = -I$(XEN_LIBXENSTAT) +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) +LDLIBS_libxenstat = $(SHDEPS_libxenstat) $(XEN_libxenstat)/libxenstat$(libextension) +SHLIB_libxenstat = $(SHDEPS_libxenstat) -Wl,-rpath-link=$(XEN_libxenstat) -CFLAGS_libxenvchan = -I$(XEN_LIBVCHAN) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn) +CFLAGS_libxenvchan = -I$(XEN_libxenvchan) $(CFLAGS_libxengnttab) $(CFLAGS_libxenevtchn) SHDEPS_libxenvchan = $(SHLIB_libxentoollog) $(SHLIB_libxenstore) $(SHLIB_libxenevtchn) $(SHLIB_libxengnttab) -LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_LIBVCHAN)/libxenvchan$(libextension) -SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) +LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_libxenvchan)/libxenvchan$(libextension) +SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_libxenvchan) ifeq ($(debug),y) # Disable optimizations
@@ -176,15 +178,15 @@ else CFLAGS += -O2 -fomit-frame-pointer endif -CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude) +CFLAGS_libxenlight = -I$(XEN_libxenlight) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude) SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libxenhypfs) -LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_XENLIGHT)/libxenlight$(libextension) -SHLIB_libxenlight = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_XENLIGHT) +LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_libxenlight)/libxenlight$(libextension) +SHLIB_libxenlight = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_libxenlight) -CFLAGS_libxlutil = -I$(XEN_XLUTIL) +CFLAGS_libxlutil = -I$(XEN_libxlutil) SHDEPS_libxlutil = $(SHLIB_libxenlight) -LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_XLUTIL)/libxlutil$(libextension) -SHLIB_libxlutil = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_XLUTIL) +LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_libxlutil)/libxlutil$(libextension) +SHLIB_libxlutil = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_libxlutil) CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
tools/golang/xenlight/Makefile +2 -2
@@ -30,11 +30,11 @@ idl-gen: $(GOXL_GEN_FILES) # # NB that because the users of this library need to be able to # recompile the library from source, it needs to include '-lxenlight' -# in the LDFLAGS; and thus we need to add -L$(XEN_XENLIGHT) here +# in the LDFLAGS; and thus we need to add -L$(XEN_libxenlight) here # so that it can find the actual library. .PHONY: build build: xenlight.go $(GOXL_GEN_FILES) - CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_XENLIGHT) -L$(XEN_LIBXENTOOLLOG)" $(GO) build -x + CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_libxenlight) -L$(XEN_libxentoollog)" $(GO) build -x .PHONY: install install: build
tools/libs/call/Makefile +1 -1
@@ -15,5 +15,5 @@ SRCS-$(CONFIG_MiniOS) += minios.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENCALL)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxencall)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/libs/devicemodel/Makefile +1 -1
@@ -15,5 +15,5 @@ SRCS-$(CONFIG_MiniOS) += compat.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENDEVICEMODEL)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxendevicemodel)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/libs/evtchn/Makefile +1 -1
@@ -15,4 +15,4 @@ SRCS-$(CONFIG_MiniOS) += minios.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENEVTCHN)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenevtchn)/include
tools/libs/foreignmemory/Makefile +1 -1
@@ -15,5 +15,5 @@ SRCS-$(CONFIG_MiniOS) += minios.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENFOREIGNMEMORY)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenforeignmemory)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/libs/gnttab/Makefile +1 -1
@@ -17,5 +17,5 @@ SRCS-$(CONFIG_NetBSD) += gnttab_unimp.c gntshr_unimp.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENGNTTAB)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxengnttab)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/libs/hypfs/Makefile +1 -1
@@ -12,5 +12,5 @@ SRCS-y += core.c include ../libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENHYPFS)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenhypfs)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/libs/toolcore/Makefile +1 -1
@@ -10,7 +10,7 @@ SRCS-y += handlereg.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENTOOLCORE)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxentoolcore)/include $(LIB_OBJS): $(AUTOINCS) $(PIC_OBJS): $(AUTOINCS)
tools/libs/toollog/Makefile +1 -1
@@ -10,4 +10,4 @@ SRCS-y += xtl_logger_stdio.c include $(XEN_ROOT)/tools/libs/libs.mk -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENTOOLLOG)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxentoollog)/include
tools/libvchan/Makefile +1 -1
@@ -35,7 +35,7 @@ endif PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc)) $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT) -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBVCHAN) +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenvchan) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/libxc/Makefile +1 -1
@@ -168,7 +168,7 @@ endif PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc)) $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT) -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXC)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenctrl)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
tools/xenstat/libxenstat/Makefile +1 -1
@@ -50,7 +50,7 @@ endif PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc)) $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT) -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENSTAT) +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenstat) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) .PHONY: all
tools/xenstore/Makefile +1 -1
@@ -128,7 +128,7 @@ endif PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc)) $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT) -$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_XENSTORE)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxenstore)/include $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) $(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
Signature · 1 line
2.20.1
Re: [PATCH 02/12] tools: switch XEN_LIBXEN* make variables to lower case (XEN_libxen*)
Quoted 10 lines · Ian Jackson
From: Juergen Gross <[email protected]>
In order to harmonize names of library related make variables switch XEN_LIBXEN* names to XEN_libxen*, as all other related variables (e.g. CFLAGS_libxen*, SHDEPS_libxen*, ...) already use this pattern.
Rename
XEN_LIBXCtoXEN_libxenctrl,XEN_XENSTOREtoXEN_libxenstore,XEN_XENLIGHTtoXEN_libxenlight,XEN_XLUTILtoXEN_libxlutil, andXEN_LIBVCHANtoXEN_libxenvchanfor the same reason.
Quoted 5 lines
Introduce
XEN_libxenguestwith the same value asXEN_libxenctrl.No functional change.
Signed-off-by Juergen Gross <[email protected]>
Looks fine to me.
(Experiment to see how this mail shows up in Gitlab)
Wei.
PATCH 3/12 tools: add a copy of library headers in tools/include
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
The headers.chk target in tools/Rules.mk tries to compile all headers stand alone for testing them not to include any internal header.
Unfortunately the headers tested against are not complete, as any header for a Xen library is not included in the include path of the test compile run, resulting in a failure in case any of the tested headers in including an official Xen library header.
Fix that by copying the official headers located in tools/libs/*/include to tools/include.
In order to support libraries with header name other than xen<lib>.h or with multiple headers add a LIBHEADER make variable a lib specific Makefile can set in that case.
Move the headers.chk target from Rules.mk to libs.mk as it is used for libraries in tools/libs only.
Add NO_HEADERS_CHK variable to skip checking headers as this will be needed e.g. for libxenctrl.
--- .gitignore | 1 + tools/Rules.mk | 8 -------- tools/libs/libs.mk | 26 +++++++++++++++++++++++--- 3 files changed, 24 insertions(+), 11 deletions(-)
.gitignore +1 -0
@@ -188,6 +188,7 @@ tools/hotplug/Linux/xendomains tools/hotplug/NetBSD/rc.d/xencommons tools/hotplug/NetBSD/rc.d/xendriverdomain tools/include/acpi +tools/include/*.h tools/include/xen/* tools/include/xen-xsm/* tools/include/xen-foreign/*.(c|h|size)
tools/Rules.mk +0 -8
@@ -225,14 +225,6 @@ INSTALL_PYTHON_PROG = \ %.opic: %.S $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) $(CFLAGS.opic) -fPIC -c -o $@ $< $(APPEND_CFLAGS) -headers.chk: - for i in $(filter %.h,$^); do \ - $(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \ - -S -o /dev/null $$i || exit 1; \ - echo $$i; \ - done >[email protected] - mv [email protected] $@ - subdirs-all subdirs-clean subdirs-install subdirs-distclean subdirs-uninstall: .phony @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \ $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
tools/libs/libs.mk +23 -3
@@ -34,6 +34,10 @@ endif PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc)) +LIBHEADER ?= xen$(LIBNAME).h +LIBHEADERS = $(foreach h, $(LIBHEADER), include/$(h)) +LIBHEADERSGLOB = $(foreach h, $(LIBHEADER), $(XEN_ROOT)/tools/include/$(h)) + $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
@@ -47,7 +51,22 @@ build: .PHONY: libs libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) -headers.chk: $(wildcard include/*.h) $(AUTOINCS) +ifneq ($(NO_HEADERS_CHK),y) +headers.chk: + for i in $(filter %.h,$^); do \ + $(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \ + -S -o /dev/null $$i || exit 1; \ + echo $$i; \ + done >[email protected] + mv [email protected] $@ +else +.PHONY: headers.chk +endif + +headers.chk: $(LIBHEADERSGLOB) $(AUTOINCS) + +$(LIBHEADERSGLOB): $(LIBHEADERS) + for i in $(realpath $(LIBHEADERS)); do ln -sf $$i $(XEN_ROOT)/tools/include; done libxen$(LIBNAME).a: $(LIB_OBJS) $(AR) rc $@ $^
@@ -68,13 +87,13 @@ install: build $(INSTALL_DATA) libxen$(LIBNAME).a $(DESTDIR)$(libdir) $(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR) $(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR) $(DESTDIR)$(libdir)/libxen$(LIBNAME).so - $(INSTALL_DATA) include/xen$(LIBNAME).h $(DESTDIR)$(includedir) + for i in $(LIBHEADERS); do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); done $(INSTALL_DATA) xen$(LIBNAME).pc $(DESTDIR)$(PKG_INSTALLDIR) .PHONY: uninstall uninstall: rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xen$(LIBNAME).pc - rm -f $(DESTDIR)$(includedir)/xen$(LIBNAME).h + for i in $(LIBHEADER); do rm -f $(DESTDIR)$(includedir)/$(LIBHEADER); done rm -f $(DESTDIR)$(libdir)/libxen$(LIBNAME).so rm -f $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR) rm -f $(DESTDIR)$(libdir)/libxen$(LIBNAME).so.$(MAJOR).$(MINOR)
@@ -90,6 +109,7 @@ clean: rm -f libxen$(LIBNAME).so.$(MAJOR).$(MINOR) libxen$(LIBNAME).so.$(MAJOR) rm -f headers.chk rm -f xen$(LIBNAME).pc + rm -f $(LIBHEADERSGLOB) .PHONY: distclean distclean: clean
Signature · 1 line
2.20.1
PATCH 4/12 tools: don't call make recursively from libs.mk
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
During build of a xen library make is called again via libs.mk. This is not necessary as the same can be achieved by a simple dependency.
--- tools/libs/libs.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/libs/libs.mk +1 -2
@@ -45,8 +45,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) all: build .PHONY: build -build: - $(MAKE) libs +build: libs .PHONY: libs libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
Signature · 1 line
2.20.1
Re: [PATCH 04/12] tools: don't call make recursively from libs.mk
Ian Jackson writes ("[PATCH 04/12] tools: don't call make recursively from libs.mk"):
Quoted 4 lines
From: Juergen Gross <[email protected]>
During build of a xen library make is called again via libs.mk. This is not necessary as the same can be achieved by a simple dependency.
PATCH 5/12 tools: define ROUNDUP() in tools/include/xen-tools/libs.h
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
Today there are multiple copies of the ROUNDUP() macro in various sources and headers. Define it once in tools/include/xen-tools/libs.h.
Using xen-tools/libs.h enables removing copies of MIN() and MAX(), too.
--- tools/console/daemon/io.c | 6 +----- tools/include/xen-tools/libs.h | 4 ++++ tools/libs/call/buffer.c | 3 +-- tools/libs/foreignmemory/linux.c | 3 +-- tools/libs/gnttab/private.h | 3 --- tools/libxc/xg_private.h | 1 - tools/libxl/libxl_internal.h | 3 --- tools/xenstore/xenstored_core.c | 2 -- 8 files changed, 7 insertions(+), 18 deletions(-)
tools/console/daemon/io.c +1 -5
@@ -49,9 +49,7 @@#include <sys/ioctl.h> #include <libutil.h> #endif - -#define MAX (a, b) (((a) > (b)) ? (a) : (b)) -#define MIN (a, b) (((a) < (b)) ? (a) : (b)) +#include <xen-tools/libs.h> /* Each 10 bits takes ~ 3 digits, plus one, plus one for nul terminator. */ #define MAX_STRLEN (x) ((sizeof(x) * CHAR_BIT + CHAR_BIT-1) / 10 * 3 + 2)
@@ -80,8 +78,6 @@ static struct pollfd *fds;static unsigned int current_array_size;static unsigned int nr_fds; -#define ROUNDUP (_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) -struct buffer {char *data;size_t consumed;
tools/include/xen-tools/libs.h +4 -0
@@ -59,4 +59,8 @@ })#endif +#ifndef ROUNDUP +#define ROUNDUP (_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) +#endif +#endif /* __XEN_TOOLS_LIBS__ */
tools/libs/call/buffer.c +1 -2
@@ -16,14 +16,13 @@#include <errno.h> #include <string.h> #include <pthread.h> +#include <xen-tools/libs.h> #include "private.h" #define DBGPRINTF(_m...) \ xtl_log(xcall->logger, XTL_DEBUG, -1, "xencall:buffer", _m) -#define ROUNDUP (_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) -pthread_mutex_t cache_mutex =PTHREAD_MUTEX_INITIALIZER ;static void cache_lock (xencall_handle *xcall)
tools/libs/foreignmemory/linux.c +1 -2
@@ -25,11 +25,10 @@#include <sys/mman.h> #include <sys/ioctl.h> +#include <xen-tools/libs.h> #include "private.h" -#define ROUNDUP (_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) -#ifndef O_CLOEXEC #define O_CLOEXEC 0#endif
tools/libs/gnttab/private.h +0 -3
@@ -5,9 +5,6 @@#include <xentoolcore_internal.h> #include <xengnttab.h> -/* Set of macros/defines used by both Linux and FreeBSD */ -#define ROUNDUP (_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) - #define GTERROR(_l, _f...) xtl_log(_l, XTL_ERROR, errno, "gnttab", _f) #define GSERROR(_l, _f...) xtl_log(_l, XTL_ERROR, errno, "gntshr", _f)
tools/libxc/xg_private.h +0 -1
@@ -95,7 +95,6 @@ typedef uint64_t x86_pgentry_t;#define PAGE_SIZE_X86 (1UL << PAGE_SHIFT_X86)#define PAGE_MASK_X86 (~(PAGE_SIZE_X86-1)) -#define ROUNDUP (_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))#define NRPAGES (x) (ROUNDUP(x, PAGE_SHIFT) >> PAGE_SHIFT)
tools/libxl/libxl_internal.h +0 -3
@@ -132,9 +132,6 @@#define MB (_mb) (_AC(_mb, ULL) << 20)#define GB (_gb) (_AC(_gb, ULL) << 30) -#define ROUNDUP (_val, _order) \ - (((unsigned long)(_val)+(1UL<<(_order))-1) & ~((1UL<<(_order))-1)) -#define DIV_ROUNDUP (n, d) (((n) + (d) - 1) / (d))#define MASK_EXTR (v, m) (((v) & (m)) / ((m) & -(m)))
tools/xenstore/xenstored_core.c +0 -2
@@ -73,8 +73,6 @@ static unsigned int nr_fds;static int sock =-1 ;static int ro_sock =-1 ; -#define ROUNDUP (_x, _w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1)) -static bool verbose = false;LIST_HEAD (connections);int tracefd =-1 ;
Signature · 1 line
2.20.1
PATCH 6/12 tools/misc: don't use libxenctrl internals from misc tools
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
xen-hptool and xen-mfndump are using internals from libxenctrl e.g. by including private headers. Fix that by using either the correct official headers or use other means.
--- tools/libxc/xg_save_restore.h | 4 -- tools/misc/Makefile | 4 -- tools/misc/xen-hptool.c | 8 ++-- tools/misc/xen-mfndump.c | 70 +++++++++++++++++++---------------- 4 files changed, 43 insertions(+), 43 deletions(-)
tools/libxc/xg_save_restore.h +0 -4
@@ -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/Makefile +0 -4
@@ -93,15 +93,11 @@ 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) 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-hptool.c +5 -3
@@ -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;
tools/misc/xen-mfndump.c +38 -32
200 lines not on this page · raw message
Signature · 1 line
2.20.1
Re: [PATCH 06/12] tools/misc: don't use libxenctrl internals from misc tools
Ian Jackson writes ("[PATCH 06/12] tools/misc: don't use libxenctrl internals from misc tools"):
Quoted 5 lines
From: Juergen Gross <[email protected]>
xen-hptool and xen-mfndump are using internals from libxenctrl e.g. by including private headers. Fix that by using either the correct official headers or use other means.
...
tools/misc/xen-mfndump.c int dump_m2p_func(int argc, char *argv[]) · line 51
Quoted 3 lines
tools/misc/xen-mfndump.c +1
-1-ERROR ("Failed to get the maximum mfn" ); +fprintf (stderr,"Failed to get the maximum mfn" );return -1 ;
I think this is definitely worse than providing a duplicate definition of ERROR.
Also patches like this are much easier to read if the different kinds of change are split up. Do you think you can break it up further ?
Thanks,
Ian.
PATCH 7/12 tools/libxc: untangle libxenctrl from libxenguest
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
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. Additionally xc_dom.h needs to be exported, so rename it to xenctrl_dom.h.
Rename all libxenguest sources from xc_* to xg_*.
Move xc_[un]map_domain_meminfo() fnctions to new source xg_domain.c as they are defined in include/xenguest.h and should be in libxenguest.
Remove xc_efi.h and xc_elf.h as they aren't used anywhere.
---
stubdom/grub/kexec.c | 2 +-
tools/helpers/init-xenstore-domain.c | 2 +-
tools/libxc/Makefile | 64 +++----
.../libxc/include/{xc_dom.h => 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 | 129 +-------------
tools/libxc/xc_efi.h | 158 ------------------
tools/libxc/xc_elf.h | 16 --
tools/libxc/xc_hcall_buf.c | 1 -
tools/libxc/xc_private.c | 3 +-
tools/libxc/xc_private.h | 36 ++++
tools/libxc/xc_resume.c | 2 -
.../libxc/{xc_cpuid_x86.c => xg_cpuid_x86.c} | 0
tools/libxc/{xc_dom_arm.c => xg_dom_arm.c} | 2 +-
...imageloader.c => xg_dom_armzimageloader.c} | 2 +-
...{xc_dom_binloader.c => xg_dom_binloader.c} | 2 +-
tools/libxc/{xc_dom_boot.c => xg_dom_boot.c} | 2 +-
...bzimageloader.c => xg_dom_bzimageloader.c} | 2 +-
...m_compat_linux.c => xg_dom_compat_linux.c} | 2 +-
tools/libxc/{xc_dom_core.c => xg_dom_core.c} | 2 +-
...c_dom_decompress.h => xg_dom_decompress.h} | 4 +-
...compress_lz4.c => xg_dom_decompress_lz4.c} | 2 +-
...ss_unsafe.c => xg_dom_decompress_unsafe.c} | 2 +-
...ss_unsafe.h => xg_dom_decompress_unsafe.h} | 2 +-
...ip2.c => xg_dom_decompress_unsafe_bzip2.c} | 2 +-
...lzma.c => xg_dom_decompress_unsafe_lzma.c} | 2 +-
...o1x.c => xg_dom_decompress_unsafe_lzo1x.c} | 2 +-
...afe_xz.c => xg_dom_decompress_unsafe_xz.c} | 2 +-
...{xc_dom_elfloader.c => xg_dom_elfloader.c} | 2 +-
...{xc_dom_hvmloader.c => xg_dom_hvmloader.c} | 2 +-
tools/libxc/{xc_dom_x86.c => xg_dom_x86.c} | 2 +-
tools/libxc/xg_domain.c | 149 +++++++++++++++++
.../libxc/{xc_nomigrate.c => xg_nomigrate.c} | 0
.../{xc_offline_page.c => xg_offline_page.c} | 2 +-
tools/libxc/xg_private.h | 22 ---
tools/libxc/xg_save_restore.h | 9 -
.../libxc/{xc_sr_common.c => xg_sr_common.c} | 2 +-
.../libxc/{xc_sr_common.h => xg_sr_common.h} | 4 +-
...{xc_sr_common_x86.c => xg_sr_common_x86.c} | 2 +-
...{xc_sr_common_x86.h => xg_sr_common_x86.h} | 2 +-
..._common_x86_pv.c => xg_sr_common_x86_pv.c} | 2 +-
..._common_x86_pv.h => xg_sr_common_x86_pv.h} | 2 +-
.../{xc_sr_restore.c => xg_sr_restore.c} | 2 +-
...tore_x86_hvm.c => xg_sr_restore_x86_hvm.c} | 2 +-
...estore_x86_pv.c => xg_sr_restore_x86_pv.c} | 2 +-
tools/libxc/{xc_sr_save.c => xg_sr_save.c} | 2 +-
...sr_save_x86_hvm.c => xg_sr_save_x86_hvm.c} | 2 +-
...c_sr_save_x86_pv.c => xg_sr_save_x86_pv.c} | 2 +-
..._stream_format.h => xg_sr_stream_format.h} | 0
tools/libxc/{xc_suspend.c => xg_suspend.c} | 0
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 +-
65 files changed, 284 insertions(+), 430 deletions(-)
rename tools/libxc/include/{xc_dom.h => xenctrl_dom.h} (98%)
delete mode 100644 tools/libxc/xc_efi.h
delete mode 100644 tools/libxc/xc_elf.h
rename tools/libxc/{xc_cpuid_x86.c => xg_cpuid_x86.c} (100%)
rename tools/libxc/{xc_dom_arm.c => xg_dom_arm.c} (99%)
rename tools/libxc/{xc_dom_armzimageloader.c => xg_dom_armzimageloader.c} (99%)
rename tools/libxc/{xc_dom_binloader.c => xg_dom_binloader.c} (99%)
rename tools/libxc/{xc_dom_boot.c => xg_dom_boot.c} (99%)
rename tools/libxc/{xc_dom_bzimageloader.c => xg_dom_bzimageloader.c} (99%)
rename tools/libxc/{xc_dom_compat_linux.c => xg_dom_compat_linux.c} (99%)
rename tools/libxc/{xc_dom_core.c => xg_dom_core.c} (99%)
rename tools/libxc/{xc_dom_decompress.h => xg_dom_decompress.h} (62%)
rename tools/libxc/{xc_dom_decompress_lz4.c => xg_dom_decompress_lz4.c} (98%)
rename tools/libxc/{xc_dom_decompress_unsafe.c => xg_dom_decompress_unsafe.c} (96%)
rename tools/libxc/{xc_dom_decompress_unsafe.h => xg_dom_decompress_unsafe.h} (97%)
rename tools/libxc/{xc_dom_decompress_unsafe_bzip2.c => xg_dom_decompress_unsafe_bzip2.c} (87%)
rename tools/libxc/{xc_dom_decompress_unsafe_lzma.c => xg_dom_decompress_unsafe_lzma.c} (87%)
rename tools/libxc/{xc_dom_decompress_unsafe_lzo1x.c => xg_dom_decompress_unsafe_lzo1x.c} (96%)
rename tools/libxc/{xc_dom_decompress_unsafe_xz.c => xg_dom_decompress_unsafe_xz.c} (95%)
rename tools/libxc/{xc_dom_elfloader.c => xg_dom_elfloader.c} (99%)
rename tools/libxc/{xc_dom_hvmloader.c => xg_dom_hvmloader.c} (99%)
rename tools/libxc/{xc_dom_x86.c => xg_dom_x86.c} (99%)
create mode 100644 tools/libxc/xg_domain.c
rename tools/libxc/{xc_nomigrate.c => xg_nomigrate.c} (100%)
rename tools/libxc/{xc_offline_page.c => xg_offline_page.c} (99%)
rename tools/libxc/{xc_sr_common.c => xg_sr_common.c} (99%)
rename tools/libxc/{xc_sr_common.h => xg_sr_common.h} (99%)
rename tools/libxc/{xc_sr_common_x86.c => xg_sr_common_x86.c} (99%)
rename tools/libxc/{xc_sr_common_x86.h => xg_sr_common_x86.h} (98%)
rename tools/libxc/{xc_sr_common_x86_pv.c => xg_sr_common_x86_pv.c} (99%)
rename tools/libxc/{xc_sr_common_x86_pv.h => xg_sr_common_x86_pv.h} (98%)
rename tools/libxc/{xc_sr_restore.c => xg_sr_restore.c} (99%)
rename tools/libxc/{xc_sr_restore_x86_hvm.c => xg_sr_restore_x86_hvm.c} (99%)
rename tools/libxc/{xc_sr_restore_x86_pv.c => xg_sr_restore_x86_pv.c} (99%)
rename tools/libxc/{xc_sr_save.c => xg_sr_save.c} (99%)
rename tools/libxc/{xc_sr_save_x86_hvm.c => xg_sr_save_x86_hvm.c} (99%)
rename tools/libxc/{xc_sr_save_x86_pv.c => xg_sr_save_x86_pv.c} (99%)
rename tools/libxc/{xc_sr_stream_format.h => xg_sr_stream_format.h} (100%)
rename tools/libxc/{xc_suspend.c => xg_suspend.c} (100%)stubdom/grub/kexec.c +1 -1
@@ -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
@@ -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/Makefile +34 -30
92 lines not on this page · raw message
tools/libxc/include/xenctrl_dom.h renamed from tools/libxc/include/xc_dom.h +8 -2
@@ -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_infoint (*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
@@ -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
@@ -60,12 +60,13 @@* */ -#include "xg_private.h" +#include "xc_private.h" #include "xc_core.h" -#include "xc_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
@@ -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
@@ -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
@@ -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 -128
141 lines not on this page · raw message
tools/libxc/xc_efi.h deleted +0 -158
158 lines not on this page · raw message
tools/libxc/xc_elf.h deleted +0 -16
@@ -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>
tools/libxc/xc_hcall_buf.c +0 -1
@@ -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 +1 -2
@@ -18,8 +18,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/xc_private.h +36 -0
@@ -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
@@ -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_cpuid_x86.c renamed from tools/libxc/xc_cpuid_x86.c +0 -0
tools/libxc/xg_dom_arm.c renamed from tools/libxc/xc_dom_arm.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_armzimageloader.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_binloader.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_boot.c +1 -1
@@ -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_bzimageloader.c renamed from tools/libxc/xc_dom_bzimageloader.c +1 -1
@@ -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_compat_linux.c renamed from tools/libxc/xc_dom_compat_linux.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_core.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_decompress.h +2 -2
@@ -1,7 +1,7 @@#ifndef __MINIOS__ -# include "xc_dom.h" +# include "xenctrl_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 renamed from tools/libxc/xc_dom_decompress_lz4.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_decompress_unsafe.c +1 -1
@@ -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 +1 -1
@@ -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_decompress_unsafe_bzip2.c renamed from tools/libxc/xc_dom_decompress_unsafe_bzip2.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_decompress_unsafe_lzma.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_decompress_unsafe_lzo1x.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_decompress_unsafe_xz.c +1 -1
@@ -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_dom_elfloader.c renamed from tools/libxc/xc_dom_elfloader.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_hvmloader.c +1 -1
@@ -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 renamed from tools/libxc/xc_dom_x86.c +1 -1
@@ -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_domain.c new file +149 -0
149 lines not on this page · raw message
tools/libxc/xg_nomigrate.c renamed from tools/libxc/xc_nomigrate.c +0 -0
tools/libxc/xg_offline_page.c renamed from tools/libxc/xc_offline_page.c +1 -1
@@ -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_private.h +0 -22
@@ -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
@@ -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) \
tools/libxc/xg_sr_common.c renamed from tools/libxc/xc_sr_common.c +1 -1
@@ -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 +2 -2
@@ -5,10 +5,10 @@#include "xg_private.h" #include "xg_save_restore.h" -#include "xc_dom.h" +#include "xenctrl_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 renamed from tools/libxc/xc_sr_common_x86.c +1 -1
@@ -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
@@ -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 renamed from tools/libxc/xc_sr_common_x86_pv.c +1 -1
@@ -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
@@ -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 renamed from tools/libxc/xc_sr_restore.c +1 -1
@@ -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 renamed from tools/libxc/xc_sr_restore_x86_hvm.c +1 -1
@@ -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 renamed from tools/libxc/xc_sr_restore_x86_pv.c +1 -1
@@ -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 renamed from tools/libxc/xc_sr_save.c +1 -1
@@ -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 renamed from tools/libxc/xc_sr_save_x86_hvm.c +1 -1
@@ -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 renamed from tools/libxc/xc_sr_save_x86_pv.c +1 -1
@@ -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
tools/libxc/xg_suspend.c renamed from tools/libxc/xc_suspend.c +0 -0
tools/libxl/libxl_arm.c +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.20.1
Re: [PATCH 07/12] tools/libxc: untangle libxenctrl from libxenguest
Ian Jackson writes ("[PATCH 07/12] tools/libxc: untangle libxenctrl from libxenguest"):
Quoted 10 lines
From: Juergen Gross <[email protected]>
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.htoxc_private.h. Additionallyxc_dom.hneeds to be exported, so rename it toxenctrl_dom.h.
Quoted 6 lines
Rename all libxenguest sources from xc_* to xg_*.
Move xc_[un]map_domain_meminfo() fnctions to new source
xg_domain.cas they are defined ininclude/xenguest.hand should be in libxenguest.Remove
xc_efi.handxc_elf.has they aren't used anywhere.
Reviewing this is quite difficult. Is there any way it could be split up ? Perhaps some of it could be generated automatically ? (Eg you could send a patch whose commit message had the perl rune you used to generate it, which would enable a reviewer to see what was supposed to be going on.)
Thanks,
Ian.
PATCH 8/12 tools: move libxenctrl below tools/libs
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
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 | 7 ++
MAINTAINERS | 2 +-
stubdom/Makefile | 29 +++++-
stubdom/mini-os.mk | 2 +-
tools/Makefile | 3 +
tools/Rules.mk | 9 +-
tools/libs/Makefile | 1 +
tools/libs/ctrl/Makefile | 69 +++++++++++++
tools/{libxc => libs/ctrl}/include/xenctrl.h | 0
.../ctrl}/include/xenctrl_compat.h | 0
.../ctrl}/include/xenctrl_dom.h | 0
tools/libs/ctrl/libxenctrl.map | 3 +
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
.../ctrl/xenctrl.pc.in} | 0
tools/libxc/Makefile | 99 +++----------------
tools/libxl/Makefile | 2 +-
tools/misc/Makefile | 1 +
tools/python/Makefile | 2 +-
tools/python/setup.py | 10 +-
63 files changed, 132 insertions(+), 107 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%)
create mode 100644 tools/libs/ctrl/libxenctrl.map
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%)
rename tools/{libxc/xencontrol.pc.in => libs/ctrl/xenctrl.pc.in} (100%).gitignore +7 -0
@@ -114,6 +114,8 @@ tools/libs/hypfs/headers.chk tools/libs/hypfs/xenhypfs.pc tools/libs/call/headers.chk tools/libs/call/xencall.pc +tools/libs/ctrl/_paths.h +tools/libs/ctrl/xenctrl.pc tools/libs/foreignmemory/headers.chk tools/libs/foreignmemory/xenforeignmemory.pc tools/libs/devicemodel/headers.chk
@@ -195,6 +197,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
@@ -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 +24 -5
@@ -351,13 +351,16 @@ libs-$(XEN_TARGET_ARCH)/foreignmemory/stamp: $(XEN_ROOT)/tools/libs/foreignmemor libs-$(XEN_TARGET_ARCH)/devicemodel/stamp: $(XEN_ROOT)/tools/libs/devicemodel/Makefile $(do_links) +libs-$(XEN_TARGET_ARCH)/ctrl/stamp: $(XEN_ROOT)/tools/libs/ctrl/Makefile + $(do_links) + libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile $(do_links) xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile $(do_links) -LINK_LIBS_DIRS := toolcore toollog evtchn gnttab call foreignmemory devicemodel +LINK_LIBS_DIRS := toolcore toollog evtchn gnttab call foreignmemory devicemodel ctrl LINK_DIRS := libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(LINK_LIBS_DIRS),libs-$(XEN_TARGET_ARCH)/$(dir)) LINK_STAMPS := $(foreach dir,$(LINK_DIRS),$(dir)/stamp)
@@ -405,6 +408,7 @@ libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: mk-headers-$(XEN_TARGET_ARCH) $ .PHONY: libxenevtchn libxenevtchn: libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a +libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: libxentoolcore libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/evtchn
@@ -414,6 +418,7 @@ libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-headers-$(XEN_TARGET_ARCH) $(N .PHONY: libxengnttab libxengnttab: libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a +libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: libxentoolcore libxentoollog libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/gnttab
@@ -423,6 +428,7 @@ libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-headers-$(XEN_TARGET_ARCH) $(N .PHONY: libxencall libxencall: libs-$(XEN_TARGET_ARCH)/call/libxencall.a +libs-$(XEN_TARGET_ARCH)/call/libxencall.a: libxentoolcore libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/call
@@ -432,6 +438,7 @@ libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLI .PHONY: libxenforeignmemory libxenforeignmemory: libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a +libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: libxentoolcore libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/foreignmemory
@@ -441,20 +448,31 @@ libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: mk-headers-$(XEN_TA .PHONY: libxendevicemodel libxendevicemodel: libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a +libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: libxentoolcore libxentoollog libxencall libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/devicemodel +####### +####### +# libxenctrl +####### + +.PHONY: libxenctrl +libxenctrl: libs-$(XEN_TARGET_ARCH)/ctrl/libxenctrl.a +libs-$(XEN_TARGET_ARCH)/ctrl/libxenctrl.a: libxentoollog libxencall libxenevtchn libxengnttab libxenforeignmemory libxendevicemodel +libs-$(XEN_TARGET_ARCH)/ctrl/libxenctrl.a: mk-headers-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) + CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libs-$(XEN_TARGET_ARCH)/ctrl + ####### # libxc ####### .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) libxentoolcore 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 #######
@@ -681,6 +699,7 @@ clean: [ ! -e libs-$(XEN_TARGET_ARCH)/call/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/call clean [ ! -e libs-$(XEN_TARGET_ARCH)/foreignmemory/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/foreignmemory clean [ ! -e libs-$(XEN_TARGET_ARCH)/devicemodel/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/devicemodel clean + [ ! -e libs-$(XEN_TARGET_ARCH)/ctrl/Makefile ] || $(MAKE) DESTDIR= -C libs-$(XEN_TARGET_ARCH)/ctrl clean [ ! -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
stubdom/mini-os.mk +1 -1
@@ -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/Makefile +3 -0
@@ -255,6 +255,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find -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/libs/ctrl/include \ -I$(XEN_ROOT)/tools/libxc/include \ -I$(XEN_ROOT)/tools/xenstore/include \ -I$(XEN_ROOT)/tools/xenstore/compat/include \
@@ -266,6 +267,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find -L$(XEN_ROOT)/tools/libs/gnttab \ -L$(XEN_ROOT)/tools/libs/foreignmemory \ -L$(XEN_ROOT)/tools/libs/devicemodel \ + -L$(XEN_ROOT)/tools/libs/ctrl \ -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore \ -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog \ -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/evtchn \
@@ -273,6 +275,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call \ -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory \ -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel \ + -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/ctrl \ $(QEMU_UPSTREAM_RPATH)" \ --bindir=$(LIBEXEC_BIN) \ --datadir=$(SHAREDIR)/qemu-xen \
tools/Rules.mk +4 -5
@@ -20,9 +20,8 @@ XEN_libxencall = $(XEN_ROOT)/tools/libs/call XEN_libxenforeignmemory = $(XEN_ROOT)/tools/libs/foreignmemory XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel XEN_libxenhypfs = $(XEN_ROOT)/tools/libs/hypfs -XEN_libxenctrl = $(XEN_ROOT)/tools/libxc -# Currently libxenguest lives in the same directory as libxenctrl -XEN_libxenguest = $(XEN_libxenctrl) +XEN_libxenctrl = $(XEN_ROOT)/tools/libs/ctrl +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)
@@ -147,7 +146,7 @@ LDLIBS_libxenctrl = $(SHDEPS_libxenctrl) $(XEN_libxenctrl)/libxenctrl$(libextens SHLIB_libxenctrl = $(SHDEPS_libxenctrl) -Wl,-rpath-link=$(XEN_libxenctrl) 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)
@@ -179,7 +178,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/libs/Makefile +1 -0
@@ -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 +69 -0
69 lines not on this page · raw message
tools/libs/ctrl/include/xenctrl.h renamed from tools/libxc/include/xenctrl.h +0 -0
tools/libs/ctrl/include/xenctrl_compat.h renamed from tools/libxc/include/xenctrl_compat.h +0 -0
tools/libs/ctrl/include/xenctrl_dom.h renamed from tools/libxc/include/xenctrl_dom.h +0 -0
tools/libs/ctrl/libxenctrl.map new file +3 -0
@@ -0,0 +1,3 @@ +VERS_4.14.0 { + global: *; /* Expose everything */ +};
tools/libs/ctrl/xc_altp2m.c renamed from tools/libxc/xc_altp2m.c +0 -0
tools/libs/ctrl/xc_arinc653.c renamed from tools/libxc/xc_arinc653.c +0 -0
tools/libs/ctrl/xc_bitops.h renamed from tools/libxc/xc_bitops.h +0 -0
tools/libs/ctrl/xc_core.c renamed from tools/libxc/xc_core.c +0 -0
tools/libs/ctrl/xc_core.h renamed from tools/libxc/xc_core.h +0 -0
tools/libs/ctrl/xc_core_arm.c renamed from tools/libxc/xc_core_arm.c +0 -0
tools/libs/ctrl/xc_core_arm.h renamed from tools/libxc/xc_core_arm.h +0 -0
tools/libs/ctrl/xc_core_x86.c renamed from tools/libxc/xc_core_x86.c +0 -0
tools/libs/ctrl/xc_core_x86.h renamed from tools/libxc/xc_core_x86.h +0 -0
tools/libs/ctrl/xc_cpu_hotplug.c renamed from tools/libxc/xc_cpu_hotplug.c +0 -0
tools/libs/ctrl/xc_cpupool.c renamed from tools/libxc/xc_cpupool.c +0 -0
tools/libs/ctrl/xc_csched.c renamed from tools/libxc/xc_csched.c +0 -0
tools/libs/ctrl/xc_csched2.c renamed from tools/libxc/xc_csched2.c +0 -0
tools/libs/ctrl/xc_devicemodel_compat.c renamed from tools/libxc/xc_devicemodel_compat.c +0 -0
tools/libs/ctrl/xc_domain.c renamed from tools/libxc/xc_domain.c +0 -0
tools/libs/ctrl/xc_evtchn.c renamed from tools/libxc/xc_evtchn.c +0 -0
tools/libs/ctrl/xc_evtchn_compat.c renamed from tools/libxc/xc_evtchn_compat.c +0 -0
tools/libs/ctrl/xc_flask.c renamed from tools/libxc/xc_flask.c +0 -0
tools/libs/ctrl/xc_foreign_memory.c renamed from tools/libxc/xc_foreign_memory.c +0 -0
tools/libs/ctrl/xc_freebsd.c renamed from tools/libxc/xc_freebsd.c +0 -0
tools/libs/ctrl/xc_gnttab.c renamed from tools/libxc/xc_gnttab.c +0 -0
tools/libs/ctrl/xc_gnttab_compat.c renamed from tools/libxc/xc_gnttab_compat.c +0 -0
tools/libs/ctrl/xc_hcall_buf.c renamed from tools/libxc/xc_hcall_buf.c +0 -0
tools/libs/ctrl/xc_kexec.c renamed from tools/libxc/xc_kexec.c +0 -0
tools/libs/ctrl/xc_linux.c renamed from tools/libxc/xc_linux.c +0 -0
tools/libs/ctrl/xc_mem_access.c renamed from tools/libxc/xc_mem_access.c +0 -0
tools/libs/ctrl/xc_mem_paging.c renamed from tools/libxc/xc_mem_paging.c +0 -0
tools/libs/ctrl/xc_memshr.c renamed from tools/libxc/xc_memshr.c +0 -0
tools/libs/ctrl/xc_minios.c renamed from tools/libxc/xc_minios.c +0 -0
tools/libs/ctrl/xc_misc.c renamed from tools/libxc/xc_misc.c +0 -0
tools/libs/ctrl/xc_monitor.c renamed from tools/libxc/xc_monitor.c +0 -0
tools/libs/ctrl/xc_msr_x86.h renamed from tools/libxc/xc_msr_x86.h +0 -0
tools/libs/ctrl/xc_netbsd.c renamed from tools/libxc/xc_netbsd.c +0 -0
tools/libs/ctrl/xc_pagetab.c renamed from tools/libxc/xc_pagetab.c +0 -0
tools/libs/ctrl/xc_physdev.c renamed from tools/libxc/xc_physdev.c +0 -0
tools/libs/ctrl/xc_pm.c renamed from tools/libxc/xc_pm.c +0 -0
tools/libs/ctrl/xc_private.c renamed from tools/libxc/xc_private.c +0 -0
tools/libs/ctrl/xc_private.h renamed from tools/libxc/xc_private.h +0 -0
tools/libs/ctrl/xc_psr.c renamed from tools/libxc/xc_psr.c +0 -0
tools/libs/ctrl/xc_resource.c renamed from tools/libxc/xc_resource.c +0 -0
tools/libs/ctrl/xc_resume.c renamed from tools/libxc/xc_resume.c +0 -0
tools/libs/ctrl/xc_rt.c renamed from tools/libxc/xc_rt.c +0 -0
tools/libs/ctrl/xc_solaris.c renamed from tools/libxc/xc_solaris.c +0 -0
tools/libs/ctrl/xc_tbuf.c renamed from tools/libxc/xc_tbuf.c +0 -0
tools/libs/ctrl/xc_vm_event.c renamed from tools/libxc/xc_vm_event.c +0 -0
tools/libs/ctrl/xenctrl.pc.in renamed from tools/libxc/xencontrol.pc.in +0 -0
tools/libxc/Makefile +11 -88
159 lines not on this page · raw message
tools/libxl/Makefile +1 -1
@@ -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
@@ -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)
tools/python/Makefile +1 -1
@@ -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 ../libxc):$$(readlink -f ../xenstore) $(PYTHON) -m unittest discover .PHONY: clean clean:
tools/python/setup.py +5 -5
@@ -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 ], - libraries = [ "xenctrl", "xenguest" ], - depends = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ], + library_dirs = [ PATH_LIBXENCTRL ], + libraries = [ "xenctrl" ], + depends = [ PATH_LIBXENCTRL + "/libxenctrl.so" ], extra_link_args = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ], sources = [ "xen/lowlevel/xc/xc.c" ])
Signature · 1 line
2.20.1
Re: [PATCH 08/12] tools: move libxenctrl below tools/libs
Ian Jackson writes ("[PATCH 08/12] tools: move libxenctrl below tools/libs"):
Quoted 8 lines
From: Juergen Gross <[email protected]>
Today
tools/libxcneeds to be built aftertools/libsas libxenctrl is depending on some libraries intools/libs. This in turn blocks moving other libraries depending on libxenctrl belowtools/libs.So carve out libxenctrl from
tools/libxcand move it intotools/libs/ctrl.
Again, maybe this could be 1. split the library, 2. move it ? Maybe ?
Ian.
Re: [PATCH 08/12] tools: move libxenctrl below tools/libs
In reply to Ian JacksonIan Jackson, le mer. 15 juil. 2020 17:25:07 +0100, a ecrit:
Quoted 6 lines
From: Juergen Gross <[email protected]>
Today
tools/libxcneeds to be built aftertools/libsas libxenctrl is depending on some libraries intools/libs. This in turn blocks moving other libraries depending on libxenctrl belowtools/libs.
Quoted 7 lines
So carve out libxenctrl from
tools/libxcand move it intotools/libs/ctrl.Signed-off-by Juergen Gross <[email protected]>stubdom/Makefile | 29 +++++- stubdom/mini-os.mk | 2 +-
For that part,
Quoted 15 lines · Ian Jackson
[ NB: this patch series is actually from Juergen Gross.
It is being experiemntally handled as a Merge Reqeust in gitlab, in part to see what problems there are with that workflow that will need extra tooling or whatever.
I have manually generated this series using git-format-patch,
scripts/add_maintainers.pl, and git-send-email. I expect that if we adopt this as a real workflow, we will want to make a robot do some of that.I have set replies to go to the Gitlab comment thread and to xen-devel. Again this is experimental. We are likely to need something to automatically collect acks, at the very least.
Quoted 8 lines
Reviewers: for now, please review this series as normal. You may reply to the messages by email. Please, for now, send your replies to gitlab and to the mailing list. I think I have set the reply-to appropriately.
Alternatively you may review the code in the gitlab web UI. But please do not use the line-by-line comment system: write only to the main MR discussion thread.
Thanks for doing this Ian.
I am curious about this: why not the line-by-line comment system? It looks like it would be the most similar to emails comments. Is it because comments done that way cannot be sent via email while the main MR discussion thread can?
Stefano Stabellini writes ("Re: [PATCH 00/12] tools: move more libraries into tools/libs"):
Quoted 25 lines · Ian Jackson
Quoted 15 lines
[ NB: this patch series is actually from Juergen Gross.
It is being experiemntally handled as a Merge Reqeust in gitlab, in part to see what problems there are with that workflow that will need extra tooling or whatever.
I have manually generated this series using git-format-patch,
scripts/add_maintainers.pl, and git-send-email. I expect that if we adopt this as a real workflow, we will want to make a robot do some of that.I have set replies to go to the Gitlab comment thread and to xen-devel. Again this is experimental. We are likely to need something to automatically collect acks, at the very least.
Quoted 8 lines
Reviewers: for now, please review this series as normal. You may reply to the messages by email. Please, for now, send your replies to gitlab and to the mailing list. I think I have set the reply-to appropriately.
Alternatively you may review the code in the gitlab web UI. But please do not use the line-by-line comment system: write only to the main MR discussion thread.
Quoted 6 lines
Thanks for doing this Ian.
I am curious about this: why not the line-by-line comment system? It looks like it would be the most similar to emails comments. Is it because comments done that way cannot be sent via email while the main MR discussion thread can?
Well, they can sort of go by email but they can't be created by email and the webpage mouse UI is clearly primary for them.
Also they are difficult to archive, so difficult to look at later.
I guess this is an experiemnt, so feel free to try it but be prepared to c&p many messages manually to the list...
Ian.
PATCH 9/12 tools: split libxenstore into new tools/libs/store directory
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
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 | 8 +-
tools/Rules.mk | 2 +-
tools/libs/Makefile | 1 +
tools/libs/store/Makefile | 66 +++++++++++++++
.../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}/xenstore.pc.in | 0
tools/{xenstore => libs/store}/xs.c | 0
tools/python/setup.py | 2 +-
tools/xenstore/Makefile | 82 +------------------
tools/xenstore/{include => }/xenstore_lib.h | 0
15 files changed, 133 insertions(+), 86 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}/xenstore.pc.in (100%)
rename tools/{xenstore => libs/store}/xs.c (100%)
rename tools/xenstore/{include => }/xenstore_lib.h (100%).gitignore +6 -1
@@ -120,6 +120,12 @@ tools/libs/foreignmemory/headers.chk tools/libs/foreignmemory/xenforeignmemory.pc tools/libs/devicemodel/headers.chk tools/libs/devicemodel/xendevicemodel.pc +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
@@ -280,7 +286,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
@@ -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 +4 -4
@@ -47,7 +47,7 @@ SUBDIRS-$(OCAML_TOOLS) += ocaml endif ifeq ($(CONFIG_RUMP),y) -SUBDIRS-y := libs libxc xenstore +SUBDIRS-y := libs libxc endif # For the sake of linking, set the sys-root
@@ -256,12 +256,12 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find -I$(XEN_ROOT)/tools/libs/foreignmemory/include \ -I$(XEN_ROOT)/tools/libs/devicemodel/include \ -I$(XEN_ROOT)/tools/libs/ctrl/include \ + -I$(XEN_ROOT)/tools/libs/store/include \ + -I$(XEN_ROOT)/tools/libs/store/compat/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/store \ -L$(XEN_ROOT)/tools/libs/toolcore \ -L$(XEN_ROOT)/tools/libs/evtchn \ -L$(XEN_ROOT)/tools/libs/gnttab \
tools/Rules.mk +1 -1
@@ -21,11 +21,11 @@ XEN_libxenforeignmemory = $(XEN_ROOT)/tools/libs/foreignmemory XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel XEN_libxenhypfs = $(XEN_ROOT)/tools/libs/hypfs XEN_libxenctrl = $(XEN_ROOT)/tools/libs/ctrl +XEN_libxenstore = $(XEN_ROOT)/tools/libs/store 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) -XEN_libxenstore = $(XEN_ROOT)/tools/xenstore XEN_libxenstat = $(XEN_ROOT)/tools/xenstat/libxenstat/src XEN_libxenvchan = $(XEN_ROOT)/tools/libvchan
tools/libs/Makefile +1 -0
@@ -11,6 +11,7 @@ SUBDIRS-y += foreignmemory SUBDIRS-y += devicemodel SUBDIRS-y += ctrl SUBDIRS-y += hypfs +SUBDIRS-y += store ifeq ($(CONFIG_RUMP),y) SUBDIRS-y := toolcore
tools/libs/store/Makefile new file +66 -0
66 lines not on this page · raw message
tools/libs/store/include/compat/xs.h renamed from tools/xenstore/include/compat/xs.h +0 -0
tools/libs/store/include/compat/xs_lib.h renamed from tools/xenstore/include/compat/xs_lib.h +0 -0
tools/libs/store/include/xenstore.h renamed from tools/xenstore/include/xenstore.h +0 -0
tools/libs/store/libxenstore.map new file +49 -0
49 lines not on this page · raw message
tools/libs/store/xenstore.pc.in renamed from tools/xenstore/xenstore.pc.in +0 -0
tools/libs/store/xs.c renamed from tools/xenstore/xs.c +0 -0
tools/python/setup.py +1 -1
@@ -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 -78
121 lines not on this page · raw message
tools/xenstore/xenstore_lib.h renamed from tools/xenstore/include/xenstore_lib.h +0 -0
Signature · 1 line
2.20.1
PATCH 10/12 tools: split libxenvchan into new tools/libs/vchan directory
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
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 | 7 +-
tools/Makefile | 2 +-
tools/Rules.mk | 4 +-
tools/libs/Makefile | 1 +
tools/libs/vchan/Makefile | 19 ++++
.../vchan/include}/libxenvchan.h | 0
tools/{libvchan => libs/vchan}/init.c | 0
tools/{libvchan => libs/vchan}/io.c | 0
tools/libs/vchan/libxenvchan.map | 16 ++++
tools/{libvchan => libs/vchan}/xenvchan.pc.in | 0
tools/libvchan/Makefile | 95 -------------------
tools/vchan/Makefile | 37 ++++++++
tools/{libvchan => vchan}/node-select.c | 0
tools/{libvchan => vchan}/node.c | 0
.../{libvchan => vchan}/vchan-socket-proxy.c | 0
15 files changed, 80 insertions(+), 101 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%)
create mode 100644 tools/libs/vchan/libxenvchan.map
rename tools/{libvchan => libs/vchan}/xenvchan.pc.in (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 +4 -3
@@ -126,6 +126,8 @@ 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/xenvchan.pc tools/console/xenconsole tools/console/xenconsoled tools/console/client/_paths.h
@@ -201,7 +203,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/libxc/*.pc tools/libxc/xc_bitops.h tools/libxc/xc_core.h
@@ -387,8 +388,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
@@ -21,7 +21,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 +2 -2
@@ -22,12 +22,12 @@ XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel XEN_libxenhypfs = $(XEN_ROOT)/tools/libs/hypfs XEN_libxenctrl = $(XEN_ROOT)/tools/libs/ctrl XEN_libxenstore = $(XEN_ROOT)/tools/libs/store +XEN_libxenvchan = $(XEN_ROOT)/tools/libs/vchan 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) XEN_libxenstat = $(XEN_ROOT)/tools/xenstat/libxenstat/src -XEN_libxenvchan = $(XEN_ROOT)/tools/libvchan CFLAGS_xeninclude = -I$(XEN_INCLUDE)
@@ -163,7 +163,7 @@ 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) +CFLAGS_libxenvchan = -I$(XEN_libxenvchan)/include $(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)
tools/libs/Makefile +1 -0
@@ -12,6 +12,7 @@ SUBDIRS-y += devicemodel SUBDIRS-y += ctrl SUBDIRS-y += hypfs SUBDIRS-y += store +SUBDIRS-$(CONFIG_Linux) += vchan ifeq ($(CONFIG_RUMP),y) SUBDIRS-y := toolcore
tools/libs/vchan/Makefile new file +19 -0
@@ -0,0 +1,19 @@ +XEN_ROOT = $(CURDIR)/../../.. +include $(XEN_ROOT)/tools/Rules.mk + +MAJOR = 4.14 +MINOR = 0 +LIBNAME := vchan +USELIBS := toollog store evtchn gnttab + +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)
tools/libs/vchan/include/libxenvchan.h renamed from tools/libvchan/libxenvchan.h +0 -0
tools/libs/vchan/init.c renamed from tools/libvchan/init.c +0 -0
tools/libs/vchan/io.c renamed from tools/libvchan/io.c +0 -0
tools/libs/vchan/libxenvchan.map new file +16 -0
@@ -0,0 +1,16 @@ +VERS_4.14.0 { + global: + libxenvchan_server_init; + libxenvchan_client_init; + libxenvchan_close; + libxenvchan_recv; + libxenvchan_read; + libxenvchan_send; + libxenvchan_write; + libxenvchan_wait; + libxenvchan_fd_for_select; + libxenvchan_is_open; + libxenvchan_data_ready; + libxenvchan_buffer_space; + local: *; /* Do not expose anything by default */ +};
tools/libs/vchan/xenvchan.pc.in renamed from tools/libvchan/xenvchan.pc.in +0 -0
tools/libvchan/Makefile deleted +0 -95
95 lines not on this page · raw message
tools/vchan/Makefile new file +37 -0
@@ -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
tools/vchan/node.c renamed from tools/libvchan/node.c +0 -0
tools/vchan/vchan-socket-proxy.c renamed from tools/libvchan/vchan-socket-proxy.c +0 -0
Signature · 1 line
2.20.1
PATCH 11/12 tools: split libxenstat into new tools/libs/stat directory
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
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 | 7 +-
tools/Makefile | 2 +-
tools/Rules.mk | 4 +-
tools/libs/Makefile | 1 +
.../{xenstat/libxenstat => libs/stat}/COPYING | 0
.../libxenstat => libs/stat}/Makefile | 98 ++++---------------
.../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 +
tools/libs/stat/libxenstat.map | 54 ++++++++++
.../libxenstat/src => libs/stat}/xenstat.c | 0
.../libxenstat => libs/stat}/xenstat.pc.in | 2 +-
.../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/xenstat/Makefile | 10 --
tools/{xenstat => }/xentop/Makefile | 2 +-
tools/{xenstat => }/xentop/TODO | 0
tools/{xenstat => }/xentop/xentop.c | 0
23 files changed, 90 insertions(+), 97 deletions(-)
rename tools/{xenstat/libxenstat => libs/stat}/COPYING (100%)
rename tools/{xenstat/libxenstat => libs/stat}/Makefile (56%)
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%)
create mode 100644 tools/libs/stat/libxenstat.map
rename tools/{xenstat/libxenstat/src => libs/stat}/xenstat.c (100%)
rename tools/{xenstat/libxenstat => libs/stat}/xenstat.pc.in (82%)
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 +4 -3
@@ -120,6 +120,9 @@ tools/libs/foreignmemory/headers.chk tools/libs/foreignmemory/xenforeignmemory.pc tools/libs/devicemodel/headers.chk tools/libs/devicemodel/xendevicemodel.pc +tools/libs/stat/_paths.h +tools/libs/stat/headers.chk +tools/libs/stat/xenstat.pc tools/libs/store/headers.chk tools/libs/store/list.h tools/libs/store/utils.h
@@ -273,9 +276,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
@@ -288,6 +288,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
@@ -18,7 +18,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 +2 -2
@@ -22,12 +22,12 @@ XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel XEN_libxenhypfs = $(XEN_ROOT)/tools/libs/hypfs XEN_libxenctrl = $(XEN_ROOT)/tools/libs/ctrl XEN_libxenstore = $(XEN_ROOT)/tools/libs/store +XEN_libxenstat = $(XEN_ROOT)/tools/libs/stat XEN_libxenvchan = $(XEN_ROOT)/tools/libs/vchan 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) -XEN_libxenstat = $(XEN_ROOT)/tools/xenstat/libxenstat/src CFLAGS_xeninclude = -I$(XEN_INCLUDE)
@@ -158,7 +158,7 @@ ifeq ($(CONFIG_Linux),y) LDLIBS_libxenstore += -ldl endif -CFLAGS_libxenstat = -I$(XEN_libxenstat) +CFLAGS_libxenstat = -I$(XEN_libxenstat)/include SHDEPS_libxenstat = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) LDLIBS_libxenstat = $(SHDEPS_libxenstat) $(XEN_libxenstat)/libxenstat$(libextension) SHLIB_libxenstat = $(SHDEPS_libxenstat) -Wl,-rpath-link=$(XEN_libxenstat)
tools/libs/Makefile +1 -0
@@ -12,6 +12,7 @@ SUBDIRS-y += devicemodel SUBDIRS-y += ctrl 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
tools/libs/stat/Makefile renamed from tools/xenstat/libxenstat/Makefile +21 -77
124 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
tools/libs/stat/bindings/swig/python/.empty renamed from tools/xenstat/libxenstat/bindings/swig/python/.empty +0 -0
tools/libs/stat/bindings/swig/xenstat.i renamed from tools/xenstat/libxenstat/bindings/swig/xenstat.i +0 -0
tools/libs/stat/include/xenstat.h renamed from tools/xenstat/libxenstat/src/xenstat.h +3 -0
@@ -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/libxenstat.map new file +54 -0
54 lines not on this page · raw message
tools/libs/stat/xenstat.c renamed from tools/xenstat/libxenstat/src/xenstat.c +0 -0
tools/libs/stat/xenstat.pc.in renamed from tools/xenstat/libxenstat/xenstat.pc.in +1 -1
@@ -7,4 +7,4 @@ Description: The Xenstat library for Xen hypervisor Version: @@version@@ Cflags: -I${includedir} Libs: @@libsflag@@${libdir} -lxenstat -Requires.private: xencontrol,xenstore +Requires.private: xencontrol,xenstore,yajl
tools/libs/stat/xenstat_freebsd.c renamed from tools/xenstat/libxenstat/src/xenstat_freebsd.c +0 -0
tools/libs/stat/xenstat_linux.c renamed from tools/xenstat/libxenstat/src/xenstat_linux.c +2 -2
@@ -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
tools/libs/stat/xenstat_priv.h renamed from tools/xenstat/libxenstat/src/xenstat_priv.h +0 -0
tools/libs/stat/xenstat_qmp.c renamed from tools/xenstat/libxenstat/src/xenstat_qmp.c +0 -0
tools/libs/stat/xenstat_solaris.c renamed from tools/xenstat/libxenstat/src/xenstat_solaris.c +0 -0
tools/xenstat/Makefile deleted +0 -10
@@ -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
@@ -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
tools/xentop/xentop.c renamed from tools/xenstat/xentop/xentop.c +0 -0
Signature · 1 line
2.20.1
PATCH 12/12 tools: generate most contents of library make variables
In reply to Ian JacksonFrom: Juergen Gross <[email protected]>
Library related make variables (CFLAGS_lib*, SHDEPS_lib*, LDLIBS_lib* and SHLIB_lib*) mostly have a common pattern for their values. Generate most of this content automatically by adding a new per-library variable defining on which other libraries a lib is depending. This in turn makes it possible to drop the USELIB variable from each library Makefile.
--- tools/Rules.mk | 103 ++++++++++-------------------- tools/libs/call/Makefile | 1 - tools/libs/ctrl/Makefile | 1 - tools/libs/devicemodel/Makefile | 1 - tools/libs/evtchn/Makefile | 1 - tools/libs/foreignmemory/Makefile | 1 - tools/libs/gnttab/Makefile | 1 - tools/libs/hypfs/Makefile | 1 - tools/libs/libs.mk | 5 +- tools/libs/stat/Makefile | 1 - tools/libs/store/Makefile | 1 - tools/libs/vchan/Makefile | 1 - 12 files changed, 35 insertions(+), 83 deletions(-)
tools/Rules.mk +33 -70
@@ -12,18 +12,38 @@ INSTALL = $(XEN_ROOT)/tools/cross-install LDFLAGS += $(PREPEND_LDFLAGS_XEN_TOOLS) XEN_INCLUDE = $(XEN_ROOT)/tools/include -XEN_libxentoolcore = $(XEN_ROOT)/tools/libs/toolcore -XEN_libxentoollog = $(XEN_ROOT)/tools/libs/toollog -XEN_libxenevtchn = $(XEN_ROOT)/tools/libs/evtchn -XEN_libxengnttab = $(XEN_ROOT)/tools/libs/gnttab -XEN_libxencall = $(XEN_ROOT)/tools/libs/call -XEN_libxenforeignmemory = $(XEN_ROOT)/tools/libs/foreignmemory -XEN_libxendevicemodel = $(XEN_ROOT)/tools/libs/devicemodel -XEN_libxenhypfs = $(XEN_ROOT)/tools/libs/hypfs -XEN_libxenctrl = $(XEN_ROOT)/tools/libs/ctrl -XEN_libxenstore = $(XEN_ROOT)/tools/libs/store -XEN_libxenstat = $(XEN_ROOT)/tools/libs/stat -XEN_libxenvchan = $(XEN_ROOT)/tools/libs/vchan + +LIBS_LIBS += toolcore +USELIBS_toolcore := +LIBS_LIBS += toollog +USELIBS_toollog := +LIBS_LIBS += evtchn +USELIBS_evtchn := toollog toolcore +LIBS_LIBS += gnttab +USELIBS_gnttab := toollog toolcore +LIBS_LIBS += call +USELIBS_call := toollog toolcore +LIBS_LIBS += foreignmemory +USELIBS_foreignmemory := toollog toolcore +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 +LIBS_LIBS += store +USELIBS_store := toolcore +LIBS_LIBS += stat +USELIBS_stat := ctrl store +LIBS_LIBS += vchan +USELIBS_vchan := toollog store gnttab evtchn + +$(foreach lib,$(LIBS_LIBS),$(eval XEN_libxen$(lib) = $(XEN_ROOT)/tools/libs/$(lib))) +$(foreach lib,$(LIBS_LIBS),$(eval CFLAGS_libxen$(lib) = -I$(XEN_libxen$(lib))/include $(CFLAGS_xeninclude))) +$(foreach lib,$(LIBS_LIBS),$(eval SHDEPS_libxen$(lib) = $(foreach use,$(USELIBS_$(lib)),$(SHLIB_libxen$(use))))) +$(foreach lib,$(LIBS_LIBS),$(eval LDLIBS_libxen$(lib) = $(SHDEPS_libxen$(lib)) $(XEN_libxen$(lib))/libxen$(lib)$(libextension))) +$(foreach lib,$(LIBS_LIBS),$(eval SHLIB_libxen$(lib) = $(SHDEPS_libxen$(lib)) -Wl,-rpath-link=$(XEN_libxen$(lib)))) + XEN_libxenguest = $(XEN_ROOT)/tools/libxc XEN_libxenlight = $(XEN_ROOT)/tools/libxl # Currently libxlutil lives in the same directory as libxenlight
@@ -98,76 +118,19 @@ endif # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or # $(SHLIB_libfoo) -CFLAGS_libxentoollog = -I$(XEN_libxentoollog)/include $(CFLAGS_xeninclude) -SHDEPS_libxentoollog = -LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_libxentoollog)/libxentoollog$(libextension) -SHLIB_libxentoollog = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_libxentoollog) - -CFLAGS_libxentoolcore = -I$(XEN_libxentoolcore)/include $(CFLAGS_xeninclude) -SHDEPS_libxentoolcore = -LDLIBS_libxentoolcore = $(SHDEPS_libxentoolcore) $(XEN_libxentoolcore)/libxentoolcore$(libextension) -SHLIB_libxentoolcore = $(SHDEPS_libxentoolcore) -Wl,-rpath-link=$(XEN_libxentoolcore) - -CFLAGS_libxenevtchn = -I$(XEN_libxenevtchn)/include $(CFLAGS_xeninclude) -SHDEPS_libxenevtchn = $(SHLIB_libxentoolcore) -LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_libxenevtchn)/libxenevtchn$(libextension) -SHLIB_libxenevtchn = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_libxenevtchn) - -CFLAGS_libxengnttab = -I$(XEN_libxengnttab)/include $(CFLAGS_xeninclude) -SHDEPS_libxengnttab = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) -LDLIBS_libxengnttab = $(SHDEPS_libxengnttab) $(XEN_libxengnttab)/libxengnttab$(libextension) -SHLIB_libxengnttab = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_libxengnttab) - -CFLAGS_libxencall = -I$(XEN_libxencall)/include $(CFLAGS_xeninclude) -SHDEPS_libxencall = $(SHLIB_libxentoolcore) -LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_libxencall)/libxencall$(libextension) -SHLIB_libxencall = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_libxencall) - -CFLAGS_libxenforeignmemory = -I$(XEN_libxenforeignmemory)/include $(CFLAGS_xeninclude) -SHDEPS_libxenforeignmemory = $(SHLIB_libxentoolcore) -LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_libxenforeignmemory)/libxenforeignmemory$(libextension) -SHLIB_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_libxenforeignmemory) - -CFLAGS_libxendevicemodel = -I$(XEN_libxendevicemodel)/include $(CFLAGS_xeninclude) -SHDEPS_libxendevicemodel = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall) -LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_libxendevicemodel)/libxendevicemodel$(libextension) -SHLIB_libxendevicemodel = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_libxendevicemodel) - -CFLAGS_libxenhypfs = -I$(XEN_libxenhypfs)/include $(CFLAGS_xeninclude) -SHDEPS_libxenhypfs = $(SHLIB_libxentoollog) $(SHLIB_libxentoolcore) $(SHLIB_libxencall) -LDLIBS_libxenhypfs = $(SHDEPS_libxenhypfs) $(XEN_libxenhypfs)/libxenhypfs$(libextension) -SHLIB_libxenhypfs = $(SHDEPS_libxenhypfs) -Wl,-rpath-link=$(XEN_libxenhypfs) - # 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) $(SHLIB_libxenctrl) LDLIBS_libxenguest = $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxenguest$(libextension) SHLIB_libxenguest = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_libxenguest) -CFLAGS_libxenstore = -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude) -SHDEPS_libxenstore = $(SHLIB_libxentoolcore) -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 -CFLAGS_libxenstat = -I$(XEN_libxenstat)/include -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)/include $(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/call/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 LIBNAME := call -USELIBS := toollog toolcore SRCS-y += core.c buffer.c SRCS-$(CONFIG_Linux) += linux.c
tools/libs/ctrl/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4.14 MINOR = 0 LIBNAME := ctrl -USELIBS := toollog call evtchn gnttab foreignmemory devicemodel SRCS-y += xc_altp2m.c SRCS-y += xc_core.c
tools/libs/devicemodel/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 3 LIBNAME := devicemodel -USELIBS := toollog toolcore call SRCS-y += core.c SRCS-$(CONFIG_Linux) += linux.c
tools/libs/evtchn/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 1 LIBNAME := evtchn -USELIBS := toollog toolcore SRCS-y += core.c SRCS-$(CONFIG_Linux) += linux.c
tools/libs/foreignmemory/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 3 LIBNAME := foreignmemory -USELIBS := toollog toolcore SRCS-y += core.c SRCS-$(CONFIG_Linux) += linux.c
tools/libs/gnttab/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 LIBNAME := gnttab -USELIBS := toollog toolcore SRCS-GNTTAB += gnttab_core.c SRCS-GNTSHR += gntshr_core.c
tools/libs/hypfs/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 LIBNAME := hypfs -USELIBS := toollog toolcore call APPEND_LDFLAGS += -lz
tools/libs/libs.mk +2 -3
@@ -4,15 +4,14 @@ # LIBNAME: name of lib to build, will be prepended with "libxen" # MAJOR: major version of lib # MINOR: minor version of lib -# USELIBS: xen libs to use (e.g. "toolcore toollog") SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map CFLAGS += -Werror -Wmissing-prototypes CFLAGS += -I./include $(CFLAGS_xeninclude) -CFLAGS += $(foreach lib, $(USELIBS), $(CFLAGS_libxen$(lib))) +CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) -LDUSELIBS = $(foreach lib, $(USELIBS), $(LDLIBS_libxen$(lib))) +LDUSELIBS = $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib))) LIB_OBJS := $(SRCS-y:.c=.o) PIC_OBJS := $(SRCS-y:.c=.opic)
tools/libs/stat/Makefile +0 -1
@@ -18,7 +18,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4.14 MINOR = 0 LIBNAME := stat -USELIBS := ctrl store CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -include $(XEN_ROOT)/tools/config.h
tools/libs/store/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 3.0 MINOR = 3 LIBNAME := store -USELIBS := toolcore ifeq ($(CONFIG_Linux),y) APPEND_LDFLAGS += -ldl
tools/libs/vchan/Makefile +0 -1
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4.14 MINOR = 0 LIBNAME := vchan -USELIBS := toollog store evtchn gnttab CFLAGS += $(CFLAGS_libxenctrl)
Signature · 1 line
2.20.1