linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] kconfig: add xenconfig
@ 2015-05-20 18:53 Luis R. Rodriguez
  2015-05-20 18:53 ` [PATCH v6 1/2] kconfig: clarify kvmconfig is for kvm Luis R. Rodriguez
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 18:53 UTC (permalink / raw)
  To: mmarek, david.vrabel, konrad.wilk, Ian.Campbell, xen-devel
  Cc: josh, bp, penberg, rientjes, rdunlap, levinsasha928, mtosatti,
	fengguang.wu, yamada.masahiro, linux-kernel, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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

-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v6 1/2] kconfig: clarify kvmconfig is for kvm
  2015-05-20 18:53 [PATCH v6 0/2] kconfig: add xenconfig Luis R. Rodriguez
@ 2015-05-20 18:53 ` Luis R. Rodriguez
  2015-05-20 18:53 ` [PATCH v6 2/2] kconfig: add xenconfig defconfig helper Luis R. Rodriguez
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 18:53 UTC (permalink / raw)
  To: mmarek, david.vrabel, konrad.wilk, Ian.Campbell, xen-devel
  Cc: josh, bp, penberg, rientjes, rdunlap, levinsasha928, mtosatti,
	fengguang.wu, yamada.masahiro, linux-kernel, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

We'll be adding options for xen as well.

Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: penberg@kernel.org
Cc: levinsasha928@gmail.com
Cc: mtosatti@redhat.com
Cc: fengguang.wu@intel.com
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 scripts/kconfig/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index d9b1fef..6950032 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -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
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v6 2/2] kconfig: add xenconfig defconfig helper
  2015-05-20 18:53 [PATCH v6 0/2] kconfig: add xenconfig Luis R. Rodriguez
  2015-05-20 18:53 ` [PATCH v6 1/2] kconfig: clarify kvmconfig is for kvm Luis R. Rodriguez
@ 2015-05-20 18:53 ` Luis R. Rodriguez
  2015-05-21 14:49   ` Masahiro Yamada
  2015-05-21  8:20 ` [PATCH v6 0/2] kconfig: add xenconfig Michal Marek
  2015-06-16 10:10 ` [Xen-devel] " David Vrabel
  3 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-05-20 18:53 UTC (permalink / raw)
  To: mmarek, david.vrabel, konrad.wilk, Ian.Campbell, xen-devel
  Cc: josh, bp, penberg, rientjes, rdunlap, levinsasha928, mtosatti,
	fengguang.wu, yamada.masahiro, linux-kernel, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

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.

Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: penberg@kernel.org
Cc: levinsasha928@gmail.com
Cc: mtosatti@redhat.com
Cc: fengguang.wu@intel.com
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Michal Marek <mmarek@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 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

diff --git a/arch/x86/configs/xen.config b/arch/x86/configs/xen.config
new file mode 100644
index 0000000..d9fc713
--- /dev/null
+++ b/arch/x86/configs/xen.config
@@ -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
diff --git a/kernel/configs/xen.config b/kernel/configs/xen.config
new file mode 100644
index 0000000..ff75622
--- /dev/null
+++ b/kernel/configs/xen.config
@@ -0,0 +1,48 @@
+# global stuff - these enable us to allow some
+# of the not so generic stuff below for xen
+CONFIG_PARAVIRT=y
+CONFIG_NET=y
+CONFIG_NET_CORE=y
+CONFIG_NETDEVICES=y
+CONFIG_BLOCK=y
+CONFIG_WATCHDOG=y
+CONFIG_TARGET_CORE=y
+CONFIG_SCSI=y
+CONFIG_FB=y
+CONFIG_INPUT_MISC=y
+CONFIG_MEMORY_HOTPLUG=y
+CONFIG_TTY=y
+# Technically not required but otherwise produces
+# pretty useless systems starting from allnoconfig
+# You want TCP/IP and ELF binaries right?
+CONFIG_INET=y
+CONFIG_BINFMT_ELF=y
+# generic config
+CONFIG_XEN=y
+CONFIG_XEN_DOM0=y
+# backend drivers
+CONFIG_XEN_BACKEND=y
+CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_NETDEV_BACKEND=m
+CONFIG_HVC_XEN=y
+CONFIG_XEN_WDT=m
+CONFIG_XEN_SCSI_BACKEND=m
+# frontend drivers
+CONFIG_XEN_FBDEV_FRONTEND=m
+CONFIG_HVC_XEN_FRONTEND=y
+CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
+CONFIG_XEN_SCSI_FRONTEND=m
+# others
+CONFIG_XEN_BALLOON=y
+CONFIG_XEN_SCRUB_PAGES=y
+CONFIG_XEN_DEV_EVTCHN=m
+CONFIG_XEN_BLKDEV_FRONTEND=m
+CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XENFS=m
+CONFIG_XEN_COMPAT_XENFS=y
+CONFIG_XEN_SYS_HYPERVISOR=y
+CONFIG_XEN_XENBUS_FRONTEND=y
+CONFIG_XEN_GNTDEV=m
+CONFIG_XEN_GRANT_DEV_ALLOC=m
+CONFIG_SWIOTLB_XEN=y
+CONFIG_XEN_PRIVCMD=m
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 6950032..f52abae 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -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
-- 
2.3.2.209.gd67f9d5.dirty


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 0/2] kconfig: add xenconfig
  2015-05-20 18:53 [PATCH v6 0/2] kconfig: add xenconfig Luis R. Rodriguez
  2015-05-20 18:53 ` [PATCH v6 1/2] kconfig: clarify kvmconfig is for kvm Luis R. Rodriguez
  2015-05-20 18:53 ` [PATCH v6 2/2] kconfig: add xenconfig defconfig helper Luis R. Rodriguez
