Skip to contentSkip to conversation

stubdom: remove grub-pv

PATCH Superseded Juergen Gross 2 participants 11 messages Jul 7

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover stubdom: remove grub-pv

The grub-pv stubdoms (32- and 64-bit) are disabled by default since several years now.

Remove them in order to enable removing quite some more code from Xen. In case someone is really depending on grub-pv, they can easily take it from an older Xen build, as there is no Xen version dependency in grub-pv (a version built 3 years ago has been tested to still work with current 4.23 staging Xen).

Note that after this series has been committed, some additional cleanup is possible by removing stubdom libpci and zlib support, but this will require a modification of Mini-OS depending on these patches.

Juergen Gross (5):
stubdom: remove support for grub-pv
stubdom: remove support for building in 32-bit mode
stubdom: remove building of libxenguest and libxenctrl
docs: remove stale stubdom entries from stubdom.txt tools/libxenguest: remove Mini-OS specific parts

 Makefile                                      |    6 -
 config/Stubdom.mk.in                          |    3 -
 docs/misc/stubdom.txt                         |   69 -
 stubdom/.gitignore                            |    1 -
 stubdom/Makefile                              |   69 +-
 stubdom/configure                             |   65 -
 stubdom/configure.ac                          |    2 -
 stubdom/grub.patches/00cvs                    | 1022 -----
 stubdom/grub.patches/10graphics.diff          | 2297 -----------
 stubdom/grub.patches/11graphics-keyboard.diff |   13 -
 stubdom/grub.patches/20print_func.diff        |   52 -
 stubdom/grub.patches/30savedefault.diff       |  186 -
 .../grub.patches/40ext3_256byte_inode.diff    |  114 -
 stubdom/grub.patches/50fs_fulldisk.diff       |   72 -
 stubdom/grub.patches/60ext4.diff              |  474 ---
 stubdom/grub.patches/61btrfs.diff             | 3499 -----------------
 stubdom/grub.patches/70compiler_warnings.diff |   45 -
 stubdom/grub.patches/99minios                 | 1570 --------
 stubdom/grub/Makefile                         |   88 -
 stubdom/grub/boot-x86_32.S                    |  112 -
 stubdom/grub/boot-x86_64.S                    |  108 -
 stubdom/grub/config.h                         |   12 -
 stubdom/grub/kexec.c                          |  434 --
 stubdom/grub/mini-os.c                        |  771 ----
 stubdom/grub/mini-os.h                        |    7 -
 stubdom/grub/minios.cfg                       |    4 -
 stubdom/grub/osdep.h                          |   30 -
 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 -
 36 files changed, 1 insertion(+), 11416 deletions(-)
 delete mode 100644 stubdom/grub.patches/00cvs
 delete mode 100644 stubdom/grub.patches/10graphics.diff
 delete mode 100644 stubdom/grub.patches/11graphics-keyboard.diff
 delete mode 100644 stubdom/grub.patches/20print_func.diff
 delete mode 100644 stubdom/grub.patches/30savedefault.diff
 delete mode 100644 stubdom/grub.patches/40ext3_256byte_inode.diff
 delete mode 100644 stubdom/grub.patches/50fs_fulldisk.diff
 delete mode 100644 stubdom/grub.patches/60ext4.diff
 delete mode 100644 stubdom/grub.patches/61btrfs.diff
 delete mode 100644 stubdom/grub.patches/70compiler_warnings.diff
 delete mode 100644 stubdom/grub.patches/99minios
 delete mode 100644 stubdom/grub/Makefile
 delete mode 100644 stubdom/grub/boot-x86_32.S
 delete mode 100644 stubdom/grub/boot-x86_64.S
 delete mode 100644 stubdom/grub/config.h
 delete mode 100644 stubdom/grub/kexec.c
 delete mode 100644 stubdom/grub/mini-os.c
 delete mode 100644 stubdom/grub/mini-os.h
 delete mode 100644 stubdom/grub/minios.cfg
 delete mode 100644 stubdom/grub/osdep.h
 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
