diff mbox series

[3/3] x86/shim: don't permit HVM and PV_SHIM_EXCLUSIVE at the same time

Message ID d6661f16-0cd2-1eed-0128-c89f1aca240d@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
This combination doesn't really make sense (and there likely are more).
The alternative here would be some presumably intrusive #ifdef-ary to
get this combination to actually build again.

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

Comments

Roger Pau Monne Sept. 15, 2020, 11:02 a.m. UTC | #1
On Mon, Sep 14, 2020 at 02:39:33PM +0200, Jan Beulich wrote:
> This combination doesn't really make sense (and there likely are more).
> The alternative here would be some presumably intrusive #ifdef-ary to
> get this combination to actually build again.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

I'm not sure I see a way to cater for Andrew requests while allowing
PV_SHIM_EXCLUSIVE to gate options in order to be able to remove
code.

Maybe PV_SHIM_EXCLUSIVE should be moved to the top level Kconfig
screen on x86 and behave like a list, so that you select a 'Normal'
hypervisor build or a 'PV shim exclusive' build, and that could
completely change the contents of the menus?

If that doesn't seem suitable I think the proposed patch is a good
option unless someone has a better approach.

Thanks, Roger.
Jan Beulich Sept. 15, 2020, 12:19 p.m. UTC | #2
On 15.09.2020 13:02, Roger Pau Monné wrote:
> On Mon, Sep 14, 2020 at 02:39:33PM +0200, Jan Beulich wrote:
>> This combination doesn't really make sense (and there likely are more).
>> The alternative here would be some presumably intrusive #ifdef-ary to
>> get this combination to actually build again.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> I'm not sure I see a way to cater for Andrew requests while allowing
> PV_SHIM_EXCLUSIVE to gate options in order to be able to remove
> code.

Yes, I'm specifically hoping for his input, in particular in light
of the additional argument given in the cover letter (HVM not
actually usable in this mode).

> Maybe PV_SHIM_EXCLUSIVE should be moved to the top level Kconfig
> screen on x86 and behave like a list, so that you select a 'Normal'
> hypervisor build or a 'PV shim exclusive' build, and that could
> completely change the contents of the menus?

This might be another option, yes. Let's see what Andrew thinks.

And btw - the patch needs an update anyway, as I've lost the
defaulting to Y of this option.

Jan
diff mbox series

Patch

--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -23,7 +23,7 @@  config X86
 	select HAS_PDX
 	select HAS_SCHED_GRANULARITY
 	select HAS_UBSAN
-	select HAS_VPCI if !PV_SHIM_EXCLUSIVE && HVM
+	select HAS_VPCI if HVM
 	select NEEDS_LIBELF
 	select NUMA
 
@@ -90,8 +90,8 @@  config PV_LINEAR_PT
          If unsure, say Y.
 
 config HVM
-	def_bool !PV_SHIM_EXCLUSIVE
-	prompt "HVM support"
+	bool "HVM support"
+	depends on !PV_SHIM_EXCLUSIVE
 	---help---
 	  Interfaces to support HVM domains.  HVM domains require hardware
 	  virtualisation extensions (e.g. Intel VT-x, AMD SVM), but can boot