Skip to contentSkip to conversation

tools: specifically enable VirtFS in Linux QEMU builds

PATCH In review Paul Durrant 5 participants 13 messages Sep 6, 2018 – Sep 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: specifically enable VirtFS in Linux QEMU builds

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

This patch modifies the README to call out those packages as pre-requisites for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

---
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]>

---
 README         |  2 ++
 tools/Makefile | 11 +++++++++++
 2 files changed, 13 insertions(+)
README +2 -0
index 4b95b21c7b..1a4e4b2c1b 100644
@@ -56,6 +56,8 @@ provided by your OS distributor:
       greater.
     * Development install of GLib v2.0 (e.g. libglib2.0-dev)
     * Development install of Pixman (e.g. libpixman-1-dev)
+    * Development install of libcap (e.g. libcap-dev) [Linux only]
+    * Development install of libattr (e.g. libattr1-dev) [Linux only]
     * pkg-config
     * bridge-utils package (/sbin/brctl)
     * iproute package (/sbin/ip)
tools/Makefile +11 -0
index 67977ad850..e74efb8a6e 100644
@@ -216,6 +216,11 @@ else
 QEMU_XEN_ENABLE_DEBUG :=
 endif
 
+#
+# 9pfs support is a documented feature but it depends on a QEMU with
+# VirtFS enabled. However VirtFS is a Linux-only option so only enable
+# it for Linux builds.
+#
 subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	unset MAKELEVEL; \
 	if test -d $(QEMU_UPSTREAM_LOC) ; then \
@@ -232,10 +237,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
+	if [ "$(CONFIG_Linux)" = "y" ]; then \
+		enable_virtfs='--enable-virtfs' ; \
+	else \
+		enable_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) \
 		$$enable_trace_backend \
+		$$enable_virtfs \
 		--prefix=$(LIBEXEC) \
 		--libdir=$(LIBEXEC_LIB) \
 		--includedir=$(LIBEXEC_INC) \
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 54 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

This patch modifies the README to call out those packages as pre-requisites for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

---
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]>

---
 README         |  2 ++
 tools/Makefile | 11 +++++++++++
 2 files changed, 13 insertions(+)
README +2 -0
index 4b95b21c7b..1a4e4b2c1b 100644
@@ -56,6 +56,8 @@ provided by your OS distributor:
       greater.
     * Development install of GLib v2.0 (e.g. libglib2.0-dev)
     * Development install of Pixman (e.g. libpixman-1-dev)
+    * Development install of libcap (e.g. libcap-dev) [Linux only]
+    * Development install of libattr (e.g. libattr1-dev) [Linux only]
     * pkg-config
     * bridge-utils package (/sbin/brctl)
     * iproute package (/sbin/ip)
tools/Makefile +5 -0
index 67977ad850..e74efb8a6e 100644
@@ -216,6 +216,11 @@ else
 QEMU_XEN_ENABLE_DEBUG :=
 endif
 
+#
+# 9pfs support is a documented feature but it depends on a QEMU with
+# VirtFS enabled. However VirtFS is a Linux-only option so only enable
+# it for Linux builds.
+#
 subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	unset MAKELEVEL; \
 	if test -d $(QEMU_UPSTREAM_LOC) ; then \

tools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 244

Quoted 8 lines
tools/Makefile +5 -0
@@ -232,10 +237,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
+	if [ "$(CONFIG_Linux)" = "y" ]; then \
+		enable_virtfs='--enable-virtfs' ; \
+	else \
+		enable_virtfs='' ; \
+	fi ; \

9pfs is still a reasonably "niche" feature; I don't think we want to force people to enable it if they don't expect to use it.

Is it the case that if we have libcap and libattr, that qemu will enable 9pfs automatically? If so we should just document that.

Another option would be to have "--enable-9pfs" option in the tools configure, which would then pass this on to qemu (and thus fail if the requisite librares aren't present), but I'm not sure if having a load of "--enable-*" at the top level is really what we want for this.

-George

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

#2 lore raw
Quoted 80 lines

-----Original Message-----
From: George Dunlap [mailto:[email protected]]
Sent: 06 September 2018 13:52
To: Paul Durrant <[email protected]>; [email protected]
Cc: Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 5 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

This patch modifies the README to call out those packages as pre-

requisites

Quoted 49 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

---
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]>

---
 README         |  2 ++
 tools/Makefile | 11 +++++++++++
 2 files changed, 13 insertions(+)