Signature · 1 line
2.54.0
#1 lore raw

PATCH 1/5 stubdom: remove support for grub-pv

The Mini-OS based grub-pv is not being built by default since Xen 4.16. Additionally it can be replaced in most cases by the more modern pvgrub (part of grub upstream), while grub-pv is based on legacy grub 0.97.

In case someone is really depending on grub-pv, an old build from a previous Xen version can be used without any problem, as only stable hypercall interfaces are used by it.

Remove grub-pv from the build system.

---
 Makefile                                      |    3 -
 config/Stubdom.mk.in                          |    3 -
 stubdom/.gitignore                            |    1 -
 stubdom/Makefile                              |   54 -
 stubdom/configure                             |   65 -
 stubdom/configure.ac                          |    2 -
 stubdom/grub.patches/00cvs                    | 1022 -----
 stubdom/grub.patches/10graphics.diff          | 2297 -----------
 stubdom/grub.patches/11graphics-keyboard.diff |   13 -
 stubdom/grub.patches/20print_func.diff        |   52 -
 stubdom/grub.patches/30savedefault.diff       |  186 -
 .../grub.patches/40ext3_256byte_inode.diff    |  114 -
 stubdom/grub.patches/50fs_fulldisk.diff       |   72 -
 stubdom/grub.patches/60ext4.diff              |  474 ---
 stubdom/grub.patches/61btrfs.diff             | 3499 -----------------
 stubdom/grub.patches/70compiler_warnings.diff |   45 -
 stubdom/grub.patches/99minios                 | 1570 --------
 stubdom/grub/Makefile                         |   88 -
 stubdom/grub/boot-x86_32.S                    |  112 -
 stubdom/grub/boot-x86_64.S                    |  108 -
 stubdom/grub/config.h                         |   12 -
 stubdom/grub/kexec.c                          |  434 --
 stubdom/grub/mini-os.c                        |  771 ----
 stubdom/grub/mini-os.h                        |    7 -
 stubdom/grub/minios.cfg                       |    4 -
 stubdom/grub/osdep.h                          |   30 -
 26 files changed, 11038 deletions(-)
 delete mode 100644 stubdom/grub.patches/00cvs
 delete mode 100644 stubdom/grub.patches/10graphics.diff
 delete mode 100644 stubdom/grub.patches/11graphics-keyboard.diff
 delete mode 100644 stubdom/grub.patches/20print_func.diff
 delete mode 100644 stubdom/grub.patches/30savedefault.diff
 delete mode 100644 stubdom/grub.patches/40ext3_256byte_inode.diff
 delete mode 100644 stubdom/grub.patches/50fs_fulldisk.diff
 delete mode 100644 stubdom/grub.patches/60ext4.diff
 delete mode 100644 stubdom/grub.patches/61btrfs.diff
 delete mode 100644 stubdom/grub.patches/70compiler_warnings.diff
 delete mode 100644 stubdom/grub.patches/99minios
 delete mode 100644 stubdom/grub/Makefile
 delete mode 100644 stubdom/grub/boot-x86_32.S
 delete mode 100644 stubdom/grub/boot-x86_64.S
 delete mode 100644 stubdom/grub/config.h
 delete mode 100644 stubdom/grub/kexec.c
 delete mode 100644 stubdom/grub/mini-os.c
 delete mode 100644 stubdom/grub/mini-os.h
 delete mode 100644 stubdom/grub/minios.cfg
 delete mode 100644 stubdom/grub/osdep.h
Makefile +0 -3
index 67b71ac3d4..eb388726b0 100644
@@ -71,9 +71,6 @@ build-tools-oxenstored: build-tools-public-headers
 .PHONY: build-stubdom
 build-stubdom: mini-os-dir build-tools-public-headers
 	$(MAKE) -C stubdom build
