diff mbox series

[01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Message ID 20210513163858.3928976-2-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series hw: Various Kconfig fixes | expand

Commit Message

Philippe Mathieu-Daudé May 13, 2021, 4:38 p.m. UTC
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 (it is certainly possible
to start a machine without NVDIMM) , so use the 'imply' weak
reverse dependency to select the symbol.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)

Comments

David Gibson May 13, 2021, 11:36 p.m. UTC | #1
On Thu, May 13, 2021 at 06:38:49PM +0200, Philippe Mathieu-Daudé wrote:
> 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 (it is certainly possible
> to start a machine without NVDIMM) , so use the 'imply' weak
> reverse dependency to select the symbol.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

ppc part
Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  default-configs/devices/ppc64-softmmu.mak | 1 -
>  hw/arm/Kconfig                            | 1 +
>  hw/i386/Kconfig                           | 1 +
>  hw/mem/Kconfig                            | 2 --
>  hw/ppc/Kconfig                            | 1 +
>  5 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
> index ae0841fa3a1..cca52665d90 100644
> --- a/default-configs/devices/ppc64-softmmu.mak
> +++ b/default-configs/devices/ppc64-softmmu.mak
> @@ -8,4 +8,3 @@ CONFIG_POWERNV=y
>  
>  # For pSeries
>  CONFIG_PSERIES=y
> -CONFIG_NVDIMM=y
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index b887f6a5b17..67723d9ea6a 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -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
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 7f91f30877f..66838fa397b 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -23,6 +23,7 @@ config PC
>      imply TPM_TIS_ISA
>      imply VGA_PCI
>      imply VIRTIO_VGA
> +    imply NVDIMM
>      select FDC
>      select I8259
>      select I8254
> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
> index a0ef2cf648e..8b19fdc49f1 100644
> --- a/hw/mem/Kconfig
> +++ b/hw/mem/Kconfig
> @@ -7,6 +7,4 @@ config MEM_DEVICE
>  
>  config NVDIMM
>      bool
> -    default y
> -    depends on (PC || PSERIES || ARM_VIRT)
>      select MEM_DEVICE
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index e51e0e5e5ac..66e0b15d9ef 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -3,6 +3,7 @@ config PSERIES
>      imply PCI_DEVICES
>      imply TEST_DEVICES
>      imply VIRTIO_VGA
> +    imply NVDIMM
>      select DIMM
>      select PCI
>      select SPAPR_VSCSI
Bin Meng May 14, 2021, 3:02 a.m. UTC | #2
On Fri, May 14, 2021 at 12:53 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> 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 (it is certainly possible
> to start a machine without NVDIMM) , so use the 'imply' weak
> reverse dependency to select the symbol.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  default-configs/devices/ppc64-softmmu.mak | 1 -
>  hw/arm/Kconfig                            | 1 +
>  hw/i386/Kconfig                           | 1 +
>  hw/mem/Kconfig                            | 2 --
>  hw/ppc/Kconfig                            | 1 +
>  5 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
> index ae0841fa3a1..cca52665d90 100644
> --- a/default-configs/devices/ppc64-softmmu.mak
> +++ b/default-configs/devices/ppc64-softmmu.mak
> @@ -8,4 +8,3 @@ CONFIG_POWERNV=y
>
>  # For pSeries
>  CONFIG_PSERIES=y
> -CONFIG_NVDIMM=y

I think only removing this one makes sense. I fail to see any
difference of other changes in this patch.

> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index b887f6a5b17..67723d9ea6a 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -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
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 7f91f30877f..66838fa397b 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -23,6 +23,7 @@ config PC
>      imply TPM_TIS_ISA
>      imply VGA_PCI
>      imply VIRTIO_VGA
> +    imply NVDIMM
>      select FDC
>      select I8259
>      select I8254
> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
> index a0ef2cf648e..8b19fdc49f1 100644
> --- a/hw/mem/Kconfig
> +++ b/hw/mem/Kconfig
> @@ -7,6 +7,4 @@ config MEM_DEVICE
>
>  config NVDIMM
>      bool
> -    default y
> -    depends on (PC || PSERIES || ARM_VIRT)
>      select MEM_DEVICE
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index e51e0e5e5ac..66e0b15d9ef 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -3,6 +3,7 @@ config PSERIES
>      imply PCI_DEVICES
>      imply TEST_DEVICES
>      imply VIRTIO_VGA
> +    imply NVDIMM
>      select DIMM
>      select PCI
>      select SPAPR_VSCSI

Regards,
Bin
Philippe Mathieu-Daudé May 15, 2021, 5:33 p.m. UTC | #3
On 5/14/21 5:02 AM, Bin Meng wrote:
> On Fri, May 14, 2021 at 12:53 AM Philippe Mathieu-Daudé
> <philmd@redhat.com> wrote:
>>
>> 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 (it is certainly possible
>> to start a machine without NVDIMM) , so use the 'imply' weak
>> reverse dependency to select the symbol.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  default-configs/devices/ppc64-softmmu.mak | 1 -
>>  hw/arm/Kconfig                            | 1 +
>>  hw/i386/Kconfig                           | 1 +
>>  hw/mem/Kconfig                            | 2 --
>>  hw/ppc/Kconfig                            | 1 +
>>  5 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
>> index ae0841fa3a1..cca52665d90 100644
>> --- a/default-configs/devices/ppc64-softmmu.mak
>> +++ b/default-configs/devices/ppc64-softmmu.mak
>> @@ -8,4 +8,3 @@ CONFIG_POWERNV=y
>>
>>  # For pSeries
>>  CONFIG_PSERIES=y
>> -CONFIG_NVDIMM=y
> 
> I think only removing this one makes sense. I fail to see any
> difference of other changes in this patch.

See below "depends on (PC || PSERIES || ARM_VIRT)"

> 
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index b887f6a5b17..67723d9ea6a 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -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
>> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
>> index 7f91f30877f..66838fa397b 100644
>> --- a/hw/i386/Kconfig
>> +++ b/hw/i386/Kconfig
>> @@ -23,6 +23,7 @@ config PC
>>      imply TPM_TIS_ISA
>>      imply VGA_PCI
>>      imply VIRTIO_VGA
>> +    imply NVDIMM
>>      select FDC
>>      select I8259
>>      select I8254
>> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
>> index a0ef2cf648e..8b19fdc49f1 100644
>> --- a/hw/mem/Kconfig
>> +++ b/hw/mem/Kconfig
>> @@ -7,6 +7,4 @@ config MEM_DEVICE
>>
>>  config NVDIMM
>>      bool
>> -    default y
>> -    depends on (PC || PSERIES || ARM_VIRT)
>>      select MEM_DEVICE
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index e51e0e5e5ac..66e0b15d9ef 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -3,6 +3,7 @@ config PSERIES
>>      imply PCI_DEVICES
>>      imply TEST_DEVICES
>>      imply VIRTIO_VGA
>> +    imply NVDIMM
>>      select DIMM
>>      select PCI
>>      select SPAPR_VSCSI
> 
> Regards,
> Bin
>
Bin Meng May 16, 2021, 12:50 a.m. UTC | #4
On Sun, May 16, 2021 at 1:33 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> On 5/14/21 5:02 AM, Bin Meng wrote:
> > On Fri, May 14, 2021 at 12:53 AM Philippe Mathieu-Daudé
> > <philmd@redhat.com> wrote:
> >>
> >> 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 (it is certainly possible
> >> to start a machine without NVDIMM) , so use the 'imply' weak
> >> reverse dependency to select the symbol.
> >>
> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> >> ---
> >>  default-configs/devices/ppc64-softmmu.mak | 1 -
> >>  hw/arm/Kconfig                            | 1 +
> >>  hw/i386/Kconfig                           | 1 +
> >>  hw/mem/Kconfig                            | 2 --
> >>  hw/ppc/Kconfig                            | 1 +
> >>  5 files changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
> >> index ae0841fa3a1..cca52665d90 100644
> >> --- a/default-configs/devices/ppc64-softmmu.mak
> >> +++ b/default-configs/devices/ppc64-softmmu.mak
> >> @@ -8,4 +8,3 @@ CONFIG_POWERNV=y
> >>
> >>  # For pSeries
> >>  CONFIG_PSERIES=y
> >> -CONFIG_NVDIMM=y
> >
> > I think only removing this one makes sense. I fail to see any
> > difference of other changes in this patch.
>
> See below "depends on (PC || PSERIES || ARM_VIRT)"

