From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
qemu-devel@nongnu.org
Cc: Michael Tokarev <mjt@tls.msk.ru>
Subject: Re: [PATCH v2] hw/mips: Improve the default USB settings in the loongson3-virt machine
Date: Thu, 13 Jul 2023 12:09:28 +0200 [thread overview]
Message-ID: <062e8b3b-dcdd-8f87-d245-ea9e16b1c276@linaro.org> (raw)
In-Reply-To: <20230621074134.82781-1-thuth@redhat.com>
Hi Thomas,
On 21/6/23 09:41, Thomas Huth wrote:
> It's possible to compile QEMU without the USB devices (e.g. when using
> "--without-default-devices" as option for the "configure" script).
> To be still able to run the loongson3-virt machine in default mode with
> such a QEMU binary, we have to check here for the availability of the
> USB devices first before instantiating them.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> v2: Use #ifdef instead of runtime check
>
> hw/mips/loongson3_virt.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
> index 216812f660..3094413eea 100644
> --- a/hw/mips/loongson3_virt.c
> +++ b/hw/mips/loongson3_virt.c
> @@ -51,6 +51,7 @@
> #include "sysemu/reset.h"
> #include "sysemu/runstate.h"
> #include "qemu/error-report.h"
> +#include CONFIG_DEVICES
I'm a but reluctant to include CONFIG_DEVICES.
> +#ifdef CONFIG_USB_OHCI_PCI
> if (defaults_enabled()) {
What about:
if (defaults_enabled() && object_class_by_name(TYPE_PCI_OHCI)) {
> pci_create_simple(pci_bus, -1, "pci-ohci");
> usb_create_simple(usb_bus_find(-1), "usb-kbd");
> usb_create_simple(usb_bus_find(-1), "usb-tablet");
> }
> +#endif
next prev parent reply other threads:[~2023-07-13 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 7:41 [PATCH v2] hw/mips: Improve the default USB settings in the loongson3-virt machine Thomas Huth
2023-07-13 8:46 ` Thomas Huth
2023-07-13 10:09 ` Philippe Mathieu-Daudé [this message]
2023-07-13 11:47 ` Michael Tokarev
2023-07-13 11:51 ` Thomas Huth
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=062e8b3b-dcdd-8f87-d245-ea9e16b1c276@linaro.org \
--to=philmd@linaro.org \
--cc=chenhuacai@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=mjt@tls.msk.ru \
--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 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).