From: Fabiano Rosas <farosas@suse.de>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org
Subject: Re: [PATCH 06/10] hw/arm: Select VIRTIO_BLK for virt machine
Date: Tue, 07 Feb 2023 16:24:34 -0300 [thread overview]
Message-ID: <87pmalmg7h.fsf@suse.de> (raw)
In-Reply-To: <461ba038-31bf-49c4-758b-94ece36f136f@redhat.com>
Thomas Huth <thuth@redhat.com> writes:
> On 06/02/2023 15.08, Fabiano Rosas wrote:
>> The virt machine has IF_VIRTIO as block_default_type, which causes the
>> generic code to try to create a virtio-blk-pci device pair at
>> configure_blockdev()/qemu_create_cli_devices().
>>
>> Select VIRTIO_BLK and VIRTIO_PCI from CONFIG_ARM_VIRT to avoid errors
>> when PCI_DEVICES=n (due to e.g. --without-default-devices):
>>
>> $ ./qemu-system-aarch64 -M virt -accel tcg -cpu max -nodefaults -cdrom foo.qcow2
>> qemu-system-aarch64: -cdrom foo.qcow2: 'virtio-blk' (alias
>> 'virtio-blk-pci') is not a valid device model name
>>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>> hw/arm/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index 8dcc08b7ec..296d4f5176 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -33,6 +33,7 @@ config ARM_VIRT
>> select ACPI_HMAT
>> select VIRTIO_PCI
>> select VIRTIO_NET
>> + select VIRTIO_BLK
>
> I'm a little bit torn here ... while it makes sense for me to add VIRTIO_NET
> so that you can run "qemu-system-aarch64 -M virt" without any additional
> arguments, this is now about fixing additional (convenience) CLI options
> that are optional ...
>
> I assume we need those for some qtests? What about checking for virtio-blk
> in those tests instead?
Yes, from bios-tables-test.c.
I tried hard to avoid this kind of scenario, but ultimately it's the
-cdrom option that's broken, not the test.
That's just how the code was written. The -cdrom option can use
virtio-blk as a backend because the virt machine has IF_VIRTIO as
block_default_type. So virtio-blk is a dependency as long as -cdrom is
present in the build. Unless we change something else or guard against
it in the code somehow.
next prev parent reply other threads:[~2023-02-07 19:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 14:07 [PATCH 00/10] Kconfig vs. default devices Fabiano Rosas
2023-02-06 14:08 ` [PATCH 01/10] vl.c: Do not add isa-parallel if it's not present Fabiano Rosas
2023-02-06 15:02 ` Philippe Mathieu-Daudé
2023-02-06 17:05 ` Fabiano Rosas
2023-02-06 14:08 ` [PATCH 02/10] hw/i386: Select E1000E for q35 Fabiano Rosas
2023-02-07 15:28 ` Thomas Huth
2023-02-06 14:08 ` [PATCH 03/10] hw/i386: Select VGA_PCI in Kconfig Fabiano Rosas
2023-02-07 15:47 ` Thomas Huth
2023-02-07 17:41 ` Fabiano Rosas
2023-02-06 14:08 ` [PATCH 04/10] hw/i386: Select E1000_PCI for i440fx Fabiano Rosas
2023-02-07 18:16 ` Thomas Huth
2023-02-06 14:08 ` [PATCH 05/10] hw/arm: Select VIRTIO_NET for virt machine Fabiano Rosas
2023-02-07 18:19 ` Thomas Huth
2023-02-06 14:08 ` [PATCH 06/10] hw/arm: Select VIRTIO_BLK " Fabiano Rosas
2023-02-07 18:26 ` Thomas Huth
2023-02-07 19:24 ` Fabiano Rosas [this message]
2023-02-06 14:08 ` [PATCH 07/10] hw/arm: Select XLNX_USB_SUBSYS for xlnx-zcu102 machine Fabiano Rosas
2023-02-06 14:21 ` Peter Maydell
2023-02-06 14:08 ` [PATCH 08/10] hw/arm: Select GICV3_TCG for sbsa-ref machine Fabiano Rosas
2023-02-06 14:21 ` Peter Maydell
2023-02-06 14:08 ` [PATCH 09/10] hw/arm: Select e1000e " Fabiano Rosas
2023-02-06 14:08 ` [PATCH 10/10] hw/arm: Select VGA_PCI " Fabiano Rosas
2023-02-06 14:22 ` Peter Maydell
2023-02-06 14:19 ` [PATCH 00/10] Kconfig vs. default devices Peter Maydell
2023-02-06 14:56 ` Fabiano Rosas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmalmg7h.fsf@suse.de \
--to=farosas@suse.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.