Skip to contentSkip to conversation

kconfig: add xenconfig

PATCH Applied Luis R. Rodriguez 6 participants 25 messages May 20, 2015 – Jun 16, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v6 cover kconfig: add xenconfig

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

This v6 addresses enabling xen on i386, x86-64 and arm64 starting from a 'make allnoconfig' setting.

Luis R. Rodriguez (2):
kconfig: clarify kvmconfig is for kvm
kconfig: add xenconfig defconfig helper

 arch/x86/configs/xen.config | 28 ++++++++++++++++++++++++++
 kernel/configs/xen.config   | 48 +++++++++++++++++++++++++++++++++++++++++++++
 scripts/kconfig/Makefile    |  7 ++++++-
 3 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 arch/x86/configs/xen.config
 create mode 100644 kernel/configs/xen.config
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#1 lore raw

PATCH v6 1/2 kconfig: clarify kvmconfig is for kvm

From: "Luis R. Rodriguez" <[email protected]>

We'll be adding options for xen as well.

---
 scripts/kconfig/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/Makefile +1 -1
index d9b1fef..6950032 100644
@@ -139,7 +139,7 @@ help:
 	@echo  '  randconfig	  - New config with random answer to all options'
 	@echo  '  listnewconfig   - List new options'
 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value'
-	@echo  '  kvmconfig	  - Enable additional options for guest kernel support'
+	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
 	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 
 # lxdialog stuff
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#2 lore raw

PATCH v6 1/2 kconfig: clarify kvmconfig is for kvm

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

We'll be adding options for xen as well.

---
 scripts/kconfig/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/Makefile +1 -1
index d9b1fef..6950032 100644
@@ -139,7 +139,7 @@ help:
 	@echo  '  randconfig	  - New config with random answer to all options'
 	@echo  '  listnewconfig   - List new options'
 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value'
-	@echo  '  kvmconfig	  - Enable additional options for guest kernel support'
+	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
 	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 
 # lxdialog stuff
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#3 lore raw

PATCH v6 2/2 kconfig: add xenconfig defconfig helper

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
	grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
	grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
	grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---
 arch/x86/configs/xen.config | 28 ++++++++++++++++++++++++++
 kernel/configs/xen.config   | 48 +++++++++++++++++++++++++++++++++++++++++++++
 scripts/kconfig/Makefile    |  5 +++++
 3 files changed, 81 insertions(+)
 create mode 100644 arch/x86/configs/xen.config
 create mode 100644 kernel/configs/xen.config
arch/x86/configs/xen.config new file +28 -0
new file mode 100644
index 0000000..d9fc713
@@ -0,0 +1,28 @@
+# global x86 required specific stuff
+# On 32-bit HIGHMEM4G is not allowed
+CONFIG_HIGHMEM64G=y
+CONFIG_64BIT=y
+
+# These enable us to allow some of the
+# not so generic stuff below
+CONFIG_HYPERVISOR_GUEST=y
+CONFIG_PCI=y
+CONFIG_PCI_MSI=y
+CONFIG_X86_MCE=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_CPU_FREQ=y
+
+# x86 xen specific config options
+CONFIG_XEN_PVH=y
+CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_SAVE_RESTORE=y
+# CONFIG_XEN_DEBUG_FS is not set
+CONFIG_XEN_MCE_LOG=y
+CONFIG_XEN_ACPI_PROCESSOR=m
+# x86 specific backend drivers
+CONFIG_XEN_PCIDEV_BACKEND=m
+# x86 specific frontend drivers
+CONFIG_XEN_PCIDEV_FRONTEND=m
+# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
+# move to generic config if it ever does.
+CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
kernel/configs/xen.config new file +48 -0

48 lines not on this page · raw message

scripts/kconfig/Makefile +5 -0
index 6950032..f52abae 100644
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
 	@:
 
+PHONY += xenconfig
+xenconfig: xen.config
+	@:
+
 PHONY += tinyconfig
 tinyconfig:
 	$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