@ 2015-05-21  8:20 ` Michal Marek
  2015-05-21 18:32   ` Luis R. Rodriguez
  2015-06-16 10:10 ` [Xen-devel] " David Vrabel
  3 siblings, 1 reply; 13+ messages in thread
From: Michal Marek @ 2015-05-21  8:20 UTC (permalink / raw)
  To: Luis R. Rodriguez, david.vrabel, konrad.wilk, Ian.Campbell, xen-devel
  Cc: josh, bp, penberg, rientjes, rdunlap, levinsasha928, mtosatti,
	fengguang.wu, yamada.masahiro, linux-kernel, Luis R. Rodriguez

Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper
  2015-05-20 18:53 ` [PATCH v6 2/2] kconfig: add xenconfig defconfig helper Luis R. Rodriguez
@ 2015-05-21 14:49   ` Masahiro Yamada
  2015-05-21 18:47     ` Luis R. Rodriguez
  0 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2015-05-21 14:49 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Michal Marek, david.vrabel, konrad.wilk, Ian.Campbell, xen-devel,
	josh, Borislav Petkov, penberg, rientjes, rdunlap, levinsasha928,
	mtosatti, fengguang.wu, Linux Kernel Mailing List,
	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 <mcgrof@do-not-panic.com>:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> 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.
>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Pekka Enberg <penberg@kernel.org>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: penberg@kernel.org
> Cc: levinsasha928@gmail.com
> Cc: mtosatti@redhat.com
> Cc: fengguang.wu@intel.com
> Cc: David Vrabel <david.vrabel@citrix.com>
> Cc: Ian Campbell <Ian.Campbell@citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: xen-devel@lists.xenproject.org
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Acked-by: Julien Grall <julien.grall@linaro.org>
> Acked-by: Michal Marek <mmarek@suse.cz>
> Acked-by: David Rientjes <rientjes@google.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> ---

> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 6950032..f52abae 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -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..


> @@ -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

??


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 0/2] kconfig: add xenconfig
  2015-05-21  8:20 ` [PATCH v6 0/2] kconfig: add xenconfig Michal Marek
@ 2015-05-21 18:32   ` Luis R. Rodriguez
  2015-05-28 21:50     ` Luis R. Rodriguez
  0 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-05-21 18:32 UTC (permalink / raw)
  To: Michal Marek
  Cc: Luis R. Rodriguez, david.vrabel, konrad.wilk, Ian.Campbell,
	xen-devel, josh, bp, penberg, rientjes, rdunlap, levinsasha928,
	mtosatti, fengguang.wu, yamada.masahiro, linux-kernel

On Thu, May 21, 2015 at 04:20:27PM +0800, Michal Marek wrote:
> Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> > 
> > 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper
  2015-05-21 14:49   ` Masahiro Yamada
@ 2015-05-21 18:47     ` Luis R. Rodriguez
  2015-05-25  1:40       ` Masahiro Yamada
  0 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-05-21 18:47 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Luis R. Rodriguez, Michal Marek, david.vrabel, konrad.wilk,
	Ian.Campbell, xen-devel, josh, Borislav Petkov, penberg,
	rientjes, rdunlap, levinsasha928, mtosatti, fengguang.wu,
	Linux Kernel Mailing List