-ifeq (x86_64,$(XEN_TARGET_ARCH))
-	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub-if-enabled
-endif
 
 define do-subtree
 $(1)/%: FORCE
config/Stubdom.mk.in +0 -3
index b399d77740..0d70d03941 100644
@@ -23,9 +23,6 @@ NEWLIB_URL          := @NEWLIB_URL@
 LWIP_VERSION        := @LWIP_VERSION@
 LWIP_URL            := @LWIP_URL@
 
-GRUB_VERSION        := @GRUB_VERSION@
-GRUB_URL            := @GRUB_URL@
-
 GMP_VERSION         := @GMP_VERSION@
 GMP_URL             := @GMP_URL@
 
stubdom/.gitignore +0 -1
index 1b69656d45..08f2e9b432 100644
@@ -9,7 +9,6 @@
 /cross-root-*
 /gcc-*
 /gmp-*
-/grub-*
 /include
 /libs-*
 /libxencall-*
stubdom/Makefile +0 -54

102 lines not on this page · raw message

stubdom/configure +0 -65

113 lines not on this page · raw message

stubdom/configure.ac +0 -2
index 33f170144e..6ff3ab0ee9 100644
@@ -18,7 +18,6 @@ m4_include([../m4/depends.m4])
 m4_include([../m4/fetcher.m4])
 
 # Enable/disable stub domains
-AX_STUBDOM_DEFAULT_DISABLE([pv-grub], [grub])
 AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore])
 AX_STUBDOM_DEFAULT_ENABLE([xenstorepvh-stubdom], [xenstorepvh])
 AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])
@@ -43,7 +42,6 @@ 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([GRUB], [grub], [0.97], [https://alpha.gnu.org/gnu/grub])
 AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive])
 AX_STUBDOM_LIB([POLARSSL], [polarssl], [1.1.4])
 AX_STUBDOM_LIB([TPMEMU], [berlios tpm emulator], [0.7.4])
stubdom/grub.patches/00cvs deleted +0 -1022

1,022 lines not on this page · raw message

stubdom/grub.patches/10graphics.diff deleted +0 -2297

1,724 lines not on this page · raw message

stubdom/grub.patches/11graphics-keyboard.diff deleted +0 -13
deleted file mode 100644
index fe17b20a6f..0000000000

Lines of this file are not shown. View the raw message.

stubdom/grub.patches/20print_func.diff deleted +0 -52

52 lines not on this page · raw message

stubdom/grub.patches/30savedefault.diff deleted +0 -186

186 lines not on this page · raw message

stubdom/grub.patches/40ext3_256byte_inode.diff deleted +0 -114

114 lines not on this page · raw message

stubdom/grub.patches/50fs_fulldisk.diff deleted +0 -72

72 lines not on this page · raw message

stubdom/grub.patches/60ext4.diff deleted +0 -474

474 lines not on this page · raw message

stubdom/grub.patches/61btrfs.diff deleted +0 -3499

3,499 lines not on this page · raw message

stubdom/grub.patches/70compiler_warnings.diff deleted +0 -45

45 lines not on this page · raw message

stubdom/grub.patches/99minios deleted +0 -1570

1,570 lines not on this page · raw message

stubdom/grub/Makefile deleted +0 -88

88 lines not on this page · raw message

stubdom/grub/boot-x86_32.S deleted +0 -112

112 lines not on this page · raw message

stubdom/grub/boot-x86_64.S deleted +0 -108

108 lines not on this page · raw message

stubdom/grub/config.h deleted +0 -12
deleted file mode 100644
index 15a6583999..0000000000

Lines of this file are not shown. View the raw message.

stubdom/grub/kexec.c deleted +0 -434

434 lines not on this page · raw message

stubdom/grub/mini-os.c deleted +0 -771

771 lines not on this page · raw message