@@ -140,6 +144,7 @@ help:
 	@echo  '  listnewconfig   - List new options'
 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value'
 	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
+	@echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
 	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 
 # lxdialog stuff
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#4 lore raw

Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper

Hi,

I am not familiar with xen at all, just some comments from the build system side.

2015-05-21 3:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 74 lines

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
        grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
        grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
        grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---

scripts/kconfig/Makefile +0 -0
index 6950032..f52abae 100644

scripts/kconfig/Makefile PHONY += kvmconfig · line 124

Quoted 10 lines
scripts/kconfig/Makefile +4 -0
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
        @:
 
+PHONY += xenconfig
+xenconfig: xen.config
+       @:
+
 PHONY += tinyconfig
 tinyconfig:
        $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config

"make xenconfig" is equivalent to "make xen.config" and only saves one character.

Now we have only three targets for mergeconfig (tiny, kvm, xen), so it is OK to add this as an alias.
But if we have more such targets, we might have
to consider to use generic targets (*.config) at some point.

I do not intend to block this.
Just take my comment with a grain of salt..

scripts/kconfig/Makefile help: · line 150

Quoted 8 lines
scripts/kconfig/Makefile +1 -0
@@ -140,6 +144,7 @@ help:
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
        @echo  '  kvmconfig       - Enable additional options for kvm guest kernel support'
+       @echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
        @echo  '  tinyconfig      - Configure the tiniest possible kernel'
 
 # lxdialog stuff

If kvmconfig and xenconfig are only available for x86, is it better to enclose those helps with
ifeq ($(ARCH),x86)
...
endif

??

Signature · 2 lines
Best Regards
Masahiro Yamada
#5 lore raw

Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper

Quoted 97 lines · Masahiro Yamada

Hi,

I am not familiar with xen at all, just some comments from the build system side.

2015-05-21 3:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 74 lines

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
        grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
        grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
        grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---

scripts/kconfig/Makefile +0 -0
index 6950032..f52abae 100644

scripts/kconfig/Makefile PHONY += kvmconfig · line 124

Quoted 10 lines
scripts/kconfig/Makefile +4 -0
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
        @:
 
+PHONY += xenconfig
+xenconfig: xen.config
+       @:
+
 PHONY += tinyconfig
 tinyconfig:
        $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config

"make xenconfig" is equivalent to "make xen.config" and only saves one character.

Quoted 4 lines

Now we have only three targets for mergeconfig (tiny, kvm, xen), so it is OK to add this as an alias.
But if we have more such targets, we might have
to consider to use generic targets (*.config) at some point.

I'm frankly terrified of all these config target options growing more and the possible large collateral of patches to Kconfig files in the future. Since this is a small specialized group now, I think we should treat it as such but I think what you say has good merit long run.

For now I'm more of a fan we limit what we stuff in here and if this explodes then only have new options use the subject.config target. Thoughts?

Quoted 11 lines

I do not intend to block this.
Just take my comment with a grain of salt..

Quoted 7 lines
scripts/kconfig/Makefile +1 -0
@@ -140,6 +144,7 @@ help:
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
        @echo  '  kvmconfig       - Enable additional options for kvm guest kernel support'
+       @echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
        @echo  '  tinyconfig      - Configure the tiniest possible kernel'
 
Quoted 8 lines

scripts/kconfig/Makefile help: · line 150

Quoted 1 line
scripts/kconfig/Makefile +0 -0
 # lxdialog stuff

If kvmconfig and xenconfig are only available for x86, is it better to enclose those helps with
ifeq ($(ARCH),x86)
...
endif

That's true if kvm was only for x86 but it is not, and likewise for xen.