README +2 -0
index 4b95b21c7b..1a4e4b2c1b 100644
@@ -56,6 +56,8 @@ provided by your OS distributor:
       greater.
     * Development install of GLib v2.0 (e.g. libglib2.0-dev)
     * Development install of Pixman (e.g. libpixman-1-dev)
+    * Development install of libcap (e.g. libcap-dev) [Linux only]
+    * Development install of libattr (e.g. libattr1-dev) [Linux only]
     * pkg-config
     * bridge-utils package (/sbin/brctl)
     * iproute package (/sbin/ip)
tools/Makefile +5 -0
index 67977ad850..e74efb8a6e 100644
@@ -216,6 +216,11 @@ else
 QEMU_XEN_ENABLE_DEBUG :=
 endif
 
+#
+# 9pfs support is a documented feature but it depends on a QEMU with
+# VirtFS enabled. However VirtFS is a Linux-only option so only enable
+# it for Linux builds.
+#
 subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	unset MAKELEVEL; \
 	if test -d $(QEMU_UPSTREAM_LOC) ; then \

tools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 244

Quoted 8 lines
tools/Makefile +5 -0
@@ -232,10 +237,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
+	if [ "$(CONFIG_Linux)" = "y" ]; then \
+		enable_virtfs='--enable-virtfs' ; \
+	else \
+		enable_virtfs='' ; \
+	fi ; \

9pfs is still a reasonably "niche" feature; I don't think we want to force people to enable it if they don't expect to use it.

Quoted 2 lines

Is it the case that if we have libcap and libattr, that qemu will enable 9pfs automatically? If so we should just document that.

Yes, that is the case but it does seem weird that we have a documented feature which is not being built in by default, because we don't call out or check for the necessary pre-requisites.

Quoted 6 lines

Another option would be to have "--enable-9pfs" option in the tools configure, which would then pass this on to qemu (and thus fail if the requisite librares aren't present), but I'm not sure if having a load of "--enable-*" at the top level is really what we want for this.

That is something I wondered about. Really I just don't want people to be scrobbling around wondering why, having built and installed Xen and QEMU put a '9p' line in their config and then kicked off their guest, it simply doesn't work.

Paul

Quoted 1 line

-George

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

#3 lore raw
In reply to Paul Durrant
Quoted 9 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

This patch modifies the README to call out those packages as pre-requisites for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul! Do we need to do anything for the configure stuff (AC_CHECK_LIB in tools/configure.ac)?

Quoted 64 lines

---
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]>

---
 README         |  2 ++
 tools/Makefile | 11 +++++++++++
 2 files changed, 13 insertions(+)
README +2 -0
index 4b95b21c7b..1a4e4b2c1b 100644
@@ -56,6 +56,8 @@ provided by your OS distributor:
       greater.
     * Development install of GLib v2.0 (e.g. libglib2.0-dev)
     * Development install of Pixman (e.g. libpixman-1-dev)
+    * Development install of libcap (e.g. libcap-dev) [Linux only]
+    * Development install of libattr (e.g. libattr1-dev) [Linux only]
     * pkg-config
     * bridge-utils package (/sbin/brctl)
     * iproute package (/sbin/ip)
tools/Makefile +11 -0
index 67977ad850..e74efb8a6e 100644
@@ -216,6 +216,11 @@ else
 QEMU_XEN_ENABLE_DEBUG :=
 endif
 
+#
+# 9pfs support is a documented feature but it depends on a QEMU with
+# VirtFS enabled. However VirtFS is a Linux-only option so only enable
+# it for Linux builds.
+#
 subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	unset MAKELEVEL; \
 	if test -d $(QEMU_UPSTREAM_LOC) ; then \
@@ -232,10 +237,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
+	if [ "$(CONFIG_Linux)" = "y" ]; then \
+		enable_virtfs='--enable-virtfs' ; \
+	else \
+		enable_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) \
 		$$enable_trace_backend \
+		$$enable_virtfs \
 		--prefix=$(LIBEXEC) \
 		--libdir=$(LIBEXEC_LIB) \
 		--includedir=$(LIBEXEC_INC) \
Signature · 1 line
2.11.0

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

#4 lore raw
Quoted 18 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 4 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

Quoted 8 lines
Quoted 1 line

This patch modifies the README to call out those packages as pre-

requisites

Quoted 4 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul!

NP. I'm at the point of seriously considering a Windows frontend, which is why I've been playing.

BTW, as a heads-up... Before I realised QEMU was not building the backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Quoted 2 lines

