From: Thomas Huth <thuth@redhat.com>
To: Fabiano Rosas <farosas@suse.de>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Eduardo Habkost <eduardo@habkost.net>,
Peter Maydell <peter.maydell@linaro.org>,
Miroslav Rezanina <mrezanin@redhat.com>
Subject: Re: [PATCH v2 01/10] hw/i386: Select CONFIG_PARALLEL for PC machines
Date: Thu, 9 Feb 2023 11:22:48 +0100 [thread overview]
Message-ID: <928a0c54-f443-2d77-296d-4f2002b1cc42@redhat.com> (raw)
In-Reply-To: <20230208192654.8854-2-farosas@suse.de>
On 08/02/2023 20.26, Fabiano Rosas wrote:
> Currently the isa-parallel driver is always added by the PC machines
> regardless of the presence of the actual code in the build, which can
> lead to a crash:
>
> qemu-system-i386: unknown type 'isa-parallel'
> Aborted (core dumped)
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> hw/i386/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 1bf47b0b0b..d3c340e053 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -20,7 +20,6 @@ config PC
> imply PCI_IPMI_BT
> imply IPMI_SSIF
> imply ISA_DEBUG
> - imply PARALLEL
> imply PCI_DEVICES
> imply PVPANIC_ISA
> imply QXL
> @@ -46,6 +45,7 @@ config PC
> select ACPI_VMGENID
> select VIRTIO_PMEM_SUPPORTED
> select VIRTIO_MEM_SUPPORTED
> + select PARALLEL
>
> config PC_PCI
> bool
Phew ... Ack from a plain upstream point of view. From a Red Hat downstream
point of view, this will cause another downstream-only patch for us, since
the binaries (and the machine types) that we have in RHEL have the
"isa-parallel" device not compiled in on purpose.
So I started wondering now whether we could tackle all this a little bit
different, in a more flexible way ... something similar like you did in your
parallel port patch in v1 / something similar to what Peter suggested in his
option (2) here:
https://lore.kernel.org/qemu-devel/CAFEAcA9VkFU_bh=aBAOoXCUCeSm1xuR+H+uerd468=vVuDrJEg@mail.gmail.com/
For display devices, we already have default_display in MachineClass, so
instead of always selecting the VGA device in your "Select VGA_PCI in
Kconfig" patch, we could check that in vl.c and set default_vga = 0 if it is
not available.
For network devices, there is already default_nic_model in PCMachineClass
... we could move that to the generic MachineClass and use it in vl.c according.
Then no_parallel, no_serial, no_floppy, no_cdrom, no_sdcard in the
MachineClass could be replaced by a "char *default_XYZ", too, so that we
rather have a device name here to indicate the availability of a default
device than a boolean flag. If the pointer is not set ==> no default device.
If the pointer is set and the device is available ==> use the default
device. If the pointer is set and the device is not compiled in ==> emit a
warning, but continue as if the pointer was not set.
What do you think?
Thomas
next prev parent reply other threads:[~2023-02-09 10:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 19:26 [PATCH v2 00/10] Kconfig vs. default devices Fabiano Rosas
2023-02-08 19:26 ` [PATCH v2 04/10] hw/i386: Select E1000_PCI for i440fx Fabiano Rosas
2023-02-08 19:26 ` [PATCH v2 05/10] hw/arm: Select VIRTIO_NET for virt machine Fabiano Rosas
2023-02-08 19:43 ` [PATCH v2 00/10] Kconfig vs. default devices Philippe Mathieu-Daudé
2023-02-09 5:43 ` Thomas Huth
2023-05-02 15:20 ` Alex Bennée
[not found] ` <20230208192654.8854-2-farosas@suse.de>
2023-02-09 10:22 ` Thomas Huth [this message]
2023-05-02 15:26 ` Alex Bennée
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=928a0c54-f443-2d77-296d-4f2002b1cc42@redhat.com \
--to=thuth@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=marcel.apfelbaum@gmail.com \
--cc=mrezanin@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).