mcgrof@ergon ~/linux-next (git::sumadre)$ git grep "config KVM$" arch/arm/kvm/Kconfig:config KVM arch/arm64/kvm/Kconfig:config KVM arch/mips/kvm/Kconfig:config KVM arch/powerpc/kvm/Kconfig:config KVM arch/s390/kvm/Kconfig:config KVM arch/tile/kvm/Kconfig:config KVM arch/x86/kvm/Kconfig:config KVM

mcgrof@ergon ~/linux-next (git::supadre)$ git grep "config XEN$" arch/arm/Kconfig:config XEN
arch/arm64/Kconfig:config XEN arch/x86/xen/Kconfig:config XEN

Luis

#6 lore raw

Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper

In reply to Masahiro Yamada
Quoted 97 lines · Masahiro Yamada

Hi,

I am not familiar with xen at all, just some comments from the build system side.

2015-05-21 3:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 74 lines

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
        grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
        grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
        grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---

scripts/kconfig/Makefile +0 -0
index 6950032..f52abae 100644

scripts/kconfig/Makefile PHONY += kvmconfig · line 124

Quoted 10 lines
scripts/kconfig/Makefile +4 -0
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
        @:
 
+PHONY += xenconfig
+xenconfig: xen.config
+       @:
+
 PHONY += tinyconfig
 tinyconfig:
        $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config

"make xenconfig" is equivalent to "make xen.config" and only saves one character.

Quoted 4 lines

Now we have only three targets for mergeconfig (tiny, kvm, xen), so it is OK to add this as an alias.
But if we have more such targets, we might have
to consider to use generic targets (*.config) at some point.

I'm frankly terrified of all these config target options growing more and the possible large collateral of patches to Kconfig files in the future. Since this is a small specialized group now, I think we should treat it as such but I think what you say has good merit long run.

For now I'm more of a fan we limit what we stuff in here and if this explodes then only have new options use the subject.config target. Thoughts?

Quoted 11 lines

I do not intend to block this.
Just take my comment with a grain of salt..

Quoted 7 lines
scripts/kconfig/Makefile +1 -0
@@ -140,6 +144,7 @@ help:
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
        @echo  '  kvmconfig       - Enable additional options for kvm guest kernel support'
+       @echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
        @echo  '  tinyconfig      - Configure the tiniest possible kernel'
 
Quoted 8 lines

scripts/kconfig/Makefile help: · line 150

Quoted 1 line
scripts/kconfig/Makefile +0 -0
 # lxdialog stuff

If kvmconfig and xenconfig are only available for x86, is it better to enclose those helps with
ifeq ($(ARCH),x86)
...
endif

That's true if kvm was only for x86 but it is not, and likewise for xen.

mcgrof@ergon ~/linux-next (git::sumadre)$ git grep "config KVM$" arch/arm/kvm/Kconfig:config KVM arch/arm64/kvm/Kconfig:config KVM arch/mips/kvm/Kconfig:config KVM arch/powerpc/kvm/Kconfig:config KVM arch/s390/kvm/Kconfig:config KVM arch/tile/kvm/Kconfig:config KVM arch/x86/kvm/Kconfig:config KVM

mcgrof@ergon ~/linux-next (git::supadre)$ git grep "config XEN$" arch/arm/Kconfig:config XEN
arch/arm64/Kconfig:config XEN arch/x86/xen/Kconfig:config XEN

Luis

#7 lore raw

Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper

Hi Luis,

2015-05-22 3:47 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 103 lines · Masahiro Yamada
Quoted 97 lines

Hi,

I am not familiar with xen at all, just some comments from the build system side.

2015-05-21 3:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 74 lines

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
        grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
        grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
        grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---

scripts/kconfig/Makefile +0 -0
index 6950032..f52abae 100644

scripts/kconfig/Makefile PHONY += kvmconfig · line 124

Quoted 10 lines
scripts/kconfig/Makefile +4 -0
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
        @:
 
+PHONY += xenconfig
+xenconfig: xen.config
+       @:
+
 PHONY += tinyconfig
 tinyconfig:
        $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config