On Thu, May 21, 2015 at 11:49:17PM +0900, Masahiro Yamada wrote:
> 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 <mcgrof@do-not-panic.com>:
> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >
> > 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.
> >
> > Cc: Josh Triplett <josh@joshtriplett.org>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Pekka Enberg <penberg@kernel.org>
> > Cc: David Rientjes <rientjes@google.com>
> > Cc: Michal Marek <mmarek@suse.cz>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: penberg@kernel.org
> > Cc: levinsasha928@gmail.com
> > Cc: mtosatti@redhat.com
> > Cc: fengguang.wu@intel.com
> > Cc: David Vrabel <david.vrabel@citrix.com>
> > Cc: Ian Campbell <Ian.Campbell@citrix.com>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > Cc: xen-devel@lists.xenproject.org
> > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > Acked-by: Julien Grall <julien.grall@linaro.org>
> > Acked-by: Michal Marek <mmarek@suse.cz>
> > Acked-by: David Rientjes <rientjes@google.com>
> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> > ---
> 
> > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> > index 6950032..f52abae 100644
> > --- a/scripts/kconfig/Makefile
> > +++ b/scripts/kconfig/Makefile
> > @@ -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'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?

> I do not intend to block this.
> Just take my comment with a grain of salt..
> 
> 
> > @@ -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

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] kconfig: add xenconfig defconfig helper
  2015-05-21 18:47     ` Luis R. Rodriguez
@ 2015-05-25  1:40       ` Masahiro Yamada
  0 siblings, 0 replies; 13+ messages in thread
From: Masahiro Yamada @ 2015-05-25  1:40 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Luis R. Rodriguez, Michal Marek, david.vrabel, konrad.wilk,
	Ian Campbell, xen-devel, josh, Borislav Petkov, penberg,
	rientjes, rdunlap, Sasha Levin, mtosatti, fengguang.wu,
	Linux Kernel Mailing List

Hi Luis,

2015-05-22 3:47 GMT+09:00 Luis R. Rodriguez <mcgrof@suse.com>:
> On Thu, May 21, 2015 at 11:49:17PM +0900, Masahiro Yamada wrote:
>> 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 <mcgrof@do-not-panic.com>:
>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>> >
>> > 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.
>> >
>> > Cc: Josh Triplett <josh@joshtriplett.org>
>> > Cc: Borislav Petkov <bp@suse.de>
>> > Cc: Pekka Enberg <penberg@kernel.org>
>> > Cc: David Rientjes <rientjes@google.com>
>> > Cc: Michal Marek <mmarek@suse.cz>
>> > Cc: Randy Dunlap <rdunlap@infradead.org>
>> > Cc: penberg@kernel.org
>> > Cc: levinsasha928@gmail.com
>> > Cc: mtosatti@redhat.com
>> > Cc: fengguang.wu@intel.com
>> > Cc: David Vrabel <david.vrabel@citrix.com>
>> > Cc: Ian Campbell <Ian.Campbell@citrix.com>
>> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> > Cc: xen-devel@lists.xenproject.org
>> > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>> > Acked-by: Julien Grall <julien.grall@linaro.org>
>> > Acked-by: Michal Marek <mmarek@suse.cz>
>> > Acked-by: David Rientjes <rientjes@google.com>
>> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
>> > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
>> > ---
>>
>> > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
>> > index 6950032..f52abae 100644
>> > --- a/scripts/kconfig/Makefile
>> > +++ b/scripts/kconfig/Makefile
>> > @@ -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'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.






>> I do not intend to block this.
>> Just take my comment with a grain of salt..
>>
>>
>> > @@ -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
>
> That's true if kvm was only for x86 but it is not, and likewise for xen.
>

OK, then.  Thanks for explaining this.




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 0/2] kconfig: add xenconfig
  2015-05-21 18:32   ` Luis R. Rodriguez
@ 2015-05-28 21:50     ` Luis R. Rodriguez
  2015-06-08 23:35       ` Luis R. Rodriguez
  0 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-05-28 21:50 UTC (permalink / raw)
  To: Michal Marek, David Vrabel, Konrad Rzeszutek Wilk, Ian Campbell
  Cc: Luis R. Rodriguez, xen-devel, josh, Borislav Petkov,
	Pekka Enberg, David Rientjes, Randy Dunlap, Sasha Levin,
	mtosatti, Fengguang Wu, yamada.masahiro, linux-kernel

On Thu, May 21, 2015 at 11:32 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> On Thu, May 21, 2015 at 04:20:27PM +0800, Michal Marek wrote:
>> Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):
>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>> >
>> > 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 0/2] kconfig: add xenconfig
  2015-05-28 21:50     ` Luis R. Rodriguez
@ 2015-06-08 23:35       ` Luis R. Rodriguez
  2015-06-09 13:44         ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-06-08 23:35 UTC (permalink / raw)
  To: Michal Marek, David Vrabel, Konrad Rzeszutek Wilk, Ian Campbell
  Cc: Luis R. Rodriguez, xen-devel, josh, Borislav Petkov,
	Pekka Enberg, David Rientjes, Randy Dunlap, Sasha Levin,
	mtosatti, Fengguang Wu, yamada.masahiro, linux-kernel

On Thu, May 28, 2015 at 2:50 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> On Thu, May 21, 2015 at 11:32 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
>> On Thu, May 21, 2015 at 04:20:27PM +0800, Michal Marek wrote:
>>> Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):
>>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>> >
>>> > 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.

Hey folks, any feedback?

 Luis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 0/2] kconfig: add xenconfig
  2015-06-08 23:35       ` Luis R. Rodriguez