Do we need to do anything for the configure stuff
(AC_CHECK_LIB in tools/configure.ac)?

That's certainly a reasonable belt'n'braces approach so that folks don't have to wait until their tools build fails to find out what they need. I'll have a look at that.

Cheers,

Paul

Quoted 56 lines
Quoted 46 lines

---
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]>

---
 README         |  2 ++
 tools/Makefile | 11 +++++++++++
 2 files changed, 13 insertions(+)
README +2 -0
index 4b95b21c7b..1a4e4b2c1b 100644
@@ -56,6 +56,8 @@ provided by your OS distributor:
       greater.
     * Development install of GLib v2.0 (e.g. libglib2.0-dev)
     * Development install of Pixman (e.g. libpixman-1-dev)
+    * Development install of libcap (e.g. libcap-dev) [Linux only]
+    * Development install of libattr (e.g. libattr1-dev) [Linux only]
     * pkg-config
     * bridge-utils package (/sbin/brctl)
     * iproute package (/sbin/ip)
tools/Makefile +5 -0
index 67977ad850..e74efb8a6e 100644
@@ -216,6 +216,11 @@ else
 QEMU_XEN_ENABLE_DEBUG :=
 endif
 
+#
+# 9pfs support is a documented feature but it depends on a QEMU with
+# VirtFS enabled. However VirtFS is a Linux-only option so only enable
+# it for Linux builds.
+#
 subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	unset MAKELEVEL; \
 	if test -d $(QEMU_UPSTREAM_LOC) ; then \

tools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 245

Quoted 9 lines
tools/Makefile +5 -0
@@ -232,10 +237,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
+	if [ "$(CONFIG_Linux)" = "y" ]; then \
+		enable_virtfs='--enable-virtfs' ; \
+	else \
+		enable_virtfs='' ; \
+	fi ; \
 	PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-

config$${PKG_CONFIG_PATH:+:$${PKG_CONFIG_PATH}} \

Quoted 10 lines
Quoted 10 lines
tools/Makefile +1 -1
 	$$source/configure --enable-xen --target-list=i386-softmmu \
 		$(QEMU_XEN_ENABLE_DEBUG) \
 		$$enable_trace_backend \
+		$$enable_virtfs \
 		--prefix=$(LIBEXEC) \
 		--libdir=$(LIBEXEC_LIB) \
 		--includedir=$(LIBEXEC_INC) \
--

2.11.0

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

#5 lore raw
Quoted 27 lines · Paul Durrant
Quoted 18 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 4 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

Quoted 8 lines
Quoted 1 line

This patch modifies the README to call out those packages as pre-

requisites

Quoted 4 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul!

Quoted 8 lines

NP. I'm at the point of seriously considering a Windows frontend, which is why I've been playing.

BTW, as a heads-up... Before I realised QEMU was not building the backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Quoted 2 lines

Do we need to do anything for the configure stuff
(AC_CHECK_LIB in tools/configure.ac)?

That's certainly a reasonable belt'n'braces approach so that folks don't have to wait until their tools build fails to find out what they need. I'll have a look at that.

IMO I don't think we should be duplicating the checks that QEMU configure already does in our configure script. The best option would be to run whatever external configure scripts there are together with our own configure script, but this is quite complicated because the qemu-dir might have to be fetched at the point where configure runs.

Roger.

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

#6 lore raw
Quoted 35 lines · Roger Pau Monné
Quoted 34 lines · Paul Durrant
Quoted 18 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 4 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

Quoted 8 lines
Quoted 1 line

This patch modifies the README to call out those packages as pre-

requisites

Quoted 4 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul!

NP. I'm at the point of seriously considering a Windows frontend, which is why I've been playing.

BTW, as a heads-up... Before I realised QEMU was not building the backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Quoted 2 lines

Do we need to do anything for the configure stuff
(AC_CHECK_LIB in tools/configure.ac)?

Quoted 7 lines
Quoted 1 line

That's certainly a reasonable belt'n'braces approach so that folks don't have to wait until their tools build fails to find out what they need. I'll have a look at that.

IMO I don't think we should be duplicating the checks that QEMU configure already does in our configure script. The best option would be to run whatever external configure scripts there are together with our own configure script, but this is quite complicated because the qemu-dir might have to be fetched at the point where configure runs.

Not the least because the dependencies may change. I think adding an "--enable-9pfs" option which will pass on the requisite "--enable" to qemu (such that qemu build will fail if the prereqs are not present) makes the most sense.

