linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm: configs: improve KVM support
@ 2016-01-04 14:50 Andre Przywara
  2016-01-04 14:50 ` [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers Andre Przywara
  2016-01-04 14:50 ` [PATCH 2/2] arm: configs: add kvm_defconfig Andre Przywara
  0 siblings, 2 replies; 6+ messages in thread
From: Andre Przywara @ 2016-01-04 14:50 UTC (permalink / raw)
  To: Russell King, arnd
  Cc: alison.wang, marc.zyngier, christoffer.dall, linux-arm-kernel,
	kvmarm, linux-kernel

Hi,

there doesn't seem to be a good generic defconfig which includes
KVM support, so this config tends to get less testing.
This mini-series addresses this with a two-fold approach:

Patch 1/2 introduces VIRTIO drivers to the existing multi_v7_defconfig,
so those kernels can be easily used as guest kernels in KVM.
This goes with the arm64 defconfig, which has those drivers compiled
in as well.

Patch 2/2 adds a new kvm_defconfig, which includes LPAE and KVM host
capability on top of the said multi_v7_defconfig. This should help to
find compatibility issues with LPAE configs on the way.
I didn't bother to deselect platforms that are not LPAE capable, as:
a) some platforms may include LPAE capable cores in the future
b) compile testing drivers is part of this exercise.
I guess with LPAE capable machines adding some KBytes to the
kernel image is not really an issue, so let's just keep those
platforms in. Also that makes the diff to multi_v7_defconfig pretty
small.

Alison, the last patch comes pretty close to your:
"[RFC PATCH] ARM: add v7 LPAE multi-platform defconfig" from early
November, though with a slightly different focus. If you have a new
version of your patch in the queue, I am happy to withdraw mine and
rather help to get yours merged, possibly with the KVM options added.
What is your take on this?

Cheers,
Andre.

Andre Przywara (2):
  arm: multi_v7_defconfig: Add virtio drivers
  arm: configs: add kvm_defconfig

 arch/arm/configs/{multi_v7_defconfig => kvm_defconfig} | 14 ++++++++++++++
 arch/arm/configs/multi_v7_defconfig                    |  8 ++++++++
 2 files changed, 22 insertions(+)
 copy arch/arm/configs/{multi_v7_defconfig => kvm_defconfig} (98%)

-- 
2.6.4


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

