* [PATCH v3 0/4] stubdom: remove building unused libraries
@ 2026-09-22 7:27 Juergen Gross
2026-09-22 7:27 ` [PATCH v3 1/4] tools/libxenguest: remove Mini-OS specific parts Juergen Gross
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Juergen Gross @ 2026-09-22 7:27 UTC (permalink / raw)
To: xen-devel
Cc: Juergen Gross, Anthony PERARD, Samuel Thibault, Oleksii Kurochko,
Community Manager
Pciutils and zlib are no longer used by any stubdom since removal of
grub-pv, so they can be removed from the stubdom build system.
Changes in V2:
- removed patch 1 of V1 as already applied
- added new patch 1 from another series which was not yet applied
- switched sequence of patches (swapped patch 2 and 3), as the drop
of pciutils is still under discussion
Changes in V3:
- undo the patch swap of V2 due to patch dependencies
- add comment in patch 2 pointing at upstream pciutils
Juergen Gross (4):
tools/libxenguest: remove Mini-OS specific parts
stubdom: remove pciutils
stubdom: remove build of zlib
CHANGELOG: add removal of grub-pv
CHANGELOG.md | 2 +
config/Stubdom.mk.in | 6 -
stubdom/.gitignore | 2 -
stubdom/Makefile | 56 +---
stubdom/configure | 36 ---
stubdom/configure.ac | 2 -
stubdom/libpci.config.h | 5 -
stubdom/libpci.config.mak | 7 -
stubdom/pciutils.patch | 298 ------------------
tools/libs/guest/Makefile.common | 15 -
tools/libs/guest/xg_dom_decompress_unsafe.c | 48 ---
tools/libs/guest/xg_dom_decompress_unsafe.h | 28 --
.../guest/xg_dom_decompress_unsafe_bzip2.c | 14 -
.../libs/guest/xg_dom_decompress_unsafe_lz4.c | 39 ---
.../guest/xg_dom_decompress_unsafe_lzma.c | 14 -
.../guest/xg_dom_decompress_unsafe_lzo1x.c | 44 ---
.../libs/guest/xg_dom_decompress_unsafe_xz.c | 46 ---
.../guest/xg_dom_decompress_unsafe_zstd.c | 44 ---
18 files changed, 7 insertions(+), 699 deletions(-)
delete mode 100644 stubdom/libpci.config.h
delete mode 100644 stubdom/libpci.config.mak
delete mode 100644 stubdom/pciutils.patch
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe.c
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe.h
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_lz4.c
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_lzma.c
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_xz.c
delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v3 1/4] tools/libxenguest: remove Mini-OS specific parts 2026-09-22 7:27 [PATCH v3 0/4] stubdom: remove building unused libraries Juergen Gross @ 2026-09-22 7:27 ` Juergen Gross 2026-09-22 7:27 ` [PATCH v3 2/4] stubdom: remove pciutils Juergen Gross ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Juergen Gross @ 2026-09-22 7:27 UTC (permalink / raw) To: xen-devel; +Cc: Juergen Gross, Anthony PERARD, Andrew Cooper The last Mini-OS use case of libxenguest is gone, so remove the Mini-OS specific parts of libxenguest. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> --- tools/libs/guest/Makefile.common | 15 ------ tools/libs/guest/xg_dom_decompress_unsafe.c | 48 ------------------- tools/libs/guest/xg_dom_decompress_unsafe.h | 28 ----------- .../guest/xg_dom_decompress_unsafe_bzip2.c | 14 ------ .../libs/guest/xg_dom_decompress_unsafe_lz4.c | 39 --------------- .../guest/xg_dom_decompress_unsafe_lzma.c | 14 ------ .../guest/xg_dom_decompress_unsafe_lzo1x.c | 44 ----------------- .../libs/guest/xg_dom_decompress_unsafe_xz.c | 46 ------------------ .../guest/xg_dom_decompress_unsafe_zstd.c | 44 ----------------- 9 files changed, 292 deletions(-) delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe.c delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe.h delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_lz4.c delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_lzma.c delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_xz.c delete mode 100644 tools/libs/guest/xg_dom_decompress_unsafe_zstd.c diff --git a/tools/libs/guest/Makefile.common b/tools/libs/guest/Makefile.common index 86b1f160e5..47b3a52360 100644 --- a/tools/libs/guest/Makefile.common +++ b/tools/libs/guest/Makefile.common @@ -1,8 +1,3 @@ -ifeq ($(CONFIG_LIBXC_MINIOS),y) -# Save/restore of a domain is currently incompatible with a stubdom environment -override CONFIG_MIGRATE := n -endif - OBJS-y += xg_private.o OBJS-y += xg_domain.o OBJS-y += xg_suspend.o @@ -55,16 +50,6 @@ OBJS-$(CONFIG_X86) += xg_dom_x86.o OBJS-$(CONFIG_X86) += xg_cpuid_x86.o OBJS-$(CONFIG_ARM) += xg_dom_arm.o -ifeq ($(CONFIG_LIBXC_MINIOS),y) -OBJS-y += xg_dom_decompress_unsafe.o -OBJS-y += xg_dom_decompress_unsafe_bzip2.o -OBJS-y += xg_dom_decompress_unsafe_lz4.o -OBJS-y += xg_dom_decompress_unsafe_lzma.o -OBJS-y += xg_dom_decompress_unsafe_lzo1x.o -OBJS-y += xg_dom_decompress_unsafe_xz.o -OBJS-y += xg_dom_decompress_unsafe_zstd.o -endif - CFLAGS += -D__XEN_TOOLS__ CFLAGS += -include $(XEN_ROOT)/tools/config.h CFLAGS += -iquote ../../../xen/common/libelf diff --git a/tools/libs/guest/xg_dom_decompress_unsafe.c b/tools/libs/guest/xg_dom_decompress_unsafe.c deleted file mode 100644 index 21d964787d..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe.c +++ /dev/null @@ -1,48 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <inttypes.h> - -#include "xg_private.h" -#include "xg_dom_decompress_unsafe.h" - -static struct xc_dom_image *unsafe_dom; -static unsigned char *output_blob; -static unsigned int output_size; - -static void unsafe_error(const char *msg) -{ - xc_dom_panic(unsafe_dom->xch, XC_INVALID_KERNEL, "%s", msg); -} - -static int unsafe_flush(void *src, unsigned int size) -{ - void *n = realloc(output_blob, output_size + size); - if (!n) - return -1; - output_blob = n; - - memcpy(&output_blob[output_size], src, size); - output_size += size; - return size; -} - -int xc_dom_decompress_unsafe( - decompress_fn fn, struct xc_dom_image *dom, void **blob, size_t *size) -{ - int ret; - - unsafe_dom = dom; - output_blob = NULL; - output_size = 0; - - ret = fn(dom->kernel_blob, dom->kernel_size, NULL, unsafe_flush, NULL, NULL, unsafe_error); - - if (ret) - free(output_blob); - else { - *blob = output_blob; - *size = output_size; - } - - return ret; -} diff --git a/tools/libs/guest/xg_dom_decompress_unsafe.h b/tools/libs/guest/xg_dom_decompress_unsafe.h deleted file mode 100644 index 5bc2222076..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifdef __MINIOS__ -# include "../../xen/include/xen/decompress.h" -#else -typedef int decompress_fn(unsigned char *inbuf, unsigned int len, - int (*fill)(void*, unsigned int), - int (*flush)(void*, unsigned int), - unsigned char *outbuf, unsigned int *posp, - void (*error)(const char *x)); -#endif - -#define cf_check /* No Control Flow Integriy checking */ - -int xc_dom_decompress_unsafe( - decompress_fn fn, struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); - -int xc_try_bzip2_decode(struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); -int xc_try_lz4_decode(struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); -int xc_try_lzma_decode(struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); -int xc_try_lzo1x_decode(struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); -int xc_try_xz_decode(struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); -int xc_try_zstd_decode(struct xc_dom_image *dom, void **blob, size_t *size) - __attribute__((visibility("internal"))); diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c b/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c deleted file mode 100644 index 9d3709e6cc..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <inttypes.h> - -#include "xg_private.h" -#include "xg_dom_decompress_unsafe.h" - -#include "../../xen/common/bunzip2.c" - -int xc_try_bzip2_decode( - struct xc_dom_image *dom, void **blob, size_t *size) -{ - return xc_dom_decompress_unsafe(bunzip2, dom, blob, size); -} diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c b/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c deleted file mode 100644 index 405143aa61..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c +++ /dev/null @@ -1,39 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <inttypes.h> -#include <stdint.h> - -#include INCLUDE_ENDIAN_H - -#define XG_NEED_UNALIGNED -#include "xg_private.h" -#include "xg_dom_decompress.h" - -#define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS - -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; - -#define likely(a) a -#define unlikely(a) a - -static inline uint16_t le16_to_cpu(uint16_t v) -{ -#if BYTE_ORDER == BIG_ENDIAN - return __builtin_bswap16(v); -#else - return v; -#endif -} - -#include "../../xen/include/xen/lz4.h" -#include "../../xen/common/decompress.h" -#include "../../xen/common/unlz4.c" - -int xc_try_lz4_decode( - struct xc_dom_image *dom, void **blob, size_t *size) -{ - return xc_dom_decompress_unsafe(unlz4, dom, blob, size); -} diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c deleted file mode 100644 index 5d178f0c43..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <inttypes.h> - -#include "xg_private.h" -#include "xg_dom_decompress_unsafe.h" - -#include "../../xen/common/unlzma.c" - -int xc_try_lzma_decode( - struct xc_dom_image *dom, void **blob, size_t *size) -{ - return xc_dom_decompress_unsafe(unlzma, dom, blob, size); -} diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c deleted file mode 100644 index 356f228718..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c +++ /dev/null @@ -1,44 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <inttypes.h> -#include INCLUDE_ENDIAN_H -#include <stdint.h> - -#include "xg_private.h" -#include "xg_dom_decompress_unsafe.h" - -typedef uint8_t u8; -typedef uint32_t u32; -typedef uint16_t u16; -typedef uint64_t u64; - -#define likely(a) a -#define noinline -#define unlikely(a) a - -static inline uint16_t be16_to_cpu(const uint16_t v) -{ -#if BYTE_ORDER == LITTLE_ENDIAN - return __builtin_bswap16(v); -#else - return v; -#endif -} - -static inline uint32_t be32_to_cpu(const uint32_t v) -{ -#if BYTE_ORDER == LITTLE_ENDIAN - return __builtin_bswap32(v); -#else - return v; -#endif -} - -#include "../../xen/common/lzo.c" -#include "../../xen/common/unlzo.c" - -int xc_try_lzo1x_decode( - struct xc_dom_image *dom, void **blob, size_t *size) -{ - return xc_dom_decompress_unsafe(unlzo, dom, blob, size); -} diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c deleted file mode 100644 index 0501f7f693..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c +++ /dev/null @@ -1,46 +0,0 @@ -#include <stdio.h> -#include INCLUDE_ENDIAN_H -#include <stdlib.h> -#include <stddef.h> -#include <stdint.h> -#include <inttypes.h> - -#include "xg_private.h" -#include "xg_dom_decompress_unsafe.h" - -// TODO -#define XZ_DEC_X86 - -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint32_t __le32; - -static inline uint32_t cpu_to_le32(const uint32_t v) -{ -#if BYTE_ORDER == BIG_ENDIAN - return __builtin_bswap32(v); -#else - return v; -#endif -} - -static inline uint32_t le32_to_cpu(const uint32_t v) -{ -#if BYTE_ORDER == BIG_ENDIAN - return __builtin_bswap32(v); -#else - return v; -#endif -} - -#define __force -#define always_inline - -#include "../../xen/common/unxz.c" - -int xc_try_xz_decode( - struct xc_dom_image *dom, void **blob, size_t *size) -{ - return xc_dom_decompress_unsafe(unxz, dom, blob, size); -} diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c deleted file mode 100644 index 319816a390..0000000000 --- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c +++ /dev/null @@ -1,44 +0,0 @@ -#include <stdio.h> -#include INCLUDE_ENDIAN_H -#include <stdlib.h> -#include <stddef.h> -#include <stdint.h> -#include <inttypes.h> - -#include "xg_private.h" -#include "xg_dom_decompress_unsafe.h" - -typedef uint8_t u8; - -typedef uint16_t __u16; -typedef uint32_t __u32; -typedef uint64_t __u64; - -typedef uint16_t __le16; -typedef uint32_t __le32; -typedef uint64_t __le64; - -typedef uint16_t __be16; -typedef uint32_t __be32; -typedef uint64_t __be64; - -#define attr_const -#define __force -#define always_inline -#define noinline -#define __packed __attribute__((__packed__)) - -#undef ERROR - -#define __TYPES_H__ /* xen/types.h guard */ -#include "../../xen/include/xen/byteorder.h" -#include "../../xen/include/xen/unaligned.h" -#include "../../xen/include/xen/xxhash.h" -#include "../../xen/lib/xxhash64.c" -#include "../../xen/common/unzstd.c" - -int xc_try_zstd_decode( - struct xc_dom_image *dom, void **blob, size_t *size) -{ - return xc_dom_decompress_unsafe(unzstd, dom, blob, size); -} -- 2.55.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/4] stubdom: remove pciutils 2026-09-22 7:27 [PATCH v3 0/4] stubdom: remove building unused libraries Juergen Gross 2026-09-22 7:27 ` [PATCH v3 1/4] tools/libxenguest: remove Mini-OS specific parts Juergen Gross @ 2026-09-22 7:27 ` Juergen Gross 2026-09-25 0:07 ` Samuel Thibault 2026-09-22 7:27 ` [PATCH v3 3/4] stubdom: remove build of zlib Juergen Gross 2026-09-22 7:27 ` [PATCH v3 4/4] CHANGELOG: add removal of grub-pv Juergen Gross 3 siblings, 1 reply; 7+ messages in thread From: Juergen Gross @ 2026-09-22 7:27 UTC (permalink / raw) To: xen-devel; +Cc: Juergen Gross, Samuel Thibault, Anthony PERARD There is no user of libpci left in stubdoms. Remove libpci from the stubdom build system. Signed-off-by: Juergen Gross <jgross@suse.com> --- V3: - add comment regarding upstream pciutils (Samuel Thibault) --- config/Stubdom.mk.in | 3 - stubdom/.gitignore | 1 - stubdom/Makefile | 36 +---- stubdom/configure | 21 --- stubdom/configure.ac | 1 - stubdom/libpci.config.h | 5 - stubdom/libpci.config.mak | 7 - stubdom/pciutils.patch | 298 -------------------------------------- 8 files changed, 6 insertions(+), 366 deletions(-) delete mode 100644 stubdom/libpci.config.h delete mode 100644 stubdom/libpci.config.mak delete mode 100644 stubdom/pciutils.patch diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in index 0d70d03941..b90eaee75a 100644 --- a/config/Stubdom.mk.in +++ b/config/Stubdom.mk.in @@ -14,9 +14,6 @@ STUBDOM_INSTALL := @STUBDOM_INSTALL@ ZLIB_VERSION := @ZLIB_VERSION@ ZLIB_URL := @ZLIB_URL@ -LIBPCI_VERSION := @LIBPCI_VERSION@ -LIBPCI_URL := @LIBPCI_URL@ - NEWLIB_VERSION := @NEWLIB_VERSION@ NEWLIB_URL := @NEWLIB_URL@ diff --git a/stubdom/.gitignore b/stubdom/.gitignore index 08f2e9b432..8c6dc00f83 100644 --- a/stubdom/.gitignore +++ b/stubdom/.gitignore @@ -23,7 +23,6 @@ /mk-headers-* /newlib-1.* /newlib-x86* -/pciutils-* /pkg-config/* /polarssl-* /tpm_emulator-* diff --git a/stubdom/Makefile b/stubdom/Makefile index 40b6ececf1..254f8d2fc8 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -122,33 +122,10 @@ $(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(MAKE) DESTDIR= libz.a && \ $(MAKE) DESTDIR= install ) -############## -# Cross-libpci -############## - -pciutils-$(LIBPCI_VERSION).tar.bz2: - $(FETCHER) $@ $(LIBPCI_URL)/$@ - -pciutils-$(XEN_TARGET_ARCH): pciutils-$(LIBPCI_VERSION).tar.bz2 - tar xjf $< - mv pciutils-$(LIBPCI_VERSION) $@ - patch -d $@ -p1 < pciutils.patch - touch $@ - -LIBPCI_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libpci.a -.PHONY: cross-libpci -cross-libpci: $(LIBPCI_STAMPFILE) -$(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(ZLIB_STAMPFILE) - ( cd $< && \ - cp ../libpci.config.h lib/config.h && \ - chmod u+w lib/config.h && \ - echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \ - ln -sf ../../libpci.config.mak lib/config.mk && \ - $(MAKE) DESTDIR= CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(call realpath,$(MINI_OS)/include)" lib/libpci.a && \ - $(INSTALL_DATA) lib/libpci.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ && \ - $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \ - $(INSTALL_DATA) lib/config.h lib/header.h lib/pci.h lib/types.h $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci/ \ - ) +####################################################################### +# There used to be a slightly modified version of pciutils, this is now +# available under https://github.com/pciutils/pciutils/pull/236 +####################################################################### ###### # lwIP @@ -250,7 +227,7 @@ cross-tpmemu: $(TPMEMU_STAMPFILE) ####### .PHONY: $(CROSS_ROOT) -$(CROSS_ROOT): cross-newlib cross-zlib cross-libpci +$(CROSS_ROOT): cross-newlib cross-zlib ####### # libraries under tools/libs @@ -477,7 +454,7 @@ clean: crossclean: clean rm -fr $(CROSS_ROOT) rm -fr newlib-$(XEN_TARGET_ARCH) - rm -fr zlib-$(XEN_TARGET_ARCH) pciutils-$(XEN_TARGET_ARCH) + rm -fr zlib-$(XEN_TARGET_ARCH) rm -fr libs-$(XEN_TARGET_ARCH) rm -fr xenstore xenstorepvh rm -fr gmp-$(XEN_TARGET_ARCH) @@ -502,7 +479,6 @@ downloadclean: patchclean rm -f zlib-$(ZLIB_VERSION).tar.gz rm -f gmp-$(GMP_VERSION).tar.bz2 rm -f tpm_emulator-$(TPMEMU_VERSION).tar.gz - rm -f pciutils-$(LIBPCI_VERSION).tar.bz2 rm -f lwip-$(LWIP_VERSION).tar.gz rm -f polarssl-$(POLARSSL_VERSION)-gpl.tgz diff --git a/stubdom/configure b/stubdom/configure index 689ff4d6ed..f3d63dceff 100755 --- a/stubdom/configure +++ b/stubdom/configure @@ -634,8 +634,6 @@ LWIP_VERSION LWIP_URL NEWLIB_VERSION NEWLIB_URL -LIBPCI_VERSION -LIBPCI_URL ZLIB_VERSION ZLIB_URL INSTALL_DATA @@ -725,7 +723,6 @@ LDFLAGS LIBS CPPFLAGS ZLIB_URL -LIBPCI_URL NEWLIB_URL LWIP_URL GMP_URL @@ -1376,7 +1373,6 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> ZLIB_URL Download url for zlib - LIBPCI_URL Download url for libpci NEWLIB_URL Download url for newlib LWIP_URL Download url for lwip GMP_URL Download url for libgmp @@ -4038,23 +4034,6 @@ ZLIB_VERSION="1.2.3" -if test "x$LIBPCI_URL" = "x" -then : - - if test "x$extfiles" = "xy" -then : - LIBPCI_URL=\$\(XEN_EXTFILES_URL\) -else $as_nop - LIBPCI_URL="https://mirrors.edge.kernel.org/pub/software/utils/pciutils" -fi - -fi -LIBPCI_VERSION="2.2.9" - - - - - if test "x$NEWLIB_URL" = "x" then : diff --git a/stubdom/configure.ac b/stubdom/configure.ac index 6ff3ab0ee9..d3d2a840d3 100644 --- a/stubdom/configure.ac +++ b/stubdom/configure.ac @@ -39,7 +39,6 @@ AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake]) # Stubdom libraries version and url setup AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3]) -AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [https://mirrors.edge.kernel.org/pub/software/utils/pciutils]) AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib]) AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip]) AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive]) diff --git a/stubdom/libpci.config.h b/stubdom/libpci.config.h deleted file mode 100644 index 28c2f6ab31..0000000000 --- a/stubdom/libpci.config.h +++ /dev/null @@ -1,5 +0,0 @@ -#define PCI_OS_MINIOS -#define PCI_HAVE_STDINT_H -#define PCI_PATH_IDS_DIR "." -#define PCI_COMPRESSED_IDS -#define PCI_IDS "pci.ids.gz" diff --git a/stubdom/libpci.config.mak b/stubdom/libpci.config.mak deleted file mode 100644 index 5c8632cf07..0000000000 --- a/stubdom/libpci.config.mak +++ /dev/null @@ -1,7 +0,0 @@ -LIBZ=-lz -LDLIBS+=$(LIBZ) -PCI_OS_MINIOS=1 -PCI_HAVE_STDINT_H=1 -PCI_PATH_IDS_DIR=. -PCI_COMPRESSED_IDS=1 -PCI_IDS=pci.ids.gz diff --git a/stubdom/pciutils.patch b/stubdom/pciutils.patch deleted file mode 100644 index 5ab84d6cce..0000000000 --- a/stubdom/pciutils.patch +++ /dev/null @@ -1,298 +0,0 @@ -diff -urN pciutils-2.2.9.orig/lib/access.c pciutils-2.2.9/lib/access.c ---- pciutils-2.2.9.orig/lib/access.c 2007-02-06 11:59:43.000000000 +0000 -+++ pciutils-2.2.9/lib/access.c 2008-06-30 19:07:09.713187000 +0100 -@@ -57,6 +57,11 @@ - #else - NULL, - #endif -+#ifdef PCI_OS_MINIOS -+ &pm_minios, -+#else -+ NULL, -+#endif - }; - - struct pci_access * ---- pciutils-2.2.9.orig/lib/pci.h 2006-09-09 13:46:06.000000000 +0100 -+++ pciutils-2.2.9/lib/pci.h 2008-06-30 18:56:15.350111000 +0100 -@@ -33,6 +33,7 @@ - PCI_ACCESS_NBSD_LIBPCI, /* NetBSD libpci */ - PCI_ACCESS_OBSD_DEVICE, /* OpenBSD /dev/pci */ - PCI_ACCESS_DUMP, /* Dump file (params: filename) */ -+ PCI_ACCESS_MINIOS, /* MiniOS */ - PCI_ACCESS_MAX - }; - ---- pciutils-2.2.9.orig/lib/internal.h 2006-09-09 11:52:47.000000000 +0100 -+++ pciutils-2.2.9/lib/internal.h 2008-07-01 10:46:24.968202000 +0100 -@@ -37,4 +37,4 @@ - - extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc, - pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device, -- pm_dump, pm_linux_sysfs; -+ pm_dump, pm_linux_sysfs, pm_minios; ---- pciutils-2.2.9.orig/lib/Makefile 2007-10-19 13:41:34.000000000 +0100 -+++ pciutils-2.2.9/lib/Makefile 2008-07-01 12:13:14.400525000 +0100 -@@ -46,6 +46,12 @@ - PCILIB=libpciutils.a - endif - -+ifdef PCI_OS_MINIOS -+XEN_ROOT=$(CURDIR)/../../.. -+include $(XEN_ROOT)/Config.mk -+OBJS += minios.o -+endif -+ - all: $(PCILIB) $(PCILIBPC) - - $(PCILIB): $(OBJS) ---- pciutils-2.2.9.orig/lib/types.h 2009-07-14 18:18:59.000000000 +0200 -+++ pciutils-2.2.9/lib/types.h 2009-07-14 18:19:16.000000000 +0200 -@@ -20,10 +20,12 @@ typedef DWORD u32; - typedef uint8_t u8; - typedef uint16_t u16; - typedef uint32_t u32; -+typedef uint64_t u64; - #else - typedef u_int8_t u8; - typedef u_int16_t u16; - typedef u_int32_t u32; -+typedef u_int64_t u64; - #endif - - #ifdef PCI_HAVE_64BIT_ADDRESS - ---- pciutils-2.2.9.orig/lib/minios.c 1970-01-01 01:00:00.000000000 +0100 -+++ pciutils-2.2.9/lib/minios.c 2008-07-01 12:31:40.554260000 +0100 -@@ -0,0 +1,106 @@ -+/* -+ * The PCI Library -- MiniOS PCI frontend access -+ * -+ * Samuel Thibault <samuel.thibault@eu.citrix.com>, 2008 -+ * -+ * Can be freely distributed and used under the terms of the GNU GPL. -+ */ -+ -+#include <os.h> -+#include <pcifront.h> -+#include <xenbus.h> -+#include "internal.h" -+ -+static int -+minios_detect(struct pci_access *a) -+{ -+ return 1; -+} -+ -+static void -+minios_init(struct pci_access *a) -+{ -+} -+ -+static void -+minios_cleanup(struct pci_access *a) -+{ -+ shutdown_pcifront(NULL); -+} -+ -+static void -+minios_scan(struct pci_access *a) -+{ -+ void func(unsigned int domain, unsigned int bus, unsigned int slot, unsigned int fun) -+ { -+ struct pci_dev *d = pci_alloc_dev(a); -+ -+ d->domain = domain; -+ d->bus = bus; -+ d->dev = slot; -+ d->func = fun; -+ -+ pci_link_dev(a, d); -+ } -+ -+ pcifront_scan(NULL, func); -+} -+ -+static int -+minios_read(struct pci_dev *d, int pos, byte *buf, int len) -+{ -+ unsigned int val; -+ switch (len) { -+ case 1: -+ if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val)) -+ return 0; -+ * buf = val; -+ return 1; -+ case 2: -+ if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val)) -+ return 0; -+ *(u16 *) buf = cpu_to_le16((u16) val); -+ return 1; -+ case 4: -+ if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val)) -+ return 0; -+ *(u32 *) buf = cpu_to_le32((u32) val); -+ return 1; -+ default: -+ return pci_generic_block_read(d, pos, buf, len); -+ } -+} -+ -+static int -+minios_write(struct pci_dev *d, int pos, byte *buf, int len) -+{ -+ unsigned int val; -+ switch (len) { -+ case 1: -+ val = * buf; -+ break; -+ case 2: -+ val = le16_to_cpu(*(u16 *) buf); -+ break; -+ case 4: -+ val = le32_to_cpu(*(u32 *) buf); -+ break; -+ default: -+ return pci_generic_block_write(d, pos, buf, len); -+ } -+ return !pcifront_conf_write(NULL, d->domain, d->bus, d->dev, d->func, pos, len, val); -+} -+ -+struct pci_methods pm_minios = { -+ "MiniOS-device", -+ NULL, /* config */ -+ minios_detect, -+ minios_init, -+ minios_cleanup, -+ minios_scan, -+ pci_generic_fill_info, -+ minios_read, -+ minios_write, -+ NULL, /* dev_init */ -+ NULL /* dev_cleanup */ -+}; ---- pciutils-2.2.9/lib/generic.c 2007-02-06 12:00:05.000000000 +0000 -+++ pciutils-2.2.9-mine/lib/generic.c 2008-07-01 19:13:52.289949000 +0100 -@@ -74,6 +74,19 @@ - pci_generic_scan_bus(a, busmap, 0); - } - -+static u32 pci_size(u32 base, u32 maxbase, u32 mask) -+{ -+ u32 size = mask & maxbase; -+ if (!size) -+ return 0; -+ size = (size & ~(size-1)) - 1; -+ -+ if (base == maxbase && ((base | size) & mask) != mask) -+ return 0; -+ -+ return size + 1; -+} -+ - int - pci_generic_fill_info(struct pci_dev *d, int flags) - { -@@ -114,23 +127,61 @@ - if (!x || x == (u32) ~0) - continue; - if ((x & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) -- d->base_addr[i] = x; -- else -+ { -+ d->base_addr[i] = x & PCI_BASE_ADDRESS_IO_MASK; -+ if (flags & PCI_FILL_SIZES) -+ { -+ u32 size; -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0); -+ d->size[i] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), PCI_BASE_ADDRESS_IO_MASK); -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, x); -+ } -+ } -+ else - { - if ((x & PCI_BASE_ADDRESS_MEM_TYPE_MASK) != PCI_BASE_ADDRESS_MEM_TYPE_64) -- d->base_addr[i] = x; -+ { -+ d->base_addr[i] = x & PCI_BASE_ADDRESS_MEM_MASK; -+ if (flags & PCI_FILL_SIZES) -+ { -+ u32 size; -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0); -+ d->size[i] = pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4); -+ d->size[i] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), PCI_BASE_ADDRESS_MEM_MASK); -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, x); -+ } -+ } - else if (i >= cnt-1) - a->warning("%04x:%02x:%02x.%d: Invalid 64-bit address seen for BAR %d.", d->domain, d->bus, d->dev, d->func, i); - else - { - u32 y = pci_read_long(d, PCI_BASE_ADDRESS_0 + (++i)*4); - #ifdef PCI_HAVE_64BIT_ADDRESS -- d->base_addr[i-1] = x | (((pciaddr_t) y) << 32); -+ d->base_addr[i-1] = (x | (((pciaddr_t) y) << 32)) & PCI_BASE_ADDRESS_MEM_MASK; -+ if (flags & PCI_FILL_SIZES) -+ { -+ u32 size; -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, ~0); -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0); -+ d->size[i-1] = pci_size(y, pci_read_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4) | -+ pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), 0xffffffff ); -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, x); -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, y); -+ } - #else - if (y) - a->warning("%04x:%02x:%02x.%d 64-bit device address ignored.", d->domain, d->bus, d->dev, d->func); - else -- d->base_addr[i-1] = x; -+ { -+ d->base_addr[i-1] = x & PCI_BASE_ADDRESS_MEM_MASK; -+ if (flags & PCI_FILL_SIZES) -+ { -+ u32 size; -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, ~0); -+ d->size[i-1] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4), PCI_BASE_ADDRESS_MEM_MASK); -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, x); -+ } -+ } - #endif - } - } -@@ -154,10 +205,19 @@ - { - u32 u = pci_read_long(d, reg); - if (u != 0xffffffff) -- d->rom_base_addr = u; -+ { -+ d->rom_base_addr = u; -+ if (flags & PCI_FILL_SIZES) -+ { -+ u32 size; -+ pci_write_long(d, reg, ~0); -+ d->rom_size = pci_read_long(d, reg); -+ pci_write_long(d, reg, u); -+ } -+ } - } - } -- return flags & ~PCI_FILL_SIZES; -+ return flags; - } - - static int -diff -uNpbE -uNpbEr pciutils-2.2.9.orig/lib/sysdep.h pciutils-2.2.9/lib/sysdep.h ---- pciutils-2.2.9.orig/lib/sysdep.h 2007-02-06 12:00:18.000000000 +0000 -+++ pciutils-2.2.9/lib/sysdep.h 2009-07-22 16:26:30.000000000 +0100 -@@ -32,6 +32,10 @@ typedef u16 word; - - #else - -+#ifdef PCI_OS_MINIOS -+#include <machine/endian.h> -+#endif -+ - #ifdef PCI_OS_LINUX - #include <endian.h> - #define BYTE_ORDER __BYTE_ORDER -- 2.55.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/4] stubdom: remove pciutils 2026-09-22 7:27 ` [PATCH v3 2/4] stubdom: remove pciutils Juergen Gross @ 2026-09-25 0:07 ` Samuel Thibault 0 siblings, 0 replies; 7+ messages in thread From: Samuel Thibault @ 2026-09-25 0:07 UTC (permalink / raw) To: Juergen Gross; +Cc: xen-devel, Anthony PERARD Juergen Gross, le mar. 22 sept. 2026 09:27:09 +0200, a ecrit: > There is no user of libpci left in stubdoms. > > Remove libpci from the stubdom build system. > > Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Thanks! > --- > V3: > - add comment regarding upstream pciutils (Samuel Thibault) > --- > config/Stubdom.mk.in | 3 - > stubdom/.gitignore | 1 - > stubdom/Makefile | 36 +---- > stubdom/configure | 21 --- > stubdom/configure.ac | 1 - > stubdom/libpci.config.h | 5 - > stubdom/libpci.config.mak | 7 - > stubdom/pciutils.patch | 298 -------------------------------------- > 8 files changed, 6 insertions(+), 366 deletions(-) > delete mode 100644 stubdom/libpci.config.h > delete mode 100644 stubdom/libpci.config.mak > delete mode 100644 stubdom/pciutils.patch > > diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in > index 0d70d03941..b90eaee75a 100644 > --- a/config/Stubdom.mk.in > +++ b/config/Stubdom.mk.in > @@ -14,9 +14,6 @@ STUBDOM_INSTALL := @STUBDOM_INSTALL@ > ZLIB_VERSION := @ZLIB_VERSION@ > ZLIB_URL := @ZLIB_URL@ > > -LIBPCI_VERSION := @LIBPCI_VERSION@ > -LIBPCI_URL := @LIBPCI_URL@ > - > NEWLIB_VERSION := @NEWLIB_VERSION@ > NEWLIB_URL := @NEWLIB_URL@ > > diff --git a/stubdom/.gitignore b/stubdom/.gitignore > index 08f2e9b432..8c6dc00f83 100644 > --- a/stubdom/.gitignore > +++ b/stubdom/.gitignore > @@ -23,7 +23,6 @@ > /mk-headers-* > /newlib-1.* > /newlib-x86* > -/pciutils-* > /pkg-config/* > /polarssl-* > /tpm_emulator-* > diff --git a/stubdom/Makefile b/stubdom/Makefile > index 40b6ececf1..254f8d2fc8 100644 > --- a/stubdom/Makefile > +++ b/stubdom/Makefile > @@ -122,33 +122,10 @@ $(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) > $(MAKE) DESTDIR= libz.a && \ > $(MAKE) DESTDIR= install ) > > -############## > -# Cross-libpci > -############## > - > -pciutils-$(LIBPCI_VERSION).tar.bz2: > - $(FETCHER) $@ $(LIBPCI_URL)/$@ > - > -pciutils-$(XEN_TARGET_ARCH): pciutils-$(LIBPCI_VERSION).tar.bz2 > - tar xjf $< > - mv pciutils-$(LIBPCI_VERSION) $@ > - patch -d $@ -p1 < pciutils.patch > - touch $@ > - > -LIBPCI_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libpci.a > -.PHONY: cross-libpci > -cross-libpci: $(LIBPCI_STAMPFILE) > -$(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(ZLIB_STAMPFILE) > - ( cd $< && \ > - cp ../libpci.config.h lib/config.h && \ > - chmod u+w lib/config.h && \ > - echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \ > - ln -sf ../../libpci.config.mak lib/config.mk && \ > - $(MAKE) DESTDIR= CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(call realpath,$(MINI_OS)/include)" lib/libpci.a && \ > - $(INSTALL_DATA) lib/libpci.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ && \ > - $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \ > - $(INSTALL_DATA) lib/config.h lib/header.h lib/pci.h lib/types.h $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci/ \ > - ) > +####################################################################### > +# There used to be a slightly modified version of pciutils, this is now > +# available under https://github.com/pciutils/pciutils/pull/236 > +####################################################################### > > ###### > # lwIP > @@ -250,7 +227,7 @@ cross-tpmemu: $(TPMEMU_STAMPFILE) > ####### > > .PHONY: $(CROSS_ROOT) > -$(CROSS_ROOT): cross-newlib cross-zlib cross-libpci > +$(CROSS_ROOT): cross-newlib cross-zlib > > ####### > # libraries under tools/libs > @@ -477,7 +454,7 @@ clean: > crossclean: clean > rm -fr $(CROSS_ROOT) > rm -fr newlib-$(XEN_TARGET_ARCH) > - rm -fr zlib-$(XEN_TARGET_ARCH) pciutils-$(XEN_TARGET_ARCH) > + rm -fr zlib-$(XEN_TARGET_ARCH) > rm -fr libs-$(XEN_TARGET_ARCH) > rm -fr xenstore xenstorepvh > rm -fr gmp-$(XEN_TARGET_ARCH) > @@ -502,7 +479,6 @@ downloadclean: patchclean > rm -f zlib-$(ZLIB_VERSION).tar.gz > rm -f gmp-$(GMP_VERSION).tar.bz2 > rm -f tpm_emulator-$(TPMEMU_VERSION).tar.gz > - rm -f pciutils-$(LIBPCI_VERSION).tar.bz2 > rm -f lwip-$(LWIP_VERSION).tar.gz > rm -f polarssl-$(POLARSSL_VERSION)-gpl.tgz > > diff --git a/stubdom/configure b/stubdom/configure > index 689ff4d6ed..f3d63dceff 100755 > --- a/stubdom/configure > +++ b/stubdom/configure > @@ -634,8 +634,6 @@ LWIP_VERSION > LWIP_URL > NEWLIB_VERSION > NEWLIB_URL > -LIBPCI_VERSION > -LIBPCI_URL > ZLIB_VERSION > ZLIB_URL > INSTALL_DATA > @@ -725,7 +723,6 @@ LDFLAGS > LIBS > CPPFLAGS > ZLIB_URL > -LIBPCI_URL > NEWLIB_URL > LWIP_URL > GMP_URL > @@ -1376,7 +1373,6 @@ Some influential environment variables: > CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if > you have headers in a nonstandard directory <include dir> > ZLIB_URL Download url for zlib > - LIBPCI_URL Download url for libpci > NEWLIB_URL Download url for newlib > LWIP_URL Download url for lwip > GMP_URL Download url for libgmp > @@ -4038,23 +4034,6 @@ ZLIB_VERSION="1.2.3" > > > > -if test "x$LIBPCI_URL" = "x" > -then : > - > - if test "x$extfiles" = "xy" > -then : > - LIBPCI_URL=\$\(XEN_EXTFILES_URL\) > -else $as_nop > - LIBPCI_URL="https://mirrors.edge.kernel.org/pub/software/utils/pciutils" > -fi > - > -fi > -LIBPCI_VERSION="2.2.9" > - > - > - > - > - > if test "x$NEWLIB_URL" = "x" > then : > > diff --git a/stubdom/configure.ac b/stubdom/configure.ac > index 6ff3ab0ee9..d3d2a840d3 100644 > --- a/stubdom/configure.ac > +++ b/stubdom/configure.ac > @@ -39,7 +39,6 @@ AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake]) > > # Stubdom libraries version and url setup > AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3]) > -AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [https://mirrors.edge.kernel.org/pub/software/utils/pciutils]) > AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib]) > AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip]) > AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive]) > diff --git a/stubdom/libpci.config.h b/stubdom/libpci.config.h > deleted file mode 100644 > index 28c2f6ab31..0000000000 > --- a/stubdom/libpci.config.h > +++ /dev/null > @@ -1,5 +0,0 @@ > -#define PCI_OS_MINIOS > -#define PCI_HAVE_STDINT_H > -#define PCI_PATH_IDS_DIR "." > -#define PCI_COMPRESSED_IDS > -#define PCI_IDS "pci.ids.gz" > diff --git a/stubdom/libpci.config.mak b/stubdom/libpci.config.mak > deleted file mode 100644 > index 5c8632cf07..0000000000 > --- a/stubdom/libpci.config.mak > +++ /dev/null > @@ -1,7 +0,0 @@ > -LIBZ=-lz > -LDLIBS+=$(LIBZ) > -PCI_OS_MINIOS=1 > -PCI_HAVE_STDINT_H=1 > -PCI_PATH_IDS_DIR=. > -PCI_COMPRESSED_IDS=1 > -PCI_IDS=pci.ids.gz > diff --git a/stubdom/pciutils.patch b/stubdom/pciutils.patch > deleted file mode 100644 > index 5ab84d6cce..0000000000 > --- a/stubdom/pciutils.patch > +++ /dev/null > @@ -1,298 +0,0 @@ > -diff -urN pciutils-2.2.9.orig/lib/access.c pciutils-2.2.9/lib/access.c > ---- pciutils-2.2.9.orig/lib/access.c 2007-02-06 11:59:43.000000000 +0000 > -+++ pciutils-2.2.9/lib/access.c 2008-06-30 19:07:09.713187000 +0100 > -@@ -57,6 +57,11 @@ > - #else > - NULL, > - #endif > -+#ifdef PCI_OS_MINIOS > -+ &pm_minios, > -+#else > -+ NULL, > -+#endif > - }; > - > - struct pci_access * > ---- pciutils-2.2.9.orig/lib/pci.h 2006-09-09 13:46:06.000000000 +0100 > -+++ pciutils-2.2.9/lib/pci.h 2008-06-30 18:56:15.350111000 +0100 > -@@ -33,6 +33,7 @@ > - PCI_ACCESS_NBSD_LIBPCI, /* NetBSD libpci */ > - PCI_ACCESS_OBSD_DEVICE, /* OpenBSD /dev/pci */ > - PCI_ACCESS_DUMP, /* Dump file (params: filename) */ > -+ PCI_ACCESS_MINIOS, /* MiniOS */ > - PCI_ACCESS_MAX > - }; > - > ---- pciutils-2.2.9.orig/lib/internal.h 2006-09-09 11:52:47.000000000 +0100 > -+++ pciutils-2.2.9/lib/internal.h 2008-07-01 10:46:24.968202000 +0100 > -@@ -37,4 +37,4 @@ > - > - extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc, > - pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device, > -- pm_dump, pm_linux_sysfs; > -+ pm_dump, pm_linux_sysfs, pm_minios; > ---- pciutils-2.2.9.orig/lib/Makefile 2007-10-19 13:41:34.000000000 +0100 > -+++ pciutils-2.2.9/lib/Makefile 2008-07-01 12:13:14.400525000 +0100 > -@@ -46,6 +46,12 @@ > - PCILIB=libpciutils.a > - endif > - > -+ifdef PCI_OS_MINIOS > -+XEN_ROOT=$(CURDIR)/../../.. > -+include $(XEN_ROOT)/Config.mk > -+OBJS += minios.o > -+endif > -+ > - all: $(PCILIB) $(PCILIBPC) > - > - $(PCILIB): $(OBJS) > ---- pciutils-2.2.9.orig/lib/types.h 2009-07-14 18:18:59.000000000 +0200 > -+++ pciutils-2.2.9/lib/types.h 2009-07-14 18:19:16.000000000 +0200 > -@@ -20,10 +20,12 @@ typedef DWORD u32; > - typedef uint8_t u8; > - typedef uint16_t u16; > - typedef uint32_t u32; > -+typedef uint64_t u64; > - #else > - typedef u_int8_t u8; > - typedef u_int16_t u16; > - typedef u_int32_t u32; > -+typedef u_int64_t u64; > - #endif > - > - #ifdef PCI_HAVE_64BIT_ADDRESS > - > ---- pciutils-2.2.9.orig/lib/minios.c 1970-01-01 01:00:00.000000000 +0100 > -+++ pciutils-2.2.9/lib/minios.c 2008-07-01 12:31:40.554260000 +0100 > -@@ -0,0 +1,106 @@ > -+/* > -+ * The PCI Library -- MiniOS PCI frontend access > -+ * > -+ * Samuel Thibault <samuel.thibault@eu.citrix.com>, 2008 > -+ * > -+ * Can be freely distributed and used under the terms of the GNU GPL. > -+ */ > -+ > -+#include <os.h> > -+#include <pcifront.h> > -+#include <xenbus.h> > -+#include "internal.h" > -+ > -+static int > -+minios_detect(struct pci_access *a) > -+{ > -+ return 1; > -+} > -+ > -+static void > -+minios_init(struct pci_access *a) > -+{ > -+} > -+ > -+static void > -+minios_cleanup(struct pci_access *a) > -+{ > -+ shutdown_pcifront(NULL); > -+} > -+ > -+static void > -+minios_scan(struct pci_access *a) > -+{ > -+ void func(unsigned int domain, unsigned int bus, unsigned int slot, unsigned int fun) > -+ { > -+ struct pci_dev *d = pci_alloc_dev(a); > -+ > -+ d->domain = domain; > -+ d->bus = bus; > -+ d->dev = slot; > -+ d->func = fun; > -+ > -+ pci_link_dev(a, d); > -+ } > -+ > -+ pcifront_scan(NULL, func); > -+} > -+ > -+static int > -+minios_read(struct pci_dev *d, int pos, byte *buf, int len) > -+{ > -+ unsigned int val; > -+ switch (len) { > -+ case 1: > -+ if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val)) > -+ return 0; > -+ * buf = val; > -+ return 1; > -+ case 2: > -+ if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val)) > -+ return 0; > -+ *(u16 *) buf = cpu_to_le16((u16) val); > -+ return 1; > -+ case 4: > -+ if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val)) > -+ return 0; > -+ *(u32 *) buf = cpu_to_le32((u32) val); > -+ return 1; > -+ default: > -+ return pci_generic_block_read(d, pos, buf, len); > -+ } > -+} > -+ > -+static int > -+minios_write(struct pci_dev *d, int pos, byte *buf, int len) > -+{ > -+ unsigned int val; > -+ switch (len) { > -+ case 1: > -+ val = * buf; > -+ break; > -+ case 2: > -+ val = le16_to_cpu(*(u16 *) buf); > -+ break; > -+ case 4: > -+ val = le32_to_cpu(*(u32 *) buf); > -+ break; > -+ default: > -+ return pci_generic_block_write(d, pos, buf, len); > -+ } > -+ return !pcifront_conf_write(NULL, d->domain, d->bus, d->dev, d->func, pos, len, val); > -+} > -+ > -+struct pci_methods pm_minios = { > -+ "MiniOS-device", > -+ NULL, /* config */ > -+ minios_detect, > -+ minios_init, > -+ minios_cleanup, > -+ minios_scan, > -+ pci_generic_fill_info, > -+ minios_read, > -+ minios_write, > -+ NULL, /* dev_init */ > -+ NULL /* dev_cleanup */ > -+}; > ---- pciutils-2.2.9/lib/generic.c 2007-02-06 12:00:05.000000000 +0000 > -+++ pciutils-2.2.9-mine/lib/generic.c 2008-07-01 19:13:52.289949000 +0100 > -@@ -74,6 +74,19 @@ > - pci_generic_scan_bus(a, busmap, 0); > - } > - > -+static u32 pci_size(u32 base, u32 maxbase, u32 mask) > -+{ > -+ u32 size = mask & maxbase; > -+ if (!size) > -+ return 0; > -+ size = (size & ~(size-1)) - 1; > -+ > -+ if (base == maxbase && ((base | size) & mask) != mask) > -+ return 0; > -+ > -+ return size + 1; > -+} > -+ > - int > - pci_generic_fill_info(struct pci_dev *d, int flags) > - { > -@@ -114,23 +127,61 @@ > - if (!x || x == (u32) ~0) > - continue; > - if ((x & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) > -- d->base_addr[i] = x; > -- else > -+ { > -+ d->base_addr[i] = x & PCI_BASE_ADDRESS_IO_MASK; > -+ if (flags & PCI_FILL_SIZES) > -+ { > -+ u32 size; > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0); > -+ d->size[i] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), PCI_BASE_ADDRESS_IO_MASK); > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, x); > -+ } > -+ } > -+ else > - { > - if ((x & PCI_BASE_ADDRESS_MEM_TYPE_MASK) != PCI_BASE_ADDRESS_MEM_TYPE_64) > -- d->base_addr[i] = x; > -+ { > -+ d->base_addr[i] = x & PCI_BASE_ADDRESS_MEM_MASK; > -+ if (flags & PCI_FILL_SIZES) > -+ { > -+ u32 size; > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0); > -+ d->size[i] = pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4); > -+ d->size[i] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), PCI_BASE_ADDRESS_MEM_MASK); > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, x); > -+ } > -+ } > - else if (i >= cnt-1) > - a->warning("%04x:%02x:%02x.%d: Invalid 64-bit address seen for BAR %d.", d->domain, d->bus, d->dev, d->func, i); > - else > - { > - u32 y = pci_read_long(d, PCI_BASE_ADDRESS_0 + (++i)*4); > - #ifdef PCI_HAVE_64BIT_ADDRESS > -- d->base_addr[i-1] = x | (((pciaddr_t) y) << 32); > -+ d->base_addr[i-1] = (x | (((pciaddr_t) y) << 32)) & PCI_BASE_ADDRESS_MEM_MASK; > -+ if (flags & PCI_FILL_SIZES) > -+ { > -+ u32 size; > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, ~0); > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0); > -+ d->size[i-1] = pci_size(y, pci_read_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4) | > -+ pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), 0xffffffff ); > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, x); > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, y); > -+ } > - #else > - if (y) > - a->warning("%04x:%02x:%02x.%d 64-bit device address ignored.", d->domain, d->bus, d->dev, d->func); > - else > -- d->base_addr[i-1] = x; > -+ { > -+ d->base_addr[i-1] = x & PCI_BASE_ADDRESS_MEM_MASK; > -+ if (flags & PCI_FILL_SIZES) > -+ { > -+ u32 size; > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, ~0); > -+ d->size[i-1] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4), PCI_BASE_ADDRESS_MEM_MASK); > -+ pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, x); > -+ } > -+ } > - #endif > - } > - } > -@@ -154,10 +205,19 @@ > - { > - u32 u = pci_read_long(d, reg); > - if (u != 0xffffffff) > -- d->rom_base_addr = u; > -+ { > -+ d->rom_base_addr = u; > -+ if (flags & PCI_FILL_SIZES) > -+ { > -+ u32 size; > -+ pci_write_long(d, reg, ~0); > -+ d->rom_size = pci_read_long(d, reg); > -+ pci_write_long(d, reg, u); > -+ } > -+ } > - } > - } > -- return flags & ~PCI_FILL_SIZES; > -+ return flags; > - } > - > - static int > -diff -uNpbE -uNpbEr pciutils-2.2.9.orig/lib/sysdep.h pciutils-2.2.9/lib/sysdep.h > ---- pciutils-2.2.9.orig/lib/sysdep.h 2007-02-06 12:00:18.000000000 +0000 > -+++ pciutils-2.2.9/lib/sysdep.h 2009-07-22 16:26:30.000000000 +0100 > -@@ -32,6 +32,10 @@ typedef u16 word; > - > - #else > - > -+#ifdef PCI_OS_MINIOS > -+#include <machine/endian.h> > -+#endif > -+ > - #ifdef PCI_OS_LINUX > - #include <endian.h> > - #define BYTE_ORDER __BYTE_ORDER > -- > 2.55.0 > -- Samuel Moralité : le modem et le cablerouteur font comme les filles, ils papotent toute la journée. -+- RB in NPC : Et en plus, ils ne parlent que de bits -+- ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 3/4] stubdom: remove build of zlib 2026-09-22 7:27 [PATCH v3 0/4] stubdom: remove building unused libraries Juergen Gross 2026-09-22 7:27 ` [PATCH v3 1/4] tools/libxenguest: remove Mini-OS specific parts Juergen Gross 2026-09-22 7:27 ` [PATCH v3 2/4] stubdom: remove pciutils Juergen Gross @ 2026-09-22 7:27 ` Juergen Gross 2026-09-22 7:27 ` [PATCH v3 4/4] CHANGELOG: add removal of grub-pv Juergen Gross 3 siblings, 0 replies; 7+ messages in thread From: Juergen Gross @ 2026-09-22 7:27 UTC (permalink / raw) To: xen-devel; +Cc: Juergen Gross, Anthony PERARD, Samuel Thibault The last users of zlib for stubdoms have been removed. Remove zlib from the stubdom build system, too. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- config/Stubdom.mk.in | 3 --- stubdom/.gitignore | 1 - stubdom/Makefile | 24 +----------------------- stubdom/configure | 15 --------------- stubdom/configure.ac | 1 - 5 files changed, 1 insertion(+), 43 deletions(-) diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in index b90eaee75a..dc0a3b54b3 100644 --- a/config/Stubdom.mk.in +++ b/config/Stubdom.mk.in @@ -11,9 +11,6 @@ STUBDOM_TARGETS := @STUBDOM_TARGETS@ STUBDOM_BUILD := @STUBDOM_BUILD@ STUBDOM_INSTALL := @STUBDOM_INSTALL@ -ZLIB_VERSION := @ZLIB_VERSION@ -ZLIB_URL := @ZLIB_URL@ - NEWLIB_VERSION := @NEWLIB_VERSION@ NEWLIB_URL := @NEWLIB_URL@ diff --git a/stubdom/.gitignore b/stubdom/.gitignore index 8c6dc00f83..e5d5744361 100644 --- a/stubdom/.gitignore +++ b/stubdom/.gitignore @@ -29,4 +29,3 @@ /vtpm/vtpm_manager.h /xenstore /xenstorepvh -/zlib-* diff --git a/stubdom/Makefile b/stubdom/Makefile index 254f8d2fc8..164694dd14 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -102,26 +102,6 @@ $(NEWLIB_STAMPFILE): mk-headers-$(XEN_TARGET_ARCH) newlib-$(NEWLIB_VERSION) $(MAKE) DESTDIR= && \ $(MAKE) DESTDIR= install ) -############ -# Cross-zlib -############ - -zlib-$(ZLIB_VERSION).tar.gz: - $(FETCHER) $@ $(ZLIB_URL)/$@ - -zlib-$(XEN_TARGET_ARCH): zlib-$(ZLIB_VERSION).tar.gz - tar xzf $< - mv zlib-$(ZLIB_VERSION) $@ - -ZLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libz.a -.PHONY: cross-zlib -cross-zlib: $(ZLIB_STAMPFILE) -$(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) - ( cd $< && \ - CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \ - $(MAKE) DESTDIR= libz.a && \ - $(MAKE) DESTDIR= install ) - ####################################################################### # There used to be a slightly modified version of pciutils, this is now # available under https://github.com/pciutils/pciutils/pull/236 @@ -227,7 +207,7 @@ cross-tpmemu: $(TPMEMU_STAMPFILE) ####### .PHONY: $(CROSS_ROOT) -$(CROSS_ROOT): cross-newlib cross-zlib +$(CROSS_ROOT): cross-newlib ####### # libraries under tools/libs @@ -454,7 +434,6 @@ clean: crossclean: clean rm -fr $(CROSS_ROOT) rm -fr newlib-$(XEN_TARGET_ARCH) - rm -fr zlib-$(XEN_TARGET_ARCH) rm -fr libs-$(XEN_TARGET_ARCH) rm -fr xenstore xenstorepvh rm -fr gmp-$(XEN_TARGET_ARCH) @@ -476,7 +455,6 @@ patchclean: crossclean .PHONY: downloadclean downloadclean: patchclean rm -f newlib-$(NEWLIB_VERSION).tar.gz - rm -f zlib-$(ZLIB_VERSION).tar.gz rm -f gmp-$(GMP_VERSION).tar.bz2 rm -f tpm_emulator-$(TPMEMU_VERSION).tar.gz rm -f lwip-$(LWIP_VERSION).tar.gz diff --git a/stubdom/configure b/stubdom/configure index f3d63dceff..1a5687d32b 100755 --- a/stubdom/configure +++ b/stubdom/configure @@ -634,8 +634,6 @@ LWIP_VERSION LWIP_URL NEWLIB_VERSION NEWLIB_URL -ZLIB_VERSION -ZLIB_URL INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -722,7 +720,6 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -ZLIB_URL NEWLIB_URL LWIP_URL GMP_URL @@ -1372,7 +1369,6 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> - ZLIB_URL Download url for zlib NEWLIB_URL Download url for newlib LWIP_URL Download url for lwip GMP_URL Download url for libgmp @@ -4023,17 +4019,6 @@ fi # Stubdom libraries version and url setup -if test "x$ZLIB_URL" = "x" -then : - - ZLIB_URL=\$\(XEN_EXTFILES_URL\) -fi -ZLIB_VERSION="1.2.3" - - - - - if test "x$NEWLIB_URL" = "x" then : diff --git a/stubdom/configure.ac b/stubdom/configure.ac index d3d2a840d3..34a47c95e1 100644 --- a/stubdom/configure.ac +++ b/stubdom/configure.ac @@ -38,7 +38,6 @@ AC_PROG_INSTALL AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake]) # Stubdom libraries version and url setup -AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3]) AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib]) AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip]) AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive]) -- 2.55.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 4/4] CHANGELOG: add removal of grub-pv 2026-09-22 7:27 [PATCH v3 0/4] stubdom: remove building unused libraries Juergen Gross ` (2 preceding siblings ...) 2026-09-22 7:27 ` [PATCH v3 3/4] stubdom: remove build of zlib Juergen Gross @ 2026-09-22 7:27 ` Juergen Gross 2026-09-22 13:59 ` Oleksii Kurochko 3 siblings, 1 reply; 7+ messages in thread From: Juergen Gross @ 2026-09-22 7:27 UTC (permalink / raw) To: xen-devel; +Cc: Juergen Gross, Oleksii Kurochko, Community Manager Signed-off-by: Juergen Gross <jgross@suse.com> --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1a777dd4..a2dd01037b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) The only known user was the classic-xen fork of Linux. This does not affect Xen kexec support in the kexec-tools package. - The example stubdom "c-stubdom" has been removed. + - The grub-pv stubdom has been removed. A grub-pv stubdom from an older + Xen version (e.g. 4.22) will still work with Xen 4.23. ## [4.22.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2026-07-30 -- 2.55.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 4/4] CHANGELOG: add removal of grub-pv 2026-09-22 7:27 ` [PATCH v3 4/4] CHANGELOG: add removal of grub-pv Juergen Gross @ 2026-09-22 13:59 ` Oleksii Kurochko 0 siblings, 0 replies; 7+ messages in thread From: Oleksii Kurochko @ 2026-09-22 13:59 UTC (permalink / raw) To: Juergen Gross, xen-devel; +Cc: Community Manager On 9/22/26 9:27 AM, Juergen Gross wrote: > Signed-off-by: Juergen Gross <jgross@suse.com> > --- > CHANGELOG.md | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/CHANGELOG.md b/CHANGELOG.md > index aa1a777dd4..a2dd01037b 100644 > --- a/CHANGELOG.md > +++ b/CHANGELOG.md > @@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) > The only known user was the classic-xen fork of Linux. This does not > affect Xen kexec support in the kexec-tools package. > - The example stubdom "c-stubdom" has been removed. > + - The grub-pv stubdom has been removed. A grub-pv stubdom from an older > + Xen version (e.g. 4.22) will still work with Xen 4.23. > > ## [4.22.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2026-07-30 > Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Thanks. ~ Oleksii ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-25 0:07 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-22 7:27 [PATCH v3 0/4] stubdom: remove building unused libraries Juergen Gross 2026-09-22 7:27 ` [PATCH v3 1/4] tools/libxenguest: remove Mini-OS specific parts Juergen Gross 2026-09-22 7:27 ` [PATCH v3 2/4] stubdom: remove pciutils Juergen Gross 2026-09-25 0:07 ` Samuel Thibault 2026-09-22 7:27 ` [PATCH v3 3/4] stubdom: remove build of zlib Juergen Gross 2026-09-22 7:27 ` [PATCH v3 4/4] CHANGELOG: add removal of grub-pv Juergen Gross 2026-09-22 13:59 ` Oleksii Kurochko
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.