From 455177ffc457098b0103d2a09cb7ba5e260dfcdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 05:38:57 +0100 Subject: [PATCH 01/34] hw/usb: Style cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are going to modify these lines, fix their style in order to avoid checkpatch.pl warning. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- hw/usb/hcd-ehci.c | 3 ++- hw/usb/hcd-uhci.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 870c72cb59..98a2860069 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1086,8 +1086,9 @@ static void ehci_opreg_write(void *ptr, hwaddr addr, case CONFIGFLAG: val &= 0x1; if (val) { - for(i = 0; i < NB_PORTS; i++) + for (i = 0; i < NB_PORTS; i++) { handle_port_owner_write(s, i, 0); + } } break; diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 7d3c026dae..b95b47f6a4 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -457,8 +457,9 @@ static void uhci_port_write(void *opaque, hwaddr addr, int n; n = (addr >> 1) & 7; - if (n >= NB_PORTS) + if (n >= NB_PORTS) { return; + } port = &s->ports[n]; dev = port->port.dev; if (dev && dev->attached) { @@ -513,8 +514,9 @@ static uint64_t uhci_port_read(void *opaque, hwaddr addr, unsigned size) UHCIPort *port; int n; n = (addr >> 1) & 7; - if (n >= NB_PORTS) + if (n >= NB_PORTS) { goto read_default; + } port = &s->ports[n]; val = port->ctrl; } From fe693e32c8136bba792a355617d2b0f5d1914721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 05:38:58 +0100 Subject: [PATCH 02/34] hw/usb/uhci: Rename NB_PORTS -> UHCI_PORTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename NB_PORTS as UHCI_PORTS to avoid definition clash with EHCI equivalent: hw/usb/hcd-uhci.h:38:9: error: 'NB_PORTS' macro redefined [-Werror,-Wmacro-redefined] #define NB_PORTS 2 ^ hw/usb/hcd-ehci.h:40:9: note: previous definition is here #define NB_PORTS 6 /* Max. Number of downstream ports */ ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- hw/usb/hcd-uhci.c | 22 +++++++++++----------- hw/usb/hcd-uhci.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index b95b47f6a4..a03cf22e69 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -322,7 +322,7 @@ static void uhci_reset(DeviceState *dev) s->fl_base_addr = 0; s->sof_timing = 64; - for(i = 0; i < NB_PORTS; i++) { + for(i = 0; i < UHCI_PORTS; i++) { port = &s->ports[i]; port->ctrl = 0x0080; if (port->port.dev && port->port.dev->attached) { @@ -364,7 +364,7 @@ static const VMStateDescription vmstate_uhci = { .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(dev, UHCIState), VMSTATE_UINT8_EQUAL(num_ports_vmstate, UHCIState, NULL), - VMSTATE_STRUCT_ARRAY(ports, UHCIState, NB_PORTS, 1, + VMSTATE_STRUCT_ARRAY(ports, UHCIState, UHCI_PORTS, 1, vmstate_uhci_port, UHCIPort), VMSTATE_UINT16(cmd, UHCIState), VMSTATE_UINT16(status, UHCIState), @@ -404,7 +404,7 @@ static void uhci_port_write(void *opaque, hwaddr addr, int i; /* send reset on the USB bus */ - for(i = 0; i < NB_PORTS; i++) { + for(i = 0; i < UHCI_PORTS; i++) { port = &s->ports[i]; usb_device_reset(port->port.dev); } @@ -457,7 +457,7 @@ static void uhci_port_write(void *opaque, hwaddr addr, int n; n = (addr >> 1) & 7; - if (n >= NB_PORTS) { + if (n >= UHCI_PORTS) { return; } port = &s->ports[n]; @@ -514,7 +514,7 @@ static uint64_t uhci_port_read(void *opaque, hwaddr addr, unsigned size) UHCIPort *port; int n; n = (addr >> 1) & 7; - if (n >= NB_PORTS) { + if (n >= UHCI_PORTS) { goto read_default; } port = &s->ports[n]; @@ -609,7 +609,7 @@ static USBDevice *uhci_find_device(UHCIState *s, uint8_t addr) USBDevice *dev; int i; - for (i = 0; i < NB_PORTS; i++) { + for (i = 0; i < UHCI_PORTS; i++) { UHCIPort *port = &s->ports[i]; if (!(port->ctrl & UHCI_PORT_EN)) { continue; @@ -1173,11 +1173,11 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp) s->irq = pci_allocate_irq(dev); if (s->masterbus) { - USBPort *ports[NB_PORTS]; - for(i = 0; i < NB_PORTS; i++) { + USBPort *ports[UHCI_PORTS]; + for(i = 0; i < UHCI_PORTS; i++) { ports[i] = &s->ports[i].port; } - usb_register_companion(s->masterbus, ports, NB_PORTS, + usb_register_companion(s->masterbus, ports, UHCI_PORTS, s->firstport, s, &uhci_port_ops, USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL, &err); @@ -1187,14 +1187,14 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp) } } else { usb_bus_new(&s->bus, sizeof(s->bus), &uhci_bus_ops, DEVICE(dev)); - for (i = 0; i < NB_PORTS; i++) { + for (i = 0; i < UHCI_PORTS; i++) { usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops, USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL); } } s->bh = qemu_bh_new_guarded(uhci_bh, s, &DEVICE(dev)->mem_reentrancy_guard); s->frame_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, uhci_frame_timer, s); - s->num_ports_vmstate = NB_PORTS; + s->num_ports_vmstate = UHCI_PORTS; QTAILQ_INIT(&s->queues); memory_region_init_io(&s->io_bar, OBJECT(s), &uhci_ioport_ops, s, diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h index 69f8b40c49..6d26b94e92 100644 --- a/hw/usb/hcd-uhci.h +++ b/hw/usb/hcd-uhci.h @@ -35,7 +35,7 @@ typedef struct UHCIQueue UHCIQueue; -#define NB_PORTS 2 +#define UHCI_PORTS 2 typedef struct UHCIPort { USBPort port; @@ -59,7 +59,7 @@ typedef struct UHCIState { uint32_t frame_bytes; uint32_t frame_bandwidth; bool completions_only; - UHCIPort ports[NB_PORTS]; + UHCIPort ports[UHCI_PORTS]; qemu_irq irq; /* Interrupts that should be raised at the end of the current frame. */ uint32_t pending_int_mask; From 1c83f366f909198a7bb50db2b40b3486ac977da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 05:38:59 +0100 Subject: [PATCH 03/34] hw/usb/ehci: Rename NB_PORTS -> EHCI_PORTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename NB_PORTS as EHCI_PORTS to avoid definition clash with UHCI equivalent: hw/usb/hcd-ehci.h:40:9: error: 'NB_PORTS' macro redefined [-Werror,-Wmacro-redefined] #define NB_PORTS 6 /* Max. Number of downstream ports */ ^ hw/usb/hcd-uhci.h:38:9: note: previous definition is here #define NB_PORTS 2 ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-ehci-sysbus.c | 2 +- hw/usb/hcd-ehci.c | 20 ++++++++++---------- hw/usb/hcd-ehci.h | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index 0b26db74d8..3ff54edf62 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -83,7 +83,7 @@ static void usb_ehci_pci_init(Object *obj) s->capsbase = 0x00; s->opregbase = 0x20; s->portscbase = 0x44; - s->portnr = NB_PORTS; + s->portnr = EHCI_PORTS; if (!dc->hotpluggable) { s->companion_enable = true; diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index bfb774504c..fe1dabd0bb 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -88,7 +88,7 @@ static void ehci_sysbus_class_init(ObjectClass *klass, void *data) SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(klass); sec->portscbase = 0x44; - sec->portnr = NB_PORTS; + sec->portnr = EHCI_PORTS; dc->realize = usb_ehci_sysbus_realize; dc->vmsd = &vmstate_ehci_sysbus; diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 98a2860069..01864d4649 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -783,9 +783,9 @@ static void ehci_register_companion(USBBus *bus, USBPort *ports[], EHCIState *s = container_of(bus, EHCIState, bus); uint32_t i; - if (firstport + portcount > NB_PORTS) { + if (firstport + portcount > EHCI_PORTS) { error_setg(errp, "firstport must be between 0 and %u", - NB_PORTS - portcount); + EHCI_PORTS - portcount); return; } @@ -831,7 +831,7 @@ static USBDevice *ehci_find_device(EHCIState *ehci, uint8_t addr) USBPort *port; int i; - for (i = 0; i < NB_PORTS; i++) { + for (i = 0; i < EHCI_PORTS; i++) { port = &ehci->ports[i]; if (!(ehci->portsc[i] & PORTSC_PED)) { DPRINTF("Port %d not enabled\n", i); @@ -850,7 +850,7 @@ void ehci_reset(void *opaque) { EHCIState *s = opaque; int i; - USBDevice *devs[NB_PORTS]; + USBDevice *devs[EHCI_PORTS]; trace_usb_ehci_reset(); @@ -858,7 +858,7 @@ void ehci_reset(void *opaque) * Do the detach before touching portsc, so that it correctly gets send to * us or to our companion based on PORTSC_POWNER before the reset. */ - for(i = 0; i < NB_PORTS; i++) { + for(i = 0; i < EHCI_PORTS; i++) { devs[i] = s->ports[i].dev; if (devs[i] && devs[i]->attached) { usb_detach(&s->ports[i]); @@ -877,7 +877,7 @@ void ehci_reset(void *opaque) s->astate = EST_INACTIVE; s->pstate = EST_INACTIVE; - for(i = 0; i < NB_PORTS; i++) { + for(i = 0; i < EHCI_PORTS; i++) { if (s->companion_ports[i]) { s->portsc[i] = PORTSC_POWNER | PORTSC_PPOWER; } else { @@ -1086,7 +1086,7 @@ static void ehci_opreg_write(void *ptr, hwaddr addr, case CONFIGFLAG: val &= 0x1; if (val) { - for (i = 0; i < NB_PORTS; i++) { + for (i = 0; i < EHCI_PORTS; i++) { handle_port_owner_write(s, i, 0); } } @@ -2427,7 +2427,7 @@ static int usb_ehci_post_load(void *opaque, int version_id) EHCIState *s = opaque; int i; - for (i = 0; i < NB_PORTS; i++) { + for (i = 0; i < EHCI_PORTS; i++) { USBPort *companion = s->companion_ports[i]; if (companion == NULL) { continue; @@ -2509,9 +2509,9 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp) { int i; - if (s->portnr > NB_PORTS) { + if (s->portnr > EHCI_PORTS) { error_setg(errp, "Too many ports! Max. port number is %d.", - NB_PORTS); + EHCI_PORTS); return; } if (s->maxframes < 8 || s->maxframes > 512) { diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 2cd821f49e..56a1c09d1f 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -37,7 +37,7 @@ #define MMIO_SIZE 0x1000 #define CAPA_SIZE 0x10 -#define NB_PORTS 6 /* Max. Number of downstream ports */ +#define EHCI_PORTS 6 /* Max. Number of downstream ports */ typedef struct EHCIPacket EHCIPacket; typedef struct EHCIQueue EHCIQueue; @@ -288,7 +288,7 @@ struct EHCIState { uint32_t configflag; }; }; - uint32_t portsc[NB_PORTS]; + uint32_t portsc[EHCI_PORTS]; /* * Internal states, shadow registers, etc @@ -298,8 +298,8 @@ struct EHCIState { bool working; uint32_t astate; /* Current state in asynchronous schedule */ uint32_t pstate; /* Current state in periodic schedule */ - USBPort ports[NB_PORTS]; - USBPort *companion_ports[NB_PORTS]; + USBPort ports[EHCI_PORTS]; + USBPort *companion_ports[EHCI_PORTS]; uint32_t usbsts_pending; uint32_t usbsts_frindex; EHCIQueueHead aqueues; From 6b29e3722e2482f6418b8c9a6969b269e04f73a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 9 Feb 2024 20:01:09 +0100 Subject: [PATCH 04/34] hw/i386/kvm/ioapic: Replace magic '24' value by proper definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace '24' -> KVM_IOAPIC_NUM_PINS. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/i386/kvm/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 409d0c8c76..b96fe84eed 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -35,7 +35,7 @@ void kvm_pc_setup_irq_routing(bool pci_enabled) kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8); } if (pci_enabled) { - for (i = 0; i < 24; ++i) { + for (i = 0; i < KVM_IOAPIC_NUM_PINS; ++i) { if (i == 0) { kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, 2); } else if (i != 2) { From 22942c10608adc9054cab01e85a8d2f2bc58b276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:46 +0100 Subject: [PATCH 05/34] target/i386/monitor: Remove unused 'hw/i386/pc.h' header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- target/i386/monitor.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 950ff9ccbc..3a281dab02 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -33,7 +33,6 @@ #include "qapi/error.h" #include "qapi/qapi-commands-misc-target.h" #include "qapi/qapi-commands-misc.h" -#include "hw/i386/pc.h" /* Perform linear address sign extension */ static hwaddr addr_canonical(CPUArchState *env, hwaddr addr) From e62f8ffb293c1abb8575b33d6a699c3af83f5698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:47 +0100 Subject: [PATCH 06/34] hw/timer: Move HPET_INTCAP definition to "hpet.h" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HPET_INTCAP is specific to TYPE_HPET, so define it there. hpet.c doesn't need to include "hw/i386/pc.h" anymore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/timer/hpet.c | 1 - include/hw/i386/pc.h | 2 -- include/hw/timer/hpet.h | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 1672faa4f2..01efe4885d 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -25,7 +25,6 @@ */ #include "qemu/osdep.h" -#include "hw/i386/pc.h" #include "hw/irq.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 02a0deedd3..c0e6c43fbd 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -15,8 +15,6 @@ #include "hw/firmware/smbios.h" #include "hw/cxl/cxl.h" -#define HPET_INTCAP "hpet-intcap" - /** * PCMachineState: * @acpi_dev: link to ACPI PM device that performs ACPI hotplug handling diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h index f04c4d3238..d17a8d4319 100644 --- a/include/hw/timer/hpet.h +++ b/include/hw/timer/hpet.h @@ -78,6 +78,8 @@ extern struct hpet_fw_config hpet_cfg; #define TYPE_HPET "hpet" +#define HPET_INTCAP "hpet-intcap" + static inline bool hpet_find(void) { return object_resolve_path_type("", TYPE_HPET, NULL); From b9212a57f57f637ee6d25208d961e3c90c97ef98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:48 +0100 Subject: [PATCH 07/34] hw/isa/lpc_ich9: Remove unused 'hw/i386/pc.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit c461f3e382 ("hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method") removed the need for "hw/i386/pc.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/isa/lpc_ich9.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 70c6e8a093..bd727b2320 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -41,7 +41,6 @@ #include "hw/isa/apm.h" #include "hw/pci/pci.h" #include "hw/southbridge/ich9.h" -#include "hw/i386/pc.h" #include "hw/acpi/acpi.h" #include "hw/acpi/ich9.h" #include "hw/pci/pci_bus.h" From a4ed7a7b763bd9d82b1e9c5e8c24938a69284504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:49 +0100 Subject: [PATCH 08/34] hw/i386/acpi: Declare pc_madt_cpu_entry() in 'acpi-common.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since pc_madt_cpu_entry() is only used by: - hw/i386/acpi-build.c // single call - hw/i386/acpi-common.c // definition there is no need to expose it outside of hw/i386/. Declare it in "acpi-common.h". acpi-build.c doesn't need "hw/i386/pc.h" anymore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/i386/acpi-common.c | 1 - hw/i386/acpi-common.h | 3 +++ include/hw/i386/pc.h | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 43dc23f7e0..f1a11f833a 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -27,7 +27,6 @@ #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/utils.h" -#include "hw/i386/pc.h" #include "target/i386/cpu.h" #include "acpi-build.h" diff --git a/hw/i386/acpi-common.h b/hw/i386/acpi-common.h index b3c56ee014..e305aaac15 100644 --- a/hw/i386/acpi-common.h +++ b/hw/i386/acpi-common.h @@ -1,12 +1,15 @@ #ifndef HW_I386_ACPI_COMMON_H #define HW_I386_ACPI_COMMON_H +#include "hw/boards.h" #include "hw/acpi/bios-linker-loader.h" #include "hw/i386/x86.h" /* Default IOAPIC ID */ #define ACPI_BUILD_IOAPIC_ID 0x0 +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, + GArray *entry, bool force_enabled); void acpi_build_madt(GArray *table_data, BIOSLinker *linker, X86MachineState *x86ms, const char *oem_id, const char *oem_table_id); diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c0e6c43fbd..d7c7f930ed 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -199,10 +199,6 @@ bool pc_system_ovmf_table_find(const char *entry, uint8_t **data, int *data_len); void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size); -/* hw/i386/acpi-common.c */ -void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, - GArray *entry, bool force_enabled); - /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); From 0a1e084949dcc2282cbbed33f10ca56d478023bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:50 +0100 Subject: [PATCH 09/34] hw/i386/port92: Add missing 'hw/isa/isa.h' header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TYPE_PORT92 inherits TYPE_ISA_DEVICE, so need to include "hw/isa/isa.h" to get its declarations (currently we indirectly include this header via "hw/i386/pc.h"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/i386/port92.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/port92.c b/hw/i386/port92.c index 1070bfbf36..b25157f6e4 100644 --- a/hw/i386/port92.c +++ b/hw/i386/port92.c @@ -10,6 +10,7 @@ #include "sysemu/runstate.h" #include "migration/vmstate.h" #include "hw/irq.h" +#include "hw/isa/isa.h" #include "hw/i386/pc.h" #include "trace.h" #include "qom/object.h" From 480c9b22330ddf18b11c027857e3c0d54448e027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:51 +0100 Subject: [PATCH 10/34] hw/acpi/cpu_hotplug: Include 'pci_device.h' instead of 'pci.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cpu_hotplug.c only needs the PCI *device* definitions. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/acpi/cpu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index 6f78db0ccb..f7fe905e0a 100644 --- a/hw/acpi/cpu_hotplug.c +++ b/hw/acpi/cpu_hotplug.c @@ -14,7 +14,7 @@ #include "qapi/error.h" #include "hw/core/cpu.h" #include "hw/i386/pc.h" -#include "hw/pci/pci.h" +#include "hw/pci/pci_device.h" #include "qemu/error-report.h" #define CPU_EJECT_METHOD "CPEJ" From a722c0b125037dee7c68c688f681dcfc21522fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 13:01:52 +0100 Subject: [PATCH 11/34] hw/acpi/cpu_hotplug: Include 'x86.h' instead of 'pc.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X86 CPU hotplug isn't specific to PC machines. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/acpi/cpu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index f7fe905e0a..83b8bc5deb 100644 --- a/hw/acpi/cpu_hotplug.c +++ b/hw/acpi/cpu_hotplug.c @@ -13,7 +13,7 @@ #include "hw/acpi/cpu_hotplug.h" #include "qapi/error.h" #include "hw/core/cpu.h" -#include "hw/i386/pc.h" +#include "hw/i386/x86.h" #include "hw/pci/pci_device.h" #include "qemu/error-report.h" From aab4631a4aadf8fc4a5288357bded72aaae686b6 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Thu, 15 Feb 2024 11:15:06 +0200 Subject: [PATCH 12/34] system/physmem: remove redundant arg reassignment Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Reviewed-by: David Hildenbrand Signed-off-by: Michael Tokarev --- system/physmem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index 5e054650b8..e3ebc19eef 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2154,10 +2154,8 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length) * * Called within RCU critical section. */ -void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) +void *qemu_map_ram_ptr(RAMBlock *block, ram_addr_t addr) { - RAMBlock *block = ram_block; - if (block == NULL) { block = qemu_get_ram_block(addr); addr -= block->offset; @@ -2182,10 +2180,9 @@ void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) * * Called within RCU critical section. */ -static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, +static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr, hwaddr *size, bool lock) { - RAMBlock *block = ram_block; if (*size == 0) { return NULL; } From c555b504d0961359015527f586203b6c37ef2bc6 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:08 +0200 Subject: [PATCH 13/34] docs: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Alex Bennée Acked-by: Michael S. Tsirkin Reviewed-by: Michael Tokarev (mjt: trivial fixup) Signed-off-by: Michael Tokarev --- docs/devel/ci-jobs.rst.inc | 2 +- docs/devel/docs.rst | 2 +- docs/devel/testing.rst | 2 +- docs/interop/prl-xml.txt | 2 +- docs/interop/vhost-user.rst | 2 +- docs/system/devices/canokey.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/devel/ci-jobs.rst.inc b/docs/devel/ci-jobs.rst.inc index 4c39cdb2d9..ec33e6ee2b 100644 --- a/docs/devel/ci-jobs.rst.inc +++ b/docs/devel/ci-jobs.rst.inc @@ -147,7 +147,7 @@ Set this variable to 1 to create the pipelines, but leave all the jobs to be manually started from the UI Set this variable to 2 to create the pipelines and run all -the jobs immediately, as was historicaly behaviour +the jobs immediately, as was the historical behaviour QEMU_CI_AVOCADO_TESTING ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/devel/docs.rst b/docs/devel/docs.rst index 50ff0d67f8..a7768b5311 100644 --- a/docs/devel/docs.rst +++ b/docs/devel/docs.rst @@ -21,7 +21,7 @@ are processed in two ways: The syntax of these ``.hx`` files is simple. It is broadly an alternation of C code put into the C output and rST format text -put into the documention. A few special directives are recognised; +put into the documentation. A few special directives are recognised; these are all-caps and must be at the beginning of the line. ``HXCOMM`` is the comment marker. The line, including any arbitrary diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index bd132306c1..aa96eacec5 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -728,7 +728,7 @@ For example to setup the HPPA ports builds of Debian:: EXECUTABLE=(pwd)/qemu-hppa V=1 The ``DEB_`` variables are substitutions used by -``debian-boostrap.pre`` which is called to do the initial debootstrap +``debian-bootstrap.pre`` which is called to do the initial debootstrap of the rootfs before it is copied into the container. The second stage is run as part of the build. The final image will be tagged as ``qemu/debian-sid-hppa``. diff --git a/docs/interop/prl-xml.txt b/docs/interop/prl-xml.txt index 7031f8752c..cf9b3fba26 100644 --- a/docs/interop/prl-xml.txt +++ b/docs/interop/prl-xml.txt @@ -122,7 +122,7 @@ Each Image element has following child elements: * Type - image type of the element. It can be: "Plain" for raw files. "Compressed" for expanding disks. - * File - path to image file. Path can be relative to DiskDecriptor.xml or + * File - path to image file. Path can be relative to DiskDescriptor.xml or absolute. == Snapshots element == diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index ad6e142f23..d1ed39dfa0 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -989,7 +989,7 @@ When reconnecting: #. If ``d.flags`` is not equal to the calculated flags value (means back-end has submitted the buffer to guest driver before crash, so - it has to commit the in-progres update), set ``old_free_head``, + it has to commit the in-progress update), set ``old_free_head``, ``old_used_idx``, ``old_used_wrap_counter`` to ``free_head``, ``used_idx``, ``used_wrap_counter`` diff --git a/docs/system/devices/canokey.rst b/docs/system/devices/canokey.rst index cfa6186e48..7f3664963f 100644 --- a/docs/system/devices/canokey.rst +++ b/docs/system/devices/canokey.rst @@ -14,7 +14,7 @@ CanoKey [1]_ is an open-source secure key with supports of All these platform-independent features are in canokey-core [3]_. For different platforms, CanoKey has different implementations, -including both hardware implementions and virtual cards: +including both hardware implementations and virtual cards: * CanoKey STM32 [4]_ * CanoKey Pigeon [5]_ From 35a5a331e4ff1b63f1e49f63e2f8b851aa54bf0d Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:09 +0200 Subject: [PATCH 14/34] tests: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Pavel Dovgalyuk Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- tests/avocado/acpi-bits/bits-tests/smbios.py2 | 2 +- tests/avocado/mem-addr-space-check.py | 6 +++--- tests/avocado/reverse_debugging.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/avocado/acpi-bits/bits-tests/smbios.py2 b/tests/avocado/acpi-bits/bits-tests/smbios.py2 index fc623de072..5868a7137a 100644 --- a/tests/avocado/acpi-bits/bits-tests/smbios.py2 +++ b/tests/avocado/acpi-bits/bits-tests/smbios.py2 @@ -1060,7 +1060,7 @@ class EventLogDescriptor(unpack.Struct): 0x16: 'Log Area Reset/Cleared', 0x17: 'System boot', xrange(0x18, 0x7F): 'Unused, available for assignment', - xrange(0x80, 0xFE): 'Availalbe for system- and OEM-specific assignments', + xrange(0x80, 0xFE): 'Available for system- and OEM-specific assignments', 0xFF: 'End of log' } yield 'log_type', u.unpack_one('B'), unpack.format_table("{}", _event_log_type_descriptors) diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py index 363c3f12a6..af019969c0 100644 --- a/tests/avocado/mem-addr-space-check.py +++ b/tests/avocado/mem-addr-space-check.py @@ -165,7 +165,7 @@ class MemAddrCheck(QemuSystemTest): For q35-7.0 machines, "above 4G" memory starts are 4G. pci64_hole size is 32 GiB. Since TCG_PHYS_ADDR_BITS is defined to be 40, TCG emulated CPUs have maximum of 1 TiB (1024 GiB) of - directly addressible memory. + directly addressable memory. Hence, maxmem value at most can be 1024 GiB - 4 GiB - 1 GiB per slot for alignment - 32 GiB + 0.5 GiB which is equal to 987.5 GiB. Setting the value to 988 GiB should @@ -190,7 +190,7 @@ class MemAddrCheck(QemuSystemTest): AMD_HT_START is defined to be at 1012 GiB. So for q35 machines version > 7.0 and AMD cpus, instead of 1024 GiB limit for 40 bit processor address space, it has to be 1012 GiB , that is 12 GiB - less than the case above in order to accomodate HT hole. + less than the case above in order to accommodate HT hole. Make sure QEMU fails when maxmem size is 976 GiB (12 GiB less than 988 GiB). """ @@ -297,7 +297,7 @@ class MemAddrCheck(QemuSystemTest): :avocado: tags=arch:x86_64 AMD processor with 41 bits. Max cpu hw address = 2 TiB. - Same as above but by setting maxram beween 976 GiB and 992 Gib, + Same as above but by setting maxram between 976 GiB and 992 Gib, QEMU should start fine. """ self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=41', diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py index 4cce5a5598..92855a02a5 100644 --- a/tests/avocado/reverse_debugging.py +++ b/tests/avocado/reverse_debugging.py @@ -191,7 +191,7 @@ class ReverseDebugging(LinuxKernelTest): self.check_pc(g, steps[-1]) logger.info('successfully reached %x' % steps[-1]) - logger.info('exitting gdb and qemu') + logger.info('exiting gdb and qemu') vm.shutdown() class ReverseDebugging_X86_64(ReverseDebugging): From 431eddb69ac658b2b25e07239d5e01c25712f5e8 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:11 +0200 Subject: [PATCH 15/34] accel/tcg: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- accel/tcg/ldst_atomicity.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/ldst_atomicity.c.inc b/accel/tcg/ldst_atomicity.c.inc index 33a04dec52..97dae70d53 100644 --- a/accel/tcg/ldst_atomicity.c.inc +++ b/accel/tcg/ldst_atomicity.c.inc @@ -76,7 +76,7 @@ static int required_atomicity(CPUState *cpu, uintptr_t p, MemOp memop) /* * Examine the alignment of p to determine if there are subobjects * that must be aligned. Note that we only really need ctz4() -- - * any more sigificant bits are discarded by the immediately + * any more significant bits are discarded by the immediately * following comparison. */ tmp = ctz32(p); From a1b93551649379553f3597f69f0370502a8872f5 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:12 +0200 Subject: [PATCH 16/34] loongson3: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/mips/loongson3_bootp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/loongson3_bootp.h b/hw/mips/loongson3_bootp.h index d525ab745a..1b0dd3b591 100644 --- a/hw/mips/loongson3_bootp.h +++ b/hw/mips/loongson3_bootp.h @@ -25,7 +25,7 @@ struct efi_memory_map_loongson { uint16_t vers; /* version of efi_memory_map */ uint32_t nr_map; /* number of memory_maps */ - uint32_t mem_freq; /* memory frequence */ + uint32_t mem_freq; /* memory frequency */ struct mem_map { uint32_t node_id; /* node_id which memory attached to */ uint32_t mem_type; /* system memory, pci memory, pci io, etc. */ @@ -156,7 +156,7 @@ struct board_devices { struct loongson_special_attribute { uint16_t vers; /* version of this special */ - char special_name[64]; /* special_atribute_name */ + char special_name[64]; /* special_attribute_name */ uint32_t loongson_special_type; /* type of special device */ /* for each device's resource */ struct resource_loongson resource[MAX_RESOURCE_NUMBER]; From 2bd55fd394067133e256b3b0326a2ee7854b7f1c Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:13 +0200 Subject: [PATCH 17/34] ppc: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev (mjt: remove 2 "arbitrer" hunks, suggested by BALATON) Signed-off-by: Michael Tokarev --- target/ppc/translate/vmx-impl.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc index 4b91c3489d..b56e615c24 100644 --- a/target/ppc/translate/vmx-impl.c.inc +++ b/target/ppc/translate/vmx-impl.c.inc @@ -1183,7 +1183,7 @@ static void glue(gen_, name)(DisasContext *ctx) \ /* * Support for Altivec instructions that use bit 31 (Rc) as an opcode - * bit but also use bit 21 as an actual Rc bit. In general, thse pairs + * bit but also use bit 21 as an actual Rc bit. In general, these pairs * come from different versions of the ISA, so we must also support a * pair of flags for each instruction. */ From 8b68e0e731b78501a65992d8bd6c83bde0e7c981 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:14 +0200 Subject: [PATCH 18/34] sh4: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/sh4/sh7750_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sh4/sh7750_regs.h b/hw/sh4/sh7750_regs.h index edb5d18f00..946ad7b3aa 100644 --- a/hw/sh4/sh7750_regs.h +++ b/hw/sh4/sh7750_regs.h @@ -172,7 +172,7 @@ /* - * Exeption-related registers + * Exception-related registers */ /* Immediate data for TRAPA instruction - TRA */ From 2432e063cb98a23cfa61c9ef79e88bcf8ace0e8c Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:15 +0200 Subject: [PATCH 19/34] include/exec/memory.h: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- include/exec/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 177be23db7..8626a355b3 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3146,7 +3146,7 @@ int ram_block_discard_require(bool state); /* * See ram_block_discard_require(): only inhibit technologies that disable - * uncoordinated discarding of pages in RAM blocks, allowing co-existance with + * uncoordinated discarding of pages in RAM blocks, allowing co-existence with * technologies that only inhibit uncoordinated discards (via the * RamDiscardManager). */ From c3aa4206fc5b5243632d58b8b8680ea068cf79ae Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:17 +0200 Subject: [PATCH 20/34] hw/arm/omap.h: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev (mjt: fix comment style as suggested by Philippe) Signed-off-by: Michael Tokarev --- include/hw/arm/omap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 067e9419f7..40ee8ea9e5 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -1008,7 +1008,8 @@ void omap_mpu_wakeup(void *opaque, int irq, int req); __func__, paddr) /* OMAP-specific Linux bootloader tags for the ATAG_BOARD area - (Board-specifc tags are not here) */ + * (Board-specific tags are not here) + */ #define OMAP_TAG_CLOCK 0x4f01 #define OMAP_TAG_MMC 0x4f02 #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 From c3df8c3084644d327b5007ff92e479d38b9a3050 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:18 +0200 Subject: [PATCH 21/34] hw/cxl/cxl_device.h: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- include/hw/cxl/cxl_device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/cxl/cxl_device.h b/include/hw/cxl/cxl_device.h index d8e184c4ba..279b276bda 100644 --- a/include/hw/cxl/cxl_device.h +++ b/include/hw/cxl/cxl_device.h @@ -268,7 +268,7 @@ void cxl_event_set_status(CXLDeviceState *cxl_dstate, CXLEventLogType log_type, /* * Helper macro to initialize capability headers for CXL devices. * - * In CXL r3.1 Section 8.2.8.2: CXL Device Capablity Header Register, this is + * In CXL r3.1 Section 8.2.8.2: CXL Device Capability Header Register, this is * listed as a 128b register, but in CXL r3.1 Section 8.2.8: CXL Device Register * Interface, it says: * > No registers defined in Section 8.2.8 are larger than 64-bits wide so that @@ -276,7 +276,7 @@ void cxl_event_set_status(CXLDeviceState *cxl_dstate, CXLEventLogType log_type, * > followed, the behavior is undefined. * * > To illustrate how the fields fit together, the layouts ... are shown as - * > wider than a 64 bit register. Implemenations are expected to use any size + * > wider than a 64 bit register. Implementations are expected to use any size * > accesses for this information up to 64 bits without lost of functionality * * Here we've chosen to make it 4 dwords. From 8fcc477d494961a6e7759753146de8074c124d44 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:19 +0200 Subject: [PATCH 22/34] hw/net/npcm_gmac.h: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- include/hw/net/npcm_gmac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/net/npcm_gmac.h b/include/hw/net/npcm_gmac.h index f2d9f08ec1..6340ffe92c 100644 --- a/include/hw/net/npcm_gmac.h +++ b/include/hw/net/npcm_gmac.h @@ -81,7 +81,7 @@ struct NPCMGMACRxDesc { /* Disable Interrupt on Completion */ #define RX_DESC_RDES1_DIS_INTR_COMP_MASK BIT(31) -/* Recieve end of ring */ +/* Receive end of ring */ #define RX_DESC_RDES1_RC_END_RING_MASK BIT(25) /* Second Address Chained */ #define RX_DESC_RDES1_SEC_ADDR_CHND_MASK BIT(24) @@ -213,7 +213,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(NPCMGMACState, NPCM_GMAC) #define NPCM_DMA_STATUS_FBI BIT(13) /* Early transmit Interrupt */ #define NPCM_DMA_STATUS_ETI BIT(10) -/* Receive Watchdog Timout */ +/* Receive Watchdog Timeout */ #define NPCM_DMA_STATUS_RWT BIT(9) /* Receive Process Stopped */ #define NPCM_DMA_STATUS_RPS BIT(8) From b1470a14b3f17f16be1d10b96dc7b1480ca6bab0 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:20 +0200 Subject: [PATCH 23/34] hw/riscv/virt.h: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Alistair Francis Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- include/hw/riscv/virt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index f89790fd58..3db839160f 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -144,13 +144,13 @@ uint32_t imsic_num_bits(uint32_t count); #define VIRT_IMSIC_GROUP_MAX_SIZE (1U << IMSIC_MMIO_GROUP_MIN_SHIFT) #if VIRT_IMSIC_GROUP_MAX_SIZE < \ IMSIC_GROUP_SIZE(VIRT_CPUS_MAX_BITS, VIRT_IRQCHIP_MAX_GUESTS_BITS) -#error "Can't accomodate single IMSIC group in address space" +#error "Can't accommodate single IMSIC group in address space" #endif #define VIRT_IMSIC_MAX_SIZE (VIRT_SOCKETS_MAX * \ VIRT_IMSIC_GROUP_MAX_SIZE) #if 0x4000000 < VIRT_IMSIC_MAX_SIZE -#error "Can't accomodate all IMSIC groups in address space" +#error "Can't accommodate all IMSIC groups in address space" #endif #endif From a0e93dd8185a055cb44255d2cde50cd762d0c728 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:21 +0200 Subject: [PATCH 24/34] pc-bios/README: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- pc-bios/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/README b/pc-bios/README index 4189bb28cc..b8a0210d24 100644 --- a/pc-bios/README +++ b/pc-bios/README @@ -67,7 +67,7 @@ and enable the use of well-known bootloaders such as U-Boot. OpenSBI is distributed under the terms of the BSD 2-clause license ("Simplified BSD License" or "FreeBSD License", SPDX: BSD-2-Clause). OpenSBI - source code also contains code reused from other projects desribed here: + source code also contains code reused from other projects described here: https://github.com/riscv/opensbi/blob/master/ThirdPartyNotices.md. - npcm7xx_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for Nuvoton From af113f6f007d5638573b0ef538a483bff6017eed Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:22 +0200 Subject: [PATCH 25/34] qapi/ui: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Markus Armbruster Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- qapi/ui.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index b6d7e142b7..1448eaca73 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -63,7 +63,7 @@ ## # @SetPasswordOptionsVnc: # -# Options for set_password specific to the VNC procotol. +# Options for set_password specific to the VNC protocol. # # @display: The id of the display where the password should be # changed. Defaults to the first. @@ -125,7 +125,7 @@ ## # @ExpirePasswordOptionsVnc: # -# Options for expire_password specific to the VNC procotol. +# Options for expire_password specific to the VNC protocol. # # @display: The id of the display where the expiration should be # changed. Defaults to the first. From 835f364ed963d855596395fa68ed5246d9f11a83 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:23 +0200 Subject: [PATCH 26/34] qemu-options.hx: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 8547254dbf..9be1e5817c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2468,7 +2468,7 @@ SRST ``to=L`` With this option, QEMU will try next available VNC displays, - until the number L, if the origianlly defined "-vnc display" is + until the number L, if the originally defined "-vnc display" is not available, e.g. port 5900+display is already used by another application. By default, to=0. @@ -5511,7 +5511,7 @@ SRST -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0 -object iothread,id=iothread1 - -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,notify_dev=nofity_way,iothread=iothread1 + -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,notify_dev=notify_way,iothread=iothread1 secondary: -netdev tap,id=hn0,vhost=off From a062f7f9ecb6754b5f54e350809401c5cf7529f8 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:24 +0200 Subject: [PATCH 27/34] ci/gitlab-pipeline-status: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- scripts/ci/gitlab-pipeline-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab-pipeline-status b/scripts/ci/gitlab-pipeline-status index e3343b0510..39f3c22c66 100755 --- a/scripts/ci/gitlab-pipeline-status +++ b/scripts/ci/gitlab-pipeline-status @@ -131,7 +131,7 @@ def create_parser(): 'checks of the pipeline status. Defaults ' 'to %(default)s')) parser.add_argument('-w', '--wait', action='store_true', default=False, - help=('Wether to wait, instead of checking only once ' + help=('Whether to wait, instead of checking only once ' 'the status of a pipeline')) parser.add_argument('-p', '--project-id', type=int, default=11167699, help=('The GitLab project ID. Defaults to the project ' From 5c192aa98254f130d3e75cedf5dadfd4b01f4a87 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:25 +0200 Subject: [PATCH 28/34] hexagon: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- target/hexagon/idef-parser/macros.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hexagon/idef-parser/macros.inc b/target/hexagon/idef-parser/macros.inc index 7478d4db17..94975d9583 100644 --- a/target/hexagon/idef-parser/macros.inc +++ b/target/hexagon/idef-parser/macros.inc @@ -127,5 +127,5 @@ /* Include fHIDE macros which hide type declarations */ #define fHIDE(A) A -/* Purge non-relavant parts */ +/* Purge non-relevant parts */ #define fBRANCH_SPECULATE_STALL(A, B, C, D, E) From c2ca6c9ca177753ca76c82fc7ed53926a3172783 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:26 +0200 Subject: [PATCH 29/34] m68k: correct typos Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev (mjt: trivial fixup "covers" suggested by Thomas) Signed-off-by: Michael Tokarev --- target/m68k/cpu.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index aca4aa610b..646cacbdf1 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -478,10 +478,11 @@ void do_m68k_semihosting(CPUM68KState *env, int nr); * The 68000 family is defined in six main CPU classes, the 680[012346]0. * Generally each successive CPU adds enhanced data/stack/instructions. * However, some features are only common to one, or a few classes. - * The features covers those subsets of instructons. + * The features cover those subsets of instructions. * - * CPU32/32+ are basically 680010 compatible with some 68020 class instructons, - * and some additional CPU32 instructions. Mostly Supervisor state differences. + * CPU32/32+ are basically 680010 compatible with some 68020 class + * instructions, and some additional CPU32 instructions. Mostly Supervisor + * state differences. * * The ColdFire core ISA is a RISC-style reduction of the 68000 series cpu. * There are 4 ColdFire core ISA revisions: A, A+, B and C. From 52a56ed2166cad644da3c9b5c2089fe5a2babc0d Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:27 +0200 Subject: [PATCH 30/34] s390x: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- target/s390x/cpu_features_def.h.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu_features_def.h.inc b/target/s390x/cpu_features_def.h.inc index e68da9b8ff..c53ac13352 100644 --- a/target/s390x/cpu_features_def.h.inc +++ b/target/s390x/cpu_features_def.h.inc @@ -142,7 +142,7 @@ DEF_FEAT(SIE_CEI, "cei", SCLP_CPU, 43, "SIE: Conditional-external-interception f /* * Features exposed via no feature bit (but e.g., instruction sensing) - * -> the feature bit number is irrelavant + * -> the feature bit number is irrelevant */ DEF_FEAT(DAT_ENH_2, "dateh2", MISC, 0, "DAT-enhancement facility 2") DEF_FEAT(CMM, "cmm", MISC, 0, "Collaborative-memory-management facility") From 690f50c27d6046f3f34e059ee8e8944eae1b7390 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Feb 2024 10:52:28 +0200 Subject: [PATCH 31/34] target/sparc: correct typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct typos automatically found with the `typos` tool Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- target/sparc/asi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/sparc/asi.h b/target/sparc/asi.h index 3270ed0c7f..a66829674b 100644 --- a/target/sparc/asi.h +++ b/target/sparc/asi.h @@ -145,14 +145,14 @@ * and later ASIs. */ #define ASI_REAL 0x14 /* Real address, cacheable */ -#define ASI_PHYS_USE_EC 0x14 /* PADDR, E-cachable */ -#define ASI_REAL_IO 0x15 /* Real address, non-cachable */ +#define ASI_PHYS_USE_EC 0x14 /* PADDR, E-cacheable */ +#define ASI_REAL_IO 0x15 /* Real address, non-cacheable */ #define ASI_PHYS_BYPASS_EC_E 0x15 /* PADDR, E-bit */ #define ASI_BLK_AIUP_4V 0x16 /* (4V) Prim, user, block ld/st */ #define ASI_BLK_AIUS_4V 0x17 /* (4V) Sec, user, block ld/st */ #define ASI_REAL_L 0x1c /* Real address, cacheable, LE */ -#define ASI_PHYS_USE_EC_L 0x1c /* PADDR, E-cachable, little endian*/ -#define ASI_REAL_IO_L 0x1d /* Real address, non-cachable, LE */ +#define ASI_PHYS_USE_EC_L 0x1c /* PADDR, E-cacheable, little endian*/ +#define ASI_REAL_IO_L 0x1d /* Real address, non-cacheable, LE */ #define ASI_PHYS_BYPASS_EC_E_L 0x1d /* PADDR, E-bit, little endian */ #define ASI_BLK_AIUP_L_4V 0x1e /* (4V) Prim, user, block, l-endian*/ #define ASI_BLK_AIUS_L_4V 0x1f /* (4V) Sec, user, block, l-endian */ From 04b86ccb5dc8a1fad809753cfbaafd4bb13283d4 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 16 Feb 2024 10:16:21 +0100 Subject: [PATCH 32/34] hw/hppa/Kconfig: Fix building with "configure --without-default-devices" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with: /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function `machine_HP_common_init_tail': hw/hppa/machine.c:399: undefined reference to `usb_bus_find' /usr/bin/ld: hw/hppa/machine.c:399: undefined reference to `usb_create_simple' /usr/bin/ld: hw/hppa/machine.c:400: undefined reference to `usb_bus_find' /usr/bin/ld: hw/hppa/machine.c:400: undefined reference to `usb_create_simple' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:162: run-ninja] Error 1 And after fixing this, the qemu-system-hppa binary refuses to run due to the missing 'pci-ohci' and 'pci-serial' devices. Let's add the right config switches to fix these problems. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/hppa/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig index ff8528aaa8..dff5df7f72 100644 --- a/hw/hppa/Kconfig +++ b/hw/hppa/Kconfig @@ -7,6 +7,7 @@ config HPPA_B160L select DINO select LASI select SERIAL + select SERIAL_PCI select ISA_BUS select I8259 select IDE_CMD646 @@ -16,3 +17,4 @@ config HPPA_B160L select LASIPS2 select PARALLEL select ARTIST + select USB_OHCI_PCI From 4a20ac400ff0753f159071764826b20e5320cde9 Mon Sep 17 00:00:00 2001 From: Tianlan Zhou Date: Thu, 22 Feb 2024 03:52:09 +0800 Subject: [PATCH 33/34] docs/system: Update description for input grab key Input grab key should be Ctrl-Alt-g, not just Ctrl-Alt. Fixes: f8d2c9369b ("sdl: use ctrl-alt-g as grab hotkey") Signed-off-by: Tianlan Zhou Reviewed-by: Thomas Huth Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- docs/system/keys.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc index 2e2c97aa23..59966a3fe7 100644 --- a/docs/system/keys.rst.inc +++ b/docs/system/keys.rst.inc @@ -29,7 +29,7 @@ Ctrl-Alt-n *3* Serial port -Ctrl-Alt +Ctrl-Alt-g Toggle mouse and keyboard grab. In the virtual consoles, you can use Ctrl-Up, Ctrl-Down, Ctrl-PageUp and From 185311130f54ead75c407cdf83004d575829b5d2 Mon Sep 17 00:00:00 2001 From: Tianlan Zhou Date: Thu, 22 Feb 2024 03:52:10 +0800 Subject: [PATCH 34/34] system/vl: Update description for input grab key Input grab key should be Ctrl-Alt-g, not just Ctrl-Alt. Fixes: f8d2c9369b ("sdl: use ctrl-alt-g as grab hotkey") Signed-off-by: Tianlan Zhou Reviewed-by: Thomas Huth Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- system/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/vl.c b/system/vl.c index a82555ae15..b8469d9965 100644 --- a/system/vl.c +++ b/system/vl.c @@ -891,7 +891,7 @@ static void help(int exitcode) printf("\nDuring emulation, the following keys are useful:\n" "ctrl-alt-f toggle full screen\n" "ctrl-alt-n switch to virtual console 'n'\n" - "ctrl-alt toggle mouse and keyboard grab\n" + "ctrl-alt-g toggle mouse and keyboard grab\n" "\n" "When using -nographic, press 'ctrl-a h' to get some help.\n" "\n"