All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build
@ 2018-09-11 15:01 Paul Durrant
  2018-09-18  8:14 ` Paul Durrant
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Durrant @ 2018-09-11 15:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall, Paul Durrant, Jan Beulich

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.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>

v3:
 - Modify configure.ac and generate configure.

v2:
 - Add the configure option rather then enabling VirtFS in all Linux builds.
---
 config/Tools.mk.in |  1 +
 tools/Makefile     | 10 +++++++++-
 tools/configure    | 17 ++++++++++++++++-
 tools/configure.ac |  9 ++++++++-
 4 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 0964f6f9e9..bdba087af0 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -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@
 
diff --git a/tools/Makefile b/tools/Makefile
index 67977ad850..c903d6a63e 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -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
diff --git a/tools/configure b/tools/configure
index 27c8d054ab..acbcf9eb3e 100755
--- a/tools/configure
+++ b/tools/configure
@@ -624,6 +624,7 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+ninepfs
 SYSTEMD_LIBS
 SYSTEMD_CFLAGS
 SYSTEMD_MODULES_LOAD
@@ -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,18 @@ if test "x$systemd" = "xy"; then :
 
 fi
 
+# Check whether --enable-9pfs was given.
+if test "${enable_9pfs+set}" = set; then :
+  enableval=$enable_9pfs; if test "x$enable_9pfs" = "xyes"; then :
+  ninepfs=y
+else
+  ninepfs=n
+fi
+fi
+
+
+
+
 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
@@ -11103,4 +11119,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
-
diff --git a/tools/configure.ac b/tools/configure.ac
index bca2545280..e7d2e6f4ff 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -486,5 +486,12 @@ AS_IF([test "x$systemd" = "xy"], [
     ])
 ])
 
-AC_OUTPUT()
+AC_ARG_ENABLE([9pfs],
+    AS_HELP_STRING([--enable-9pfs],
+                   [Explicitly enable 9pfs support in QEMU build (default is to defer to QEMU configure default)]),
+    [AS_IF([test "x$enable_9pfs" = "xyes"], [ninepfs=y], [ninepfs=n])],[
+])
 
+AC_SUBST(ninepfs)
+
+AC_OUTPUT()
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build
  2018-09-11 15:01 [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build Paul Durrant
@ 2018-09-18  8:14 ` Paul Durrant
  2018-09-18 16:46   ` Stefano Stabellini
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Durrant @ 2018-09-18  8:14 UTC (permalink / raw)
  To: Paul Durrant, xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Tim (Xen.org),
	George Dunlap, Julien Grall, Jan Beulich, Ian Jackson

Ping?

> -----Original Message-----
> From: Paul Durrant [mailto:paul.durrant@citrix.com]
> Sent: 11 September 2018 16:01
> To: xen-devel@lists.xenproject.org
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> Jackson <Ian.Jackson@citrix.com>; Jan Beulich <jbeulich@suse.com>; Julien
> Grall <julien.grall@arm.com>; Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com>; Stefano Stabellini <sstabellini@kernel.org>; Tim
> (Xen.org) <tim@xen.org>; Wei Liu <wei.liu2@citrix.com>
> Subject: [PATCH v3] 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.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Tim Deegan <tim@xen.org>
> Cc: Wei Liu <wei.liu2@citrix.com>
> 
> v3:
>  - Modify configure.ac and generate configure.
> 
> v2:
>  - Add the configure option rather then enabling VirtFS in all Linux
> builds.
> ---
>  config/Tools.mk.in |  1 +
>  tools/Makefile     | 10 +++++++++-
>  tools/configure    | 17 ++++++++++++++++-
>  tools/configure.ac |  9 ++++++++-
>  4 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/config/Tools.mk.in b/config/Tools.mk.in
> index 0964f6f9e9..bdba087af0 100644
> --- a/config/Tools.mk.in
> +++ b/config/Tools.mk.in
> @@ -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@
> 
> diff --git a/tools/Makefile b/tools/Makefile
> index 67977ad850..c903d6a63e 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -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
> diff --git a/tools/configure b/tools/configure
> index 27c8d054ab..acbcf9eb3e 100755
> --- a/tools/configure
> +++ b/tools/configure
> @@ -624,6 +624,7 @@ ac_includes_default="\
> 
>  ac_subst_vars='LTLIBOBJS
>  LIBOBJS
> +ninepfs
>  SYSTEMD_LIBS
>  SYSTEMD_CFLAGS
>  SYSTEMD_MODULES_LOAD
> @@ -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,18 @@ if test "x$systemd" = "xy"; then :
> 
>  fi
> 
> +# Check whether --enable-9pfs was given.
> +if test "${enable_9pfs+set}" = set; then :
> +  enableval=$enable_9pfs; if test "x$enable_9pfs" = "xyes"; then :
> +  ninepfs=y
> +else
> +  ninepfs=n
> +fi
> +fi
> +
> +
> +
> +
>  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
> @@ -11103,4 +11119,3 @@ if test -n "$ac_unrecognized_opts" && test
> "$enable_option_checking" != no; then
>  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts"
> >&2;}
>  fi
> 
> -
> diff --git a/tools/configure.ac b/tools/configure.ac
> index bca2545280..e7d2e6f4ff 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -486,5 +486,12 @@ AS_IF([test "x$systemd" = "xy"], [
>      ])
>  ])
> 
> -AC_OUTPUT()
> +AC_ARG_ENABLE([9pfs],
> +    AS_HELP_STRING([--enable-9pfs],
> +                   [Explicitly enable 9pfs support in QEMU build (default
> is to defer to QEMU configure default)]),
> +    [AS_IF([test "x$enable_9pfs" = "xyes"], [ninepfs=y], [ninepfs=n])],[
> +])
> 
> +AC_SUBST(ninepfs)
> +
> +AC_OUTPUT()
> --
> 2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build
  2018-09-18  8:14 ` Paul Durrant
