[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] hw/mips: Improve the default USB settings in the loongson

From: Thomas Huth
Subject: Re: [PATCH v2] hw/mips: Improve the default USB settings in the loongson3-virt machine
Date: Thu, 13 Jul 2023 10:46:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 21/06/2023 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"
#define PM_CNTL_MODE 0x10 @@ -447,11 +448,13 @@ static inline void loongson3_virt_devices_init(MachineState *machine, pci_vga_init(pci_bus); +#ifdef CONFIG_USB_OHCI_PCI
      if (defaults_enabled()) {
          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");
for (i = 0; i < nb_nics; i++) {
          NICInfo *nd = &nd_table[i];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]