Skip to contentSkip to conversation

tools: add option to explicitly enable VirtFS in QEMU build

PATCH Superseded Paul Durrant 2 participants 5 messages Sep 11, 2018

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools: add option to explicitly enable VirtFS in QEMU build

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless VirtFS is enabled, which is predicated on the libcap and libattr dev packages being installed. This is not obvious to anyone intending to use 9pfs.

This patch adds an 'enable-9pfs' option to configure which, if specified, will cause '--enable-virtfs' to be passed to QEMU's configure. This will cause the dependency on libcap and libattr to be called out if the packages are not in installed.

For completeness, specifying 'disable-9pfs' will cause '--disable-virtfs' to be passed to QEMU's confgure and not specifying an option will keep the previous behaviour of predicating VirtFS on whether the libcap and libattr packages are installed.

NOTE: The shell script in configure might look odd, but it is coded for
consistency with other similar logic blocks within the file.

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

v2:
- Add the configure option rather then enabling VirtFS in all Linux builds.

---
 config/Tools.mk.in |  1 +
 tools/Makefile     | 10 +++++++++-
 tools/configure    | 29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
config/Tools.mk.in +1 -0
index 0964f6f9e9..bdba087af0 100644
@@ -62,6 +62,7 @@ SYSTEMD_CFLAGS      := @SYSTEMD_CFLAGS@
 SYSTEMD_LIBS        := @SYSTEMD_LIBS@
 XEN_SYSTEMD_DIR     := @SYSTEMD_DIR@
 XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@
+CONFIG_9PFS         := @ninepfs@
 
 LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@
 
tools/Makefile +9 -1
index 67977ad850..c903d6a63e 100644
@@ -232,6 +232,13 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
+	if [ "$(CONFIG_9PFS)" = "y" ]; then \
+		virtfs='--enable-virtfs' ; \
+	elif [ "$(CONFIG_9PFS)" = "n" ]; then \
+		virtfs='--disable-virtfs' ; \
+	else \
+		virtfs='' ; \
+	fi ; \
 	PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config$${PKG_CONFIG_PATH:+:$${PKG_CONFIG_PATH}} \
 	$$source/configure --enable-xen --target-list=i386-softmmu \
 		$(QEMU_XEN_ENABLE_DEBUG) \
@@ -279,7 +286,8 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 		--python=$(PYTHON) \
 		$(CONFIG_QEMUU_EXTRA_ARGS) \
 		--cpu=$(IOEMU_CPU_ARCH) \
-		$(IOEMU_CONFIGURE_CROSS); \
+		$(IOEMU_CONFIGURE_CROSS) \
+		$$virtfs; \
 	$(MAKE) all
 
 subdir-install-qemu-xen-dir: subdir-all-qemu-xen-dir
tools/configure +29 -0
index 27c8d054ab..1ce5215456 100755
@@ -711,6 +711,7 @@ ocamltools
 monitors
 githttp
 rpath
+ninepfs
 DEBUG_DIR
 XEN_DUMP_DIR
 XEN_PAGING_DIR
@@ -820,6 +821,7 @@ with_xenstored
 enable_systemd
 with_systemd
 with_systemd_modules_load
+enable_9pfs
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1500,6 +1502,8 @@ Optional Features:
   --disable-ipxe          Enable in-tree IPXE, (DEFAULT is on if rombios is
                           enabled, otherwise off, see also --with-system-ipxe)
   --enable-systemd        Enable systemd support (default is DISABLED)
+  --enable-9pfs           Explicitly enable 9pfs support in QEMU build
+                          (default is to defer to QEMU configure default)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -9799,6 +9803,31 @@ if test "x$systemd" = "xy"; then :
 
 fi
 