"make xenconfig" is equivalent to "make xen.config" and only saves one character.

Quoted 4 lines

Now we have only three targets for mergeconfig (tiny, kvm, xen), so it is OK to add this as an alias.
But if we have more such targets, we might have
to consider to use generic targets (*.config) at some point.

Quoted 7 lines

I'm frankly terrified of all these config target options growing more and the possible large collateral of patches to Kconfig files in the future. Since this is a small specialized group now, I think we should treat it as such but I think what you say has good merit long run.

For now I'm more of a fan we limit what we stuff in here and if this explodes then only have new options use the subject.config target. Thoughts?

Sounds good to me.

Quoted 20 lines
Quoted 11 lines

I do not intend to block this.
Just take my comment with a grain of salt..

Quoted 7 lines
scripts/kconfig/Makefile +1 -0
@@ -140,6 +144,7 @@ help:
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
        @echo  '  kvmconfig       - Enable additional options for kvm guest kernel support'
+       @echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
        @echo  '  tinyconfig      - Configure the tiniest possible kernel'
 
Quoted 8 lines

scripts/kconfig/Makefile help: · line 150

Quoted 1 line
scripts/kconfig/Makefile +0 -0
 # lxdialog stuff

If kvmconfig and xenconfig are only available for x86, is it better to enclose those helps with
ifeq ($(ARCH),x86)
...
endif

Quoted 2 lines

That's true if kvm was only for x86 but it is not, and likewise for xen.

OK, then. Thanks for explaining this.

Signature · 2 lines
Best Regards
Masahiro Yamada
#8 lore raw

Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper

In reply to Luis R. Rodriguez

Hi Luis,

2015-05-22 3:47 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 103 lines · Masahiro Yamada
Quoted 97 lines

Hi,

I am not familiar with xen at all, just some comments from the build system side.

2015-05-21 3:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 74 lines

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
        grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
        grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
        grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---

scripts/kconfig/Makefile +0 -0
index 6950032..f52abae 100644

scripts/kconfig/Makefile PHONY += kvmconfig · line 124

Quoted 10 lines
scripts/kconfig/Makefile +4 -0
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
        @:
 
+PHONY += xenconfig
+xenconfig: xen.config
+       @:
+
 PHONY += tinyconfig
 tinyconfig:
        $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config

"make xenconfig" is equivalent to "make xen.config" and only saves one character.

Quoted 4 lines

Now we have only three targets for mergeconfig (tiny, kvm, xen), so it is OK to add this as an alias.
But if we have more such targets, we might have
to consider to use generic targets (*.config) at some point.

Quoted 7 lines

I'm frankly terrified of all these config target options growing more and the possible large collateral of patches to Kconfig files in the future. Since this is a small specialized group now, I think we should treat it as such but I think what you say has good merit long run.

For now I'm more of a fan we limit what we stuff in here and if this explodes then only have new options use the subject.config target. Thoughts?

Sounds good to me.

Quoted 20 lines
Quoted 11 lines

I do not intend to block this.
Just take my comment with a grain of salt..

Quoted 7 lines
scripts/kconfig/Makefile +1 -0
@@ -140,6 +144,7 @@ help:
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
        @echo  '  kvmconfig       - Enable additional options for kvm guest kernel support'
+       @echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
        @echo  '  tinyconfig      - Configure the tiniest possible kernel'
 
Quoted 8 lines

scripts/kconfig/Makefile help: · line 150

Quoted 1 line
scripts/kconfig/Makefile +0 -0
 # lxdialog stuff

If kvmconfig and xenconfig are only available for x86, is it better to enclose those helps with
ifeq ($(ARCH),x86)
...
endif

Quoted 2 lines

That's true if kvm was only for x86 but it is not, and likewise for xen.

OK, then. Thanks for explaining this.

Signature · 2 lines
Best Regards
Masahiro Yamada
#9 lore raw

Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper

In reply to Luis R. Rodriguez