Yes, I saw that. This change does not make any difference compared to
"depends on"

>
> >
> >> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> >> index b887f6a5b17..67723d9ea6a 100644
> >> --- a/hw/arm/Kconfig
> >> +++ b/hw/arm/Kconfig
> >> @@ -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
> >> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> >> index 7f91f30877f..66838fa397b 100644
> >> --- a/hw/i386/Kconfig
> >> +++ b/hw/i386/Kconfig
> >> @@ -23,6 +23,7 @@ config PC
> >>      imply TPM_TIS_ISA
> >>      imply VGA_PCI
> >>      imply VIRTIO_VGA
> >> +    imply NVDIMM
> >>      select FDC
> >>      select I8259
> >>      select I8254
> >> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
> >> index a0ef2cf648e..8b19fdc49f1 100644
> >> --- a/hw/mem/Kconfig
> >> +++ b/hw/mem/Kconfig
> >> @@ -7,6 +7,4 @@ config MEM_DEVICE
> >>
> >>  config NVDIMM
> >>      bool
> >> -    default y
> >> -    depends on (PC || PSERIES || ARM_VIRT)
> >>      select MEM_DEVICE
> >> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> >> index e51e0e5e5ac..66e0b15d9ef 100644
> >> --- a/hw/ppc/Kconfig
> >> +++ b/hw/ppc/Kconfig
> >> @@ -3,6 +3,7 @@ config PSERIES
> >>      imply PCI_DEVICES
> >>      imply TEST_DEVICES
> >>      imply VIRTIO_VGA
> >> +    imply NVDIMM
> >>      select DIMM
> >>      select PCI
> >>      select SPAPR_VSCSI

Regards,
Bin
Philippe Mathieu-Daudé May 16, 2021, 12:42 p.m. UTC | #5
On 5/16/21 2:50 AM, Bin Meng wrote:
> On Sun, May 16, 2021 at 1:33 AM Philippe Mathieu-Daudé
> <philmd@redhat.com> wrote:
>>
>> On 5/14/21 5:02 AM, Bin Meng wrote:
>>> On Fri, May 14, 2021 at 12:53 AM Philippe Mathieu-Daudé
>>> <philmd@redhat.com> wrote:
>>>>
>>>> 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 (it is certainly possible
>>>> to start a machine without NVDIMM) , so use the 'imply' weak
>>>> reverse dependency to select the symbol.
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>> ---
>>>>  default-configs/devices/ppc64-softmmu.mak | 1 -
>>>>  hw/arm/Kconfig                            | 1 +
>>>>  hw/i386/Kconfig                           | 1 +
>>>>  hw/mem/Kconfig                            | 2 --
>>>>  hw/ppc/Kconfig                            | 1 +
>>>>  5 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
>>>> index ae0841fa3a1..cca52665d90 100644
>>>> --- a/default-configs/devices/ppc64-softmmu.mak
>>>> +++ b/default-configs/devices/ppc64-softmmu.mak
>>>> @@ -8,4 +8,3 @@ CONFIG_POWERNV=y
>>>>
>>>>  # For pSeries
>>>>  CONFIG_PSERIES=y
>>>> -CONFIG_NVDIMM=y
>>>
>>> I think only removing this one makes sense. I fail to see any
>>> difference of other changes in this patch.
>>
>> See below "depends on (PC || PSERIES || ARM_VIRT)"
> 
> Yes, I saw that. This change does not make any difference compared to
> "depends on"

No, there is no logical change indeed. Simply IIUC the documentation
"imply" is the preferred form.