+
+
+# Check whether --enable-9pfs was given.
+if test "${enable_9pfs+set}" = set; then :
+  enableval=$enable_9pfs;
+fi
+
+
+if test "x$enable_9pfs" = "xno"; then :
+
+    ax_cv_9pfs="n"
+
+elif test "x$enable_9pfs" = "xyes"; then :
+
+    ax_cv_9pfs="y"
+
+elif test -z $ax_cv_9pfs; then :
+
+    ax_cv_9pfs=""
+
+fi
+ninepfs=$ax_cv_9pfs
+
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 31 lines
Quoted 1 line
Quoted 1 line · On 11.09.18 at 15:37, <[email protected]> wrote:

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless VirtFS is enabled, which is predicated on the libcap and libattr dev packages being installed. This is not obvious to anyone intending to use 9pfs.

This patch adds an 'enable-9pfs' option to configure which, if specified, will cause '--enable-virtfs' to be passed to QEMU's configure. This will cause the dependency on libcap and libattr to be called out if the packages are not in installed.

For completeness, specifying 'disable-9pfs' will cause '--disable-virtfs' to be passed to QEMU's confgure and not specifying an option will keep the previous behaviour of predicating VirtFS on whether the libcap and libattr packages are installed.

NOTE: The shell script in configure might look odd, but it is coded for
consistency with other similar logic blocks within the file.

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

Quoted 7 lines

v2:
- Add the configure option rather then enabling VirtFS in all Linux builds.

---
 config/Tools.mk.in |  1 +
 tools/Makefile     | 10 +++++++++-
 tools/configure    | 29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