stubdom/grub/mini-os.h deleted +0 -7
deleted file mode 100644
index 9ec2bda014..0000000000

Lines of this file are not shown. View the raw message.

stubdom/grub/minios.cfg deleted +0 -4
deleted file mode 100644
index 5145b357e0..0000000000

Lines of this file are not shown. View the raw message.

stubdom/grub/osdep.h deleted +0 -30
deleted file mode 100644
index 1d3e50adbf..0000000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.54.0

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH 2/5 stubdom: remove support for building in 32-bit mode

In reply to Juergen Gross

With the removal of grub-pv there is no 32-bit stubdom left.

Remove 32-bit support from the stubdom build system.

---
 Makefile         |  3 ---
 stubdom/Makefile | 11 -----------
 2 files changed, 14 deletions(-)
Makefile +0 -3
index eb388726b0..ea432e21b0 100644
@@ -146,9 +146,6 @@ install-tools: install-tools-public-headers
 .PHONY: install-stubdom
 install-stubdom: mini-os-dir install-tools-public-headers
 	$(MAKE) -C stubdom install
-ifeq (x86_64,$(XEN_TARGET_ARCH))
-	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub-if-enabled
-endif
 
 .PHONY: tools/firmware/seabios-dir-force-update
 tools/firmware/seabios-dir-force-update:
stubdom/Makefile +0 -11
index 850e8544ca..2698bddc9d 100644
@@ -31,15 +31,7 @@ endef
 $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_deps,$(lib))))
 
 GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH)
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-GNU_TARGET_ARCH:=i686
-endif
 
-ifeq ($(GNU_TARGET_ARCH), i686)
-TARGET_CFLAGS=
-NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
-STUBDOM_SUPPORTED=1
-endif
 ifeq ($(GNU_TARGET_ARCH), x86_64)
 TARGET_CFLAGS=-mno-red-zone
 NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
@@ -179,9 +171,6 @@ gmp-$(GMP_VERSION).tar.bz2:
 	$(FETCHER) $@ $(GMP_URL)/$@
 
 .PHONY: cross-gmp
-ifeq ($(XEN_TARGET_ARCH), x86_32)
-   GMPEXT=ABI=32
-endif
 gmp-$(XEN_TARGET_ARCH): gmp-$(GMP_VERSION).tar.bz2 $(NEWLIB_STAMPFILE)
 	tar xjf $<
 	rm $@ -rf || :
Signature · 1 line
2.54.0
#3 lore raw

Re: [PATCH 2/5] stubdom: remove support for building in 32-bit mode

Makefile install-tools: install-tools-public-headers · line 151

Quoted 9 lines · Juergen Gross
Makefile +0 -3
@@ -146,9 +146,6 @@ install-tools: install-tools-public-headers
 .PHONY: install-stubdom
 install-stubdom: mini-os-dir install-tools-public-headers
 	$(MAKE) -C stubdom install
-ifeq (x86_64,$(XEN_TARGET_ARCH))
-	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub-if-enabled
-endif

Doesn't this belong in patch 1, together with the build-stubdom: rule adjustment? Or does that other hunk belong here?

Jan

#4 lore raw

Re: [PATCH 2/5] stubdom: remove support for building in 32-bit mode

Quoted 13 lines · Jan Beulich

Makefile install-tools: install-tools-public-headers · line 151

Quoted 9 lines · Juergen Gross
Makefile +0 -3
@@ -146,9 +146,6 @@ install-tools: install-tools-public-headers
  .PHONY: install-stubdom
  install-stubdom: mini-os-dir install-tools-public-headers
  	$(MAKE) -C stubdom install
-ifeq (x86_64,$(XEN_TARGET_ARCH))
-	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub-if-enabled
-endif

Doesn't this belong in patch 1, together with the build-stubdom: rule adjustment? Or does that other hunk belong here?

Ah yes, probably better to move it to patch 1.

Juergen

