Skip to contentSkip to conversation

build: convert CONFIG_COMPAT to Kconfig

PATCH In review Doug Goldstein 4 participants 8 messages Dec 18, 2015 – Jan 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: convert CONFIG_COMPAT to Kconfig

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +7 -0
index 7d0e9a9..046e257 100644
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.
+
 # Select HAS_DEVICE_TREE if device tree is supported
 config HAS_DEVICE_TREE
 	bool
Signature · 1 line
2.4.10
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

a slight quibble.

Quoted 41 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644

xen/common/Kconfig line 9

Quoted 9 lines
xen/common/Kconfig +6 -0
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests. Arm guests are technically HVM, although the term is rather less common on their side.

~Andrew

#2 lore raw
Quoted 66 lines · Andrew Cooper
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

a slight quibble.

Quoted 41 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644

xen/common/Kconfig line 9

Quoted 9 lines
xen/common/Kconfig +6 -0
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests. Arm guests are technically HVM, although the term is rather less common on their side.

Quoted 2 lines

~Andrew

How about:

32-bit interface support on 64-bit Xen which is used by x86 HVM and PV guests and ARM HVM guests. The reason this is used for HVM guests is that HVMLoader makes 32-bit hypercalls irrespective of the destination run mode of the guest.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 65 lines · Doug Goldstein
Quoted 64 lines · Andrew Cooper
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

a slight quibble.

Quoted 41 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644

xen/common/Kconfig line 9

Quoted 9 lines
xen/common/Kconfig +6 -0
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests. Arm guests are technically HVM, although the term is rather less common on their side.

Quoted 9 lines
Quoted 2 lines

~Andrew

How about:

32-bit interface support on 64-bit Xen which is used by x86 HVM and PV guests and ARM HVM guests. The reason this is used for HVM guests is that HVMLoader makes 32-bit hypercalls irrespective of the destination run mode of the guest.

The complication here is that arm doesn't yet support compat. There is a hope to (which is, I guess, why Jan asked for it to be common), but it shouldn't give any implication that it is available on ARM yet.

