hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 11 May 2021 15:53:50 +0000 (17:53 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 May 2021 12:49:45 +0000 (14:49 +0200)
Per the kconfig.rst:

  A device should be listed [...] ``imply`` if (depending on
  the QEMU command line) the board may or  may not be started
  without it.

This is the case with the NVDIMM device, so use the 'imply'
weak reverse dependency to select the symbol.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210511155354.3069141-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
default-configs/devices/ppc64-softmmu.mak
hw/arm/Kconfig
hw/i386/Kconfig
hw/mem/Kconfig
hw/ppc/Kconfig

index ae0841fa3a184ccdb74db3dd8683ffc08712b598..cca52665d9077803fcee4330ae377e64df998c66 100644 (file)
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y
index b887f6a5b17d44bd274f45be988c2b2cc1beb6ef..67723d9ea6a83cba8e8be4f0e50d8c93ddd0f5f1 100644 (file)
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
index 7f91f30877f857bf6eac2fdec6a4b55e93dcb691..66838fa397b21ea7e83ed48a2ca8c1020c6bf74c 100644 (file)
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
index a0ef2cf648e112233744ec859da1a4bb3cc6372d..8b19fdc49f1685fbf11dae22d8951131123f43ab 100644 (file)
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
index e51e0e5e5ac6cc19012e381e9d87111a11ee141c..66e0b15d9efd68ef5a420a7b1bff4f82b65690c6 100644 (file)
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI