For ARM targets, boards that require TCG are already using "default y".
Switch ARM_VIRT to the same selection mechanism.
No changes to generated config-devices.mak file.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configs/devices/arm-softmmu/default.mak | 3 ++-
hw/arm/Kconfig | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/configs/devices/arm-softmmu/default.mak b/configs/devices/arm-softmmu/default.mak
index c1cfb3bcf75..31f77c20269 100644
--- a/configs/devices/arm-softmmu/default.mak
+++ b/configs/devices/arm-softmmu/default.mak
@@ -5,7 +5,8 @@
# CONFIG_PCI_DEVICES=n
# CONFIG_TEST_DEVICES=n
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
# These are selected by default when TCG is enabled, uncomment them to
# keep out of the build.
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 893a7bff66b..1e7cd01087f 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -1,5 +1,7 @@
config ARM_VIRT
bool
+ default y
+ depends on ARM
imply PCI_DEVICES
imply TEST_DEVICES
imply VFIO_AMD_XGBE
--
2.44.0
Paolo Bonzini <pbonzini@redhat.com> writes: > For ARM targets, boards that require TCG are already using "default y". > Switch ARM_VIRT to the same selection mechanism. > > No changes to generated config-devices.mak file. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > configs/devices/arm-softmmu/default.mak | 3 ++- > hw/arm/Kconfig | 2 ++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/configs/devices/arm-softmmu/default.mak b/configs/devices/arm-softmmu/default.mak > index c1cfb3bcf75..31f77c20269 100644 > --- a/configs/devices/arm-softmmu/default.mak > +++ b/configs/devices/arm-softmmu/default.mak > @@ -5,7 +5,8 @@ > # CONFIG_PCI_DEVICES=n > # CONFIG_TEST_DEVICES=n > > -CONFIG_ARM_VIRT=y > +# Boards are selected by default, uncomment to keep out of the build. > +# CONFIG_ARM_VIRT=n > > # These are selected by default when TCG is enabled, uncomment them to > # keep out of the build. > diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig > index 893a7bff66b..1e7cd01087f 100644 > --- a/hw/arm/Kconfig > +++ b/hw/arm/Kconfig > @@ -1,5 +1,7 @@ > config ARM_VIRT > bool > + default y > + depends on ARM > imply PCI_DEVICES We lose pci.c when building --without-default-devices: $ arch aarch64 $ ../configure --target-list=aarch64-softmmu,arm-softmmu --disable-linux-user --without-default-devices $ make ... libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function `kvm_arch_fixup_msi_route': ../target/arm/kvm.c:1548: undefined reference to `pci_device_iommu_address_space' > imply TEST_DEVICES > imply VFIO_AMD_XGBE
Hi Fabiano, On 23/4/24 20:02, Fabiano Rosas wrote: > Paolo Bonzini <pbonzini@redhat.com> writes: > >> For ARM targets, boards that require TCG are already using "default y". >> Switch ARM_VIRT to the same selection mechanism. >> >> No changes to generated config-devices.mak file. >> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >> --- >> configs/devices/arm-softmmu/default.mak | 3 ++- >> hw/arm/Kconfig | 2 ++ >> 2 files changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/configs/devices/arm-softmmu/default.mak b/configs/devices/arm-softmmu/default.mak >> index c1cfb3bcf75..31f77c20269 100644 >> --- a/configs/devices/arm-softmmu/default.mak >> +++ b/configs/devices/arm-softmmu/default.mak >> @@ -5,7 +5,8 @@ >> # CONFIG_PCI_DEVICES=n >> # CONFIG_TEST_DEVICES=n >> >> -CONFIG_ARM_VIRT=y >> +# Boards are selected by default, uncomment to keep out of the build. >> +# CONFIG_ARM_VIRT=n >> >> # These are selected by default when TCG is enabled, uncomment them to >> # keep out of the build. >> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig >> index 893a7bff66b..1e7cd01087f 100644 >> --- a/hw/arm/Kconfig >> +++ b/hw/arm/Kconfig >> @@ -1,5 +1,7 @@ >> config ARM_VIRT >> bool >> + default y >> + depends on ARM >> imply PCI_DEVICES > > We lose pci.c when building --without-default-devices: > > $ arch > aarch64 > $ ../configure --target-list=aarch64-softmmu,arm-softmmu > --disable-linux-user --without-default-devices > $ make > ... > libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function `kvm_arch_fixup_msi_route': > ../target/arm/kvm.c:1548: undefined reference to `pci_device_iommu_address_space' IIRC QEMU isn't yet ready to be built with --without-default-devices but without any machine, you need to explicit at least one. For example you can use --with-devices-aarch64=minimal, or define a config with only the Virt machine. Regards, Phil.
Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé <philmd@linaro.org> ha
scritto:
> Hi Fabiano,
>
> On 23/4/24 20:02, Fabiano Rosas wrote:
> > Paolo Bonzini <pbonzini@redhat.com> writes:
> >
> >> For ARM targets, boards that require TCG are already using "default y".
> >> Switch ARM_VIRT to the same selection mechanism.
> >>
> >> No changes to generated config-devices.mak file.
> >>
> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >> ---
> >> configs/devices/arm-softmmu/default.mak | 3 ++-
> >> hw/arm/Kconfig | 2 ++
> >> 2 files changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/configs/devices/arm-softmmu/default.mak
> b/configs/devices/arm-softmmu/default.mak
> >> index c1cfb3bcf75..31f77c20269 100644
> >> --- a/configs/devices/arm-softmmu/default.mak
> >> +++ b/configs/devices/arm-softmmu/default.mak
> >> @@ -5,7 +5,8 @@
> >> # CONFIG_PCI_DEVICES=n
> >> # CONFIG_TEST_DEVICES=n
> >>
> >> -CONFIG_ARM_VIRT=y
> >> +# Boards are selected by default, uncomment to keep out of the build.
> >> +# CONFIG_ARM_VIRT=n
> >>
> >> # These are selected by default when TCG is enabled, uncomment them to
> >> # keep out of the build.
> >> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> >> index 893a7bff66b..1e7cd01087f 100644
> >> --- a/hw/arm/Kconfig
> >> +++ b/hw/arm/Kconfig
> >> @@ -1,5 +1,7 @@
> >> config ARM_VIRT
> >> bool
> >> + default y
> >> + depends on ARM
> >> imply PCI_DEVICES
> >
> > We lose pci.c when building --without-default-devices:
> >
> > $ arch
> > aarch64
> > $ ../configure --target-list=aarch64-softmmu,arm-softmmu
> > --disable-linux-user --without-default-devices
> > $ make
> > ...
> > libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function
> `kvm_arch_fixup_msi_route':
> > ../target/arm/kvm.c:1548: undefined reference to
> `pci_device_iommu_address_space'
>
I guess we can add something like
config AARCH64
select PCI if KVM
Paolo
IIRC QEMU isn't yet ready to be built with --without-default-devices
> but without any machine, you need to explicit at least one. For
> example you can use --with-devices-aarch64=minimal, or define a
> config with only the Virt machine.
Paolo
> Regards,
>
> Phil.
>
>
Paolo Bonzini <pbonzini@redhat.com> writes: > Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé <philmd@linaro.org> ha > scritto: > >> Hi Fabiano, >> >> On 23/4/24 20:02, Fabiano Rosas wrote: >> > Paolo Bonzini <pbonzini@redhat.com> writes: >> > >> >> For ARM targets, boards that require TCG are already using "default y". >> >> Switch ARM_VIRT to the same selection mechanism. >> >> >> >> No changes to generated config-devices.mak file. >> >> >> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >> >> --- >> >> configs/devices/arm-softmmu/default.mak | 3 ++- >> >> hw/arm/Kconfig | 2 ++ >> >> 2 files changed, 4 insertions(+), 1 deletion(-) >> >> >> >> diff --git a/configs/devices/arm-softmmu/default.mak >> b/configs/devices/arm-softmmu/default.mak >> >> index c1cfb3bcf75..31f77c20269 100644 >> >> --- a/configs/devices/arm-softmmu/default.mak >> >> +++ b/configs/devices/arm-softmmu/default.mak >> >> @@ -5,7 +5,8 @@ >> >> # CONFIG_PCI_DEVICES=n >> >> # CONFIG_TEST_DEVICES=n >> >> >> >> -CONFIG_ARM_VIRT=y >> >> +# Boards are selected by default, uncomment to keep out of the build. >> >> +# CONFIG_ARM_VIRT=n >> >> >> >> # These are selected by default when TCG is enabled, uncomment them to >> >> # keep out of the build. >> >> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig >> >> index 893a7bff66b..1e7cd01087f 100644 >> >> --- a/hw/arm/Kconfig >> >> +++ b/hw/arm/Kconfig >> >> @@ -1,5 +1,7 @@ >> >> config ARM_VIRT >> >> bool >> >> + default y >> >> + depends on ARM >> >> imply PCI_DEVICES >> > >> > We lose pci.c when building --without-default-devices: >> > >> > $ arch >> > aarch64 >> > $ ../configure --target-list=aarch64-softmmu,arm-softmmu >> > --disable-linux-user --without-default-devices >> > $ make >> > ... >> > libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function >> `kvm_arch_fixup_msi_route': >> > ../target/arm/kvm.c:1548: undefined reference to >> `pci_device_iommu_address_space' >> > > I guess we can add something like > > config AARCH64 > select PCI if KVM Yep, that fixes the build. With defaults disabled the tests are all kinds of broken, but I guess that's expected. I see issues even in master. With the above included: Tested-by: Fabiano Rosas <farosas@suse.de> # build-only on aarch64
Philippe Mathieu-Daudé <philmd@linaro.org> writes: > Hi Fabiano, > > On 23/4/24 20:02, Fabiano Rosas wrote: >> Paolo Bonzini <pbonzini@redhat.com> writes: >> >>> For ARM targets, boards that require TCG are already using "default y". >>> Switch ARM_VIRT to the same selection mechanism. >>> >>> No changes to generated config-devices.mak file. >>> >>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >>> --- >>> configs/devices/arm-softmmu/default.mak | 3 ++- >>> hw/arm/Kconfig | 2 ++ >>> 2 files changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/configs/devices/arm-softmmu/default.mak b/configs/devices/arm-softmmu/default.mak >>> index c1cfb3bcf75..31f77c20269 100644 >>> --- a/configs/devices/arm-softmmu/default.mak >>> +++ b/configs/devices/arm-softmmu/default.mak >>> @@ -5,7 +5,8 @@ >>> # CONFIG_PCI_DEVICES=n >>> # CONFIG_TEST_DEVICES=n >>> >>> -CONFIG_ARM_VIRT=y >>> +# Boards are selected by default, uncomment to keep out of the build. >>> +# CONFIG_ARM_VIRT=n >>> >>> # These are selected by default when TCG is enabled, uncomment them to >>> # keep out of the build. >>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig >>> index 893a7bff66b..1e7cd01087f 100644 >>> --- a/hw/arm/Kconfig >>> +++ b/hw/arm/Kconfig >>> @@ -1,5 +1,7 @@ >>> config ARM_VIRT >>> bool >>> + default y >>> + depends on ARM >>> imply PCI_DEVICES >> >> We lose pci.c when building --without-default-devices: >> >> $ arch >> aarch64 >> $ ../configure --target-list=aarch64-softmmu,arm-softmmu >> --disable-linux-user --without-default-devices >> $ make >> ... >> libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function `kvm_arch_fixup_msi_route': >> ../target/arm/kvm.c:1548: undefined reference to `pci_device_iommu_address_space' > > IIRC QEMU isn't yet ready to be built with --without-default-devices > but without any machine, you need to explicit at least one. For > example you can use --with-devices-aarch64=minimal, or define a > config with only the Virt machine. Could we detect this kind of breakage somehow and report it properly to the user? As in "you chose an impossible configuration, select a board and try again". I see this comes from kvm.c, perhaps on arm CONFIG_KVM needs to depend on VIRT? > > Regards, > > Phil.
© 2016 - 2026 Red Hat, Inc.