@ 2018-09-18 16:46   ` Stefano Stabellini
  2018-09-18 16:57     ` Paul Durrant
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Stabellini @ 2018-09-18 16:46 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Tim (Xen.org),
	George Dunlap, Julien Grall, Jan Beulich, Ian Jackson, xen-devel

On Tue, 18 Sep 2018, Paul Durrant wrote:
> Ping?

Looks good to me


> > -----Original Message-----
> > From: Paul Durrant [mailto:paul.durrant@citrix.com]
> > Sent: 11 September 2018 16:01
> > To: xen-devel@lists.xenproject.org
> > Cc: Paul Durrant <Paul.Durrant@citrix.com>; Andrew Cooper
> > <Andrew.Cooper3@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> > Jackson <Ian.Jackson@citrix.com>; Jan Beulich <jbeulich@suse.com>; Julien
> > Grall <julien.grall@arm.com>; Konrad Rzeszutek Wilk
> > <konrad.wilk@oracle.com>; Stefano Stabellini <sstabellini@kernel.org>; Tim
> > (Xen.org) <tim@xen.org>; Wei Liu <wei.liu2@citrix.com>
> > Subject: [PATCH v3] 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.
> > 
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > ---
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Julien Grall <julien.grall@arm.com>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > Cc: Stefano Stabellini <sstabellini@kernel.org>
> > Cc: Tim Deegan <tim@xen.org>
> > Cc: Wei Liu <wei.liu2@citrix.com>
> > 
> > v3:
> >  - Modify configure.ac and generate configure.
> > 
> > v2:
> >  - Add the configure option rather then enabling VirtFS in all Linux
> > builds.
> > ---
> >  config/Tools.mk.in |  1 +
> >  tools/Makefile     | 10 +++++++++-
> >  tools/configure    | 17 ++++++++++++++++-
> >  tools/configure.ac |  9 ++++++++-
> >  4 files changed, 34 insertions(+), 3 deletions(-)
> > 
> > diff --git a/config/Tools.mk.in b/config/Tools.mk.in
> > index 0964f6f9e9..bdba087af0 100644
> > --- a/config/Tools.mk.in
> > +++ b/config/Tools.mk.in
> > @@ -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@
> > 
> > diff --git a/tools/Makefile b/tools/Makefile
> > index 67977ad850..c903d6a63e 100644
> > --- a/tools/Makefile
> > +++ b/tools/Makefile
> > @@ -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
> > diff --git a/tools/configure b/tools/configure
> > index 27c8d054ab..acbcf9eb3e 100755
> > --- a/tools/configure
> > +++ b/tools/configure
> > @@ -624,6 +624,7 @@ ac_includes_default="\
> > 
> >  ac_subst_vars='LTLIBOBJS
> >  LIBOBJS
> > +ninepfs
> >  SYSTEMD_LIBS
> >  SYSTEMD_CFLAGS
> >  SYSTEMD_MODULES_LOAD
> > @@ -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,18 @@ if test "x$systemd" = "xy"; then :
> > 
> >  fi
> > 
> > +# Check whether --enable-9pfs was given.
> > +if test "${enable_9pfs+set}" = set; then :
> > +  enableval=$enable_9pfs; if test "x$enable_9pfs" = "xyes"; then :
> > +  ninepfs=y
> > +else
> > +  ninepfs=n
> > +fi
> > +fi
> > +
> > +
> > +
> > +
> >  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
> > @@ -11103,4 +11119,3 @@ if test -n "$ac_unrecognized_opts" && test
> > "$enable_option_checking" != no; then
> >  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts"
> > >&2;}
> >  fi
> > 
> > -
> > diff --git a/tools/configure.ac b/tools/configure.ac
> > index bca2545280..e7d2e6f4ff 100644
> > --- a/tools/configure.ac
> > +++ b/tools/configure.ac
> > @@ -486,5 +486,12 @@ AS_IF([test "x$systemd" = "xy"], [
> >      ])
> >  ])
> > 
> > -AC_OUTPUT()
> > +AC_ARG_ENABLE([9pfs],
> > +    AS_HELP_STRING([--enable-9pfs],
> > +                   [Explicitly enable 9pfs support in QEMU build (default
> > is to defer to QEMU configure default)]),
> > +    [AS_IF([test "x$enable_9pfs" = "xyes"], [ninepfs=y], [ninepfs=n])],[
> > +])
> > 
> > +AC_SUBST(ninepfs)
> > +
> > +AC_OUTPUT()
> > --
> > 2.11.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build
  2018-09-18 16:46   ` Stefano Stabellini
@ 2018-09-18 16:57     ` Paul Durrant
  2018-09-19 15:03       ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Durrant @ 2018-09-18 16:57 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: Wei Liu, Konrad Rzeszutek Wilk, Andrew Cooper, Tim (Xen.org),
	George Dunlap, Julien Grall, Jan Beulich, Ian Jackson, xen-devel