Hi,

I am not familiar with xen at all, just some comments from the build system side.

2015-05-21 3:53 GMT+09:00 Luis R. Rodriguez <[email protected]>:

Quoted 74 lines

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
        grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
        grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
        grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---

scripts/kconfig/Makefile +0 -0
index 6950032..f52abae 100644

scripts/kconfig/Makefile PHONY += kvmconfig · line 124

Quoted 10 lines
scripts/kconfig/Makefile +4 -0
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
        @:
 
+PHONY += xenconfig
+xenconfig: xen.config
+       @:
+
 PHONY += tinyconfig
 tinyconfig:
        $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config

"make xenconfig" is equivalent to "make xen.config" and only saves one character.

Now we have only three targets for mergeconfig (tiny, kvm, xen), so it is OK to add this as an alias.
But if we have more such targets, we might have
to consider to use generic targets (*.config) at some point.

I do not intend to block this.
Just take my comment with a grain of salt..

scripts/kconfig/Makefile help: · line 150

Quoted 8 lines
scripts/kconfig/Makefile +1 -0
@@ -140,6 +144,7 @@ help:
        @echo  '  listnewconfig   - List new options'
        @echo  '  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value'
        @echo  '  kvmconfig       - Enable additional options for kvm guest kernel support'
+       @echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
        @echo  '  tinyconfig      - Configure the tiniest possible kernel'
 
 # lxdialog stuff

If kvmconfig and xenconfig are only available for x86, is it better to enclose those helps with
ifeq ($(ARCH),x86)
...
endif

??

Signature · 2 lines
Best Regards
Masahiro Yamada
#10 lore raw

PATCH v6 2/2 kconfig: add xenconfig defconfig helper

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using:

make xenconfig

You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config.

Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one.

A few generic notes: we enable both of these:

CONFIG_INET=y
CONFIG_BINFMT_ELF=y

although technically not required given you likely will end up with a pretty useless system otherwise.

A few architectural differences worth noting:

$ make allnoconfig; make xenconfig > /dev/null ; \
	grep XEN .config > 64-bit-config
$ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \
	grep XEN .config > 32-bit-config
$ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \
	grep XEN .config > arm64-config

Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly.

Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts.

---
 arch/x86/configs/xen.config | 28 ++++++++++++++++++++++++++
 kernel/configs/xen.config   | 48 +++++++++++++++++++++++++++++++++++++++++++++
 scripts/kconfig/Makefile    |  5 +++++
 3 files changed, 81 insertions(+)
 create mode 100644 arch/x86/configs/xen.config
 create mode 100644 kernel/configs/xen.config
arch/x86/configs/xen.config new file +28 -0
new file mode 100644
index 0000000..d9fc713
@@ -0,0 +1,28 @@
+# global x86 required specific stuff
+# On 32-bit HIGHMEM4G is not allowed
+CONFIG_HIGHMEM64G=y
+CONFIG_64BIT=y
+
+# These enable us to allow some of the
+# not so generic stuff below
+CONFIG_HYPERVISOR_GUEST=y
+CONFIG_PCI=y
+CONFIG_PCI_MSI=y
+CONFIG_X86_MCE=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_CPU_FREQ=y
+
+# x86 xen specific config options
+CONFIG_XEN_PVH=y
+CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_SAVE_RESTORE=y
+# CONFIG_XEN_DEBUG_FS is not set
+CONFIG_XEN_MCE_LOG=y
+CONFIG_XEN_ACPI_PROCESSOR=m
+# x86 specific backend drivers
+CONFIG_XEN_PCIDEV_BACKEND=m
+# x86 specific frontend drivers
+CONFIG_XEN_PCIDEV_FRONTEND=m
+# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
+# move to generic config if it ever does.
+CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
kernel/configs/xen.config new file +48 -0

48 lines not on this page · raw message

scripts/kconfig/Makefile +5 -0
index 6950032..f52abae 100644
@@ -115,6 +115,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
 	@:
 