-George

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

#7 lore raw
Quoted 73 lines

-----Original Message-----
From: George Dunlap [mailto:[email protected]]
Sent: 07 September 2018 16:26
To: Roger Pau Monne <[email protected]>; Paul Durrant <[email protected]>
Cc: 'Stefano Stabellini' <[email protected]>; Wei Liu <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Andrew Cooper <[email protected]>; Tim (Xen.org) <[email protected]>; Julien Grall <[email protected]>; Jan Beulich <[email protected]>; Ian Jackson <[email protected]>; xen- [email protected]
Subject: Re: [Xen-devel] [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 8 lines · Roger Pau Monné
Quoted 7 lines · Paul Durrant
Quoted 7 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>;

Jan

Quoted 1 line
Quoted 1 line
Quoted 1 line

Beulich <[email protected]>; Julien Grall <[email protected]>;

Konrad

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU

builds

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Paul Durrant
Quoted 1 line

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

will

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

not be built with backend support unless libcap and libattr dev

packages

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

are installed.

This patch modifies the README to call out those packages as pre-

requisites

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul!

NP. I'm at the point of seriously considering a Windows frontend, which is

why I've been playing.

Quoted 2 lines
Quoted 2 lines

BTW, as a heads-up... Before I realised QEMU was not building the

backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Do we need to do anything for the configure stuff
(AC_CHECK_LIB in tools/configure.ac)?

That's certainly a reasonable belt'n'braces approach so that folks don't

have to wait until their tools build fails to find out what they need. I'll have a look at that.

Quoted 6 lines

IMO I don't think we should be duplicating the checks that QEMU configure already does in our configure script. The best option would be to run whatever external configure scripts there are together with our own configure script, but this is quite complicated because the qemu-dir might have to be fetched at the point where configure runs.

Quoted 4 lines

Not the least because the dependencies may change. I think adding an "--enable-9pfs" option which will pass on the requisite "--enable" to qemu (such that qemu build will fail if the prereqs are not present) makes the most sense.

I'd be happy with that if others are.

Paul

Quoted 2 lines

-George

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

#8 lore raw

Paul Durrant writes ("RE: [Xen-devel] [PATCH] tools: specifically enable VirtFS in Linux QEMU builds"):

Quoted 7 lines

George Dunlap [mailto:[email protected]]

Quoted 4 lines

Not the least because the dependencies may change. I think adding an "--enable-9pfs" option which will pass on the requisite "--enable" to qemu (such that qemu build will fail if the prereqs are not present) makes the most sense.

I'd be happy with that if others are.

SGTM. I guess there would be osstest patch(es) to add the dependencies and pass the new option.

Ian.

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

#9 lore raw
Quoted 22 lines

-----Original Message-----
From: Ian Jackson [mailto:[email protected]]
Sent: 07 September 2018 17:19
To: Paul Durrant <[email protected]>
Cc: George Dunlap <[email protected]>; Roger Pau Monne <[email protected]>; 'Stefano Stabellini' <[email protected]>; Wei Liu <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Andrew Cooper <[email protected]>; Tim (Xen.org) <[email protected]>; Julien Grall <[email protected]>; Jan Beulich <[email protected]>; xen- [email protected]
Subject: RE: [Xen-devel] [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Paul Durrant writes ("RE: [Xen-devel] [PATCH] tools: specifically enable VirtFS in Linux QEMU builds"):

Quoted 6 lines

George Dunlap [mailto:[email protected]]

Quoted 4 lines

Not the least because the dependencies may change. I think adding an "--enable-9pfs" option which will pass on the requisite "--enable" to qemu (such that qemu build will fail if the prereqs are not present) makes the most sense.

Quoted 4 lines
Quoted 1 line

I'd be happy with that if others are.

SGTM. I guess there would be osstest patch(es) to add the dependencies and pass the new option.

Yes, they would need to follow.

Paul

Quoted 2 lines

Ian.

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

#10 lore raw
In reply to Paul Durrant
Quoted 73 lines · Paul Durrant
Quoted 73 lines

-----Original Message-----
From: George Dunlap [mailto:[email protected]]
Sent: 07 September 2018 16:26
To: Roger Pau Monne <[email protected]>; Paul Durrant <[email protected]>
Cc: 'Stefano Stabellini' <[email protected]>; Wei Liu <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Andrew Cooper <[email protected]>; Tim (Xen.org) <[email protected]>; Julien Grall <[email protected]>; Jan Beulich <[email protected]>; Ian Jackson <[email protected]>; xen- [email protected]
Subject: Re: [Xen-devel] [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 8 lines · Roger Pau Monné
Quoted 7 lines · Paul Durrant
Quoted 7 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>;

Jan

Quoted 1 line
Quoted 1 line
Quoted 1 line

Beulich <[email protected]>; Julien Grall <[email protected]>;

Konrad

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU

builds

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Paul Durrant
Quoted 1 line

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

will

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

not be built with backend support unless libcap and libattr dev

packages

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

are installed.

This patch modifies the README to call out those packages as pre-

requisites

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul!

NP. I'm at the point of seriously considering a Windows frontend, which is

why I've been playing.

Quoted 2 lines
Quoted 2 lines

BTW, as a heads-up... Before I realised QEMU was not building the

backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Do we need to do anything for the configure stuff
(AC_CHECK_LIB in tools/configure.ac)?

That's certainly a reasonable belt'n'braces approach so that folks don't

have to wait until their tools build fails to find out what they need. I'll have a look at that.

Quoted 6 lines

IMO I don't think we should be duplicating the checks that QEMU configure already does in our configure script. The best option would be to run whatever external configure scripts there are together with our own configure script, but this is quite complicated because the qemu-dir might have to be fetched at the point where configure runs.

Quoted 6 lines
Quoted 4 lines

Not the least because the dependencies may change. I think adding an "--enable-9pfs" option which will pass on the requisite "--enable" to qemu (such that qemu build will fail if the prereqs are not present) makes the most sense.

I'd be happy with that if others are.

If QEMU changes the virtfs default to "enable", then this option will become ineffective maybe without us even noticing. However, I guess we prefer to deal with duplicate enable/disable options in QEMU and Xen, rather than duplicate dependency checks which might be harder to keep up-to-date in the long run?

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

#11 lore raw
In reply to Paul Durrant
Quoted 23 lines · Paul Durrant
Quoted 23 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 5 lines · Paul Durrant

9pfs support has been a documented feature since Xen 4.9, but QEMU will not be built with backend support unless libcap and libattr dev packages are installed.

This patch modifies the README to call out those packages as pre-

requisites

Quoted 3 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Thank you, Paul!

NP. I'm at the point of seriously considering a Windows frontend, which is why I've been playing.

BTW, as a heads-up... Before I realised QEMU was not building the backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Interesting. I don't recall ever testing this is a scenario, so I am not surprised it is broken. I don't know why the module doesn't get loaded automatically. FYI another thing missing is suspend/resume support in the driver.

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

#12 lore raw
Quoted 54 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 07 September 2018 17:58
To: Paul Durrant <[email protected]>
Cc: 'Stefano Stabellini' <[email protected]>; xen- [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: RE: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 8 lines · Paul Durrant
Quoted 8 lines

-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 06 September 2018 19:12
To: Paul Durrant <[email protected]>
Cc: [email protected]; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>;

Konrad

Quoted 7 lines
Quoted 7 lines

Rzeszutek Wilk <[email protected]>; Stefano Stabellini <[email protected]>; Tim (Xen.org) <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH] tools: specifically enable VirtFS in Linux QEMU builds

Quoted 1 line · Paul Durrant

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

will

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

not be built with backend support unless libcap and libattr dev packages are installed.

This patch modifies the README to call out those packages as pre-

requisites

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

for Linux builds and specifically enables VirtFS in the configure line for QEMU so that an error message is displayed if they are missing.

Thank you, Paul!

NP. I'm at the point of seriously considering a Windows frontend, which is

why I've been playing.

Quoted 2 lines

BTW, as a heads-up... Before I realised QEMU was not building the

backend, I tried a modprobe of the Xen 9pfs transport module in a Linux guest and immediately hit a kernel BUG (NULL ptr IIRC) which was apparently down to the frontend expecting the backend to be present when its probe routine is run, rather than deferring things until the backend goes into InitWait (which is what a frontend generally should do). Also, it's non-obvious why I have to explicitly modprobe anyway... Shouldn't the module get demand-loaded when I run mount -t 9pfs blah?

Quoted 4 lines

Interesting. I don't recall ever testing this is a scenario, so I am not surprised it is broken. I don't know why the module doesn't get loaded automatically. FYI another thing missing is suspend/resume support in the driver.

I see. I guess that probably means cycling through closing->closed and back to initwait has not been exercised in the backend. I'll bear that in mind when I get to that stage. Thanks :-)

Paul

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