diff mbox series

[2/3] x86/shim: adjust Kconfig defaults

Message ID 7eb74774-f8dc-ef97-c66d-0c4ac50ed9e0@suse.com (mailing list archive)
State New, archived
Headers show
Series x86: shim building adjustments | expand

Commit Message

Jan Beulich Sept. 14, 2020, 12:39 p.m. UTC
Just like HVM, defaulting SHADOW_PAGING and TBOOT to Yes in shim-
exclusive mode makes no sense, as the respective code is dead there.

Also adjust the shim default config file: It needs to specifiy values
only for settings where a non-default value is wanted.

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

Comments

Roger Pau Monne Sept. 15, 2020, 10:49 a.m. UTC | #1
On Mon, Sep 14, 2020 at 02:39:08PM +0200, Jan Beulich wrote:
> Just like HVM, defaulting SHADOW_PAGING and TBOOT to Yes in shim-
> exclusive mode makes no sense, as the respective code is dead there.
> 
> Also adjust the shim default config file: It needs to specifiy values
> only for settings where a non-default value is wanted.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

> 
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -116,9 +116,9 @@ config XEN_SHSTK
>  	  compatiblity can be provided via the PV Shim mechanism.
>  
>  config SHADOW_PAGING
> -        bool "Shadow Paging"
> -        default y
> -        ---help---
> +	bool "Shadow Paging"
> +	default y if !PV_SHIM_EXCLUSIVE

I think you could also do: default !PV_SHIM_EXCLUSIVE?

I'm fine with using the current form.

Thanks, Roger.
Jan Beulich Sept. 15, 2020, 12:15 p.m. UTC | #2
On 15.09.2020 12:49, Roger Pau Monné wrote:
> On Mon, Sep 14, 2020 at 02:39:08PM +0200, Jan Beulich wrote:
>> Just like HVM, defaulting SHADOW_PAGING and TBOOT to Yes in shim-
>> exclusive mode makes no sense, as the respective code is dead there.
>>
>> Also adjust the shim default config file: It needs to specifiy values
>> only for settings where a non-default value is wanted.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks.

>> --- a/xen/arch/x86/Kconfig
>> +++ b/xen/arch/x86/Kconfig
>> @@ -116,9 +116,9 @@ config XEN_SHSTK
>>  	  compatiblity can be provided via the PV Shim mechanism.
>>  
>>  config SHADOW_PAGING
>> -        bool "Shadow Paging"
>> -        default y
>> -        ---help---
>> +	bool "Shadow Paging"
>> +	default y if !PV_SHIM_EXCLUSIVE
> 
> I think you could also do: default !PV_SHIM_EXCLUSIVE?

Oh, yes, in this case I can indeed. I've mechanically used the form
wanted when the prompt isn't unconditionally visible. Will switch.

Jan
diff mbox series

Patch

--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -116,9 +116,9 @@  config XEN_SHSTK
 	  compatiblity can be provided via the PV Shim mechanism.
 
 config SHADOW_PAGING
-        bool "Shadow Paging"
-        default y
-        ---help---
+	bool "Shadow Paging"
+	default y if !PV_SHIM_EXCLUSIVE
+	---help---
 
           Shadow paging is a software alternative to hardware paging support
           (Intel EPT, AMD NPT).
@@ -165,8 +165,8 @@  config HVM_FEP
 	  If unsure, say N.
 
 config TBOOT
-	def_bool y
-	prompt "Xen tboot support" if EXPERT
+	bool "Xen tboot support" if EXPERT
+	default y if !PV_SHIM_EXCLUSIVE
 	select CRYPTO
 	---help---
 	  Allows support for Trusted Boot using the Intel(R) Trusted Execution
--- a/xen/arch/x86/configs/pvshim_defconfig
+++ b/xen/arch/x86/configs/pvshim_defconfig
@@ -8,12 +8,9 @@  CONFIG_NR_CPUS=32
 CONFIG_EXPERT=y
 CONFIG_SCHED_NULL=y
 # Disable features not used by the PV shim
-# CONFIG_HVM is not set
 # CONFIG_XEN_SHSTK is not set
 # CONFIG_HYPFS is not set
-# CONFIG_SHADOW_PAGING is not set
 # CONFIG_BIGMEM is not set
-# CONFIG_TBOOT is not set
 # CONFIG_KEXEC is not set
 # CONFIG_XENOPROF is not set
 # CONFIG_XSM is not set