From: Ian Jackson Date: Mon, 15 Oct 2018 11:17:25 +0000 (+0100) Subject: Commit patch queue (exported by git-debrebase) X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=73166f4cba449b3a7f60f867339e1f610ffc645d;p=xen.git Commit patch queue (exported by git-debrebase) [git-debrebase make-patches: export and commit patches] --- diff --git a/debian/patches/0039-tools-firmware-Makfile-Respect-caller-s-CONFIG_PV_SH.patch b/debian/patches/0039-tools-firmware-Makfile-Respect-caller-s-CONFIG_PV_SH.patch new file mode 100644 index 0000000000..7a9c758ed5 --- /dev/null +++ b/debian/patches/0039-tools-firmware-Makfile-Respect-caller-s-CONFIG_PV_SH.patch @@ -0,0 +1,26 @@ +From: Ian Jackson +Date: Fri, 12 Oct 2018 16:00:16 +0000 +Subject: tools/firmware/Makfile: Respect caller's CONFIG_PV_SHIM + +This makes it easier to disable the shim build. (In Debian we need to +build the shim separately because it needs different compiler flags +and a different XEN_COMPILE_ARCH. + +Signed-off-by: Ian Jackson +--- + tools/firmware/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile +index 5a7cf77..d6104e6 100644 +--- a/tools/firmware/Makefile ++++ b/tools/firmware/Makefile +@@ -2,7 +2,7 @@ XEN_ROOT = $(CURDIR)/../.. + include $(XEN_ROOT)/tools/Rules.mk + + ifneq ($(XEN_TARGET_ARCH),x86_32) +-CONFIG_PV_SHIM := y ++CONFIG_PV_SHIM ?= y + endif + + # hvmloader is a 32-bit protected mode binary. diff --git a/debian/patches/0040-shim-Provide-separate-install-shim-target.patch b/debian/patches/0040-shim-Provide-separate-install-shim-target.patch new file mode 100644 index 0000000000..cb13f94de8 --- /dev/null +++ b/debian/patches/0040-shim-Provide-separate-install-shim-target.patch @@ -0,0 +1,77 @@ +From: Ian Jackson +Date: Fri, 12 Oct 2018 17:17:10 +0000 +Subject: shim: Provide separate install-shim target + +When building on a 32-bit userland, the user wants to build 32-bit +tools and a 64-bit hypervisor. This involves setting XEN_TARGET_ARCH +to different values for the tools build and the hypervisor build. + +So the user must invoke the tools build and the hypervisor build +separately. + +However, although the shim is done by the tools/firmware Makefile, its +bitness needs to be the same as the hypervisor, not the same as the +tools. When run with XEN_TARGET_ARCH=x86_32, it it skipped, which is +wrong. + +So the user must invoke the shim build separately. This can be done +with + make -C tools/firmware/xen-dir XEN_TARGET_ARCH=x86_64 + +However, tools/firmware/xen-dir has no `install' target. The +installation of all `firmware' is done in tools/firmware/Makefile. It +might be possible to fix this, but it is not trivial. For example, +the definitions of INST_DIR and DEBG_DIR would need to be copied, as +would an appropriate $(INSTALL_DIR) call. + +For now, provide an `install-shim' target in tools/firmware/Makefile. + +This has to be called from `install' of course. We can't make it +a dependency of `install' because it might be run before `all' has +completed. We could make it depend on a `shim' target but such +a target is nearly impossible to write because everything is done by +the inflexible subdir-$@ machinery. + +The overally result of this patch is that existing make invocations +work as before. But additionally, the user can say + make -C tools/firmware install-shim XEN_TARGET_ARCH=x86_64 +to install the shim. The user must have built it already. +Unlike the build rune, this install-rune is properly conditional +so it is OK to call on ARM. + +What a mess. + +Signed-off-by: Ian Jackson +--- + tools/firmware/Makefile | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile +index d6104e6..c449fab 100644 +--- a/tools/firmware/Makefile ++++ b/tools/firmware/Makefile +@@ -43,6 +43,12 @@ ifeq ($(CONFIG_ROMBIOS),y) + endif + $(MAKE) $(LD32BIT-y) CC=$(CC) PYTHON=$(PYTHON) subdirs-$@ + ++.PHONY: install-shim ++install-shim: ++ifeq ($(CONFIG_PV_SHIM),y) ++ $(INSTALL_DATA) xen-dir/xen-shim $(INST_DIR)/xen-shim ++ $(INSTALL_DATA) xen-dir/xen-shim-syms $(DEBG_DIR)/xen-shim-syms ++endif + + .PHONY: install + install: all +@@ -55,10 +61,7 @@ endif + ifeq ($(CONFIG_OVMF),y) + $(INSTALL_DATA) ovmf-dir/ovmf.bin $(INST_DIR)/ovmf.bin + endif +-ifeq ($(CONFIG_PV_SHIM),y) +- $(INSTALL_DATA) xen-dir/xen-shim $(INST_DIR)/xen-shim +- $(INSTALL_DATA) xen-dir/xen-shim-syms $(DEBG_DIR)/xen-shim-syms +-endif ++ $(MAKE) install-shim + + .PHONY: uninstall + uninstall: diff --git a/debian/patches/0041-tools-firmware-Makefile-CONFIG_PV_SHIM-enable-only-o.patch b/debian/patches/0041-tools-firmware-Makefile-CONFIG_PV_SHIM-enable-only-o.patch new file mode 100644 index 0000000000..39f76cd0ff --- /dev/null +++ b/debian/patches/0041-tools-firmware-Makefile-CONFIG_PV_SHIM-enable-only-o.patch @@ -0,0 +1,26 @@ +From: Ian Jackson +Date: Fri, 12 Oct 2018 17:56:04 +0000 +Subject: tools/firmware/Makefile: CONFIG_PV_SHIM: enable only on x86_64 + +Previously this was *dis*abled for x86_*32*. But if someone should +run some of this Makefile on ARM, say, it ought not to be built +either. + +Signed-off-by: Ian Jackson +--- + tools/firmware/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile +index c449fab..40e36d9 100644 +--- a/tools/firmware/Makefile ++++ b/tools/firmware/Makefile +@@ -1,7 +1,7 @@ + XEN_ROOT = $(CURDIR)/../.. + include $(XEN_ROOT)/tools/Rules.mk + +-ifneq ($(XEN_TARGET_ARCH),x86_32) ++ifeq ($(XEN_TARGET_ARCH),x86_64) + CONFIG_PV_SHIM ?= y + endif + diff --git a/debian/patches/0042-docs-man-xen-vbd-interface.7-Provide-properly-format.patch b/debian/patches/0042-docs-man-xen-vbd-interface.7-Provide-properly-format.patch new file mode 100644 index 0000000000..816d97b8c6 --- /dev/null +++ b/debian/patches/0042-docs-man-xen-vbd-interface.7-Provide-properly-format.patch @@ -0,0 +1,26 @@ +From: Ian Jackson +Date: Fri, 12 Oct 2018 17:56:56 +0100 +Subject: docs/man/xen-vbd-interface.7: Provide properly-formatted NAME section + +This manpage was omitted from + docs/man: Provide properly-formatted NAME sections +because I was previously building with markdown not installed. + +Signed-off-by: Ian Jackson +--- + docs/man/xen-vbd-interface.markdown.7 | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/docs/man/xen-vbd-interface.markdown.7 b/docs/man/xen-vbd-interface.markdown.7 +index 1c996bf..d950d95 100644 +--- a/docs/man/xen-vbd-interface.markdown.7 ++++ b/docs/man/xen-vbd-interface.markdown.7 +@@ -1,3 +1,8 @@ ++Name ++---- ++ ++xen-vbd-interface - Xen paravirtualised block device protocol ++ + Xen guest interface + ------------------- + diff --git a/debian/patches/0043-Revert-tools-xenstore-compatibility.diff.patch b/debian/patches/0043-Revert-tools-xenstore-compatibility.diff.patch new file mode 100644 index 0000000000..4a7dfc7933 --- /dev/null +++ b/debian/patches/0043-Revert-tools-xenstore-compatibility.diff.patch @@ -0,0 +1,70 @@ +From: Ian Jackson +Date: Mon, 15 Oct 2018 12:11:32 +0100 +Subject: Revert "tools-xenstore-compatibility.diff" + +Following recent discussion in pkg-xen-devel and xen-devel, + https://lists.xenproject.org/archives/html/xen-devel/2018-10/msg00838.html +I am dropping this patch. + +For now I revert it. When we next debrebase, we can (if we like) +throw away both the original patch, and this revert. + +This reverts commit 5047884c76849b67e364bc525d1b3b55e781cf16. + +Signed-off-by: Ian Jackson +--- + tools/xenstore/include/xenstore.h | 1 - + tools/xenstore/xenstore_client.c | 2 +- + tools/xenstore/xs.c | 4 +--- + 3 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/tools/xenstore/include/xenstore.h b/tools/xenstore/include/xenstore.h +index edf6271..0d95bb0 100644 +--- a/tools/xenstore/include/xenstore.h ++++ b/tools/xenstore/include/xenstore.h +@@ -25,7 +25,6 @@ + + #define XS_OPEN_READONLY 1UL<<0 + #define XS_OPEN_SOCKETONLY 1UL<<1 +-#define XS_OPEN_DOMAINONLY 1UL<<2 + + /* + * Setting XS_UNWATCH_FILTER arranges that after xs_unwatch, no +diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c +index d7ae1ec..3d14d37 100644 +--- a/tools/xenstore/xenstore_client.c ++++ b/tools/xenstore/xenstore_client.c +@@ -636,7 +636,7 @@ main(int argc, char **argv) + max_width = ws.ws_col - 2; + } + +- xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : XS_OPEN_DOMAINONLY); ++ xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : 0); + if (xsh == NULL) err(1, "xs_open"); + + again: +diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c +index 4e99bf8..cbcebb2 100644 +--- a/tools/xenstore/xs.c ++++ b/tools/xenstore/xs.c +@@ -307,19 +307,17 @@ struct xs_handle *xs_daemon_open_readonly(void) + + struct xs_handle *xs_domain_open(void) + { +- return xs_open(XS_OPEN_DOMAINONLY); ++ return xs_open(0); + } + + struct xs_handle *xs_open(unsigned long flags) + { + struct xs_handle *xsh = NULL; + +- if (!(flags & XS_OPEN_DOMAINONLY)) { + if (flags & XS_OPEN_READONLY) + xsh = get_handle(xs_daemon_socket_ro()); + else + xsh = get_handle(xs_daemon_socket()); +- } + + if (!xsh && !(flags & XS_OPEN_SOCKETONLY)) + xsh = get_handle(xs_domain_dev()); diff --git a/debian/patches/series b/debian/patches/series index 39ea86df74..b38b738c38 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -36,3 +36,8 @@ prefix-abiname/tools-libfsimage-abiname.diff prefix-abiname/tools-libfsimage-prefix.diff 0037-autoconf-Provide-libexec_libdir_suffix.patch 0038-.gitignore-Add-configure-output-which-we-always-dele.patch +0039-tools-firmware-Makfile-Respect-caller-s-CONFIG_PV_SH.patch +0040-shim-Provide-separate-install-shim-target.patch +0041-tools-firmware-Makefile-CONFIG_PV_SHIM-enable-only-o.patch +0042-docs-man-xen-vbd-interface.7-Provide-properly-format.patch +0043-Revert-tools-xenstore-compatibility.diff.patch