+PHONY += xenconfig
+xenconfig: xen.config
+	@:
+
 PHONY += tinyconfig
 tinyconfig:
 	$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
@@ -140,6 +144,7 @@ help:
 	@echo  '  listnewconfig   - List new options'
 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value'
 	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
+	@echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
 	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 
 # lxdialog stuff
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#11 lore raw
In reply to Luis R. Rodriguez

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

Michal

#12 lore raw
In reply to Luis R. Rodriguez

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

Michal

#13 lore raw
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

As you wish :)

Luis

#14 lore raw
In reply to Michal Marek
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

As you wish :)

Luis

#15 lore raw
Quoted 4 lines · Luis R. Rodriguez
Quoted 3 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 2 lines

From: "Luis R. Rodriguez" <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

As you wish :)

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Luis

#16 lore raw
In reply to Luis R. Rodriguez
Quoted 4 lines · Luis R. Rodriguez
Quoted 3 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 2 lines

From: "Luis R. Rodriguez" <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

As you wish :)

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Luis

#17 lore raw
Quoted 12 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

Quoted 6 lines
Quoted 1 line

As you wish :)

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Hey folks, any feedback?

Luis

#18 lore raw
In reply to Luis R. Rodriguez
Quoted 12 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

Quoted 6 lines
Quoted 1 line

As you wish :)

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Hey folks, any feedback?

Luis

#19 lore raw
Quoted 14 lines · Luis R. Rodriguez
Quoted 12 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

As you wish :)

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Hey folks, any feedback?

It should go in, David do you want me to put it in?

Quoted 2 lines

Luis

#20 lore raw
In reply to Luis R. Rodriguez
Quoted 14 lines · Luis R. Rodriguez
Quoted 12 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

As you wish :)

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Hey folks, any feedback?

It should go in, David do you want me to put it in?

Quoted 2 lines

Luis

#21 lore raw
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Luis R. Rodriguez
Quoted 14 lines · Luis R. Rodriguez
Quoted 12 lines · Luis R. Rodriguez
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

As you wish :)

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Hey folks, any feedback?

It should go in, David do you want me to put it in?

Thanks Konrad, its' been over one year now [0] since this patch's first iteration, it'd be great to see this merged finally.

[0] http://lkml.kernel.org/r/[email protected]

Luis

#22 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Luis R. Rodriguez
Quoted 14 lines · Luis R. Rodriguez
Quoted 12 lines · Luis R. Rodriguez
Quoted 9 lines · Michal Marek

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):

Quoted 4 lines

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

Not kbuild, if I may ask :). Otherwise people will find me in get_maintainer.pl output and keep CCing me on updates to the xen.config files, which is something I am not at all familiar with.

As you wish :)

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

David, Konrad, Ian,

Michal prefers this to go through the Xen tree. Please let me know if there any issues with the patches.

Hey folks, any feedback?

It should go in, David do you want me to put it in?

Thanks Konrad, its' been over one year now [0] since this patch's first iteration, it'd be great to see this merged finally.

[0] http://lkml.kernel.org/r/[email protected]

Luis

Applied
#23 lore raw
In reply to Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

This v6 addresses enabling xen on i386, x86-64 and arm64 starting from a 'make allnoconfig' setting.

Luis R. Rodriguez (2):
kconfig: clarify kvmconfig is for kvm
kconfig: add xenconfig defconfig helper

Applied to for-linus-4.2, thanks.

David

Applied
#24 lore raw
In reply to Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

Michal Marek, Xen folks (David Vrabel, Konrad, Ian), which tree should these go through?

This v6 addresses enabling xen on i386, x86-64 and arm64 starting from a 'make allnoconfig' setting.

Luis R. Rodriguez (2):
kconfig: clarify kvmconfig is for kvm
kconfig: add xenconfig defconfig helper

Applied to for-linus-4.2, thanks.

David