@ 2015-06-09 13:44         ` Konrad Rzeszutek Wilk
  2015-06-15 19:07           ` Luis R. Rodriguez
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-06-09 13:44 UTC (permalink / raw)
  To: Luis R. Rodriguez, david.vrabel
  Cc: Michal Marek, David Vrabel, Ian Campbell, xen-devel, josh,
	Borislav Petkov, Pekka Enberg, David Rientjes, Randy Dunlap,
	Sasha Levin, mtosatti, Fengguang Wu, yamada.masahiro,
	linux-kernel

On Mon, Jun 08, 2015 at 04:35:35PM -0700, Luis R. Rodriguez wrote:
> On Thu, May 28, 2015 at 2:50 PM, Luis R. Rodriguez
> <mcgrof@do-not-panic.com> wrote:
> > On Thu, May 21, 2015 at 11:32 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> On Thu, May 21, 2015 at 04:20:27PM +0800, Michal Marek wrote:
> >>> Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):
> >>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >>> >
> >>> > 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.
> 
> Hey folks, any feedback?

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 0/2] kconfig: add xenconfig
  2015-06-09 13:44         ` Konrad Rzeszutek Wilk
@ 2015-06-15 19:07           ` Luis R. Rodriguez
  0 siblings, 0 replies; 13+ messages in thread
From: Luis R. Rodriguez @ 2015-06-15 19:07 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: David Vrabel, Michal Marek, Ian Campbell, xen-devel,
	Josh Triplett, Borislav Petkov, Pekka Enberg, David Rientjes,
	Randy Dunlap, Sasha Levin, mtosatti, Fengguang Wu,
	yamada.masahiro, linux-kernel

On Tue, Jun 9, 2015 at 6:44 AM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> wrote:
> On Mon, Jun 08, 2015 at 04:35:35PM -0700, Luis R. Rodriguez wrote:
>> On Thu, May 28, 2015 at 2:50 PM, Luis R. Rodriguez
>> <mcgrof@do-not-panic.com> wrote:
>> > On Thu, May 21, 2015 at 11:32 AM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
>> >> On Thu, May 21, 2015 at 04:20:27PM +0800, Michal Marek wrote:
>> >>> Dne 21.5.2015 v 02:53 Luis R. Rodriguez napsal(a):
>> >>> > From: "Luis R. Rodriguez" <mcgrof@suse.com>
>> >>> >
>> >>> > 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.
>>
>> 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/1401929299-16550-1-git-send-email-mcgrof@do-not-panic.com

 Luis

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Xen-devel] [PATCH v6 0/2] kconfig: add xenconfig
  2015-05-20 18:53 [PATCH v6 0/2] kconfig: add xenconfig Luis R. Rodriguez
                   ` (2 preceding siblings ...)
  2015-05-21  8:20 ` [PATCH v6 0/2] kconfig: add xenconfig Michal Marek
@ 2015-06-16 10:10 ` David Vrabel
  3 siblings, 0 replies; 13+ messages in thread
From: David Vrabel @ 2015-06-16 10:10 UTC (permalink / raw)
  To: Luis R. Rodriguez, mmarek, david.vrabel, konrad.wilk,
	Ian.Campbell, xen-devel
  Cc: mtosatti, Luis R. Rodriguez, rdunlap, josh, linux-kernel,
	penberg, yamada.masahiro, fengguang.wu, levinsasha928, rientjes,
	bp

On 20/05/15 19:53, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-06-16 10:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 18:53 [PATCH v6 0/2] kconfig: add xenconfig Luis R. Rodriguez
2015-05-20 18:53 ` [PATCH v6 1/2] kconfig: clarify kvmconfig is for kvm Luis R. Rodriguez
2015-05-20 18:53 ` [PATCH v6 2/2] kconfig: add xenconfig defconfig helper Luis R. Rodriguez
2015-05-21 14:49   ` Masahiro Yamada
2015-05-21 18:47     ` Luis R. Rodriguez
2015-05-25  1:40       ` Masahiro Yamada
2015-05-21  8:20 ` [PATCH v6 0/2] kconfig: add xenconfig Michal Marek
2015-05-21 18:32   ` Luis R. Rodriguez
2015-05-28 21:50     ` Luis R. Rodriguez
2015-06-08 23:35       ` Luis R. Rodriguez
2015-06-09 13:44         ` Konrad Rzeszutek Wilk
2015-06-15 19:07           ` Luis R. Rodriguez
2015-06-16 10:10 ` [Xen-devel] " David Vrabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).