> -----Original Message-----
> From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> Sent: 18 September 2018 17:46
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel@lists.xenproject.org; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> Jackson <Ian.Jackson@citrix.com>; Jan Beulich <jbeulich@suse.com>; Julien
> Grall <julien.grall@arm.com>; Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com>; Stefano Stabellini <sstabellini@kernel.org>; Tim
> (Xen.org) <tim@xen.org>; Wei Liu <wei.liu2@citrix.com>
> Subject: RE: [PATCH v3] tools: add option to explicitly enable VirtFS in
> QEMU build
> 
> On Tue, 18 Sep 2018, Paul Durrant wrote:
> > Ping?
> 
> Looks good to me

I'll take that as an R-b then :-)

  Paul

> 
> 
> > > -----Original Message-----
> > > From: Paul Durrant [mailto:paul.durrant@citrix.com]
> > > Sent: 11 September 2018 16:01
> > > To: xen-devel@lists.xenproject.org
> > > Cc: Paul Durrant <Paul.Durrant@citrix.com>; Andrew Cooper
> > > <Andrew.Cooper3@citrix.com>; George Dunlap <George.Dunlap@citrix.com>;
> Ian
> > > Jackson <Ian.Jackson@citrix.com>; Jan Beulich <jbeulich@suse.com>;
> Julien
> > > Grall <julien.grall@arm.com>; Konrad Rzeszutek Wilk
> > > <konrad.wilk@oracle.com>; Stefano Stabellini <sstabellini@kernel.org>;
> Tim
> > > (Xen.org) <tim@xen.org>; Wei Liu <wei.liu2@citrix.com>
> > > Subject: [PATCH v3] 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.
> > >
> > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > > ---
> > > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > > Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> > > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > > Cc: Jan Beulich <jbeulich@suse.com>
> > > Cc: Julien Grall <julien.grall@arm.com>
> > > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > Cc: Stefano Stabellini <sstabellini@kernel.org>
> > > Cc: Tim Deegan <tim@xen.org>
> > > Cc: Wei Liu <wei.liu2@citrix.com>
> > >
> > > v3:
> > >  - Modify configure.ac and generate configure.
> > >
> > > v2:
> > >  - Add the configure option rather then enabling VirtFS in all Linux
> > > builds.
> > > ---
> > >  config/Tools.mk.in |  1 +
> > >  tools/Makefile     | 10 +++++++++-
> > >  tools/configure    | 17 ++++++++++++++++-
> > >  tools/configure.ac |  9 ++++++++-
> > >  4 files changed, 34 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/config/Tools.mk.in b/config/Tools.mk.in
> > > index 0964f6f9e9..bdba087af0 100644
> > > --- a/config/Tools.mk.in
> > > +++ b/config/Tools.mk.in
> > > @@ -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@
> > >
> > > diff --git a/tools/Makefile b/tools/Makefile
> > > index 67977ad850..c903d6a63e 100644
> > > --- a/tools/Makefile
> > > +++ b/tools/Makefile
> > > @@ -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
> > > diff --git a/tools/configure b/tools/configure
> > > index 27c8d054ab..acbcf9eb3e 100755
> > > --- a/tools/configure
> > > +++ b/tools/configure
> > > @@ -624,6 +624,7 @@ ac_includes_default="\
> > >
> > >  ac_subst_vars='LTLIBOBJS
> > >  LIBOBJS
> > > +ninepfs
> > >  SYSTEMD_LIBS
> > >  SYSTEMD_CFLAGS
> > >  SYSTEMD_MODULES_LOAD
> > > @@ -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,18 @@ if test "x$systemd" = "xy"; then :
> > >
> > >  fi
> > >
> > > +# Check whether --enable-9pfs was given.
> > > +if test "${enable_9pfs+set}" = set; then :
> > > +  enableval=$enable_9pfs; if test "x$enable_9pfs" = "xyes"; then :
> > > +  ninepfs=y
> > > +else
> > > +  ninepfs=n
> > > +fi
> > > +fi
> > > +
> > > +
> > > +
> > > +
> > >  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
> > > @@ -11103,4 +11119,3 @@ if test -n "$ac_unrecognized_opts" && test
> > > "$enable_option_checking" != no; then
> > >  $as_echo "$as_me: WARNING: unrecognized options:
> $ac_unrecognized_opts"
> > > >&2;}
> > >  fi
> > >
> > > -
> > > diff --git a/tools/configure.ac b/tools/configure.ac
> > > index bca2545280..e7d2e6f4ff 100644
> > > --- a/tools/configure.ac
> > > +++ b/tools/configure.ac
> > > @@ -486,5 +486,12 @@ AS_IF([test "x$systemd" = "xy"], [
> > >      ])
> > >  ])
> > >
> > > -AC_OUTPUT()
> > > +AC_ARG_ENABLE([9pfs],
> > > +    AS_HELP_STRING([--enable-9pfs],
> > > +                   [Explicitly enable 9pfs support in QEMU build
> (default
> > > is to defer to QEMU configure default)]),
> > > +    [AS_IF([test "x$enable_9pfs" = "xyes"], [ninepfs=y],
> [ninepfs=n])],[
> > > +])
> > >
> > > +AC_SUBST(ninepfs)
> > > +
> > > +AC_OUTPUT()
> > > --
> > > 2.11.0
> >

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build
  2018-09-18 16:57     ` Paul Durrant
@ 2018-09-19 15:03       ` Wei Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2018-09-19 15:03 UTC (permalink / raw)
  To: Paul Durrant
  Cc: 'Stefano Stabellini',
	Wei Liu, Konrad Rzeszutek Wilk, Andrew Cooper, Tim (Xen.org),
	George Dunlap, Julien Grall, Jan Beulich, Ian Jackson, xen-devel