> 
>>
>>>
>>>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>>>> index b887f6a5b17..67723d9ea6a 100644
>>>> --- a/hw/arm/Kconfig
>>>> +++ b/hw/arm/Kconfig
>>>> @@ -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
>>>> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
>>>> index 7f91f30877f..66838fa397b 100644
>>>> --- a/hw/i386/Kconfig
>>>> +++ b/hw/i386/Kconfig
>>>> @@ -23,6 +23,7 @@ config PC
>>>>      imply TPM_TIS_ISA
>>>>      imply VGA_PCI
>>>>      imply VIRTIO_VGA
>>>> +    imply NVDIMM
>>>>      select FDC
>>>>      select I8259
>>>>      select I8254
>>>> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
>>>> index a0ef2cf648e..8b19fdc49f1 100644
>>>> --- a/hw/mem/Kconfig
>>>> +++ b/hw/mem/Kconfig
>>>> @@ -7,6 +7,4 @@ config MEM_DEVICE
>>>>
>>>>  config NVDIMM
>>>>      bool
>>>> -    default y
>>>> -    depends on (PC || PSERIES || ARM_VIRT)
>>>>      select MEM_DEVICE
>>>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>>>> index e51e0e5e5ac..66e0b15d9ef 100644
>>>> --- a/hw/ppc/Kconfig
>>>> +++ b/hw/ppc/Kconfig
>>>> @@ -3,6 +3,7 @@ config PSERIES
>>>>      imply PCI_DEVICES
>>>>      imply TEST_DEVICES
>>>>      imply VIRTIO_VGA
>>>> +    imply NVDIMM
>>>>      select DIMM
>>>>      select PCI
>>>>      select SPAPR_VSCSI
> 
> Regards,
> Bin
>
Bin Meng May 16, 2021, 2:15 p.m. UTC | #6
On Sun, May 16, 2021 at 8:42 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> On 5/16/21 2:50 AM, Bin Meng wrote:
> > On Sun, May 16, 2021 at 1:33 AM Philippe Mathieu-Daudé
> > <philmd@redhat.com> wrote:
> >>
> >> On 5/14/21 5:02 AM, Bin Meng wrote:
> >>> On Fri, May 14, 2021 at 12:53 AM Philippe Mathieu-Daudé
> >>> <philmd@redhat.com> wrote:
> >>>>
> >>>> 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 (it is certainly possible
> >>>> to start a machine without NVDIMM) , so use the 'imply' weak
> >>>> reverse dependency to select the symbol.
> >>>>
> >>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> >>>> ---
> >>>>  default-configs/devices/ppc64-softmmu.mak | 1 -
> >>>>  hw/arm/Kconfig                            | 1 +
> >>>>  hw/i386/Kconfig                           | 1 +
> >>>>  hw/mem/Kconfig                            | 2 --
> >>>>  hw/ppc/Kconfig                            | 1 +
> >>>>  5 files changed, 3 insertions(+), 3 deletions(-)
> >>>>
> >>>> diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
> >>>> index ae0841fa3a1..cca52665d90 100644
> >>>> --- a/default-configs/devices/ppc64-softmmu.mak
> >>>> +++ b/default-configs/devices/ppc64-softmmu.mak
> >>>> @@ -8,4 +8,3 @@ CONFIG_POWERNV=y
> >>>>
> >>>>  # For pSeries
> >>>>  CONFIG_PSERIES=y
> >>>> -CONFIG_NVDIMM=y
> >>>
> >>> I think only removing this one makes sense. I fail to see any
> >>> difference of other changes in this patch.
> >>
> >> See below "depends on (PC || PSERIES || ARM_VIRT)"
> >
> > Yes, I saw that. This change does not make any difference compared to
> > "depends on"
>
> No, there is no logical change indeed. Simply IIUC the documentation
> "imply" is the preferred form.

Okay, per the documentation "imply" is the preferred way over "default
y && depends on".

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/default-configs/devices/ppc64-softmmu.mak b/default-configs/devices/ppc64-softmmu.mak
index ae0841fa3a1..cca52665d90 100644
--- a/default-configs/devices/ppc64-softmmu.mak
+++ b/default-configs/devices/ppc64-softmmu.mak
@@ -8,4 +8,3 @@  CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index b887f6a5b17..67723d9ea6a 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -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
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 7f91f30877f..66838fa397b 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -23,6 +23,7 @@  config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
index a0ef2cf648e..8b19fdc49f1 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -7,6 +7,4 @@  config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index e51e0e5e5ac..66e0b15d9ef 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -3,6 +3,7 @@  config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI