diff mbox series

[RFC,21/25] virtio: make virtio dependencies with Kconfig

Message ID 20181227063419.12981-22-yang.zhong@intel.com
State New
Headers show
Series Support Kconfig in QEMU | expand

Commit Message

Yang Zhong Dec. 27, 2018, 6:34 a.m. UTC
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 default-configs/i386-softmmu.mak |  1 -
 hw/9pfs/Kconfig                  |  2 ++
 hw/block/Kconfig                 |  2 ++
 hw/char/Kconfig                  |  2 ++
 hw/display/Kconfig               |  5 +++++
 hw/input/Kconfig                 |  2 ++
 hw/net/Kconfig                   |  2 ++
 hw/pci-host/Kconfig              |  2 ++
 hw/virtio/Kconfig                | 10 +++++++++-
 9 files changed, 26 insertions(+), 2 deletions(-)

Comments

Thomas Huth Jan. 4, 2019, 7:54 p.m. UTC | #1
On 2018-12-27 07:34, Yang Zhong wrote:
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
>  default-configs/i386-softmmu.mak |  1 -
>  hw/9pfs/Kconfig                  |  2 ++
>  hw/block/Kconfig                 |  2 ++
>  hw/char/Kconfig                  |  2 ++
>  hw/display/Kconfig               |  5 +++++
>  hw/input/Kconfig                 |  2 ++
>  hw/net/Kconfig                   |  2 ++
>  hw/pci-host/Kconfig              |  2 ++
>  hw/virtio/Kconfig                | 10 +++++++++-
>  9 files changed, 26 insertions(+), 2 deletions(-)

Shouldn't this patch also get rid of default-configs/virtio.mak ?

[...]
> diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
> index aabd6d4d96..9127daed5e 100644
> --- a/hw/virtio/Kconfig
> +++ b/hw/virtio/Kconfig
> @@ -3,18 +3,26 @@ config VIRTIO
>  
>  config VIRTIO_RNG
>      bool
> +    default y
> +    depends on VIRTIO
>  
>  config VIRTIO_PCI
>      bool
>      default y
>      depends on PCI
> -    select VIRTIO
> +    depends on VIRTIO
>  
>  config VIRTIO_MMIO
>      bool
> +    default y
> +    depends on VIRTIO

I don't think we should enable VIRTIO_MMIO by default - it's only used
on arm and riscv, but not on x86 and the other architectures.

>  config VIRTIO_BALLOON
>      bool
> +    default y
> +    depends on VIRTIO
>  
>  config VIRTIO_CRYPTO
>      bool
> +    default y
> +    depends on VIRTIO
> 

 Thomas
Yang Zhong Jan. 8, 2019, 10:45 a.m. UTC | #2
On Fri, Jan 04, 2019 at 08:54:54PM +0100, Thomas Huth wrote:
> On 2018-12-27 07:34, Yang Zhong wrote:
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> >  default-configs/i386-softmmu.mak |  1 -
> >  hw/9pfs/Kconfig                  |  2 ++
> >  hw/block/Kconfig                 |  2 ++
> >  hw/char/Kconfig                  |  2 ++
> >  hw/display/Kconfig               |  5 +++++
> >  hw/input/Kconfig                 |  2 ++
> >  hw/net/Kconfig                   |  2 ++
> >  hw/pci-host/Kconfig              |  2 ++
> >  hw/virtio/Kconfig                | 10 +++++++++-
> >  9 files changed, 26 insertions(+), 2 deletions(-)
> 
> Shouldn't this patch also get rid of default-configs/virtio.mak ?
> 
  Thanks for reminder, i omitted this file and should remove it. thanks!

  Regards,

  Yang

> [...]
> > diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
> > index aabd6d4d96..9127daed5e 100644
> > --- a/hw/virtio/Kconfig
> > +++ b/hw/virtio/Kconfig
> > @@ -3,18 +3,26 @@ config VIRTIO
> >  
> >  config VIRTIO_RNG
> >      bool
> > +    default y
> > +    depends on VIRTIO
> >  
> >  config VIRTIO_PCI
> >      bool
> >      default y
> >      depends on PCI
> > -    select VIRTIO
> > +    depends on VIRTIO
> >  
> >  config VIRTIO_MMIO
> >      bool
> > +    default y
> > +    depends on VIRTIO
> 
> I don't think we should enable VIRTIO_MMIO by default - it's only used
> on arm and riscv, but not on x86 and the other architectures.
>
  Yes, the VIRTIO_MMIO is only used in arm and risc arch, i will change
  this. thanks for Thomas's comments

  Regards,

  Yang
 
> >  config VIRTIO_BALLOON
> >      bool
> > +    default y
> > +    depends on VIRTIO
> >  
> >  config VIRTIO_CRYPTO
> >      bool
> > +    default y
> > +    depends on VIRTIO
> > 
> 
>  Thomas
diff mbox series

Patch

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index eb2d22de3c..d3488b5a6d 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,7 +1,6 @@ 
 # Default configuration for i386-softmmu
 
 CONFIG_VMXNET3_PCI=y
-CONFIG_VIRTIO_VGA=y
 CONFIG_IPMI=y
 CONFIG_IPMI_LOCAL=y
 CONFIG_IPMI_EXTERN=y
diff --git a/hw/9pfs/Kconfig b/hw/9pfs/Kconfig
index a4750999d9..d85869ca81 100644
--- a/hw/9pfs/Kconfig
+++ b/hw/9pfs/Kconfig
@@ -1,2 +1,4 @@ 
 config VIRTIO_9P
     bool
+    default y
+    depends on VIRTIO
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
index 83c2be5915..771967ad9f 100644
--- a/hw/block/Kconfig
+++ b/hw/block/Kconfig
@@ -28,6 +28,8 @@  config NVME_PCI
 
 config VIRTIO_BLK
     bool
+    default y
+    depends on VIRTIO
 
 config VHOST_USER_BLK
     bool
diff --git a/hw/char/Kconfig b/hw/char/Kconfig
index 26765599a5..e2b56a178c 100644
--- a/hw/char/Kconfig
+++ b/hw/char/Kconfig
@@ -25,6 +25,8 @@  config SERIAL_PCI
 
 config VIRTIO_SERIAL
     bool
+    default y
+    depends on VIRTIO
 
 config STM32F2XX_USART
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 8b8f1027b1..38629b8e1b 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -93,9 +93,14 @@  config QXL
 
 config VIRTIO_GPU
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_VGA
     bool
+    default y
+    depends on VIRTIO && PCI
+    select VGA
 
 config DPCD
     bool
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index 5d64e07fc6..7434a14cb0 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -21,6 +21,8 @@  config TSC2005
 
 config VIRTIO_INPUT
     bool
+    default y
+    depends on VIRTIO
 
 config TSC210X
     bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index b50a8a4368..8b65de1d7f 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -94,6 +94,8 @@  config XILINX_ETHLITE
 
 config VIRTIO_NET
    bool
+   default y
+   depends on VIRTIO
 
 config ETSEC
     bool
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index 9d57c6cac9..d7af6aa441 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -23,6 +23,7 @@  config PCI_PIIX
     bool
     select PAM
     select PCI
+    select VIRTIO
 
 config PCI_Q35
     bool
@@ -31,6 +32,7 @@  config PCI_Q35
     select XIO3130
     select IOH3420
     select I82801B11
+    select VIRTIO
 
 config PCI_GENERIC
     bool
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index aabd6d4d96..9127daed5e 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -3,18 +3,26 @@  config VIRTIO
 
 config VIRTIO_RNG
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_PCI
     bool
     default y
     depends on PCI
-    select VIRTIO
+    depends on VIRTIO
 
 config VIRTIO_MMIO
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_BALLOON
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_CRYPTO
     bool
+    default y
+    depends on VIRTIO