I am not overly familiar with the kconfig grammar. Is there a sensible way to limit the option to being visible only on x86, and only on 64bit builds? (even if arm supported compat, it wouldn't make sense to offer it to arm32).

Or am I just talking my way back around to suggesting that it be an arch specific option?

~Andrew

#4 lore raw
Quoted 76 lines · Andrew Cooper
Quoted 65 lines · Doug Goldstein
Quoted 64 lines · Andrew Cooper
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

a slight quibble.

Quoted 41 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644

xen/common/Kconfig line 9

Quoted 9 lines
xen/common/Kconfig +6 -0
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests. Arm guests are technically HVM, although the term is rather less common on their side.

Quoted 9 lines
Quoted 2 lines

~Andrew

How about:

32-bit interface support on 64-bit Xen which is used by x86 HVM and PV guests and ARM HVM guests. The reason this is used for HVM guests is that HVMLoader makes 32-bit hypercalls irrespective of the destination run mode of the guest.

Quoted 3 lines

The complication here is that arm doesn't yet support compat. There is a hope to (which is, I guess, why Jan asked for it to be common), but it shouldn't give any implication that it is available on ARM yet.

So maybe just drop the "and ARM HVM guests" part of that statement and when that gets added we can expand the language?

Quoted 11 lines

I am not overly familiar with the kconfig grammar. Is there a sensible way to limit the option to being visible only on x86, and only on 64bit builds? (even if arm supported compat, it wouldn't make sense to offer it to arm32).

Or am I just talking my way back around to suggesting that it be an arch specific option?

~Andrew

Not necessarily. Currently its not visible to users at all and x86 just enables it. Should it be made to be visible we could keep it in the common place and add depends like "depends on X86_64" or "depends on 64BIT" (both x86_64 and arm64).

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 90 lines · Doug Goldstein
Quoted 70 lines · Andrew Cooper
Quoted 69 lines · Doug Goldstein
Quoted 64 lines · Andrew Cooper
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

a slight quibble.

Quoted 41 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644

xen/common/Kconfig line 9

Quoted 9 lines
xen/common/Kconfig +6 -0
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests. Arm guests are technically HVM, although the term is rather less common on their side.

Quoted 2 lines

~Andrew

How about:

Quoted 8 lines
Quoted 5 lines

32-bit interface support on 64-bit Xen which is used by x86 HVM and PV guests and ARM HVM guests. The reason this is used for HVM guests is that HVMLoader makes 32-bit hypercalls irrespective of the destination run mode of the guest.

The complication here is that arm doesn't yet support compat. There is a hope to (which is, I guess, why Jan asked for it to be common), but it shouldn't give any implication that it is available on ARM yet.

So maybe just drop the "and ARM HVM guests" part of that statement and when that gets added we can expand the language?

Quoted 8 lines

I am not overly familiar with the kconfig grammar. Is there a sensible way to limit the option to being visible only on x86, and only on 64bit builds? (even if arm supported compat, it wouldn't make sense to offer it to arm32).

Or am I just talking my way back around to suggesting that it be an arch specific option?

Quoted 6 lines
Quoted 2 lines

~Andrew

Not necessarily. Currently its not visible to users at all and x86 just enables it. Should it be made to be visible we could keep it in the common place and add depends like "depends on X86_64" or "depends on 64BIT" (both x86_64 and arm64).

Ah ok. In which case dropping the ARM bit is probably best, and leaving everything else as it stands.

~Andrew

#6 lore raw
In reply to Andrew Cooper
Quoted 77 lines
Quoted 1 line
Quoted 1 line · On 18.12.15 at 23:09, <[email protected]> wrote:
Quoted 65 lines · Doug Goldstein
Quoted 64 lines · Andrew Cooper
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

a slight quibble.

Quoted 41 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of 'bool') caused it to break on ARM. This resolves the issue and should be ready to merge.

---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++
 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
xen/arch/x86/Kconfig +1 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select COMPAT
 	select HAS_ACPI
 	select HAS_CPUFREQ
 	select HAS_EHCI
xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644

xen/common/Kconfig line 9

Quoted 9 lines
xen/common/Kconfig +6 -0
@@ -1,6 +1,13 @@
 
 menu "Common Features"
 
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used for both
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls irrespective
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests. Arm guests are technically HVM, although the term is rather less common on their side.

Quoted 9 lines
Quoted 2 lines

~Andrew

How about:

32-bit interface support on 64-bit Xen which is used by x86 HVM and PV guests and ARM HVM guests. The reason this is used for HVM guests is that HVMLoader makes 32-bit hypercalls irrespective of the destination run mode of the guest.

Quoted 3 lines

The complication here is that arm doesn't yet support compat. There is a hope to (which is, I guess, why Jan asked for it to be common), but it shouldn't give any implication that it is available on ARM yet.

I don't think ARM is meant to ever use this layer - its interface was made 32-bit clean from the beginning. The reason for wanting this option to be common is an abstract one (i.e. considering just possible future architectures).

Jan

#7 lore raw
Quoted 87 lines · Jan Beulich
Quoted 87 lines
Quoted 1 line
Quoted 1 line · On 18.12.15 at 23:09, <[email protected]> wrote:
Quoted 84 lines · Doug Goldstein
Quoted 72 lines · Andrew Cooper
Quoted 6 lines · Doug Goldstein

Use the Kconfig generated CONFIG_COMPAT defines in the code base.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Andrew Cooper <[email protected]>

have
a slight quibble.

Quoted 54 lines

---
This was previously Acked-by: Jan Beulich <[email protected]> but then
there was a request to change it to xen/common/Kconfig from xen/arch/x86/Kconfig. Unfortunately a small typo ('def_bool y' instead of
'bool') caused it to break on ARM. This resolves the issue and should be
ready to merge.
---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 1 +
 xen/common/Kconfig   | 7 +++++++

 3 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -0
index f12d549..85fa27c 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y

 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y

-CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y

xen/arch/x86/Kconfig +0 -0
index 07e366d..7d2ed96 100644
@@ -3,6 +3,7 @@ config X86_64


 config X86
  def_bool y

xen/arch/x86/Kconfig +1 -0
+	select COMPAT

  select HAS_ACPI
  select HAS_CPUFREQ
  select HAS_EHCI

xen/common/Kconfig +0 -0
index 7d0e9a9..046e257 100644
@@ -1,6 +1,13 @@


 menu "Common Features"

xen/common/Kconfig +4 -0
+config COMPAT
+	bool
+	help
+	  32-bit interface support on 64-bit Xen which is used

for both

xen/common/Kconfig +1 -0
+	  HVM and PV guests. HVMLoader makes 32-bit hypercalls

irrespective

xen/common/Kconfig line 9

Quoted 1 line
xen/common/Kconfig +1 -0
+	  of the destination runmode of the guest.

As this is now common, probably want to specify x86 HVM and PV guests.
Arm guests are technically HVM, although the term is rather less common
on their side.

Quoted 2 lines

~Andrew

How about:

32-bit interface support on 64-bit Xen which is used by x86 HVM and PV
guests and ARM HVM guests. The reason this is used for HVM guests is that HVMLoader makes 32-bit hypercalls irrespective of the destination
run mode of the guest.

Quoted 7 lines
Quoted 4 lines

The complication here is that arm doesn't yet support compat.  There is a hope to (which is, I guess, why Jan asked for it to be common), but it
shouldn't give any implication that it is available on ARM yet.

I don't think ARM is meant to ever use this layer - its interface was made 32-bit clean from the beginning.

Correct. We went to some lengths to avoid the need for a compat layer for supporting 32 bit guests on a 64 bit Xen ARM.

I also want to clarify that ARM guests are neither PV nor HVM(*), they are something in between and we try to avoid the PV/HVM terminology when speaking about ARM, they are just "guests" as there is only one kind. (Some of the PV/HVM terminology has leaked into the implementation, due to not fully refactoring some stuff or shaving various yaks by renaming stuff, but that's irrelevant to the bigger picture IMHO).

Eventually we may end up with a thing like x86's HVM (i.e. pretending to be real h/w) at which point we will need to retcon on a name for the existing guest type.

(*) They are somewhat more like a PVH or dm-lite guest, but even that isn't quite right.

Quoted 3 lines

The reason for wanting this
option to be common is an abstract one (i.e. considering just possible future architectures).

I would hope that most future arches would try very hard to follow ARM's lead here and not have a compat layer at all, but that doesn't conflict with your abstract point IMHO.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel