x86: don't offer Hyper-V option when "PV Shim Exclusive"
diff mbox series

Message ID 34075b30-a9a1-4c02-5c6d-bdd73aeec5d0@suse.com
State New
Headers show
Series
  • x86: don't offer Hyper-V option when "PV Shim Exclusive"
Related show

Commit Message

Jan Beulich Dec. 5, 2019, 3:42 p.m. UTC
This only added dead code. Use "if" instead of "depends on" to make
(halfway) clear that other guest options should also go in thae same
block. Move the option down such that the shim related options get
presented first, avoiding to ask the question when the answer may end
up being discarded.

While in the neighborhood also bring PV_SHIM_EXCLUSIVE into more
"canonical" shape.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Wei Liu Dec. 5, 2019, 3:57 p.m. UTC | #1
On Thu, 5 Dec 2019 at 15:41, Jan Beulich <jbeulich@suse.com> wrote:
>
> This only added dead code. Use "if" instead of "depends on" to make
> (halfway) clear that other guest options should also go in thae same
> block. Move the option down such that the shim related options get
> presented first, avoiding to ask the question when the answer may end
> up being discarded.
>
> While in the neighborhood also bring PV_SHIM_EXCLUSIVE into more
> "canonical" shape.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>

Reviewed-by: Wei Liu <wl@xen.org>
Alan Robinson Dec. 5, 2019, 4:10 p.m. UTC | #2
On Thu, Dec 05, 2019 at 04:42:08PM +0100, Jan Beulich wrote:
> 
> This only added dead code. Use "if" instead of "depends on" to make
> (halfway) clear that other guest options should also go in thae same

s/thae/the/

> block. Move the option down such that the shim related options get
> presented first, avoiding to ask the question when the answer may end
> up being discarded.
> 
> While in the neighborhood also bring PV_SHIM_EXCLUSIVE into more
> "canonical" shape.
> 

Alan
Andrew Cooper Dec. 5, 2019, 6:15 p.m. UTC | #3
On 05/12/2019 15:42, Jan Beulich wrote:
> This only added dead code. Use "if" instead of "depends on" to make
> (halfway) clear that other guest options should also go in thae same
> block. Move the option down such that the shim related options get
> presented first, avoiding to ask the question when the answer may end
> up being discarded.
>
> While in the neighborhood also bring PV_SHIM_EXCLUSIVE into more
> "canonical" shape.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Patch
diff mbox series

--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -164,14 +164,6 @@  endchoice
 config GUEST
 	bool
 
-config HYPERV_GUEST
-	bool "Hyper-V Guest"
-	select GUEST
-	---help---
-	  Support for Xen detecting when it is running under Hyper-V.
-
-	  If unsure, say N.
-
 config XEN_GUEST
 	bool "Xen Guest"
 	select GUEST
@@ -201,8 +193,7 @@  config PV_SHIM
 	  If unsure, say Y.
 
 config PV_SHIM_EXCLUSIVE
-	def_bool n
-	prompt "PV Shim Exclusive"
+	bool "PV Shim Exclusive"
 	depends on PV_SHIM
 	---help---
 	  Build Xen in a way which unconditionally assumes PV_SHIM mode.  This
@@ -211,6 +202,18 @@  config PV_SHIM_EXCLUSIVE
 
 	  If unsure, say N.
 
+if !PV_SHIM_EXCLUSIVE
+
+config HYPERV_GUEST
+	bool "Hyper-V Guest"
+	select GUEST
+	---help---
+	  Support for Xen detecting when it is running under Hyper-V.
+
+	  If unsure, say N.
+
+endif
+
 config MEM_SHARING
 	bool "Xen memory sharing support" if EXPERT = "y"
 	depends on HVM