On Tue, Sep 18, 2018 at 05:57:57PM +0100, Paul Durrant wrote:
> > -----Original Message-----
> > From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> > Sent: 18 September 2018 17:46
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: xen-devel@lists.xenproject.org; Andrew Cooper
> > <Andrew.Cooper3@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> > Jackson <Ian.Jackson@citrix.com>; Jan Beulich <jbeulich@suse.com>; Julien
> > Grall <julien.grall@arm.com>; Konrad Rzeszutek Wilk
> > <konrad.wilk@oracle.com>; Stefano Stabellini <sstabellini@kernel.org>; Tim
> > (Xen.org) <tim@xen.org>; Wei Liu <wei.liu2@citrix.com>
> > Subject: RE: [PATCH v3] tools: add option to explicitly enable VirtFS in
> > QEMU build
> > 
> > On Tue, 18 Sep 2018, Paul Durrant wrote:
> > > Ping?
> > 
> > Looks good to me
> 
> I'll take that as an R-b then :-)

Acked-by: Wei Liu <wei.liu2@citrix.com>

Note to self: rerun autogen.sh when applying this patch.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-19 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 15:01 [PATCH v3] tools: add option to explicitly enable VirtFS in QEMU build Paul Durrant
2018-09-18  8:14 ` Paul Durrant
2018-09-18 16:46   ` Stefano Stabellini
2018-09-18 16:57     ` Paul Durrant
2018-09-19 15:03       ` Wei Liu

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.