* [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers
  2016-01-04 14:50 [PATCH 0/2] arm: configs: improve KVM support Andre Przywara
@ 2016-01-04 14:50 ` Andre Przywara
  2016-01-04 15:11   ` Arnd Bergmann
  2016-01-04 14:50 ` [PATCH 2/2] arm: configs: add kvm_defconfig Andre Przywara
  1 sibling, 1 reply; 6+ messages in thread
From: Andre Przywara @ 2016-01-04 14:50 UTC (permalink / raw)
  To: Russell King, arnd
  Cc: alison.wang, marc.zyngier, christoffer.dall, linux-arm-kernel,
	kvmarm, linux-kernel

To make multi_v7_defconfig really "multi", let's add virtio drivers
to allow booting a default kernel as a KVM/QEMU guest.
MACH_VIRT is already defined, so we just add VIRTIO_BLK, VIRTIO_NET
and VIRTIO_CONSOLE to actually make this kernel useful in a guest.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/configs/multi_v7_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 69a22fd..4ee2f36 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -180,6 +180,7 @@ CONFIG_MTD_NAND_DAVINCI=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
+CONFIG_VIRTIO_BLK=y
 CONFIG_AD525X_DPOT=y
 CONFIG_AD525X_DPOT_I2C=y
 CONFIG_ATMEL_TCLIB=y
@@ -202,6 +203,7 @@ CONFIG_SATA_HIGHBANK=y
 CONFIG_SATA_MV=y
 CONFIG_SATA_RCAR=y
 CONFIG_NETDEVICES=y
+CONFIG_VIRTIO_NET=y
 CONFIG_HIX5HD2_GMAC=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_MACB=y
@@ -294,6 +296,8 @@ CONFIG_SERIAL_CONEXANT_DIGICOLOR=y
 CONFIG_SERIAL_CONEXANT_DIGICOLOR_CONSOLE=y
 CONFIG_SERIAL_ST_ASC=y
 CONFIG_SERIAL_ST_ASC_CONSOLE=y
+CONFIG_HVC_DRIVER=y
+CONFIG_VIRTIO_CONSOLE=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
 CONFIG_I2C_MUX=y
@@ -745,3 +749,7 @@ CONFIG_CRYPTO_GHASH_ARM_CE=m
 CONFIG_CRYPTO_DEV_ATMEL_AES=m
 CONFIG_CRYPTO_DEV_ATMEL_TDES=m
 CONFIG_CRYPTO_DEV_ATMEL_SHA=m
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_PCI_LEGACY=y
+CONFIG_VIRTIO_MMIO=y
-- 
2.6.4


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

* [PATCH 2/2] arm: configs: add kvm_defconfig
  2016-01-04 14:50 [PATCH 0/2] arm: configs: improve KVM support Andre Przywara
  2016-01-04 14:50 ` [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers Andre Przywara
@ 2016-01-04 14:50 ` Andre Przywara
  2016-01-04 15:15   ` Arnd Bergmann
  1 sibling, 1 reply; 6+ messages in thread
From: Andre Przywara @ 2016-01-04 14:50 UTC (permalink / raw)
  To: Russell King, arnd
  Cc: alison.wang, marc.zyngier, christoffer.dall, linux-arm-kernel,
	kvmarm, linux-kernel

This new config enables KVM (and thus LPAE) on top of
multi_v7_defconfig. This creates a kernel that can _host_ KVM guests,
for guests a multi_v7_defconfig with virtio drivers is sufficient.
Since LPAE kernels are not compatible with non-LPAE capable hardware,
this has to be separate from the existing multi_v7_defconfig.

The purpose of this new defconfig is both to simplify creation of KVM
host kernels as well as to give the LPAE option some better testing
coverage, as the enlarged dma_addr_t and phys_addr_t types create some
headache to some drivers.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/configs/{multi_v7_defconfig => kvm_defconfig} | 6 ++++++
 1 file changed, 6 insertions(+)
 copy arch/arm/configs/{multi_v7_defconfig => kvm_defconfig} (99%)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/kvm_defconfig
similarity index 99%
copy from arch/arm/configs/multi_v7_defconfig
copy to arch/arm/configs/kvm_defconfig
index 4ee2f36..2a3d81a 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/kvm_defconfig
@@ -24,6 +24,7 @@ CONFIG_ARCH_AT91=y
 CONFIG_SOC_SAMA5D2=y
 CONFIG_SOC_SAMA5D3=y
 CONFIG_SOC_SAMA5D4=y
+CONFIG_ARCH_AXXIA=y
 CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM_CYGNUS=y
 CONFIG_ARCH_BCM_NSP=y
@@ -105,6 +106,8 @@ CONFIG_ARCH_VEXPRESS_CA9X4=y
 CONFIG_ARCH_VEXPRESS_TC2_PM=y
 CONFIG_ARCH_WM8850=y
 CONFIG_ARCH_ZYNQ=y
+CONFIG_ARM_LPAE=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
 CONFIG_TRUSTED_FOUNDATIONS=y
 CONFIG_PCI=y
 CONFIG_PCI_HOST_GENERIC=y
@@ -204,6 +207,7 @@ CONFIG_SATA_MV=y
 CONFIG_SATA_RCAR=y
 CONFIG_NETDEVICES=y
 CONFIG_VIRTIO_NET=y
+CONFIG_VHOST_NET=y
 CONFIG_HIX5HD2_GMAC=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_MACB=y
@@ -753,3 +757,5 @@ CONFIG_VIRTIO=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_PCI_LEGACY=y
 CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_KVM=y
-- 
2.6.4


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

* Re: [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers
  2016-01-04 14:50 ` [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers Andre Przywara
@ 2016-01-04 15:11   ` Arnd Bergmann
  2016-01-08 10:52     ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2016-01-04 15:11 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Andre Przywara, Russell King, alison.wang, marc.zyngier,
	linux-kernel, christoffer.dall, kvmarm

On Monday 04 January 2016 14:50:33 Andre Przywara wrote:
> To make multi_v7_defconfig really "multi", let's add virtio drivers
> to allow booting a default kernel as a KVM/QEMU guest.
> MACH_VIRT is already defined, so we just add VIRTIO_BLK, VIRTIO_NET
> and VIRTIO_CONSOLE to actually make this kernel useful in a guest.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> 

This one looks good.

	Arnd

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

* Re: [PATCH 2/2] arm: configs: add kvm_defconfig
  2016-01-04 14:50 ` [PATCH 2/2] arm: configs: add kvm_defconfig Andre Przywara
@ 2016-01-04 15:15   ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-01-04 15:15 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Andre Przywara, Russell King, alison.wang, marc.zyngier,
	linux-kernel, christoffer.dall, kvmarm

On Monday 04 January 2016 14:50:34 Andre Przywara wrote:
> This new config enables KVM (and thus LPAE) on top of
> multi_v7_defconfig. This creates a kernel that can _host_ KVM guests,
> for guests a multi_v7_defconfig with virtio drivers is sufficient.
> Since LPAE kernels are not compatible with non-LPAE capable hardware,
> this has to be separate from the existing multi_v7_defconfig.
> 
> The purpose of this new defconfig is both to simplify creation of KVM
> host kernels as well as to give the LPAE option some better testing
> coverage, as the enlarged dma_addr_t and phys_addr_t types create some
> headache to some drivers.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> 

I agree about the purpose, but I want something better here:

* Use config fragments to just set the few extra options that
  we can't enable otherwise, and have a shared config file
  with the normal multi_v7. There is still an ongoing question
  about big-endian defconfig, which has exactly the same problem,
  and we should have a common approach for all combinations.

  We might also want to do this in a way that lets us build
  v6/v6k/v7/v7ve/v8 kernels in big-endian and little-endian
  all from the same defconfig file, with the set of platforms
  getting smaller as we go to higher arch levels.

* I really want to see the ARMv7VE dependencies sorted out.

	Arnd

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

* Re: [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers
  2016-01-04 15:11   ` Arnd Bergmann
@ 2016-01-08 10:52     ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-01-08 10:52 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Russell King, alison.wang, marc.zyngier, Andre Przywara,
	linux-kernel, kvmarm, christoffer.dall

On Monday 04 January 2016 16:11:12 Arnd Bergmann wrote:
> On Monday 04 January 2016 14:50:33 Andre Przywara wrote:
> > To make multi_v7_defconfig really "multi", let's add virtio drivers
> > to allow booting a default kernel as a KVM/QEMU guest.
> > MACH_VIRT is already defined, so we just add VIRTIO_BLK, VIRTIO_NET
> > and VIRTIO_CONSOLE to actually make this kernel useful in a guest.
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > 
> 
> This one looks good.
> 

I've applied it to next/defconfig now, with a trivial conflict resolved.
Thanks,

	Arnd

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

end of thread, other threads:[~2016-01-08 10:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 14:50 [PATCH 0/2] arm: configs: improve KVM support Andre Przywara
2016-01-04 14:50 ` [PATCH 1/2] arm: multi_v7_defconfig: Add virtio drivers Andre Przywara
2016-01-04 15:11   ` Arnd Bergmann
2016-01-08 10:52     ` Arnd Bergmann
2016-01-04 14:50 ` [PATCH 2/2] arm: configs: add kvm_defconfig Andre Przywara
2016-01-04 15:15   ` Arnd Bergmann

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).