#5 lore raw

PATCH 3/5 stubdom: remove building of libxenguest and libxenctrl

In reply to Juergen Gross

grub-pv was the last user of the stubdom variants of libxenguest and libxenctrl.

Remove both libraries from the stubdom build system.

---
 stubdom/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
stubdom/Makefile +1 -3
index 2698bddc9d..40b6ececf1 100644
@@ -256,9 +256,7 @@ $(CROSS_ROOT): cross-newlib cross-zlib cross-libpci
 # libraries under tools/libs
 #######
 
-STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel ctrl guest manage
-
-LIBDEP_guest := cross-zlib
+STUB_LIBS := toolcore toollog evtchn gnttab call foreignmemory devicemodel manage
 
 #######
 # common handling
Signature · 1 line
2.54.0
#6 lore raw

PATCH 4/5 docs: remove stale stubdom entries from stubdom.txt

In reply to Juergen Gross

There are several stubdoms mentioned in docs/misc/stubdom.txt which no longer exist. Remove them.

---
 docs/misc/stubdom.txt | 69 -------------------------------------------
 1 file changed, 69 deletions(-)
docs/misc/stubdom.txt +0 -69
index cfcba4ba96..3ee96d5063 100644
@@ -85,72 +85,3 @@ To change the CD-ROM medium, libxl will:
 
 The stubdom must internally add /dev/xvdc to an fdset in QEMU with opaque set
 to "stub-devid:$devid".  libxl will lookup the fdset with that string.
-
-                                   PV-GRUB
-                                   =======
-
-  This replaces pygrub to boot domU images safely: it runs the regular grub
-inside the created domain itself and uses regular domU facilities to read the
-disk / fetch files from network etc. ; it eventually loads the PV kernel and
-chain-boots it.
-  
-Configuration
-=============
-
-In your PV config,
-
-- use pv-grub.gz as kernel:
-
-kernel = "pv-grub.gz"
-
-- set the path to menu.lst, as seen from the domU, in extra:
-
-extra = "(hd0,0)/boot/grub/menu.lst"
-
-or you can provide the content of a menu.lst stored in dom0 by passing it as a
-ramdisk:
-
-ramdisk = "/boot/domU-1-menu.lst"
-
-or you can also use a tftp path (dhcp will be automatically performed):
-
-extra = "(nd)/somepath/menu.lst"
-
-or you can set it in option 150 of your dhcp server and leave extra and ramdisk
-empty (dhcp will be automatically performed)
-
-Limitations
-===========
-
-- You can not boot a 64bit kernel with a 32bit-compiled PV-GRUB and vice-versa.
-To cross-compile a 32bit PV-GRUB,
-
-export XEN_TARGET_ARCH=x86_32
-
-- bootsplash is supported, but the ioemu backend does not yet support restart
-for use by the booted kernel.
-
-- PV-GRUB doesn't support virtualized partitions. For instance:
-
-disk = [ 'phy:hda7,hda7,w' ]
-
-will be seen by PV-GRUB as (hd0), not (hd0,6), since GRUB will not see any
-partition table.
-
-
-                                Your own stubdom
-                                ================
-
-  By running
-
-cd stubdom/
-make c-stubdom
-
-  or
-
-cd stubdom/
-make caml-stubdom
-
-  you can compile examples of C or caml stub domain kernels.  You can use these
-and the relevant Makefile rules as basis to build your own stub domain kernel.
-Available libraries are libc, libxc, libxs, zlib and libpci.
Signature · 1 line
2.54.0
#7 lore raw

PATCH 5/5 tools/libxenguest: remove Mini-OS specific parts

In reply to Juergen Gross

The last Mini-OS use case of libxenguest is gone, so remove the Mini-OS specific parts of libxenguest.

---
 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
tools/libs/guest/Makefile.common +0 -15
index 86b1f160e5..47b3a52360 100644
@@ -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
tools/libs/guest/xg_dom_decompress_unsafe.c deleted +0 -48