Wouldn't you first and foremost need to edit tools/configure.ac?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 52 lines

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: 11 September 2018 14:45
To: Paul Durrant <[email protected]>
Cc: Julien Grall <[email protected]>; Andrew Cooper <[email protected]>; Wei Liu <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Stefano Stabellini <[email protected]>; xen-devel <xen- [email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Tim (Xen.org) <[email protected]>
Subject: Re: [PATCH v2] tools: add option to explicitly enable VirtFS in QEMU build

Quoted 31 lines
Quoted 1 line
Quoted 1 line · On 11.09.18 at 15:37, <[email protected]> wrote:

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless VirtFS is enabled, which is predicated on the libcap and libattr dev packages being installed. This is not obvious to anyone intending to use 9pfs.

This patch adds an 'enable-9pfs' option to configure which, if specified, will cause '--enable-virtfs' to be passed to QEMU's configure. This will cause the dependency on libcap and libattr to be called out if the packages are not in installed.

For completeness, specifying 'disable-9pfs' will cause '--disable-virtfs' to be passed to QEMU's confgure and not specifying an option will keep the previous behaviour of predicating VirtFS on whether the libcap and libattr packages are installed.

NOTE: The shell script in configure might look odd, but it is coded for
consistency with other similar logic blocks within the file.

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

Quoted 7 lines

v2:
- Add the configure option rather then enabling VirtFS in all Linux builds.

---
 config/Tools.mk.in |  1 +
 tools/Makefile     | 10 +++++++++-
 tools/configure    | 29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
Quoted 2 lines

Wouldn't you first and foremost need to edit tools/configure.ac?

No idea. There seem to be several layer of magic so it's quite believable that I've missed one. Any clue as to what I need to do there?

Paul

Quoted 2 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 69 lines

-----Original Message-----
From: Paul Durrant
Sent: 11 September 2018 15:04
To: 'Jan Beulich' <[email protected]>
Cc: Julien Grall <[email protected]>; Andrew Cooper <[email protected]>; Wei Liu <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Stefano Stabellini <[email protected]>; xen-devel <xen- [email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Tim (Xen.org) <[email protected]>
Subject: RE: [PATCH v2] tools: add option to explicitly enable VirtFS in QEMU build

Quoted 7 lines

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: 11 September 2018 14:45
To: Paul Durrant <[email protected]>
Cc: Julien Grall <[email protected]>; Andrew Cooper <[email protected]>; Wei Liu <[email protected]>; George Dunlap <[email protected]>; Ian Jackson

<[email protected]>;

Quoted 4 lines

Stefano Stabellini <[email protected]>; xen-devel <xen- [email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Tim (Xen.org) <[email protected]>
Subject: Re: [PATCH v2] tools: add option to explicitly enable VirtFS in

QEMU

Quoted 4 lines

build

Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 11.09.18 at 15:37, <[email protected]> wrote:

9pfs support has been a documented feature since Xen 4.9, but QEMU

will

Quoted 7 lines
Quoted 7 lines

not be built with backend support unless VirtFS is enabled, which is predicated on the libcap and libattr dev packages being installed. This is not obvious to anyone intending to use 9pfs.

This patch adds an 'enable-9pfs' option to configure which, if specified, will cause '--enable-virtfs' to be passed to QEMU's configure. This will cause the dependency on libcap and libattr to be called out if the

packages

Quoted 30 lines
Quoted 29 lines

are not in installed.

For completeness, specifying 'disable-9pfs' will cause '--disable-virtfs' to be passed to QEMU's confgure and not specifying an option will keep the previous behaviour of predicating VirtFS on whether the libcap and libattr packages are installed.

NOTE: The shell script in configure might look odd, but it is coded for
consistency with other similar logic blocks within the file.

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

v2:
- Add the configure option rather then enabling VirtFS in all Linux builds.

---
 config/Tools.mk.in |  1 +
 tools/Makefile     | 10 +++++++++-
 tools/configure    | 29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines

Wouldn't you first and foremost need to edit tools/configure.ac?

No idea. There seem to be several layer of magic so it's quite believable that I've missed one. Any clue as to what I need to do there?

OIC... configure is generated despite being checked in... Well that's nice and obvious!

Paul

Quoted 5 lines

Paul

Quoted 2 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 72 lines
Quoted 12 lines
Quoted 1 line · On 11.09.18 at 16:06, <[email protected]> wrote:

-----Original Message-----
From: Paul Durrant
Sent: 11 September 2018 15:04
To: 'Jan Beulich' <[email protected]>
Cc: Julien Grall <[email protected]>; Andrew Cooper <[email protected]>; Wei Liu <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Stefano Stabellini <[email protected]>; xen-devel <xen- [email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Tim (Xen.org) <[email protected]>
Subject: RE: [PATCH v2] tools: add option to explicitly enable VirtFS in

QEMU

Quoted 20 lines

build

Quoted 7 lines

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: 11 September 2018 14:45
To: Paul Durrant <[email protected]>
Cc: Julien Grall <[email protected]>; Andrew Cooper <[email protected]>; Wei Liu <[email protected]>; George Dunlap <[email protected]>; Ian Jackson

<[email protected]>;

Quoted 4 lines

Stefano Stabellini <[email protected]>; xen-devel <xen- [email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Tim (Xen.org) <[email protected]>
Subject: Re: [PATCH v2] tools: add option to explicitly enable VirtFS in

QEMU

Quoted 4 lines

build

Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 11.09.18 at 15:37, <[email protected]> wrote:

9pfs support has been a documented feature since Xen 4.9, but QEMU

will

Quoted 32 lines
Quoted 7 lines
Quoted 7 lines

not be built with backend support unless VirtFS is enabled, which is predicated on the libcap and libattr dev packages being installed. This is not obvious to anyone intending to use 9pfs.

This patch adds an 'enable-9pfs' option to configure which, if specified, will cause '--enable-virtfs' to be passed to QEMU's configure. This will cause the dependency on libcap and libattr to be called out if the

packages

Quoted 24 lines
Quoted 24 lines

are not in installed.

For completeness, specifying 'disable-9pfs' will cause '--disable-virtfs' to be passed to QEMU's confgure and not specifying an option will keep the previous behaviour of predicating VirtFS on whether the libcap and libattr packages are installed.

NOTE: The shell script in configure might look odd, but it is coded for
consistency with other similar logic blocks within the file.

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

v2:
- Add the configure option rather then enabling VirtFS in all Linux

builds.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
---
 config/Tools.mk.in |  1 +
 tools/Makefile     | 10 +++++++++-
 tools/configure    | 29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Wouldn't you first and foremost need to edit tools/configure.ac?

No idea. There seem to be several layer of magic so it's quite believable that I've missed one. Any clue as to what I need to do there?

OIC... configure is generated despite being checked in... Well that's nice and obvious!

That's pretty common for projects using autoconf to generate their ./configure scripts. Eliminates the requirement for everyone to have a suitable autoconf version installed.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel