xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] pvshim: make PV shim build selectable from configure
@ 2019-05-14 13:59 Roger Pau Monne
  2019-05-14 13:59 ` [Xen-devel] " Roger Pau Monne
  2019-05-14 14:03 ` Wei Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Roger Pau Monne @ 2019-05-14 13:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson, Roger Pau Monne

So a user can decide whether to compile a PV shim as part of the tools
build. Note that the default behavior is preserved, which is to build
a PV shim when the target or host (if target is unset) architecture is
64bit x86.

Requested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
NOTE: run autogen.sh after applying.
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
 - Only enable by default on x86_64, like the previous behavior.
 - Fallback to use host_cpu if target_cpu is empty.
---
 config/Tools.mk.in      |  2 ++
 tools/configure.ac      | 13 +++++++++++++
 tools/firmware/Makefile |  4 ----
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 98245f63c9..84ddb1a542 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -75,3 +75,5 @@ TINFO_LIBS          := @TINFO_LIBS@
 ARGP_LDFLAGS        := @argp_ldflags@
 
 FILE_OFFSET_BITS    := @FILE_OFFSET_BITS@
+
+CONFIG_PV_SHIM      := @pvshim@
diff --git a/tools/configure.ac b/tools/configure.ac
index c9fd69ddfa..fcf282e74e 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -492,4 +492,17 @@ AC_ARG_ENABLE([9pfs],
 
 AC_SUBST(ninepfs)
 
+AC_ARG_ENABLE([pvshim],
+    AS_HELP_STRING([--disable-pvshim],
+                   [Disable pvshim build (enabled by default on 64bit x86)]),
+    [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [
+    cpu=`test -z "$target_cpu" && echo "$host_cpu" || echo "$target_cpu"`
+    case "$cpu" in
+        x86_64)
+           pvshim="y";;
+        *) pvshim="n";;
+    esac
+])
+AC_SUBST(pvshim)
+
 AC_OUTPUT()
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index cf304fc578..809a5fd025 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -1,10 +1,6 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-ifneq ($(XEN_TARGET_ARCH),x86_32)
-CONFIG_PV_SHIM := y
-endif
-
 # hvmloader is a 32-bit protected mode binary.
 TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
-- 
2.17.2 (Apple Git-113)


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

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

* [Xen-devel] [PATCH v2] pvshim: make PV shim build selectable from configure
  2019-05-14 13:59 [PATCH v2] pvshim: make PV shim build selectable from configure Roger Pau Monne
@ 2019-05-14 13:59 ` Roger Pau Monne
  2019-05-14 14:03 ` Wei Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Roger Pau Monne @ 2019-05-14 13:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson, Roger Pau Monne

So a user can decide whether to compile a PV shim as part of the tools
build. Note that the default behavior is preserved, which is to build
a PV shim when the target or host (if target is unset) architecture is
64bit x86.

Requested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
NOTE: run autogen.sh after applying.
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
 - Only enable by default on x86_64, like the previous behavior.
 - Fallback to use host_cpu if target_cpu is empty.
---
 config/Tools.mk.in      |  2 ++
 tools/configure.ac      | 13 +++++++++++++
 tools/firmware/Makefile |  4 ----
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 98245f63c9..84ddb1a542 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -75,3 +75,5 @@ TINFO_LIBS          := @TINFO_LIBS@
 ARGP_LDFLAGS        := @argp_ldflags@
 
 FILE_OFFSET_BITS    := @FILE_OFFSET_BITS@
+
+CONFIG_PV_SHIM      := @pvshim@
diff --git a/tools/configure.ac b/tools/configure.ac
index c9fd69ddfa..fcf282e74e 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -492,4 +492,17 @@ AC_ARG_ENABLE([9pfs],
 
 AC_SUBST(ninepfs)
 
+AC_ARG_ENABLE([pvshim],
+    AS_HELP_STRING([--disable-pvshim],
+                   [Disable pvshim build (enabled by default on 64bit x86)]),
+    [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [
+    cpu=`test -z "$target_cpu" && echo "$host_cpu" || echo "$target_cpu"`
+    case "$cpu" in
+        x86_64)
+           pvshim="y";;
+        *) pvshim="n";;
+    esac
+])
+AC_SUBST(pvshim)
+
 AC_OUTPUT()
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index cf304fc578..809a5fd025 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -1,10 +1,6 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-ifneq ($(XEN_TARGET_ARCH),x86_32)
-CONFIG_PV_SHIM := y
-endif
-
 # hvmloader is a 32-bit protected mode binary.
 TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
-- 
2.17.2 (Apple Git-113)


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

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

* Re: [PATCH v2] pvshim: make PV shim build selectable from configure
  2019-05-14 13:59 [PATCH v2] pvshim: make PV shim build selectable from configure Roger Pau Monne
  2019-05-14 13:59 ` [Xen-devel] " Roger Pau Monne
@ 2019-05-14 14:03 ` Wei Liu
  2019-05-14 14:03   ` [Xen-devel] " Wei Liu
  1 sibling, 1 reply; 4+ messages in thread
From: Wei Liu @ 2019-05-14 14:03 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Wei Liu

On Tue, May 14, 2019 at 03:59:22PM +0200, Roger Pau Monne wrote:
> So a user can decide whether to compile a PV shim as part of the tools
> build. Note that the default behavior is preserved, which is to build
> a PV shim when the target or host (if target is unset) architecture is
> 64bit x86.
> 
> Requested-by: Olaf Hering <olaf@aepfle.de>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> NOTE: run autogen.sh after applying.

Noted.

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

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

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

* Re: [Xen-devel] [PATCH v2] pvshim: make PV shim build selectable from configure
  2019-05-14 14:03 ` Wei Liu
@ 2019-05-14 14:03   ` Wei Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2019-05-14 14:03 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Wei Liu

On Tue, May 14, 2019 at 03:59:22PM +0200, Roger Pau Monne wrote:
> So a user can decide whether to compile a PV shim as part of the tools
> build. Note that the default behavior is preserved, which is to build
> a PV shim when the target or host (if target is unset) architecture is
> 64bit x86.
> 
> Requested-by: Olaf Hering <olaf@aepfle.de>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> NOTE: run autogen.sh after applying.

Noted.

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

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

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

end of thread, other threads:[~2019-05-14 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-14 13:59 [PATCH v2] pvshim: make PV shim build selectable from configure Roger Pau Monne
2019-05-14 13:59 ` [Xen-devel] " Roger Pau Monne
2019-05-14 14:03 ` Wei Liu
2019-05-14 14:03   ` [Xen-devel] " Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).