48 lines not on this page · raw message

tools/libs/guest/xg_dom_decompress_unsafe.h deleted +0 -28
deleted file mode 100644
index 5bc2222076..0000000000
@@ -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")));
tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c deleted +0 -14
deleted file mode 100644
index 9d3709e6cc..0000000000
@@ -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);
-}
tools/libs/guest/xg_dom_decompress_unsafe_lz4.c deleted +0 -39
deleted file mode 100644
index 405143aa61..0000000000
@@ -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);
-}
tools/libs/guest/xg_dom_decompress_unsafe_lzma.c deleted +0 -14
deleted file mode 100644
index 5d178f0c43..0000000000
@@ -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);
-}
tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c deleted +0 -44

44 lines not on this page · raw message

tools/libs/guest/xg_dom_decompress_unsafe_xz.c deleted +0 -46

46 lines not on this page · raw message

tools/libs/guest/xg_dom_decompress_unsafe_zstd.c deleted +0 -44

44 lines not on this page · raw message

Signature · 1 line
2.54.0
#8 lore raw
In reply to Juergen Gross
Quoted 8 lines · Juergen Gross

The grub-pv stubdoms (32- and 64-bit) are disabled by default since several years now.

Remove them in order to enable removing quite some more code from Xen. In case someone is really depending on grub-pv, they can easily take it from an older Xen build, as there is no Xen version dependency in grub-pv (a version built 3 years ago has been tested to still work with current 4.23 staging Xen).

What guarantees this to remain this way, when ...

Quoted 4 lines

Juergen Gross (5):
stubdom: remove support for grub-pv
stubdom: remove support for building in 32-bit mode
stubdom: remove building of libxenguest and libxenctrl

... there was this dependency on (unstable) libraries?

Jan

#9 lore raw
Quoted 10 lines · Jan Beulich
Quoted 8 lines · Juergen Gross

The grub-pv stubdoms (32- and 64-bit) are disabled by default since several years now.

Remove them in order to enable removing quite some more code from Xen. In case someone is really depending on grub-pv, they can easily take it from an older Xen build, as there is no Xen version dependency in grub-pv (a version built 3 years ago has been tested to still work with current 4.23 staging Xen).

Quoted 8 lines

What guarantees this to remain this way, when ...

Quoted 4 lines

Juergen Gross (5):
stubdom: remove support for grub-pv
stubdom: remove support for building in 32-bit mode
stubdom: remove building of libxenguest and libxenctrl

... there was this dependency on (unstable) libraries?

Only stable hypercalls are being used. Otherwise the domctl version check would fail, right?

I did a review of the stubdom specific grub code and didn't spot any use of an unstable hypercall, BTW.

Juergen

#10 lore raw
Quoted 18 lines · Juergen Gross
Quoted 17 lines · Jan Beulich
Quoted 8 lines · Juergen Gross

The grub-pv stubdoms (32- and 64-bit) are disabled by default since several years now.

Remove them in order to enable removing quite some more code from Xen. In case someone is really depending on grub-pv, they can easily take it from an older Xen build, as there is no Xen version dependency in grub-pv (a version built 3 years ago has been tested to still work with current 4.23 staging Xen).

What guarantees this to remain this way, when ...

Quoted 4 lines

Juergen Gross (5):
stubdom: remove support for grub-pv
stubdom: remove support for building in 32-bit mode
stubdom: remove building of libxenguest and libxenctrl

Quoted 4 lines
Quoted 1 line

... there was this dependency on (unstable) libraries?

Only stable hypercalls are being used. Otherwise the domctl version check would fail, right?

Of course, but the libraries offer more than just wrappers around domctl. Yet then ...

Quoted 2 lines

I did a review of the stubdom specific grub code and didn't spot any use of an unstable hypercall, BTW.

... this is of course reassuring.

Jan