Misc patches for 2024-06-18
The following changes since commit 900536d3e97aed7fdd9cb4dadd3bf7023360e819:
Merge tag 'dirtylimit-dirtyrate-pull-request-20240617' of https://github.com/newfriday/qemu into staging (2024-06-17 11:40:24 -0700)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/misc-20240618
for you to fetch changes up to 02ad1f5b04bf2941852f405c87535307365f7041:
ui+display: rename is_buffer_shared() -> surface_is_allocated() (2024-06-18 17:54:40 +0200)
Spurious warning (3 times):
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
Deliberately ignored in ui/ (also 3 times):
WARNING: line over 80 characters
----------------------------------------------------------------
Misc patches queue
. Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil)
. Always use little endian audio format in virtio-snd (Phil)
. Avoid using Monitor in INTERRUPT_STATS_PROVIDER::print_info (Phil) . Introduce x-query-interrupt-controllers QMP command (Phil)
. Introduce pnv_chip_foreach_cpu() to remove one CPU_FOREACH use (Cédric) . Set arm_v7m_tcg_ops::cpu_exec_halt & mandate TCGCPUOps::cpu_exec_halt (Peter) . Constify few uses of IOMMUTLBEvent (Phil)
. Wire loongson_ipi device to loongson3_virt/TCG (Jiaxun)
. Fix inclusion of tracing headers on s390x/TCG (Phil)
. Add few shortcuts missing to readline (Manos)
. Update ui/display entries in MAINTAINERS (Gerd)
. Use qemu_add_mouse_change_notifier on Cocoa (Akihiko)
. Fix Standard VGA screen blanking and cleanups (Gerd)
. Fix USB/MTP reported "free space" value (Fabio)
----------------------------------------------------------------
Akihiko Odaki (1):
ui/cocoa: Use qemu_add_mouse_change_notifier
Cédric Le Goater (1):
ppc/pnv: Introduce pnv_chip_foreach_cpu()
Fabio D'Urso (1):
hw/usb/dev-mtp: Correctly report free space
Gerd Hoffmann (5):
MAINTAINERS: drop virtio-gpu maintainership
MAINTAINERS: drop spice+ui maintainership
stdvga: fix screen blanking
ui+display: rename is_placeholder() -> surface_is_placeholder() ui+display: rename is_buffer_shared() -> surface_is_allocated()
Jiaxun Yang (4):
hw/intc: Remove loongarch_ipi.c hw/intc/loongson_ipi: Provide per core MMIO address spaces hw/intc/loongson_ipi: Replace ipi_getcpu with cpu_by_arch_id hw/mips/loongson3_virt: Wire up loongson_ipi device
Manos Pitsidianakis (3):
util/readline: Fix lints for readline_handle_byte util/readline: Add C-n, C-p shortcuts util/readline: Add C-u shortcut
Peter Maydell (3):
target/arm: Set arm_v7m_tcg_ops cpu_exec_halt to arm_cpu_exec_halt()
target: Set TCGCPUOps::cpu_exec_halt to target's has_work
implementation
accel/tcg: Make TCGCPUOps::cpu_exec_halt mandatory
Philippe Mathieu-Daudé (58):
hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size hw/acpi/ich9: Remove 'memory-hotplug-support' property hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() hw/mem/memory-device: Remove legacy_align from
memory_device_pre_plug()
hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob hw/i386/pc: Remove PCMachineClass::rsdp_in_ram hw/i386/acpi: Remove AcpiBuildState::rsdp field hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro target/i386: Remove X86CPU::kvm_no_smi_migration field hw/i386/pc: Replace PCMachineClass::acpi_data_size by
PC_ACPI_DATA_SIZE
hw/audio/virtio-snd: Always use little endian audio format hw/ppc: Avoid using Monitor in pnv_phb3_msi_pic_print_info() hw/ppc: Avoid using Monitor in icp_pic_print_info() hw/ppc: Avoid using Monitor in xive_tctx_pic_print_info() hw/ppc: Avoid using Monitor in ics_pic_print_info() hw/ppc: Avoid using Monitor in PnvChipClass::intc_print_info() hw/ppc: Avoid using Monitor in xive_end_queue_pic_print_info() hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info() hw/ppc: Avoid using Monitor in spapr_xive_pic_print_info() hw/ppc: Avoid using Monitor in xive_source_pic_print_info() hw/ppc: Avoid using Monitor in pnv_phb4_pic_print_info() hw/ppc: Avoid using Monitor in xive_eas_pic_print_info() hw/ppc: Avoid using Monitor in xive_end_pic_print_info() hw/ppc: Avoid using Monitor in xive_end_eas_pic_print_info() hw/ppc: Avoid using Monitor in xive_nvt_pic_print_info() hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info() hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info() hw/ppc: Avoid using Monitor in xive2_eas_pic_print_info() hw/ppc: Avoid using Monitor in xive2_end_eas_pic_print_info() hw/ppc: Avoid using Monitor in xive2_end_queue_pic_print_info() hw/ppc: Avoid using Monitor in xive2_end_pic_print_info() hw/ppc: Avoid using Monitor in xive2_nvp_pic_print_info() hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info() hw/ppc: Avoid using Monitor in
SpaprInterruptControllerClass::print_info()
hw/ppc: Avoid using Monitor in spapr_irq_print_info() hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child() hw/ppc: Avoid using Monitor in pic_print_info()
hw/intc: Avoid using Monitor in INTERRUPT_STATS_PROVIDER::print_info() hw/intc: Introduce x-query-interrupt-controllers QMP command
memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one()
memory: Constify IOMMUTLBEvent in memory_region_notify_iommu() hw/i386/iommu: Constify IOMMUTLBEvent in vtd_page_walk_hook prototype hw/usb: Remove unused 'host.h' header
hw/s390x: Introduce s390_skeys_get|set() helpers target/s390x: Use s390_skeys_get|set() helper
MAINTAINERS | 8 +- docs/about/deprecated.rst | 4 +- docs/about/removed-features.rst | 2 +- qapi/machine.json | 17 ++ hw/mips/loongson3_bootp.h | 3 + hw/usb/hcd-xhci.h | 4 +- hw/usb/host.h | 44 ---- include/exec/memory.h | 4 +- include/hw/core/tcg-cpu-ops.h | 9 +- include/hw/firmware/smbios.h | 3 +- include/hw/i386/pc.h | 22 -- include/hw/intc/intc.h | 2 +- include/hw/intc/loongson_ipi.h | 2 + include/hw/mem/memory-device.h | 2 +- include/hw/mem/pc-dimm.h | 3 +- include/hw/pci-host/pnv_phb3.h | 2 +- include/hw/pci-host/pnv_phb4.h | 2 +- include/hw/ppc/pnv_chip.h | 4 +- include/hw/ppc/pnv_psi.h | 2 +- include/hw/ppc/pnv_xive.h | 4 +- include/hw/ppc/spapr_irq.h | 4 +- include/hw/ppc/xics.h | 4 +- include/hw/ppc/xive.h | 4 +- include/hw/ppc/xive2_regs.h | 8 +- include/hw/ppc/xive_regs.h | 8 +- include/hw/s390x/storage-keys.h | 10 + include/ui/surface.h | 6 +- target/arm/internals.h | 3 + target/i386/cpu.h | 3 - target/i386/kvm/kvm-cpu.h | 41 --- target/riscv/internals.h | 3 + accel/tcg/cpu-exec.c | 12 +- hw/acpi/ich9.c | 46 +--- hw/arm/virt.c | 5 +- hw/audio/virtio-snd.c | 2 +- hw/core/machine-qmp-cmds.c | 29 +++ hw/display/qxl-render.c | 2 +- hw/display/vga.c | 25 +- hw/display/xenfb.c | 5 +- hw/i386/acpi-build.c | 96 +------ hw/i386/fw_cfg.c | 3 +- hw/i386/intel_iommu.c | 8 +- hw/i386/pc.c | 107 ++------ hw/i386/pc_piix.c | 171 +++---------- hw/intc/goldfish_pic.c | 8 +- hw/intc/i8259_common.c | 14 +- hw/intc/ioapic_common.c | 57 ++--- hw/intc/loongarch_ipi.c | 347 -------------------------- hw/intc/loongson_ipi.c | 125 +++++----- hw/intc/m68k_irqc.c | 5 +- hw/intc/pnv_xive.c | 38 +-- hw/intc/pnv_xive2.c | 48 ++-- hw/intc/slavio_intctl.c | 11 +- hw/intc/spapr_xive.c | 41 ++- hw/intc/xics.c | 25 +- hw/intc/xics_spapr.c | 7 +- hw/intc/xive.c | 108 ++++---- hw/intc/xive2.c | 87 ++++--- hw/loongarch/virt.c | 4 +- hw/mem/memory-device.c | 12 +- hw/mem/pc-dimm.c | 6 +- hw/mips/loongson3_bootp.c | 2 - hw/mips/loongson3_virt.c | 39 ++- hw/pci-host/pnv_phb3_msi.c | 21 +- hw/pci-host/pnv_phb4.c | 17 +- hw/ppc/pnv.c | 96 ++++--- hw/ppc/pnv_psi.c | 9 +- hw/ppc/spapr.c | 13 +- hw/ppc/spapr_irq.c | 4 +- hw/riscv/virt.c | 2 +- hw/s390x/s390-skeys.c | 27 ++ hw/smbios/smbios.c | 13 +- hw/usb/dev-mtp.c | 2 +- hw/usb/hcd-xhci-nec.c | 4 - hw/usb/hcd-xhci-pci.c | 4 +- hw/usb/hcd-xhci.c | 42 +--- hw/virtio/virtio-md-pci.c | 2 +- monitor/hmp-cmds.c | 27 -- system/memory.c | 6 +- target/alpha/cpu.c | 1 + target/arm/cpu.c | 2 +- target/arm/tcg/cpu-v7m.c | 1 + target/avr/cpu.c | 1 + target/cris/cpu.c | 2 + target/hppa/cpu.c | 1 + target/i386/cpu.c | 2 - target/i386/kvm/kvm-cpu.c | 3 +- target/i386/kvm/kvm.c | 7 +- target/loongarch/cpu.c | 1 + target/m68k/cpu.c | 1 + target/microblaze/cpu.c | 1 + target/mips/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/ppc/cpu_init.c | 2 + target/riscv/cpu.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 + target/rx/cpu.c | 1 + target/s390x/cpu.c | 1 + target/s390x/mmu_helper.c | 11 +- target/s390x/tcg/mem_helper.c | 16 +- target/sh4/cpu.c | 1 + target/sparc/cpu.c | 1 + target/xtensa/cpu.c | 1 + ui/console.c | 3 +- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- util/readline.c | 35 ++- hmp-commands-info.hx | 2 +- hw/mips/Kconfig | 1 + hw/s390x/trace-events | 4 + target/s390x/trace-events | 4 - tests/avocado/mem-addr-space-check.py | 9 +- ui/cocoa.m | 62 +++-- 113 files changed, 782 insertions(+), 1426 deletions(-) delete mode 100644 hw/usb/host.h delete mode 100644 target/i386/kvm/kvm-cpu.h delete mode 100644 hw/intc/loongarch_ipi.c
Signature · 1 line
2.41.0
[PULL 04/76] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag
XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify various functions in hcd-xhci.c.
Message-Id: <[email protected]>
--- hw/usb/hcd-xhci.h | 3 +-- hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 1 - hw/usb/hcd-xhci.c | 42 ++++++++---------------------------------- 4 files changed, 9 insertions(+), 39 deletions(-)
hw/usb/hcd-xhci.h +1 -2
@@ -36,8 +36,7 @@ typedef struct XHCIStreamContext XHCIStreamContext;typedef struct XHCIEPContext XHCIEPContext ;enum xhci_flags { -XHCI_FLAG_SS_FIRST =1 , -XHCI_FLAG_ENABLE_STREAMS , +XHCI_FLAG_ENABLE_STREAMS =1 , }; typedef enum TRBType {
hw/usb/hcd-xhci-nec.c +0 -2
@@ -41,8 +41,6 @@ struct XHCINecState {static Property nec_xhci_properties[] = {DEFINE_PROP_ON_OFF_AUTO ("msi" , XHCIPciState, msi,ON_OFF_AUTO_AUTO ),DEFINE_PROP_ON_OFF_AUTO ("msix" , XHCIPciState, msix,ON_OFF_AUTO_AUTO ), -DEFINE_PROP_BIT ("superspeed-ports-first" , XHCINecState, flags, -XHCI_FLAG_SS_FIRST , true),DEFINE_PROP_UINT32 ("intrs" , XHCINecState, intrs,XHCI_MAXINTRS ),DEFINE_PROP_UINT32 ("slots" , XHCINecState, slots,XHCI_MAXSLOTS ),DEFINE_PROP_END_OF_LIST (),
hw/usb/hcd-xhci-pci.c +0 -1
@@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj) s->msix =ON_OFF_AUTO_AUTO ; xhci->numintrs =XHCI_MAXINTRS ; xhci->numslots =XHCI_MAXSLOTS ; -xhci_set_flag (xhci,XHCI_FLAG_SS_FIRST ); }static const TypeInfo qemu_xhci_info = {
hw/usb/hcd-xhci.c +8 -34
74 lines not on this page · raw message
Signature · 1 line
2.41.0
[PULL 05/76] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size
In reply to Philippe Mathieu-DaudéPCMachineClass::legacy_acpi_table_size was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify acpi_build().
Message-Id: <[email protected]>
--- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 63 +++++++++----------------------------------- 2 files changed, 12 insertions(+), 52 deletions(-)
include/hw/i386/pc.h +0 -1
@@ -103,7 +103,6 @@ struct PCMachineClass {/* ACPI compat: */ bool has_acpi_build;bool rsdp_in_ram; -int legacy_acpi_table_size;unsigned acpi_data_size;int pci_root_uid;
hw/i386/acpi-build.c +12 -51
100 lines not on this page · raw message
Signature · 1 line
2.41.0
[PULL 10/76] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded
In reply to Philippe Mathieu-DaudéPCMachineClass::smbios_uuid_encoded was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true, remove it.
Message-Id: <[email protected]>
--- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 3 +-- hw/i386/pc.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)
include/hw/i386/pc.h +0 -1
@@ -109,7 +109,6 @@ struct PCMachineClass {/* SMBIOS compat: */ bool smbios_defaults;bool smbios_legacy_mode; -bool smbios_uuid_encoded;SmbiosEntryPointType default_smbios_ep_type;/* RAM / address space compat: */
hw/i386/fw_cfg.c +1 -2
@@ -63,8 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,if (pcmc->smbios_defaults) {/* These values are guest ABI, do not change */ -smbios_set_defaults ("QEMU" , mc->desc, mc->name, - pcmc->smbios_uuid_encoded); +smbios_set_defaults ("QEMU" , mc->desc, mc->name, true); }/* tell smbios about cpuid version and features */
hw/i386/pc.c +0 -1
@@ -1796,7 +1796,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_acpi_build = true; pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; - pcmc->smbios_uuid_encoded = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_aligned_dimm = true;
Signature · 1 line
2.41.0
[PULL 06/76] hw/acpi/ich9: Remove 'memory-hotplug-support' property
In reply to Philippe Mathieu-DaudéNo external code sets the 'memory-hotplug-support' property, remove it.
Message-Id: <[email protected]>
--- hw/acpi/ich9.c | 18 ------------------ 1 file changed, 18 deletions(-)
hw/acpi/ich9.c +0 -18
@@ -351,21 +351,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,visit_type_uint32 (v, name, &value, errp); } -static bool ich9_pm_get_memory_hotplug_support (Object *obj,Error **errp) -{ -ICH9LPCState *s =ICH9_LPC_DEVICE (obj); - -return s->pm.acpi_memory_hotplug.is_enabled; -} - -static void ich9_pm_set_memory_hotplug_support (Object *obj,bool value, -Error **errp) -{ -ICH9LPCState *s =ICH9_LPC_DEVICE (obj); - - s->pm.acpi_memory_hotplug.is_enabled = value; -} -static bool ich9_pm_get_cpu_hotplug_legacy (Object *obj,Error **errp) {ICH9LPCState *s =ICH9_LPC_DEVICE (obj);
@@ -445,9 +430,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) NULL, NULL, pm);object_property_add_uint32_ptr (obj,ACPI_PM_PROP_GPE0_BLK_LEN , &gpe0_len,OBJ_PROP_FLAG_READ ); -object_property_add_bool (obj,"memory-hotplug-support" , - ich9_pm_get_memory_hotplug_support, - ich9_pm_set_memory_hotplug_support);object_property_add_bool (obj,"cpu-hotplug-legacy" , ich9_pm_get_cpu_hotplug_legacy, ich9_pm_set_cpu_hotplug_legacy);
Signature · 1 line
2.41.0
[PULL 14/76] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
In reply to Philippe Mathieu-Daudé'legacy_align' is always NULL, remove it.
Message-Id: <[email protected]>
--- include/hw/mem/pc-dimm.h | 3 +-- hw/arm/virt.c | 2 +- hw/i386/pc.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/pc-dimm.c | 6 ++---- hw/ppc/spapr.c | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-)
include/hw/mem/pc-dimm.h +1 -2
@@ -66,8 +66,7 @@ struct PCDIMMDeviceClass { void (*unrealize)(PCDIMMDevice *dimm); }; -void pc_dimm_pre_plug (PCDIMMDevice *dimm,MachineState *machine, -const uint64_t *legacy_align,Error **errp); +void pc_dimm_pre_plug (PCDIMMDevice *dimm,MachineState *machine,Error **errp);void pc_dimm_plug (PCDIMMDevice *dimm,MachineState *machine);void pc_dimm_unplug (PCDIMMDevice *dimm,MachineState *machine);#endif
hw/arm/virt.c +1 -1
@@ -2763,7 +2763,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,return ; } -pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev),NULL , errp); +pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev), errp); } static void virt_memory_plug(HotplugHandler *hotplug_dev,
hw/i386/pc.c +1 -1
@@ -1327,7 +1327,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,return ; } -pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev),NULL , errp); +pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev), errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev,
hw/loongarch/virt.c +1 -1
@@ -1245,7 +1245,7 @@ static bool memhp_type_supported(DeviceState *dev)static void virt_mem_pre_plug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { -pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev),NULL , errp); +pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev), errp); } static void virt_device_pre_plug(HotplugHandler *hotplug_dev,
hw/mem/pc-dimm.c +2 -4
@@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp)return host_memory_backend_get_memory (dimm->hostmem); } -void pc_dimm_pre_plug (PCDIMMDevice *dimm,MachineState *machine, -const uint64_t *legacy_align,Error **errp) +void pc_dimm_pre_plug (PCDIMMDevice *dimm,MachineState *machine,Error **errp) {Error *local_err =NULL ;int slot;
@@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort);trace_mhp_pc_dimm_assigned_slot (slot); -memory_device_pre_plug (MEMORY_DEVICE (dimm), machine, legacy_align, - errp); +memory_device_pre_plug (MEMORY_DEVICE (dimm), machine,NULL , errp); }void pc_dimm_plug (PCDIMMDevice *dimm,MachineState *machine)
hw/ppc/spapr.c +1 -1
@@ -3700,7 +3700,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,return ; } -pc_dimm_pre_plug (dimm,MACHINE (hotplug_dev),NULL , errp); +pc_dimm_pre_plug (dimm,MACHINE (hotplug_dev), errp); }struct SpaprDimmState {
Signature · 1 line
2.41.0
[PULL 07/76] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug'
In reply to Philippe Mathieu-Daudéacpi_memory_hotplug::is_enabled is set to %true once via ich9_lpc_initfn() -> ich9_pm_add_properties(). No need to check it, so remove now dead code.
Message-Id: <[email protected]>
--- hw/acpi/ich9.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-)
hw/acpi/ich9.c +6 -22
@@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id) .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ } -static bool vmstate_test_use_memhp (void *opaque) -{ -ICH9LPCPMRegs *s = opaque; -return s->acpi_memory_hotplug.is_enabled; -} -static const VMStateDescription vmstate_memhp_state = { .name ="ich9_pm/memhp" , .version_id =1 , .minimum_version_id =1 , - .needed = vmstate_test_use_memhp, .fields = (const VMStateField []) {VMSTATE_MEMORY_HOTPLUG (acpi_memory_hotplug, ICH9LPCPMRegs),VMSTATE_END_OF_LIST ()
@@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq)legacy_acpi_cpu_hotplug_init (pci_address_space_io (lpc_pci),OBJECT (lpc_pci), &pm->gpe_cpu,ICH9_CPU_HOTPLUG_IO_BASE ); -if (pm->acpi_memory_hotplug.is_enabled) { -acpi_memory_hotplug_init (pci_address_space_io (lpc_pci),OBJECT (lpc_pci), - &pm->acpi_memory_hotplug, -ACPI_MEMORY_HOTPLUG_BASE ); - } +acpi_memory_hotplug_init (pci_address_space_io (lpc_pci),OBJECT (lpc_pci), + &pm->acpi_memory_hotplug, +ACPI_MEMORY_HOTPLUG_BASE ); } static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,
@@ -460,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,return ; } -if (object_dynamic_cast (OBJECT (dev),TYPE_PC_DIMM ) && - !lpc->pm.acpi_memory_hotplug.is_enabled) { -error_setg (errp, -"memory hotplug is not enabled: %s.memory-hotplug-support " -"is not set" ,object_get_typename (OBJECT (lpc))); - }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) { +if (object_dynamic_cast (OBJECT (dev),TYPE_CPU )) {uint64_t negotiated = lpc->smi_negotiated_features; if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) &&
@@ -509,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, {ICH9LPCState *lpc =ICH9_LPC_DEVICE (hotplug_dev); -if (lpc->pm.acpi_memory_hotplug.is_enabled && -object_dynamic_cast (OBJECT (dev),TYPE_PC_DIMM )) { +if (object_dynamic_cast (OBJECT (dev),TYPE_PC_DIMM )) {acpi_memory_unplug_request_cb (hotplug_dev, &lpc->pm.acpi_memory_hotplug, dev, errp);
@@ -545,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, {ICH9LPCState *lpc =ICH9_LPC_DEVICE (hotplug_dev); -if (lpc->pm.acpi_memory_hotplug.is_enabled && -object_dynamic_cast (OBJECT (dev),TYPE_PC_DIMM )) { +if (object_dynamic_cast (OBJECT (dev),TYPE_PC_DIMM )) {acpi_memory_unplug_cb (&lpc->pm.acpi_memory_hotplug, dev, errp); }else if (object_dynamic_cast (OBJECT (dev),TYPE_CPU ) && !lpc->pm.cpu_hotplug_legacy) {
Signature · 1 line
2.41.0
[PULL 01/76] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines
In reply to Philippe Mathieu-DaudéSimilarly to the commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated", deprecate the 2.4 to 2.12 machines.
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 4 ++-- hw/i386/pc_piix.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
docs/about/deprecated.rst +2 -2
@@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) -''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type
hw/i386/pc_piix.c +1 -1
@@ -742,6 +742,7 @@ DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,static void pc_i440fx_2_12_machine_options (MachineClass *m) {pc_i440fx_3_0_machine_options (m); + m->deprecation_reason ="old and unattended - use a newer version instead" ;compat_props_add (m->compat_props, hw_compat_2_12, hw_compat_2_12_len);compat_props_add (m->compat_props, pc_compat_2_12, pc_compat_2_12_len); }
@@ -847,7 +848,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) {pc_i440fx_2_4_machine_options (m); m->hw_version ="2.3.0" ; - m->deprecation_reason ="old and unattended - use a newer version instead" ;compat_props_add (m->compat_props, hw_compat_2_3, hw_compat_2_3_len);compat_props_add (m->compat_props, pc_compat_2_3, pc_compat_2_3_len); }
Signature · 1 line
2.41.0
[PULL 11/76] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults()
In reply to Philippe Mathieu-Daudé'uuid_encoded' is always true, remove it.
Message-Id: <[email protected]>
--- include/hw/firmware/smbios.h | 3 +-- hw/arm/virt.c | 3 +-- hw/i386/fw_cfg.c | 2 +- hw/loongarch/virt.c | 2 +- hw/riscv/virt.c | 2 +- hw/smbios/smbios.c | 6 ++---- 6 files changed, 7 insertions(+), 11 deletions(-)
include/hw/firmware/smbios.h +1 -2
@@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size);void smbios_entry_add (QemuOpts *opts,Error **errp);void smbios_set_cpuid (uint32_t version,uint32_t features);void smbios_set_defaults (const char *manufacturer,const char *product, -const char *version, -bool uuid_encoded); +const char *version);void smbios_set_default_processor_family (uint16_t processor_family);uint8_t *smbios_get_table_legacy (size_t *length,Error **errp); void smbios_get_tables(MachineState *ms,
hw/arm/virt.c +1 -2
@@ -1677,8 +1677,7 @@ static void virt_build_smbios(VirtMachineState *vms) }smbios_set_defaults ("QEMU" , product, - vmc->smbios_old_sys_ver ?"1.0" : mc->name, - true); + vmc->smbios_old_sys_ver ?"1.0" : mc->name);/* build the array of physical mem area from base_memmap */ mem_array.address = vms->memmap[VIRT_MEM ].base;
hw/i386/fw_cfg.c +1 -1
@@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,if (pcmc->smbios_defaults) {/* These values are guest ABI, do not change */ -smbios_set_defaults ("QEMU" , mc->desc, mc->name, true); +smbios_set_defaults ("QEMU" , mc->desc, mc->name); }/* tell smbios about cpuid version and features */
hw/loongarch/virt.c +1 -1
@@ -556,7 +556,7 @@ static void virt_build_smbios(LoongArchVirtMachineState *lvms)return ; } -smbios_set_defaults ("QEMU" , product, mc->name, true); +smbios_set_defaults ("QEMU" , product, mc->name); smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64, NULL, 0,
hw/riscv/virt.c +1 -1
@@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s) product ="KVM Virtual Machine" ; } -smbios_set_defaults ("QEMU" , product, mc->name, true); +smbios_set_defaults ("QEMU" , product, mc->name);if (riscv_is_32bit (&s->soc[0 ])) {smbios_set_default_processor_family (0x200 );
hw/smbios/smbios.c +2 -4
@@ -30,7 +30,7 @@#include "hw/pci/pci_device.h" #include "smbios_build.h" -static bool smbios_uuid_encoded = true; +static const bool smbios_uuid_encoded = true;/* * SMBIOS tables provided by user with '-smbios file=<foo>' option */
@@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family) }void smbios_set_defaults (const char *manufacturer,const char *product, -const char *version, -bool uuid_encoded) +const char *version) { smbios_have_defaults = true; - smbios_uuid_encoded = uuid_encoded;SMBIOS_SET_DEFAULT (smbios_type1.manufacturer, manufacturer);SMBIOS_SET_DEFAULT (smbios_type1.product, product);
Signature · 1 line
2.41.0
[PULL 13/76] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm
In reply to Philippe Mathieu-DaudéPCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Update the comment in Avocado test_phybits_low_pse36().
Message-Id: <[email protected]>
--- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 14 +++----------- tests/avocado/mem-addr-space-check.py | 9 ++++----- 3 files changed, 7 insertions(+), 19 deletions(-)
include/hw/i386/pc.h +0 -3
@@ -74,8 +74,6 @@ typedef struct PCMachineState {* * Compat fields: * -* @enforce_aligned_dimm: check that DIMM's address/size is aligned by -* backend's alignment value if provided * @acpi_data_size: Size of the chunk of memory at the top of RAM * for the BIOS ACPI tables and other BIOS * datastructures.
@@ -114,7 +112,6 @@ struct PCMachineClass {/* RAM / address space compat: */ bool gigabyte_align;bool has_reserved_memory; -bool enforce_aligned_dimm;bool broken_reserved_end;bool enforce_amd_1tb_hole;bool isa_bios_alias;
hw/i386/pc.c +3 -11
@@ -728,7 +728,6 @@ static void pc_get_device_memory_range(PCMachineState *pcms, hwaddr *base, ram_addr_t *device_mem_size) { -PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (pcms);MachineState *machine =MACHINE (pcms);ram_addr_t size;hwaddr addr;
@@ -736,10 +735,8 @@ static void pc_get_device_memory_range(PCMachineState *pcms, size = machine->maxram_size - machine->ram_size; addr =ROUND_UP (pc_above_4g_end (pcms),1 * GiB); -if (pcmc->enforce_aligned_dimm) { -/* size device region assuming 1G page max alignment per slot */ - size += (1 * GiB) * machine->ram_slots; - } +/* size device region assuming 1G page max alignment per slot */ + size += (1 * GiB) * machine->ram_slots; *base = addr; *device_mem_size = size;
@@ -1303,12 +1300,9 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs)static void pc_memory_pre_plug (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp) { -const PCMachineState *pcms =PC_MACHINE (hotplug_dev);const X86MachineState *x86ms =X86_MACHINE (hotplug_dev); -const PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (pcms);const MachineState *ms =MACHINE (hotplug_dev);const bool is_nvdimm =object_dynamic_cast (OBJECT (dev),TYPE_NVDIMM ); -const uint64_t legacy_align =TARGET_PAGE_SIZE ;Error *local_err =NULL ;/*
@@ -1333,8 +1327,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,return ; } -pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev), - pcmc->enforce_aligned_dimm ?NULL : &legacy_align, errp); +pc_dimm_pre_plug (PC_DIMM (dev),MACHINE (hotplug_dev),NULL , errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev,
@@ -1798,7 +1791,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; - pcmc->enforce_aligned_dimm = true; pcmc->enforce_amd_1tb_hole = true; pcmc->isa_bios_alias = true;/* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported
tests/avocado/mem-addr-space-check.py +4 -5
@@ -31,11 +31,10 @@ def test_phybits_low_pse36(self): at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when we have 0.5 GiB of VM memory, see pc_q35_init()). This means total hotpluggable memory size is 60 GiB. Per slot, we reserve 1 GiB of memory - for dimm alignment for all newer machines (see enforce_aligned_dimm - property for pc machines and pc_get_device_memory_range()). That leaves - total hotpluggable actual memory size of 59 GiB. If the VM is started - with 0.5 GiB of memory, maxmem should be set to a maximum value of - 59.5 GiB to ensure that the processor can address all memory directly. + for dimm alignment for all machines. That leaves total hotpluggable + actual memory size of 59 GiB. If the VM is started with 0.5 GiB of + memory, maxmem should be set to a maximum value of 59.5 GiB to ensure + that the processor can address all memory directly. Note that 64-bit pci hole size is 0 in this case. If maxmem is set to 59.6G, QEMU should fail to start with a message "phy-bits are too low". If maxmem is set to 59.5G with all other QEMU parameters identical, QEMU
Signature · 1 line
2.41.0
[PULL 02/76] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
In reply to Philippe Mathieu-DaudéThe pc-i440fx-2.0 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it.
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 15 ------------- hw/i386/pc_piix.c | 37 --------------------------------- 5 files changed, 2 insertions(+), 57 deletions(-)
docs/about/deprecated.rst +1 -1
@@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have
docs/about/removed-features.rst +1 -1
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2) +``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live
include/hw/i386/pc.h +0 -3
@@ -318,9 +318,6 @@ extern const size_t pc_compat_2_2_len;extern GlobalProperty pc_compat_2_1[];extern const size_t pc_compat_2_1_len; -extern GlobalProperty pc_compat_2_0[]; -extern const size_t pc_compat_2_0_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \
hw/i386/pc.c +0 -15
@@ -320,21 +320,6 @@ GlobalProperty pc_compat_2_1[] = { };const size_t pc_compat_2_1_len =G_N_ELEMENTS (pc_compat_2_1); -GlobalProperty pc_compat_2_0[] = { - PC_CPU_MODEL_IDS("2.0.0") - {"virtio-scsi-pci" ,"any_layout" ,"off" }, - {"PIIX4_PM" ,"memory-hotplug-support" ,"off" }, - {"apic" ,"version" ,"0x11" }, - {"nec-usb-xhci" ,"superspeed-ports-first" ,"off" }, - {"nec-usb-xhci" ,"force-pcie-endcap" ,"on" }, - {"pci-serial" ,"prog_if" ,"0" }, - {"pci-serial-2x" ,"prog_if" ,"0" }, - {"pci-serial-4x" ,"prog_if" ,"0" }, - {"virtio-net-pci" ,"guest_announce" ,"off" }, - {"ICH9-LPC" ,"memory-hotplug-support" ,"off" }, -}; -const size_t pc_compat_2_0_len =G_N_ELEMENTS (pc_compat_2_0); -GSIState *pc_gsi_create (qemu_irq **irqs,bool pci_enabled) {GSIState *s;
hw/i386/pc_piix.c +0 -37
@@ -441,11 +441,6 @@ static void pc_compat_2_1_fn(MachineState *machine)x86_cpu_change_kvm_default ("svm" ,NULL ); } -static void pc_compat_2_0_fn (MachineState *machine) -{ -pc_compat_2_1_fn (machine); -} -#ifdef CONFIG_ISAPC static void pc_init_isa (MachineState *machine) {
@@ -887,38 +882,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v2_1,"pc-i440fx-2.1" , pc_compat_2_1_fn, pc_i440fx_2_1_machine_options); -static void pc_i440fx_2_0_machine_options (MachineClass *m) -{ -PCMachineClass *pcmc =PC_MACHINE_CLASS (m); - -pc_i440fx_2_1_machine_options (m); - m->hw_version ="2.0.0" ; -compat_props_add (m->compat_props, pc_compat_2_0, pc_compat_2_0_len); - pcmc->smbios_legacy_mode = true; - pcmc->has_reserved_memory = false; -/* This value depends on the actual DSDT and SSDT compiled into -* the source QEMU; unfortunately it depends on the binary and -* not on the machine type, so we cannot make pc-i440fx-1.7 work on -* both QEMU 1.7 and QEMU 2.0. -* -* Large variations cause migration to fail for more than one -* consecutive value of the "-smp" maxcpus option. -* -* For small variations of the kind caused by different iasl versions, -* the 4k rounding usually leaves slack. However, there could be still -* one or two values that break. For QEMU 1.7 and QEMU 2.0 the -* slack is only ~10 bytes before one "-smp maxcpus" value breaks! -* -* 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on -* QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418. -*/ - pcmc->legacy_acpi_table_size =6652 ; - pcmc->acpi_data_size =0x10000 ; -} - -DEFINE_I440FX_MACHINE (v2_0,"pc-i440fx-2.0" , pc_compat_2_0_fn, - pc_i440fx_2_0_machine_options); -#ifdef CONFIG_ISAPC static void isapc_machine_options (MachineClass *m) {
Signature · 1 line
2.41.0
[PULL 19/76] hw/i386/acpi: Remove AcpiBuildState::rsdp field
In reply to Philippe Mathieu-DaudéAcpiBuildState::rsdp is always NULL, remove it,
simplifying acpi_build_update().
Message-Id: <[email protected]>
--- hw/i386/acpi-build.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
hw/i386/acpi-build.c +1 -7
@@ -2458,7 +2458,6 @@ struct AcpiBuildState {MemoryRegion *table_mr;/* Is table patched? */ uint8_t patched; -void *rsdp;MemoryRegion *rsdp_mr;MemoryRegion *linker_mr; } AcpiBuildState;
@@ -2714,11 +2713,7 @@ static void acpi_build_update(void *build_opaque)acpi_ram_update (build_state->table_mr, tables.table_data); -if (build_state->rsdp) { -memcpy (build_state->rsdp, tables.rsdp->data,acpi_data_len (tables.rsdp)); - }else { -acpi_ram_update (build_state->rsdp_mr, tables.rsdp); - } +acpi_ram_update (build_state->rsdp_mr, tables.rsdp);acpi_ram_update (build_state->linker_mr, tables.linker->cmd_blob);acpi_build_tables_cleanup (&tables, true);
@@ -2804,7 +2799,6 @@ void acpi_setup(void) tables.vmgenid); } - build_state->rsdp =NULL ; build_state->rsdp_mr =acpi_add_rom_blob (acpi_build_update, build_state, tables.rsdp,ACPI_BUILD_RSDP_FILE );
Signature · 1 line
2.41.0
[PULL 03/76] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag
In reply to Philippe Mathieu-DaudéXHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify usb_xhci_pci_realize().
Message-Id: <[email protected]>
--- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-)
hw/usb/hcd-xhci.h +0 -1
@@ -37,7 +37,6 @@ typedef struct XHCIEPContext XHCIEPContext;enum xhci_flags {XHCI_FLAG_SS_FIRST =1 , -XHCI_FLAG_FORCE_PCIE_ENDCAP ,XHCI_FLAG_ENABLE_STREAMS , };
hw/usb/hcd-xhci-nec.c +0 -2
@@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = {DEFINE_PROP_ON_OFF_AUTO ("msix" , XHCIPciState, msix,ON_OFF_AUTO_AUTO ),DEFINE_PROP_BIT ("superspeed-ports-first" , XHCINecState, flags,XHCI_FLAG_SS_FIRST , true), -DEFINE_PROP_BIT ("force-pcie-endcap" , XHCINecState, flags, -XHCI_FLAG_FORCE_PCIE_ENDCAP , false),DEFINE_PROP_UINT32 ("intrs" , XHCINecState, intrs,XHCI_MAXINTRS ),DEFINE_PROP_UINT32 ("slots" , XHCINecState, slots,XHCI_MAXSLOTS ), DEFINE_PROP_END_OF_LIST(),
hw/usb/hcd-xhci-pci.c +1 -2
@@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)PCI_BASE_ADDRESS_MEM_TYPE_64 , &s->xhci.mem); -if (pci_bus_is_express (pci_get_bus (dev)) || -xhci_get_flag (&s->xhci,XHCI_FLAG_FORCE_PCIE_ENDCAP )) { +if (pci_bus_is_express (pci_get_bus (dev))) { ret =pcie_endpoint_cap_init (dev,0xa0 );assert (ret >0 ); }
Signature · 1 line
2.41.0
[PULL 17/76] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob
In reply to Philippe Mathieu-DaudéPCMachineClass::resizable_acpi_blob was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_build().
Message-Id: <[email protected]>
--- include/hw/i386/pc.h | 3 --- hw/i386/acpi-build.c | 10 ---------- hw/i386/pc.c | 1 - 3 files changed, 14 deletions(-)
include/hw/i386/pc.h +0 -3
@@ -125,9 +125,6 @@ struct PCMachineClass {/* create kvmclock device even when KVM PV features are not exposed */ bool kvmclock_create_always; -/* resizable acpi blob compat */ -bool resizable_acpi_blob; -/* * whether the machine type implements broken 32-bit address space bound * check for memory.
hw/i386/acpi-build.c +0 -10
@@ -2687,16 +2687,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)* keep the table size stable for all (max_cpus, max_memory_slots) * combinations. */ -/* Make sure we have a buffer in case we need to resize the tables. */ -if ((tables_blob->len >ACPI_BUILD_TABLE_SIZE /2 ) && - !pcmc->resizable_acpi_blob) { -/* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ -warn_report ("ACPI table size %u exceeds %d bytes," -" migration may not work" , - tables_blob->len,ACPI_BUILD_TABLE_SIZE /2 ); -error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges.\n" ); - }acpi_align_size (tables_blob,ACPI_BUILD_TABLE_SIZE );acpi_align_size (tables->linker->cmd_blob,ACPI_BUILD_ALIGN_SIZE );
hw/i386/pc.c +0 -1
@@ -1774,7 +1774,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->acpi_data_size =0x20000 +0x8000 ; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; - pcmc->resizable_acpi_blob = true; x86mc->apic_xrupt_override = true;assert (!mc->get_hotplug_handler); mc->get_hotplug_handler = pc_get_hotplug_handler;
Signature · 1 line
2.41.0
[PULL 29/76] hw/ppc: Avoid using Monitor in PnvChipClass::intc_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/pnv_chip.h | 2 +- hw/ppc/pnv.c | 30 ++++++++---------------------- 2 files changed, 9 insertions(+), 23 deletions(-)
include/hw/ppc/pnv_chip.h +1 -1
@@ -151,7 +151,7 @@ struct PnvChipClass {void (*intc_create)(PnvChip *chip,PowerPCCPU *cpu,Error **errp);void (*intc_reset)(PnvChip *chip,PowerPCCPU *cpu);void (*intc_destroy)(PnvChip *chip,PowerPCCPU *cpu); -void (*intc_print_info)(PnvChip *chip,PowerPCCPU *cpu,Monitor *mon); +void (*intc_print_info)(PnvChip *chip,PowerPCCPU *cpu,GString *buf); ISABus *(*isa_create)(PnvChip *chip, Error **errp);void (*dt_populate)(PnvChip *chip,void *fdt);void (*pic_print_info)(PnvChip *chip,Monitor *mon);
hw/ppc/pnv.c +8 -22
@@ -1129,15 +1129,9 @@ static void pnv_chip_power8_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) }static void pnv_chip_power8_intc_print_info (PnvChip *chip,PowerPCCPU *cpu, -Monitor *mon) +GString *buf) { -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; -icp_pic_print_info (ICP (pnv_cpu_state (cpu)->intc), buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }/*
@@ -1222,15 +1216,9 @@ static void pnv_chip_power9_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) }static void pnv_chip_power9_intc_print_info (PnvChip *chip,PowerPCCPU *cpu, -Monitor *mon) +GString *buf) { -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; -xive_tctx_pic_print_info (XIVE_TCTX (pnv_cpu_state (cpu)->intc), buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); } static void pnv_chip_power10_intc_create(PnvChip *chip, PowerPCCPU *cpu,
@@ -1272,15 +1260,9 @@ static void pnv_chip_power10_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) }static void pnv_chip_power10_intc_print_info (PnvChip *chip,PowerPCCPU *cpu, -Monitor *mon) +GString *buf) { -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; -xive_tctx_pic_print_info (XIVE_TCTX (pnv_cpu_state (cpu)->intc), buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }/*
@@ -2363,14 +2345,18 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj,PnvMachineState *pnv =PNV_MACHINE (obj);int i;CPUState *cs; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;CPU_FOREACH (cs) {PowerPCCPU *cpu =POWERPC_CPU (cs);/* XXX: loop on each chip/core/thread instead of CPU_FOREACH() */ PNV_CHIP_GET_CLASS (pnv->chips[0 ])->intc_print_info (pnv->chips[0 ], cpu, - mon); + buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);for (i =0 ; i < pnv->num_chips; i++) {PNV_CHIP_GET_CLASS (pnv->chips[i])->pic_print_info (pnv->chips[i], mon);
Signature · 1 line
2.41.0
[PULL 30/76] hw/ppc: Avoid using Monitor in xive_end_queue_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive_regs.h | 2 +- hw/intc/spapr_xive.c | 7 ++++++- hw/intc/xive.c | 17 +++++++++++------ 3 files changed, 18 insertions(+), 8 deletions(-)
include/hw/ppc/xive_regs.h +1 -1
@@ -262,7 +262,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end) }void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon); -void xive_end_queue_pic_print_info (XiveEND *end,uint32_t width,Monitor *mon); +void xive_end_queue_pic_print_info (XiveEND *end,uint32_t width,GString *buf);void xive_end_eas_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon);/* Notification Virtual Target (NVT) */
hw/intc/spapr_xive.c +6 -1
@@ -142,12 +142,17 @@ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end,uint32_t qentries =1 << (qsize +10 );uint32_t nvt =xive_get_field32 (END_W6_NVT_INDEX , end->w6);uint8_t priority =xive_get_field32 (END_W7_F0_PRIORITY , end->w7); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;monitor_printf (mon,"%3d/%d % 6d/%5d @%" PRIx64" ^%d" ,spapr_xive_nvt_to_target (0 , nvt), priority, qindex, qentries, qaddr_base, qgen); -xive_end_queue_pic_print_info (end,6 , mon); +xive_end_queue_pic_print_info (end,6 , buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }/*
hw/intc/xive.c +11 -6
@@ -11,6 +11,7 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h"
@@ -1323,7 +1324,7 @@ static const TypeInfo xive_source_info = {* XiveEND helpers */ -void xive_end_queue_pic_print_info (XiveEND *end,uint32_t width,Monitor *mon) +void xive_end_queue_pic_print_info (XiveEND *end,uint32_t width,GString *buf) {uint64_t qaddr_base =xive_end_qaddr (end);uint32_t qsize =xive_get_field32 (END_W0_QSIZE , end->w0);
@@ -1334,7 +1335,7 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, Monitor *mon)/* * print out the [ (qindex - (width - 1)) .. (qindex + 1)] window */ -monitor_printf (mon," [ " ); +g_string_append_printf (buf," [ " ); qindex = (qindex - (width -1 )) & (qentries -1 );for (i =0 ; i < width; i++) {uint64_t qaddr = qaddr_base + (qindex <<2 );
@@ -1346,11 +1347,11 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, Monitor *mon) HWADDR_PRIx "\n", qaddr);return ; } -monitor_printf (mon,"%s%08x " , i == width -1 ?"^" :"" , -be32_to_cpu (qdata)); +g_string_append_printf (buf,"%s%08x " , i == width -1 ?"^" :"" , +be32_to_cpu (qdata)); qindex = (qindex +1 ) & (qentries -1 ); } -monitor_printf (mon,"]" ); +g_string_append_c (buf,']' ); }void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon)
@@ -1365,6 +1366,8 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon)uint32_t nvt_idx =xive_get_field32 (END_W6_NVT_INDEX , end->w6);uint8_t priority =xive_get_field32 (END_W7_F0_PRIORITY , end->w7);uint8_t pq; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;if (!xive_end_is_valid (end)) {return ;
@@ -1389,8 +1392,10 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon)if (qaddr_base) {monitor_printf (mon," eq:@%08" PRIx64"% 6d/%5d ^%d" , qaddr_base, qindex, qentries, qgen); -xive_end_queue_pic_print_info (end,6 , mon); +xive_end_queue_pic_print_info (end,6 , buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"\n" ); }
Signature · 1 line
2.41.0
[PULL 18/76] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram
In reply to Philippe Mathieu-DaudéPCMachineClass::rsdp_in_ram was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_setup().
Message-Id: <[email protected]>
--- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 35 ++++------------------------------- hw/i386/pc.c | 1 - 3 files changed, 4 insertions(+), 33 deletions(-)
include/hw/i386/pc.h +0 -1
@@ -100,7 +100,6 @@ struct PCMachineClass {/* ACPI compat: */ bool has_acpi_build; -bool rsdp_in_ram;unsigned acpi_data_size;int pci_root_uid;
hw/i386/acpi-build.c +4 -31
@@ -2494,7 +2494,6 @@ staticvoid acpi_build (AcpiBuildTables *tables,MachineState *machine) {PCMachineState *pcms =PC_MACHINE (machine); -PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (pcms);X86MachineState *x86ms =X86_MACHINE (machine);DeviceState *iommu = pcms->iommu;GArray *table_offsets;
@@ -2666,16 +2665,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) .rsdt_tbl_offset = &rsdt, };build_rsdp (tables->rsdp, tables->linker, &rsdp_data); -if (!pcmc->rsdp_in_ram) { -/* We used to allocate some extra space for RSDP revision 2 but -* only used the RSDP revision 0 space. The extra bytes were -* zeroed out and not used. -* Here we continue wasting those extra 16 bytes to make sure we -* don't break migration for machine types 2.2 and older due to -* RSDP blob size mismatch. -*/ -build_append_int_noprefix (tables->rsdp,0 ,16 ); - } }/* We'll expose it all to Guest so we want to reduce
@@ -2754,7 +2743,6 @@ static const VMStateDescription vmstate_acpi_build = {void acpi_setup (void ) {PCMachineState *pcms =PC_MACHINE (qdev_get_machine ()); -PCMachineClass *pcmc =PC_MACHINE_GET_CLASS (pcms);X86MachineState *x86ms =X86_MACHINE (pcms);AcpiBuildTables tables;AcpiBuildState *build_state;
@@ -2816,25 +2804,10 @@ void acpi_setup(void) tables.vmgenid); } -if (!pcmc->rsdp_in_ram) { -/* -* Keep for compatibility with old machine types. -* Though RSDP is small, its contents isn't immutable, so -* we'll update it along with the rest of tables on guest access. -*/ -uint32_t rsdp_size =acpi_data_len (tables.rsdp); - - build_state->rsdp =g_memdup (tables.rsdp->data, rsdp_size); -fw_cfg_add_file_callback (x86ms->fw_cfg,ACPI_BUILD_RSDP_FILE , - acpi_build_update,NULL , build_state, - build_state->rsdp, rsdp_size, true); - build_state->rsdp_mr =NULL ; - }else { - build_state->rsdp =NULL ; - build_state->rsdp_mr =acpi_add_rom_blob (acpi_build_update, - build_state, tables.rsdp, -ACPI_BUILD_RSDP_FILE ); - } + build_state->rsdp =NULL ; + build_state->rsdp_mr =acpi_add_rom_blob (acpi_build_update, + build_state, tables.rsdp, +ACPI_BUILD_RSDP_FILE );qemu_register_reset (acpi_build_reset, build_state);acpi_build_reset (build_state);
hw/i386/pc.c +0 -1
@@ -1763,7 +1763,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->pci_enabled = true; pcmc->has_acpi_build = true; - pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true;
Signature · 1 line
2.41.0
[PULL 23/76] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE
In reply to Philippe Mathieu-DaudéPCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 machine, which got removed. Since it is constant, replace the class field by a definition (local to hw/i386/pc.c, since not used elsewhere).
Message-Id: <[email protected]>
--- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-)
include/hw/i386/pc.h +0 -4
@@ -74,9 +74,6 @@ typedef struct PCMachineState {* * Compat fields: * -* @acpi_data_size: Size of the chunk of memory at the top of RAM -* for the BIOS ACPI tables and other BIOS -* datastructures. * @gigabyte_align: Make sure that guest addresses aligned at * 1Gbyte boundaries get mapped to host * addresses aligned at 1Gbyte boundaries. This
@@ -100,7 +97,6 @@ struct PCMachineClass {/* ACPI compat: */ bool has_acpi_build; -unsigned acpi_data_size;int pci_root_uid;/* SMBIOS compat: */
hw/i386/pc.c +12 -7
@@ -265,6 +265,16 @@ GlobalProperty pc_compat_2_4[] = { };const size_t pc_compat_2_4_len =G_N_ELEMENTS (pc_compat_2_4); +/* +* @PC_FW_DATA: +* Size of the chunk of memory at the top of RAM for the BIOS ACPI tables +* and other BIOS datastructures. +* +* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K +* reported to be used at the moment, 32K should be enough for a while. +*/ +#define PC_FW_DATA (0x20000 + 0x8000) +GSIState *pc_gsi_create (qemu_irq **irqs,bool pci_enabled) {GSIState *s;
@@ -646,8 +656,7 @@ void xen_load_linux(PCMachineState *pcms)fw_cfg_add_i16 (fw_cfg,FW_CFG_NB_CPUS , x86ms->boot_cpus);rom_set_fw (fw_cfg); -x86_load_linux (x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); +x86_load_linux (x86ms, fw_cfg,PC_FW_DATA , pcmc->pvh_enabled);for (i =0 ; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || !strcmp(option_rom[i].name, "linuxboot_dma.bin") ||
@@ -986,8 +995,7 @@ void pc_memory_init(PCMachineState *pcms, }if (linux_boot) { -x86_load_linux (x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); +x86_load_linux (x86ms, fw_cfg,PC_FW_DATA , pcmc->pvh_enabled); }for (i =0 ; i < nb_option_roms; i++) {
@@ -1743,9 +1751,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; pcmc->isa_bios_alias = true; -/* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported -* to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size =0x20000 +0x8000 ; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true;
Signature · 1 line
2.41.0
[PULL 21/76] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro
In reply to Philippe Mathieu-DaudéLast commit removed the last non-NULL use of DEFINE_I440FX_MACHINE 3rd parameter. 'compatfn' is now obsolete, remove it.
Message-Id: <[email protected]>
--- hw/i386/pc_piix.c | 69 ++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 40 deletions(-)
hw/i386/pc_piix.c +29 -40
@@ -414,13 +414,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) pcms->south_bridge = PCSouthBridgeOption_lookup.array[value]; } -/* Looking for a pc_compat_2_4() function? It doesn't exist. -* pc_compat_*() functions that run on machine-init time and -* change global QEMU state are deprecated. Please don't create -* one, and implement any pc-*-2.4 (and newer) compat code in -* hw_compat_*, pc_compat_*, or * pc_*_machine_options(). -*/ -#ifdef CONFIG_ISAPC static void pc_init_isa (MachineState *machine) {
@@ -452,13 +445,9 @@ static void pc_xen_hvm_init(MachineState *machine) }#endif -#define DEFINE_I440FX_MACHINE (suffix, name, compatfn, optionfn) \ +#define DEFINE_I440FX_MACHINE (suffix, name, optionfn) \ static void pc_init_##suffix(MachineState *machine) \ { \ - void (*compat)(MachineState *m) = (compatfn); \ - if (compat) { \ - compat(machine); \ - } \ pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \ } \ DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
@@ -496,7 +485,7 @@ static void pc_i440fx_9_1_machine_options(MachineClass *m) m->is_default = true; } -DEFINE_I440FX_MACHINE (v9_1,"pc-i440fx-9.1" ,NULL , +DEFINE_I440FX_MACHINE (v9_1,"pc-i440fx-9.1" , pc_i440fx_9_1_machine_options);static void pc_i440fx_9_0_machine_options (MachineClass *m)
@@ -512,7 +501,7 @@ static void pc_i440fx_9_0_machine_options(MachineClass *m) pcmc->isa_bios_alias = false; } -DEFINE_I440FX_MACHINE (v9_0,"pc-i440fx-9.0" ,NULL , +DEFINE_I440FX_MACHINE (v9_0,"pc-i440fx-9.0" , pc_i440fx_9_0_machine_options);static void pc_i440fx_8_2_machine_options (MachineClass *m)
@@ -527,7 +516,7 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m) pcmc->default_smbios_ep_type =SMBIOS_ENTRY_POINT_TYPE_64 ; } -DEFINE_I440FX_MACHINE (v8_2,"pc-i440fx-8.2" ,NULL , +DEFINE_I440FX_MACHINE (v8_2,"pc-i440fx-8.2" , pc_i440fx_8_2_machine_options);static void pc_i440fx_8_1_machine_options (MachineClass *m)
@@ -541,7 +530,7 @@ static void pc_i440fx_8_1_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_8_1, pc_compat_8_1_len); } -DEFINE_I440FX_MACHINE (v8_1,"pc-i440fx-8.1" ,NULL , +DEFINE_I440FX_MACHINE (v8_1,"pc-i440fx-8.1" , pc_i440fx_8_1_machine_options);static void pc_i440fx_8_0_machine_options (MachineClass *m)
@@ -556,7 +545,7 @@ static void pc_i440fx_8_0_machine_options(MachineClass *m) pcmc->default_smbios_ep_type =SMBIOS_ENTRY_POINT_TYPE_32 ; } -DEFINE_I440FX_MACHINE (v8_0,"pc-i440fx-8.0" ,NULL , +DEFINE_I440FX_MACHINE (v8_0,"pc-i440fx-8.0" , pc_i440fx_8_0_machine_options);static void pc_i440fx_7_2_machine_options (MachineClass *m)
@@ -566,7 +555,7 @@ static void pc_i440fx_7_2_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_7_2, pc_compat_7_2_len); } -DEFINE_I440FX_MACHINE (v7_2,"pc-i440fx-7.2" ,NULL , +DEFINE_I440FX_MACHINE (v7_2,"pc-i440fx-7.2" , pc_i440fx_7_2_machine_options);static void pc_i440fx_7_1_machine_options (MachineClass *m)
@@ -576,7 +565,7 @@ static void pc_i440fx_7_1_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_7_1, pc_compat_7_1_len); } -DEFINE_I440FX_MACHINE (v7_1,"pc-i440fx-7.1" ,NULL , +DEFINE_I440FX_MACHINE (v7_1,"pc-i440fx-7.1" , pc_i440fx_7_1_machine_options);static void pc_i440fx_7_0_machine_options (MachineClass *m)
@@ -588,7 +577,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_7_0, pc_compat_7_0_len); } -DEFINE_I440FX_MACHINE (v7_0,"pc-i440fx-7.0" ,NULL , +DEFINE_I440FX_MACHINE (v7_0,"pc-i440fx-7.0" , pc_i440fx_7_0_machine_options);static void pc_i440fx_6_2_machine_options (MachineClass *m)
@@ -598,7 +587,7 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } -DEFINE_I440FX_MACHINE (v6_2,"pc-i440fx-6.2" ,NULL , +DEFINE_I440FX_MACHINE (v6_2,"pc-i440fx-6.2" , pc_i440fx_6_2_machine_options);static void pc_i440fx_6_1_machine_options (MachineClass *m)
@@ -609,7 +598,7 @@ static void pc_i440fx_6_1_machine_options(MachineClass *m) m->smp_props.prefer_sockets = true; } -DEFINE_I440FX_MACHINE (v6_1,"pc-i440fx-6.1" ,NULL , +DEFINE_I440FX_MACHINE (v6_1,"pc-i440fx-6.1" , pc_i440fx_6_1_machine_options);static void pc_i440fx_6_0_machine_options (MachineClass *m)
@@ -619,7 +608,7 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } -DEFINE_I440FX_MACHINE (v6_0,"pc-i440fx-6.0" ,NULL , +DEFINE_I440FX_MACHINE (v6_0,"pc-i440fx-6.0" , pc_i440fx_6_0_machine_options);static void pc_i440fx_5_2_machine_options (MachineClass *m)
@@ -629,7 +618,7 @@ static void pc_i440fx_5_2_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } -DEFINE_I440FX_MACHINE (v5_2,"pc-i440fx-5.2" ,NULL , +DEFINE_I440FX_MACHINE (v5_2,"pc-i440fx-5.2" , pc_i440fx_5_2_machine_options);static void pc_i440fx_5_1_machine_options (MachineClass *m)
@@ -643,7 +632,7 @@ static void pc_i440fx_5_1_machine_options(MachineClass *m) pcmc->pci_root_uid =1 ; } -DEFINE_I440FX_MACHINE (v5_1,"pc-i440fx-5.1" ,NULL , +DEFINE_I440FX_MACHINE (v5_1,"pc-i440fx-5.1" , pc_i440fx_5_1_machine_options);static void pc_i440fx_5_0_machine_options (MachineClass *m)
@@ -655,7 +644,7 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m) m->auto_enable_numa_with_memdev = false; } -DEFINE_I440FX_MACHINE (v5_0,"pc-i440fx-5.0" ,NULL , +DEFINE_I440FX_MACHINE (v5_0,"pc-i440fx-5.0" , pc_i440fx_5_0_machine_options);static void pc_i440fx_4_2_machine_options (MachineClass *m)
@@ -665,7 +654,7 @@ static void pc_i440fx_4_2_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } -DEFINE_I440FX_MACHINE (v4_2,"pc-i440fx-4.2" ,NULL , +DEFINE_I440FX_MACHINE (v4_2,"pc-i440fx-4.2" , pc_i440fx_4_2_machine_options);static void pc_i440fx_4_1_machine_options (MachineClass *m)
@@ -675,7 +664,7 @@ static void pc_i440fx_4_1_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } -DEFINE_I440FX_MACHINE (v4_1,"pc-i440fx-4.1" ,NULL , +DEFINE_I440FX_MACHINE (v4_1,"pc-i440fx-4.1" , pc_i440fx_4_1_machine_options);static void pc_i440fx_4_0_machine_options (MachineClass *m)
@@ -687,7 +676,7 @@ static void pc_i440fx_4_0_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_4_0, pc_compat_4_0_len); } -DEFINE_I440FX_MACHINE (v4_0,"pc-i440fx-4.0" ,NULL , +DEFINE_I440FX_MACHINE (v4_0,"pc-i440fx-4.0" , pc_i440fx_4_0_machine_options);static void pc_i440fx_3_1_machine_options (MachineClass *m)
@@ -701,7 +690,7 @@ static void pc_i440fx_3_1_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_3_1, pc_compat_3_1_len); } -DEFINE_I440FX_MACHINE (v3_1,"pc-i440fx-3.1" ,NULL , +DEFINE_I440FX_MACHINE (v3_1,"pc-i440fx-3.1" , pc_i440fx_3_1_machine_options);static void pc_i440fx_3_0_machine_options (MachineClass *m)
@@ -711,7 +700,7 @@ static void pc_i440fx_3_0_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_3_0, pc_compat_3_0_len); } -DEFINE_I440FX_MACHINE (v3_0,"pc-i440fx-3.0" ,NULL , +DEFINE_I440FX_MACHINE (v3_0,"pc-i440fx-3.0" , pc_i440fx_3_0_machine_options);static void pc_i440fx_2_12_machine_options (MachineClass *m)
@@ -722,7 +711,7 @@ static void pc_i440fx_2_12_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } -DEFINE_I440FX_MACHINE (v2_12,"pc-i440fx-2.12" ,NULL , +DEFINE_I440FX_MACHINE (v2_12,"pc-i440fx-2.12" , pc_i440fx_2_12_machine_options);static void pc_i440fx_2_11_machine_options (MachineClass *m)
@@ -732,7 +721,7 @@ static void pc_i440fx_2_11_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_11, pc_compat_2_11_len); } -DEFINE_I440FX_MACHINE (v2_11,"pc-i440fx-2.11" ,NULL , +DEFINE_I440FX_MACHINE (v2_11,"pc-i440fx-2.11" , pc_i440fx_2_11_machine_options);static void pc_i440fx_2_10_machine_options (MachineClass *m)
@@ -743,7 +732,7 @@ static void pc_i440fx_2_10_machine_options(MachineClass *m) m->auto_enable_numa_with_memhp = false; } -DEFINE_I440FX_MACHINE (v2_10,"pc-i440fx-2.10" ,NULL , +DEFINE_I440FX_MACHINE (v2_10,"pc-i440fx-2.10" , pc_i440fx_2_10_machine_options);static void pc_i440fx_2_9_machine_options (MachineClass *m)
@@ -753,7 +742,7 @@ static void pc_i440fx_2_9_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_9, pc_compat_2_9_len); } -DEFINE_I440FX_MACHINE (v2_9,"pc-i440fx-2.9" ,NULL , +DEFINE_I440FX_MACHINE (v2_9,"pc-i440fx-2.9" , pc_i440fx_2_9_machine_options);static void pc_i440fx_2_8_machine_options (MachineClass *m)
@@ -763,7 +752,7 @@ static void pc_i440fx_2_8_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } -DEFINE_I440FX_MACHINE (v2_8,"pc-i440fx-2.8" ,NULL , +DEFINE_I440FX_MACHINE (v2_8,"pc-i440fx-2.8" , pc_i440fx_2_8_machine_options);static void pc_i440fx_2_7_machine_options (MachineClass *m)
@@ -773,7 +762,7 @@ static void pc_i440fx_2_7_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_7, pc_compat_2_7_len); } -DEFINE_I440FX_MACHINE (v2_7,"pc-i440fx-2.7" ,NULL , +DEFINE_I440FX_MACHINE (v2_7,"pc-i440fx-2.7" , pc_i440fx_2_7_machine_options);static void pc_i440fx_2_6_machine_options (MachineClass *m)
@@ -788,7 +777,7 @@ static void pc_i440fx_2_6_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_6, pc_compat_2_6_len); } -DEFINE_I440FX_MACHINE (v2_6,"pc-i440fx-2.6" ,NULL , +DEFINE_I440FX_MACHINE (v2_6,"pc-i440fx-2.6" , pc_i440fx_2_6_machine_options);static void pc_i440fx_2_5_machine_options (MachineClass *m)
@@ -802,7 +791,7 @@ static void pc_i440fx_2_5_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_5, pc_compat_2_5_len); } -DEFINE_I440FX_MACHINE (v2_5,"pc-i440fx-2.5" ,NULL , +DEFINE_I440FX_MACHINE (v2_5,"pc-i440fx-2.5" , pc_i440fx_2_5_machine_options);static void pc_i440fx_2_4_machine_options (MachineClass *m)
@@ -816,7 +805,7 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m)compat_props_add (m->compat_props, pc_compat_2_4, pc_compat_2_4_len); } -DEFINE_I440FX_MACHINE (v2_4,"pc-i440fx-2.4" ,NULL , +DEFINE_I440FX_MACHINE (v2_4,"pc-i440fx-2.4" , pc_i440fx_2_4_machine_options)#ifdef CONFIG_ISAPC
Signature · 1 line
2.41.0
[PULL 39/76] hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/pnv_xive.h | 2 +- hw/intc/pnv_xive.c | 9 +-------- hw/ppc/pnv.c | 8 +++++++- 3 files changed, 9 insertions(+), 10 deletions(-)
include/hw/ppc/pnv_xive.h +1 -1
@@ -93,7 +93,7 @@ struct PnvXiveClass {DeviceRealize parent_realize; }; -void pnv_xive_pic_print_info (PnvXive *xive,Monitor *mon); +void pnv_xive_pic_print_info (PnvXive *xive,GString *buf);/* * XIVE2 interrupt controller (POWER10)
hw/intc/pnv_xive.c +1 -8
@@ -11,12 +11,10 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" #include "sysemu/reset.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/pnv.h" #include "hw/ppc/pnv_chip.h"
@@ -1846,7 +1844,7 @@ static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx, xive_get_field32(NVT_W4_IPB, nvt->w4)); } -void pnv_xive_pic_print_info (PnvXive *xive,Monitor *mon) +void pnv_xive_pic_print_info (PnvXive *xive,GString *buf) {XiveRouter *xrtr =XIVE_ROUTER (xive);uint8_t blk =pnv_xive_block_id (xive);
@@ -1858,8 +1856,6 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)XiveNVT nvt;int i;uint64_t xive_nvt_per_subpage; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;g_string_append_printf (buf,"XIVE[%x] #%d Source %08x .. %08x\n" , chip_id, blk, srcno0, srcno0 + nr_ipis -1 );
@@ -1897,9 +1893,6 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)xive_nvt_pic_print_info (&nvt, i++, buf); } } - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }static void pnv_xive_reset (void *dev)
hw/ppc/pnv.c +7 -1
@@ -808,8 +808,14 @@ static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque)static void pnv_chip_power9_pic_print_info (PnvChip *chip,Monitor *mon) {Pnv9Chip *chip9 =PNV9_CHIP (chip); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + +pnv_xive_pic_print_info (&chip9->xive, buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); -pnv_xive_pic_print_info (&chip9->xive, mon);pnv_psi_pic_print_info (&chip9->psi, mon); object_child_foreach_recursive(OBJECT(chip),
Signature · 1 line
2.41.0
[PULL 28/76] hw/ppc: Avoid using Monitor in ics_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xics.h | 2 +- hw/intc/xics.c | 17 ++++++++--------- hw/intc/xics_spapr.c | 4 ++-- hw/ppc/pnv.c | 15 ++++++++------- 4 files changed, 19 insertions(+), 19 deletions(-)
include/hw/ppc/xics.h +1 -1
@@ -172,7 +172,7 @@ static inline bool ics_irq_free(ICSState *ics, uint32_t srcno)void ics_set_irq_type (ICSState *ics,int srcno,bool lsi);void icp_pic_print_info (ICPState *icp,GString *buf); -void ics_pic_print_info (ICSState *ics,Monitor *mon); +void ics_pic_print_info (ICSState *ics,GString *buf);void ics_resend (ICSState *ics);void icp_resend (ICPState *ss);
hw/intc/xics.c +8 -9
@@ -35,7 +35,6 @@#include "qemu/module.h" #include "qapi/visitor.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/irq.h" #include "sysemu/kvm.h"
@@ -68,12 +67,12 @@ void icp_pic_print_info(ICPState *icp, GString *buf) icp->pending_priority, icp->mfrr); } -void ics_pic_print_info (ICSState *ics,Monitor *mon) +void ics_pic_print_info (ICSState *ics,GString *buf) {uint32_t i; -monitor_printf (mon,"ICS %4x..%4x %p\n" , - ics->offset, ics->offset + ics->nr_irqs -1 , ics); +g_string_append_printf (buf,"ICS %4x..%4x %p\n" , + ics->offset, ics->offset + ics->nr_irqs -1 , ics);if (!ics->irqs) {return ;
@@ -89,11 +88,11 @@ void ics_pic_print_info(ICSState *ics, Monitor *mon)if (!(irq->flags &XICS_FLAGS_IRQ_MASK )) {continue ; } -monitor_printf (mon," %4x %s %02x %02x\n" , - ics->offset + i, - (irq->flags &XICS_FLAGS_IRQ_LSI ) ? -"LSI" :"MSI" , - irq->priority, irq->status); +g_string_append_printf (buf," %4x %s %02x %02x\n" , + ics->offset + i, + (irq->flags &XICS_FLAGS_IRQ_LSI ) ? +"LSI" :"MSI" , + irq->priority, irq->status); } }
hw/intc/xics_spapr.c +2 -2
@@ -409,10 +409,10 @@ static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon)icp_pic_print_info (spapr_cpu_state (cpu)->icp, buf); } +ics_pic_print_info (ics, buf); + info =human_readable_text_from_str (buf);monitor_puts (mon, info->human_readable_text); - -ics_pic_print_info (ics, mon); }static int xics_spapr_post_load (SpaprInterruptController *intc,int version_id)
hw/ppc/pnv.c +8 -7
@@ -770,20 +770,21 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon)Pnv8Chip *chip8 =PNV8_CHIP (chip);int i; -ics_pic_print_info (&chip8->psi.ics, mon); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + +ics_pic_print_info (&chip8->psi.ics, buf);for (i =0 ; i < chip8->num_phbs; i++) {PnvPHB *phb = chip8->phbs[i];PnvPHB3 *phb3 =PNV_PHB3 (phb->backend); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;pnv_phb3_msi_pic_print_info (&phb3->msis, buf); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); - -ics_pic_print_info (&phb3->lsis, mon); +ics_pic_print_info (&phb3->lsis, buf); } + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }static int pnv_chip_power9_pic_print_info_child (Object *child,void *opaque)
Signature · 1 line
2.41.0
[PULL 40/76] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/pnv_psi.h | 2 +- hw/ppc/pnv.c | 10 +++++++--- hw/ppc/pnv_psi.c | 9 +-------- 3 files changed, 9 insertions(+), 12 deletions(-)
include/hw/ppc/pnv_psi.h +1 -1
@@ -110,6 +110,6 @@ typedef enum PnvPsiIrq {#define PSIHB9_IRQ_PSU 13#define PSIHB9_NUM_IRQS 14 -void pnv_psi_pic_print_info (Pnv9Psi *psi,Monitor *mon); +void pnv_psi_pic_print_info (Pnv9Psi *psi,GString *buf);#endif /* PPC_PNV_PSI_H */
hw/ppc/pnv.c +7 -3
@@ -812,12 +812,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon)g_autoptr (HumanReadableText) info =NULL ;pnv_xive_pic_print_info (&chip9->xive, buf); +pnv_psi_pic_print_info (&chip9->psi, buf); info =human_readable_text_from_str (buf);monitor_puts (mon, info->human_readable_text); -pnv_psi_pic_print_info (&chip9->psi, mon); -object_child_foreach_recursive (OBJECT (chip), pnv_chip_power9_pic_print_info_child, mon); }
@@ -862,9 +861,14 @@ static void pnv_ipmi_bt_init(ISABus *bus, IPMIBmc *bmc, uint32_t irq)static void pnv_chip_power10_pic_print_info (PnvChip *chip,Monitor *mon) {Pnv10Chip *chip10 =PNV10_CHIP (chip); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;pnv_xive2_pic_print_info (&chip10->xive, mon); -pnv_psi_pic_print_info (&chip10->psi, mon); + +pnv_psi_pic_print_info (&chip10->psi, buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);object_child_foreach_recursive (OBJECT (chip), pnv_chip_power9_pic_print_info_child, mon);
hw/ppc/pnv_psi.c +1 -8
@@ -25,8 +25,6 @@#include "qemu/module.h" #include "sysemu/reset.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h"
@@ -978,11 +976,9 @@ static void pnv_psi_register_types(void)type_init (pnv_psi_register_types); -void pnv_psi_pic_print_info (Pnv9Psi *psi9,Monitor *mon) +void pnv_psi_pic_print_info (Pnv9Psi *psi9,GString *buf) {PnvPsi *psi =PNV_PSI (psi9); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;uint32_t offset = (psi->regs[PSIHB_REG (PSIHB9_IVT_OFFSET )] >>PSIHB9_IVT_OFF_SHIFT );
@@ -990,7 +986,4 @@ void pnv_psi_pic_print_info(Pnv9Psi *psi9, Monitor *mon)g_string_append_printf (buf,"PSIHB Source %08x .. %08x\n" , offset, offset + psi9->source.nr_irqs -1 );xive_source_pic_print_info (&psi9->source, offset, buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }
Signature · 1 line
2.41.0
[PULL 16/76] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine
In reply to Philippe Mathieu-DaudéThe pc-i440fx-2.2 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it.
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 23 ----------------------- hw/i386/pc_piix.c | 21 --------------------- 5 files changed, 2 insertions(+), 49 deletions(-)
docs/about/deprecated.rst +1 -1
@@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have
docs/about/removed-features.rst +1 -1
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live
include/hw/i386/pc.h +0 -3
@@ -307,9 +307,6 @@ extern const size_t pc_compat_2_4_len;extern GlobalProperty pc_compat_2_3[];extern const size_t pc_compat_2_3_len; -extern GlobalProperty pc_compat_2_2[]; -extern const size_t pc_compat_2_2_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \
hw/i386/pc.c +0 -23
@@ -290,29 +290,6 @@ GlobalProperty pc_compat_2_3[] = { };const size_t pc_compat_2_3_len =G_N_ELEMENTS (pc_compat_2_3); -GlobalProperty pc_compat_2_2[] = { - PC_CPU_MODEL_IDS("2.2.0") - {"kvm64" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"kvm32" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Conroe" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Penryn" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Nehalem" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Westmere" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"SandyBridge" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Haswell" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Broadwell" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Opteron_G1" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Opteron_G2" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Opteron_G3" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Opteron_G4" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Opteron_G5" "-" TYPE_X86_CPU ,"vme" ,"off" }, - {"Haswell" "-" TYPE_X86_CPU ,"f16c" ,"off" }, - {"Haswell" "-" TYPE_X86_CPU ,"rdrand" ,"off" }, - {"Broadwell" "-" TYPE_X86_CPU ,"f16c" ,"off" }, - {"Broadwell" "-" TYPE_X86_CPU ,"rdrand" ,"off" }, -}; -const size_t pc_compat_2_2_len =G_N_ELEMENTS (pc_compat_2_2); -GSIState *pc_gsi_create (qemu_irq **irqs,bool pci_enabled) {GSIState *s;
hw/i386/pc_piix.c +0 -21
@@ -429,11 +429,6 @@ static void pc_compat_2_3_fn(MachineState *machine) } } -static void pc_compat_2_2_fn (MachineState *machine) -{ -pc_compat_2_3_fn (machine); -} -#ifdef CONFIG_ISAPC static void pc_init_isa (MachineState *machine) {
@@ -843,22 +838,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v2_3,"pc-i440fx-2.3" , pc_compat_2_3_fn, pc_i440fx_2_3_machine_options); -static void pc_i440fx_2_2_machine_options (MachineClass *m) -{ -PCMachineClass *pcmc =PC_MACHINE_CLASS (m); - -pc_i440fx_2_3_machine_options (m); - m->hw_version ="2.2.0" ; - m->default_machine_opts ="firmware=bios-256k.bin,suppress-vmdesc=on" ; -compat_props_add (m->compat_props, hw_compat_2_2, hw_compat_2_2_len); -compat_props_add (m->compat_props, pc_compat_2_2, pc_compat_2_2_len); - pcmc->rsdp_in_ram = false; - pcmc->resizable_acpi_blob = false; -} - -DEFINE_I440FX_MACHINE (v2_2,"pc-i440fx-2.2" , pc_compat_2_2_fn, - pc_i440fx_2_2_machine_options); -#ifdef CONFIG_ISAPC static void isapc_machine_options (MachineClass *m) {
Signature · 1 line
2.41.0
[PULL 35/76] hw/ppc: Avoid using Monitor in xive_eas_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive_regs.h | 2 +- hw/intc/pnv_xive.c | 10 +++++----- hw/intc/xive.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-)
include/hw/ppc/xive_regs.h +1 -1
@@ -167,7 +167,7 @@ typedef struct XiveEAS {#define xive_eas_is_valid (eas) (be64_to_cpu((eas)->w) & EAS_VALID)#define xive_eas_is_masked (eas) (be64_to_cpu((eas)->w) & EAS_MASKED) -void xive_eas_pic_print_info (XiveEAS *eas,uint32_t lisn,Monitor *mon); +void xive_eas_pic_print_info (XiveEAS *eas,uint32_t lisn,GString *buf);static inline uint64_t xive_get_field64 (uint64_t mask,uint64_t word) {
hw/intc/pnv_xive.c +5 -5
@@ -1864,19 +1864,19 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)g_string_append_printf (buf,"XIVE[%x] #%d Source %08x .. %08x\n" , chip_id, blk, srcno0, srcno0 + nr_ipis -1 );xive_source_pic_print_info (&xive->ipi_source, srcno0, buf); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"XIVE[%x] #%d EAT %08x .. %08x\n" , chip_id, blk, - srcno0, srcno0 + nr_ipis -1 ); +g_string_append_printf (buf,"XIVE[%x] #%d EAT %08x .. %08x\n" , + chip_id, blk, srcno0, srcno0 + nr_ipis -1 );for (i =0 ; i < nr_ipis; i++) {if (xive_router_get_eas (xrtr, blk, i, &eas)) {break ; }if (!xive_eas_is_masked (&eas)) { -xive_eas_pic_print_info (&eas, i, mon); +xive_eas_pic_print_info (&eas, i, buf); } } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] #%d ENDT\n" , chip_id, blk); i =0 ;
hw/intc/xive.c +6 -6
@@ -1921,17 +1921,17 @@ static const TypeInfo xive_router_info = { } }; -void xive_eas_pic_print_info (XiveEAS *eas,uint32_t lisn,Monitor *mon) +void xive_eas_pic_print_info (XiveEAS *eas,uint32_t lisn,GString *buf) {if (!xive_eas_is_valid (eas)) {return ; } -monitor_printf (mon," %08x %s end:%02x/%04x data:%08x\n" , - lisn,xive_eas_is_masked (eas) ?"M" :" " , - (uint8_t )xive_get_field64 (EAS_END_BLOCK , eas->w), - (uint32_t )xive_get_field64 (EAS_END_INDEX , eas->w), - (uint32_t )xive_get_field64 (EAS_END_DATA , eas->w)); +g_string_append_printf (buf," %08x %s end:%02x/%04x data:%08x\n" , + lisn,xive_eas_is_masked (eas) ?"M" :" " , + (uint8_t )xive_get_field64 (EAS_END_BLOCK , eas->w), + (uint32_t )xive_get_field64 (EAS_END_INDEX , eas->w), + (uint32_t )xive_get_field64 (EAS_END_DATA , eas->w)); }/*
Signature · 1 line
2.41.0
[PULL 52/76] hw/intc: Introduce x-query-interrupt-controllers QMP command
In reply to Philippe Mathieu-DaudéThis is a counterpart to the HMP "info pic" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is rewritten to call the QMP command.
Message-Id: <[email protected]>
--- qapi/machine.json | 17 +++++++++++++++++ hw/core/machine-qmp-cmds.c | 29 +++++++++++++++++++++++++++++ monitor/hmp-cmds.c | 33 --------------------------------- hmp-commands-info.hx | 2 +- 4 files changed, 47 insertions(+), 34 deletions(-)
qapi/machine.json +17 -0
@@ -1864,3 +1864,20 @@ { 'command': 'dumpdtb', 'data': { 'filename': 'str' }, 'if': 'CONFIG_FDT' } + +## +# @x-query-interrupt-controllers: +# +# Query information on interrupt controller devices +# +# Features: +# +# @unstable: This command is meant for debugging. +# +# Returns: Interrupt controller devices information +# +# Since: 9.1 +## +{ 'command': 'x-query-interrupt-controllers', + 'returns': 'HumanReadableText', + 'features': [ 'unstable' ]}
hw/core/machine-qmp-cmds.c +29 -0
@@ -361,6 +361,35 @@ HumanReadableText *qmp_x_query_irq(Error **errp)return human_readable_text_from_str (buf); } +static int qmp_x_query_intc_foreach (Object *obj,void *opaque) +{ +InterruptStatsProvider *intc; +InterruptStatsProviderClass *k; +GString *buf = opaque; + +if (object_dynamic_cast (obj,TYPE_INTERRUPT_STATS_PROVIDER )) { + intc =INTERRUPT_STATS_PROVIDER (obj); + k =INTERRUPT_STATS_PROVIDER_GET_CLASS (obj); +if (k->print_info) { + k->print_info (intc, buf); + }else { +g_string_append_printf (buf, +"Interrupt controller information not available for %s.\n" , +object_get_typename (obj)); + } + } + +return 0 ; +} + +HumanReadableText *qmp_x_query_interrupt_controllers (Error **errp) +{ +g_autoptr (GString) buf =g_string_new ("" ); +object_child_foreach_recursive (object_get_root (), + qmp_x_query_intc_foreach, buf); +return human_readable_text_from_str (buf); +} +GuidInfo *qmp_query_vm_generation_id (Error **errp) {GuidInfo *info;
monitor/hmp-cmds.c +0 -33
@@ -25,9 +25,7 @@#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" -#include "qapi/type-helpers.h" #include "qemu/cutils.h" -#include "hw/intc/intc.h" #include "qemu/log.h" #include "sysemu/sysemu.h"
@@ -83,37 +81,6 @@ void hmp_info_version(Monitor *mon, const QDict *qdict)qapi_free_VersionInfo (info); } -static int hmp_info_pic_foreach (Object *obj,void *opaque) -{ -InterruptStatsProvider *intc; -InterruptStatsProviderClass *k; -Monitor *mon = opaque; - -if (object_dynamic_cast (obj,TYPE_INTERRUPT_STATS_PROVIDER )) { - intc =INTERRUPT_STATS_PROVIDER (obj); - k =INTERRUPT_STATS_PROVIDER_GET_CLASS (obj); -if (k->print_info) { -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; - - k->print_info (intc, buf); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); - }else { -monitor_printf (mon,"Interrupt controller information not available for %s.\n" , -object_get_typename (obj)); - } - } - -return 0 ; -} - -void hmp_info_pic (Monitor *mon,const QDict *qdict) -{ -object_child_foreach_recursive (object_get_root (), - hmp_info_pic_foreach, mon); -} -void hmp_quit (Monitor *mon,const QDict *qdict) {monitor_suspend (mon);
hmp-commands-info.hx +1 -1
@@ -174,7 +174,7 @@ ERST .args_type = "", .params = "", .help = "show PIC state", - .cmd = hmp_info_pic, + .cmd_info_hrt = qmp_x_query_interrupt_controllers, }, SRST
Signature · 1 line
2.41.0
[PULL 15/76] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug()
In reply to Philippe Mathieu-Daudé'legacy_align' is always NULL, remove it, simplifying memory_device_pre_plug().
Message-Id: <[email protected]>
--- include/hw/mem/memory-device.h | 2 +- hw/i386/pc.c | 3 +-- hw/mem/memory-device.c | 12 ++++-------- hw/mem/pc-dimm.c | 2 +- hw/virtio/virtio-md-pci.c | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-)
include/hw/mem/memory-device.h +1 -1
@@ -169,7 +169,7 @@ uint64_t get_plugged_memory_size(void);unsigned int memory_devices_get_reserved_memslots (void );bool memory_devices_memslot_auto_decision_active (void );void memory_device_pre_plug (MemoryDeviceState *md,MachineState *ms, -const uint64_t *legacy_align,Error **errp); +Error **errp);void memory_device_plug (MemoryDeviceState *md,MachineState *ms);void memory_device_unplug (MemoryDeviceState *md,MachineState *ms); uint64_t memory_device_get_region_size(const MemoryDeviceState *md,
hw/i386/pc.c +1 -2
@@ -1395,8 +1395,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev, {/* The vmbus handler has no hotplug handler; we should never end up here. */ g_assert (!dev->hotplugged); -memory_device_pre_plug (MEMORY_DEVICE (dev),MACHINE (hotplug_dev),NULL , - errp); +memory_device_pre_plug (MEMORY_DEVICE (dev),MACHINE (hotplug_dev), errp); } static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev,
hw/mem/memory-device.c +4 -8
@@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void) }void memory_device_pre_plug (MemoryDeviceState *md,MachineState *ms, -const uint64_t *legacy_align,Error **errp) +Error **errp) {const MemoryDeviceClass *mdc =MEMORY_DEVICE_GET_CLASS (md);Error *local_err =NULL ;
@@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms,return ; } -if (legacy_align) { - align = *legacy_align; - }else { -if (mdc->get_min_alignment) { - align = mdc->get_min_alignment (md); - } - align =MAX (align,memory_region_get_alignment (mr)); +if (mdc->get_min_alignment) { + align = mdc->get_min_alignment (md); } + align =MAX (align,memory_region_get_alignment (mr)); addr = mdc->get_addr (md); addr =memory_device_get_free_addr (ms, !addr ?NULL : &addr, align,memory_region_size (mr), &local_err);
hw/mem/pc-dimm.c +1 -1
@@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) &error_abort);trace_mhp_pc_dimm_assigned_slot (slot); -memory_device_pre_plug (MEMORY_DEVICE (dimm), machine,NULL , errp); +memory_device_pre_plug (MEMORY_DEVICE (dimm), machine, errp); }void pc_dimm_plug (PCDIMMDevice *dimm,MachineState *machine)
hw/virtio/virtio-md-pci.c +1 -1
@@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp)* First, see if we can plug this memory device at all. If that * succeeds, branch of to the actual hotplug handler. */ -memory_device_pre_plug (md, ms,NULL , &local_err); +memory_device_pre_plug (md, ms, &local_err);if (!local_err && bus_handler) {hotplug_handler_pre_plug (bus_handler, dev, &local_err); }
Signature · 1 line
2.41.0
[PULL 22/76] target/i386: Remove X86CPU::kvm_no_smi_migration field
In reply to Philippe Mathieu-DaudéX86CPU::kvm_no_smi_migration was only used by the pc-i440fx-2.3 machine, which got removed. Remove it and simplify kvm_put_vcpu_events().
Message-Id: <[email protected]>
--- target/i386/cpu.h | 3 --- target/i386/cpu.c | 2 -- target/i386/kvm/kvm.c | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-)
target/i386/cpu.h +0 -3
@@ -2108,9 +2108,6 @@ struct ArchCPU {/* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; -/* Stop SMI delivery for migration compatibility with old machines */ -bool kvm_no_smi_migration; -/* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid;
target/i386/cpu.c +0 -2
@@ -8281,8 +8281,6 @@ static Property x86_cpu_properties[] = {DEFINE_PROP_BOOL ("x-vendor-cpuid-only" ,X86CPU , vendor_cpuid_only, true),DEFINE_PROP_BOOL ("lmce" ,X86CPU , enable_lmce, false),DEFINE_PROP_BOOL ("l3-cache" ,X86CPU , enable_l3_cache, true), -DEFINE_PROP_BOOL ("kvm-no-smi-migration" ,X86CPU , kvm_no_smi_migration, - false),DEFINE_PROP_BOOL ("kvm-pv-enforce-cpuid" ,X86CPU , kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true),
target/i386/kvm/kvm.c +1 -6
@@ -4474,6 +4474,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector;if (has_msr_smbase) { + events.flags |=KVM_VCPUEVENT_VALID_SMM ; events.smi.smm = !!(env->hflags &HF_SMM_MASK ); events.smi.smm_inside_nmi = !!(env->hflags2 &HF2_SMM_INSIDE_NMI_MASK );if (kvm_irqchip_in_kernel ()) {
@@ -4488,12 +4489,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.smi.pending =0 ; events.smi.latched_init =0 ; } -/* Stop SMI delivery on old machine types to avoid a reboot -* on an inward migration of an old VM. -*/ -if (!cpu->kvm_no_smi_migration) { - events.flags |=KVM_VCPUEVENT_VALID_SMM ; - } }if (level >=KVM_PUT_RESET_STATE ) {
Signature · 1 line
2.41.0
[PULL 46/76] hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/pnv_xive.h | 2 +- hw/intc/pnv_xive2.c | 9 +-------- hw/ppc/pnv.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-)
include/hw/ppc/pnv_xive.h +1 -1
@@ -163,6 +163,6 @@ typedef struct PnvXive2Class { DeviceRealize parent_realize; } PnvXive2Class; -void pnv_xive2_pic_print_info (PnvXive2 *xive,Monitor *mon); +void pnv_xive2_pic_print_info (PnvXive2 *xive,GString *buf);#endif /* PPC_PNV_XIVE_H */
hw/intc/pnv_xive2.c +1 -8
@@ -10,11 +10,9 @@#include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/pnv.h" #include "hw/ppc/pnv_chip.h"
@@ -2105,7 +2103,7 @@ static uint64_t pnv_xive2_vst_per_subpage(PnvXive2 *xive, uint32_t type)return (1ull << page_shift) / info->size; } -void pnv_xive2_pic_print_info (PnvXive2 *xive,Monitor *mon) +void pnv_xive2_pic_print_info (PnvXive2 *xive,GString *buf) {Xive2Router *xrtr =XIVE2_ROUTER (xive);uint8_t blk =pnv_xive2_block_id (xive);
@@ -2117,8 +2115,6 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)Xive2Nvp nvp;int i;uint64_t xive_nvp_per_subpage; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;g_string_append_printf (buf,"XIVE[%x] Source %08x .. %08x\n" , blk, srcno0, srcno0 + nr_esbs -1 );
@@ -2156,7 +2152,4 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)xive2_nvp_pic_print_info (&nvp, i++, buf); } } - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }
hw/ppc/pnv.c +1 -1
@@ -864,7 +864,7 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon)g_autoptr (GString) buf =g_string_new ("" );g_autoptr (HumanReadableText) info =NULL ; -pnv_xive2_pic_print_info (&chip10->xive, mon); +pnv_xive2_pic_print_info (&chip10->xive, buf);pnv_psi_pic_print_info (&chip10->psi, buf); info =human_readable_text_from_str (buf);
Signature · 1 line
2.41.0
[PULL 54/76] target/arm: Set arm_v7m_tcg_ops cpu_exec_halt to arm_cpu_exec_halt()
In reply to Philippe Mathieu-DaudéFrom: Peter Maydell <[email protected]>
In commit a96edb687e76 we set the cpu_exec_halt field of the TCGCPUOps arm_tcg_ops to arm_cpu_exec_halt(), but we left the arm_v7m_tcg_ops struct unchanged. That isn't wrong, because for M-profile FEAT_WFxT doesn't exist and the default handling for "no cpu_exec_halt method" is correct, but it's perhaps a little confusing. We would also like to make setting the cpu_exec_halt method mandatory.
Initialize arm_v7m_tcg_ops cpu_exec_halt to the same function we use for A-profile. (On M-profile we never set up the wfxt timer so there is no change in behaviour here.)
Message-ID: <[email protected]>
--- target/arm/internals.h | 3 +++ target/arm/cpu.c | 2 +- target/arm/tcg/cpu-v7m.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-)
target/arm/internals.h +3 -0
@@ -364,6 +364,9 @@ void arm_restore_state_to_opc(CPUState *cs,#ifdef CONFIG_TCG void arm_cpu_synchronize_from_tb (CPUState *cs,const TranslationBlock *tb); + +/* Our implementation of TCGCPUOps::cpu_exec_halt */ +bool arm_cpu_exec_halt (CPUState *cs);#endif /* CONFIG_TCG */ typedef enum ARMFPRounding {
target/arm/cpu.c +1 -1
@@ -1133,7 +1133,7 @@ static bool arm_cpu_virtio_is_big_endian(CPUState *cs) }#ifdef CONFIG_TCG -static bool arm_cpu_exec_halt (CPUState *cs) +bool arm_cpu_exec_halt (CPUState *cs) {bool leave_halt =cpu_has_work (cs);
target/arm/tcg/cpu-v7m.c +1 -0
@@ -244,6 +244,7 @@ static const TCGCPUOps arm_v7m_tcg_ops = {#else .tlb_fill = arm_cpu_tlb_fill, .cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt, + .cpu_exec_halt = arm_cpu_exec_halt, .do_interrupt = arm_v7m_cpu_do_interrupt, .do_transaction_failed = arm_cpu_do_transaction_failed, .do_unaligned_access = arm_cpu_do_unaligned_access,
Signature · 1 line
2.41.0
[PULL 08/76] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
In reply to Philippe Mathieu-DaudéThe pc-i440fx-2.1 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it.
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 7 ------- hw/i386/pc_piix.c | 23 ----------------------- 5 files changed, 2 insertions(+), 35 deletions(-)
docs/about/deprecated.rst +1 -1
@@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have
docs/about/removed-features.rst +1 -1
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live
include/hw/i386/pc.h +0 -3
@@ -314,9 +314,6 @@ extern const size_t pc_compat_2_3_len;extern GlobalProperty pc_compat_2_2[];extern const size_t pc_compat_2_2_len; -extern GlobalProperty pc_compat_2_1[]; -extern const size_t pc_compat_2_1_len; -#define DEFINE_PC_MACHINE (suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \
hw/i386/pc.c +0 -7
@@ -313,13 +313,6 @@ GlobalProperty pc_compat_2_2[] = { };const size_t pc_compat_2_2_len =G_N_ELEMENTS (pc_compat_2_2); -GlobalProperty pc_compat_2_1[] = { - PC_CPU_MODEL_IDS("2.1.0") - {"coreduo" "-" TYPE_X86_CPU ,"vmx" ,"on" }, - {"core2duo" "-" TYPE_X86_CPU ,"vmx" ,"on" }, -}; -const size_t pc_compat_2_1_len =G_N_ELEMENTS (pc_compat_2_1); -GSIState *pc_gsi_create (qemu_irq **irqs,bool pci_enabled) {GSIState *s;
hw/i386/pc_piix.c +0 -23
@@ -66,7 +66,6 @@#include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" -#include "kvm/kvm-cpu.h" #include "target/i386/cpu.h" #define XEN_IOAPIC_NUM_PIRQS 128ULL
@@ -435,12 +434,6 @@ static void pc_compat_2_2_fn(MachineState *machine)pc_compat_2_3_fn (machine); } -static void pc_compat_2_1_fn (MachineState *machine) -{ -pc_compat_2_2_fn (machine); -x86_cpu_change_kvm_default ("svm" ,NULL ); -} -#ifdef CONFIG_ISAPC static void pc_init_isa (MachineState *machine) {
@@ -866,22 +859,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v2_2,"pc-i440fx-2.2" , pc_compat_2_2_fn, pc_i440fx_2_2_machine_options); -static void pc_i440fx_2_1_machine_options (MachineClass *m) -{ -PCMachineClass *pcmc =PC_MACHINE_CLASS (m); - -pc_i440fx_2_2_machine_options (m); - m->hw_version ="2.1.0" ; - m->default_display =NULL ; -compat_props_add (m->compat_props, hw_compat_2_1, hw_compat_2_1_len); -compat_props_add (m->compat_props, pc_compat_2_1, pc_compat_2_1_len); - pcmc->smbios_uuid_encoded = false; - pcmc->enforce_aligned_dimm = false; -} - -DEFINE_I440FX_MACHINE (v2_1,"pc-i440fx-2.1" , pc_compat_2_1_fn, - pc_i440fx_2_1_machine_options); -#ifdef CONFIG_ISAPC static void isapc_machine_options (MachineClass *m) {
Signature · 1 line
2.41.0
[PULL 26/76] hw/ppc: Avoid using Monitor in icp_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xics.h | 2 +- hw/intc/xics.c | 8 ++++---- hw/intc/xics_spapr.c | 8 +++++++- hw/ppc/pnv.c | 8 +++++++- 4 files changed, 19 insertions(+), 7 deletions(-)
include/hw/ppc/xics.h +1 -1
@@ -171,7 +171,7 @@ static inline bool ics_irq_free(ICSState *ics, uint32_t srcno) }void ics_set_irq_type (ICSState *ics,int srcno,bool lsi); -void icp_pic_print_info (ICPState *icp,Monitor *mon); +void icp_pic_print_info (ICPState *icp,GString *buf);void ics_pic_print_info (ICSState *ics,Monitor *mon);void ics_resend (ICSState *ics);
hw/intc/xics.c +4 -4
@@ -42,7 +42,7 @@#include "sysemu/reset.h" #include "target/ppc/cpu.h" -void icp_pic_print_info (ICPState *icp,Monitor *mon) +void icp_pic_print_info (ICPState *icp,GString *buf) {int cpu_index;
@@ -63,9 +63,9 @@ void icp_pic_print_info(ICPState *icp, Monitor *mon)icp_synchronize_state (icp); } -monitor_printf (mon,"CPU %d XIRR=%08x (%p) PP=%02x MFRR=%02x\n" , - cpu_index, icp->xirr, icp->xirr_owner, - icp->pending_priority, icp->mfrr); +g_string_append_printf (buf,"CPU %d XIRR=%08x (%p) PP=%02x MFRR=%02x\n" , + cpu_index, icp->xirr, icp->xirr_owner, + icp->pending_priority, icp->mfrr); }void ics_pic_print_info (ICSState *ics,Monitor *mon)
hw/intc/xics_spapr.c +7 -1
@@ -34,6 +34,8 @@#include "hw/ppc/xics_spapr.h" #include "hw/ppc/fdt.h" #include "qapi/visitor.h" +#include "qapi/type-helpers.h" +#include "monitor/monitor.h" /* * Guest interfaces
@@ -399,12 +401,16 @@ static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon) {ICSState *ics =ICS_SPAPR (intc);CPUState *cs; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;CPU_FOREACH (cs) {PowerPCCPU *cpu =POWERPC_CPU (cs); -icp_pic_print_info (spapr_cpu_state (cpu)->icp, mon); +icp_pic_print_info (spapr_cpu_state (cpu)->icp, buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);ics_pic_print_info (ics, mon); }
hw/ppc/pnv.c +7 -1
@@ -1130,7 +1130,13 @@ static void pnv_chip_power8_intc_destroy(PnvChip *chip, PowerPCCPU *cpu)static void pnv_chip_power8_intc_print_info (PnvChip *chip,PowerPCCPU *cpu,Monitor *mon) { -icp_pic_print_info (ICP (pnv_cpu_state (cpu)->intc), mon); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + +icp_pic_print_info (ICP (pnv_cpu_state (cpu)->intc), buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }/*
Signature · 1 line
2.41.0
[PULL 50/76] hw/ppc: Avoid using Monitor in pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/pnv_chip.h | 2 +- hw/ppc/pnv.c | 29 +++++++---------------------- 2 files changed, 8 insertions(+), 23 deletions(-)
include/hw/ppc/pnv_chip.h +1 -1
@@ -154,7 +154,7 @@ struct PnvChipClass {void (*intc_print_info)(PnvChip *chip,PowerPCCPU *cpu,GString *buf); ISABus *(*isa_create)(PnvChip *chip, Error **errp);void (*dt_populate)(PnvChip *chip,void *fdt); -void (*pic_print_info)(PnvChip *chip,Monitor *mon); +void (*pic_print_info)(PnvChip *chip,GString *buf);uint64_t (*xscom_core_base)(PnvChip *chip,uint32_t core_id);uint32_t (*xscom_pcba)(PnvChip *chip,uint64_t addr); };
hw/ppc/pnv.c +7 -22
@@ -765,14 +765,11 @@ static ISABus *pnv_isa_create(PnvChip *chip, Error **errp)return PNV_CHIP_GET_CLASS (chip)->isa_create (chip, errp); } -static void pnv_chip_power8_pic_print_info (PnvChip *chip,Monitor *mon) +static void pnv_chip_power8_pic_print_info (PnvChip *chip,GString *buf) {Pnv8Chip *chip8 =PNV8_CHIP (chip);int i; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; -ics_pic_print_info (&chip8->psi.ics, buf);for (i =0 ; i < chip8->num_phbs; i++) {
@@ -782,9 +779,6 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon)pnv_phb3_msi_pic_print_info (&phb3->msis, buf);ics_pic_print_info (&phb3->lsis, buf); } - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }static int pnv_chip_power9_pic_print_info_child (Object *child,void *opaque)
@@ -801,19 +795,14 @@ static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque)return 0 ; } -static void pnv_chip_power9_pic_print_info (PnvChip *chip,Monitor *mon) +static void pnv_chip_power9_pic_print_info (PnvChip *chip,GString *buf) {Pnv9Chip *chip9 =PNV9_CHIP (chip); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;pnv_xive_pic_print_info (&chip9->xive, buf);pnv_psi_pic_print_info (&chip9->psi, buf);object_child_foreach_recursive (OBJECT (chip), pnv_chip_power9_pic_print_info_child, buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); } static uint64_t pnv_chip_power8_xscom_core_base(PnvChip *chip,
@@ -853,19 +842,14 @@ static void pnv_ipmi_bt_init(ISABus *bus, IPMIBmc *bmc, uint32_t irq)isa_realize_and_unref (dev, bus, &error_fatal); } -static void pnv_chip_power10_pic_print_info (PnvChip *chip,Monitor *mon) +static void pnv_chip_power10_pic_print_info (PnvChip *chip,GString *buf) {Pnv10Chip *chip10 =PNV10_CHIP (chip); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;pnv_xive2_pic_print_info (&chip10->xive, buf);pnv_psi_pic_print_info (&chip10->psi, buf);object_child_foreach_recursive (OBJECT (chip), pnv_chip_power9_pic_print_info_child, buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }/* Always give the first 1GB to chip 0 else we won't boot */
@@ -2363,12 +2347,13 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj,PNV_CHIP_GET_CLASS (pnv->chips[0 ])->intc_print_info (pnv->chips[0 ], cpu, buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text);for (i =0 ; i < pnv->num_chips; i++) { -PNV_CHIP_GET_CLASS (pnv->chips[i])->pic_print_info (pnv->chips[i], mon); +PNV_CHIP_GET_CLASS (pnv->chips[i])->pic_print_info (pnv->chips[i], buf); } + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); } static int pnv_match_nvt(XiveFabric *xfb, uint8_t format,
Signature · 1 line
2.41.0
[PULL 34/76] hw/ppc: Avoid using Monitor in pnv_phb4_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/pci-host/pnv_phb4.h | 2 +- hw/pci-host/pnv_phb4.c | 9 +-------- hw/ppc/pnv.c | 6 +++++- 3 files changed, 7 insertions(+), 10 deletions(-)
include/hw/pci-host/pnv_phb4.h +1 -1
@@ -155,7 +155,7 @@ struct PnvPHB4 { QLIST_HEAD(, PnvPhb4DMASpace) dma_spaces; }; -void pnv_phb4_pic_print_info (PnvPHB4 *phb,Monitor *mon); +void pnv_phb4_pic_print_info (PnvPHB4 *phb,GString *buf);int pnv_phb4_pec_get_phb_id (PnvPhb4PecState *pec,int stack_index);PnvPhb4PecState *pnv_pec_add_phb (PnvChip *chip,PnvPHB *phb,Error **errp);void pnv_phb4_bus_init (DeviceState *dev,PnvPHB4 *phb);
hw/pci-host/pnv_phb4.c +1 -8
@@ -10,8 +10,6 @@#include "qemu/log.h" #include "qapi/visitor.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" #include "target/ppc/cpu.h" #include "hw/pci-host/pnv_phb4_regs.h" #include "hw/pci-host/pnv_phb4.h"
@@ -1802,14 +1800,12 @@ static void pnv_phb4_register_types(void)type_init (pnv_phb4_register_types); -void pnv_phb4_pic_print_info (PnvPHB4 *phb,Monitor *mon) +void pnv_phb4_pic_print_info (PnvPHB4 *phb,GString *buf) {uint64_t notif_port = phb->regs[PHB_INT_NOTIFY_ADDR >>3 ] & ~PHB_INT_NOTIFY_ADDR_64K ;uint32_t offset = phb->regs[PHB_INT_NOTIFY_INDEX >>3 ];bool abt = !!(phb->regs[PHB_CTRLR >>3 ] &PHB_CTRLR_IRQ_ABT_MODE ); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;g_string_append_printf (buf, "PHB4[%x:%x] Source %08x .. %08x "
@@ -1819,7 +1815,4 @@ void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon) abt ?"ABT" :"" , notif_port);xive_source_pic_print_info (&phb->xsrc,0 , buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }
hw/ppc/pnv.c +5 -1
@@ -791,12 +791,16 @@ static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) {Monitor *mon = opaque;PnvPHB *phb = (PnvPHB *)object_dynamic_cast (child,TYPE_PNV_PHB ); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;if (!phb) {return 0 ; } -pnv_phb4_pic_print_info (PNV_PHB4 (phb->backend), mon); +pnv_phb4_pic_print_info (PNV_PHB4 (phb->backend), buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);return 0 ; }
Signature · 1 line
2.41.0
[PULL 24/76] hw/audio/virtio-snd: Always use little endian audio format
In reply to Philippe Mathieu-DaudéThe VIRTIO Sound Device conforms with the Virtio spec v1.2, thus only use little endianness.
Remove the suspicious target_words_bigendian() noticed during code review.
Message-Id: <[email protected]>
--- hw/audio/virtio-snd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/audio/virtio-snd.c +1 -1
@@ -401,7 +401,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as, as->nchannels =MIN (AUDIO_MAX_CHANNELS , params->channels); as->fmt =virtio_snd_get_qemu_format (params->format); as->freq =virtio_snd_get_qemu_freq (params->rate); - as->endianness =target_words_bigendian () ?1 :0 ; + as->endianness =0 ;/* Conforming to VIRTIO 1.0: always little endian. */ }/*
Signature · 1 line
2.41.0
[PULL 25/76] hw/ppc: Avoid using Monitor in pnv_phb3_msi_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/pci-host/pnv_phb3.h | 2 +- hw/pci-host/pnv_phb3_msi.c | 21 ++++++++++----------- hw/ppc/pnv.c | 8 +++++++- 3 files changed, 18 insertions(+), 13 deletions(-)
include/hw/pci-host/pnv_phb3.h +1 -1
@@ -40,7 +40,7 @@ void pnv_phb3_msi_update_config(Phb3MsiState *msis, uint32_t base,void pnv_phb3_msi_send (Phb3MsiState *msis,uint64_t addr,uint16_t data,int32_t dev_pe);void pnv_phb3_msi_ffi (Phb3MsiState *msis,uint64_t val); -void pnv_phb3_msi_pic_print_info (Phb3MsiState *msis,Monitor *mon); +void pnv_phb3_msi_pic_print_info (Phb3MsiState *msis,GString *buf);/*
hw/pci-host/pnv_phb3_msi.c +10 -11
@@ -13,7 +13,6 @@#include "hw/pci-host/pnv_phb3.h" #include "hw/ppc/pnv.h" #include "hw/pci/msi.h" -#include "monitor/monitor.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "sysemu/reset.h"
@@ -316,13 +315,13 @@ static void pnv_phb3_msi_register_types(void)type_init (pnv_phb3_msi_register_types); -void pnv_phb3_msi_pic_print_info (Phb3MsiState *msi,Monitor *mon) +void pnv_phb3_msi_pic_print_info (Phb3MsiState *msi,GString *buf) {ICSState *ics =ICS (msi);int i; -monitor_printf (mon,"ICS %4x..%4x %p\n" , - ics->offset, ics->offset + ics->nr_irqs -1 , ics); +g_string_append_printf (buf,"ICS %4x..%4x %p\n" , + ics->offset, ics->offset + ics->nr_irqs -1 , ics);for (i =0 ; i < ics->nr_irqs; i++) {uint64_t ive;
@@ -335,12 +334,12 @@ void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, Monitor *mon)continue ; } -monitor_printf (mon," %4x %c%c server=%04x prio=%02x gen=%d\n" , - ics->offset + i, -GETFIELD (IODA2_IVT_P , ive) ?'P' :'-' , -GETFIELD (IODA2_IVT_Q , ive) ?'Q' :'-' , - (uint32_t )GETFIELD (IODA2_IVT_SERVER , ive) >>2 , - (uint32_t )GETFIELD (IODA2_IVT_PRIORITY , ive), - (uint32_t )GETFIELD (IODA2_IVT_GEN , ive)); +g_string_append_printf (buf," %4x %c%c server=%04x prio=%02x gen=%d\n" , + ics->offset + i, +GETFIELD (IODA2_IVT_P , ive) ?'P' :'-' , +GETFIELD (IODA2_IVT_Q , ive) ?'Q' :'-' , + (uint32_t )GETFIELD (IODA2_IVT_SERVER , ive) >>2 , + (uint32_t )GETFIELD (IODA2_IVT_PRIORITY , ive), + (uint32_t )GETFIELD (IODA2_IVT_GEN , ive)); } }
hw/ppc/pnv.c +7 -1
@@ -38,6 +38,7 @@#include "hw/loader.h" #include "hw/nmi.h" #include "qapi/visitor.h" +#include "qapi/type-helpers.h" #include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/ipmi/ipmi.h"
@@ -774,8 +775,13 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon)for (i =0 ; i < chip8->num_phbs; i++) {PnvPHB *phb = chip8->phbs[i];PnvPHB3 *phb3 =PNV_PHB3 (phb->backend); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + +pnv_phb3_msi_pic_print_info (&phb3->msis, buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); -pnv_phb3_msi_pic_print_info (&phb3->msis, mon);ics_pic_print_info (&phb3->lsis, mon); } }
Signature · 1 line
2.41.0
[PULL 51/76] hw/intc: Avoid using Monitor in INTERRUPT_STATS_PROVIDER::print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one (see commit f2de406f29 "docs/devel: document expectations for QAPI data modelling for QMP" for rationale).
Message-Id: <[email protected]>
--- include/hw/intc/intc.h | 2 +- hw/intc/goldfish_pic.c | 8 +++--- hw/intc/i8259_common.c | 14 +++++----- hw/intc/ioapic_common.c | 57 +++++++++++++++++++++-------------------- hw/intc/m68k_irqc.c | 5 ++-- hw/intc/slavio_intctl.c | 11 ++++---- hw/ppc/pnv.c | 10 +------- hw/ppc/spapr.c | 10 +------- monitor/hmp-cmds.c | 8 +++++- 9 files changed, 57 insertions(+), 68 deletions(-)
include/hw/intc/intc.h +1 -1
@@ -22,7 +22,7 @@ struct InterruptStatsProviderClass {*/ bool (*get_statistics)(InterruptStatsProvider *obj,uint64_t **irq_counts,unsigned int *nb_irqs); - void (*print_info)(InterruptStatsProvider *obj, Monitor *mon); + void (*print_info)(InterruptStatsProvider *obj, GString *buf); };#endif
hw/intc/goldfish_pic.c +4 -4
@@ -12,7 +12,6 @@#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "qemu/log.h" #include "trace.h" #include "hw/intc/intc.h"
@@ -39,11 +38,12 @@ static bool goldfish_pic_get_statistics(InterruptStatsProvider *obj,return true; } -static void goldfish_pic_print_info (InterruptStatsProvider *obj,Monitor *mon) +static void goldfish_pic_print_info (InterruptStatsProvider *obj,GString *buf) {GoldfishPICState *s =GOLDFISH_PIC (obj); -monitor_printf (mon,"goldfish-pic.%d: pending=0x%08x enabled=0x%08x\n" , - s->idx, s->pending, s->enabled); +g_string_append_printf (buf, +"goldfish-pic.%d: pending=0x%08x enabled=0x%08x\n" , + s->idx, s->pending, s->enabled); }static void goldfish_pic_update (GoldfishPICState *s)
hw/intc/i8259_common.c +7 -7
@@ -28,7 +28,6 @@#include "hw/isa/i8259_internal.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "qapi/error.h" static int irq_level[16 ];
@@ -132,16 +131,17 @@ static bool pic_get_statistics(InterruptStatsProvider *obj,return true; } -static void pic_print_info (InterruptStatsProvider *obj,Monitor *mon) +static void pic_print_info (InterruptStatsProvider *obj,GString *buf) {PICCommonState *s =PIC_COMMON (obj);pic_dispatch_pre_save (s); -monitor_printf (mon,"pic%d: irr=%02x imr=%02x isr=%02x hprio=%d " -"irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n" , - s->master ?0 :1 , s->irr, s->imr, s->isr, s->priority_add, - s->irq_base, s->read_reg_select, s->elcr, - s->special_fully_nested_mode); +g_string_append_printf (buf,"pic%d: irr=%02x imr=%02x isr=%02x hprio=%d " +"irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n" , + s->master ?0 :1 , s->irr, s->imr, s->isr, + s->priority_add, + s->irq_base, s->read_reg_select, s->elcr, + s->special_fully_nested_mode); }static bool ltim_state_needed (void *opaque)
hw/intc/ioapic_common.c +29 -28
108 lines not on this page · raw message
hw/intc/m68k_irqc.c +2 -3
@@ -10,7 +10,6 @@#include "qemu/osdep.h" #include "cpu.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/qdev-properties.h" #include "hw/nmi.h" #include "hw/intc/intc.h"
@@ -27,10 +26,10 @@ static bool m68k_irqc_get_statistics(InterruptStatsProvider *obj,return true; } -static void m68k_irqc_print_info (InterruptStatsProvider *obj,Monitor *mon) +static void m68k_irqc_print_info (InterruptStatsProvider *obj,GString *buf) {M68KIRQCState *s =M68K_IRQC (obj); -monitor_printf (mon,"m68k-irqc: ipr=0x%x\n" , s->ipr); +g_string_append_printf (buf,"m68k-irqc: ipr=0x%x\n" , s->ipr); }static void m68k_set_irq (void *opaque,int irq,int level)
hw/intc/slavio_intctl.c +5 -6
@@ -24,7 +24,6 @@#include "qemu/osdep.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "qemu/module.h" #include "hw/sysbus.h" #include "hw/intc/intc.h"
@@ -401,17 +400,17 @@ static bool slavio_intctl_get_statistics(InterruptStatsProvider *obj, }#endif -static void slavio_intctl_print_info (InterruptStatsProvider *obj,Monitor *mon) +static void slavio_intctl_print_info (InterruptStatsProvider *obj,GString *buf) {SLAVIO_INTCTLState *s =SLAVIO_INTCTL (obj);int i;for (i =0 ; i <MAX_CPUS ; i++) { -monitor_printf (mon,"per-cpu %d: pending 0x%08x\n" , i, - s->slaves[i].intreg_pending); +g_string_append_printf (buf,"per-cpu %d: pending 0x%08x\n" , i, + s->slaves[i].intreg_pending); } -monitor_printf (mon,"master: pending 0x%08x, disabled 0x%08x\n" , - s->intregm_pending, s->intregm_disabled); +g_string_append_printf (buf,"master: pending 0x%08x, disabled 0x%08x\n" , + s->intregm_pending, s->intregm_disabled); }static void slavio_intctl_init (Object *obj)
hw/ppc/pnv.c +1 -9
@@ -38,8 +38,6 @@#include "hw/loader.h" #include "hw/nmi.h" #include "qapi/visitor.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/ipmi/ipmi.h" #include "target/ppc/mmu-hash64.h"
@@ -2331,14 +2329,11 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir)return cpu ?ICP (pnv_cpu_state (cpu)->intc) :NULL ; } -static void pnv_pic_print_info (InterruptStatsProvider *obj, -Monitor *mon) +static void pnv_pic_print_info (InterruptStatsProvider *obj,GString *buf) {PnvMachineState *pnv =PNV_MACHINE (obj);int i;CPUState *cs; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;CPU_FOREACH (cs) {PowerPCCPU *cpu =POWERPC_CPU (cs);
@@ -2351,9 +2346,6 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj,for (i =0 ; i < pnv->num_chips; i++) {PNV_CHIP_GET_CLASS (pnv->chips[i])->pic_print_info (pnv->chips[i], buf); } - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); } static int pnv_match_nvt(XiveFabric *xfb, uint8_t format,
hw/ppc/spapr.c +1 -9
@@ -31,7 +31,6 @@#include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/qapi-events-qdev.h" -#include "qapi/type-helpers.h" #include "qapi/visitor.h" #include "sysemu/sysemu.h" #include "sysemu/hostmem.h"
@@ -90,8 +89,6 @@#include "hw/ppc/spapr_nvdimm.h" #include "hw/ppc/spapr_numa.h" -#include "monitor/monitor.h" -#include <libfdt.h> /* SLOF memory layout:
@@ -4527,18 +4524,13 @@ static ICPState *spapr_icp_get(XICSFabric *xi, int vcpu_id)return cpu ?spapr_cpu_state (cpu)->icp :NULL ; } -static void spapr_pic_print_info (InterruptStatsProvider *obj, -Monitor *mon) +static void spapr_pic_print_info (InterruptStatsProvider *obj,GString *buf) {SpaprMachineState *spapr =SPAPR_MACHINE (obj); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;spapr_irq_print_info (spapr, buf);g_string_append_printf (buf,"irqchip: %s\n" ,kvm_irqchip_in_kernel () ?"in-kernel" :"emulated" ); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }/*
monitor/hmp-cmds.c +7 -1
@@ -25,6 +25,7 @@#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" +#include "qapi/type-helpers.h" #include "qemu/cutils.h" #include "hw/intc/intc.h" #include "qemu/log.h"
@@ -92,7 +93,12 @@ static int hmp_info_pic_foreach(Object *obj, void *opaque) intc =INTERRUPT_STATS_PROVIDER (obj); k =INTERRUPT_STATS_PROVIDER_GET_CLASS (obj);if (k->print_info) { - k->print_info (intc, mon); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + + k->print_info (intc, buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }else {monitor_printf (mon,"Interrupt controller information not available for %s.\n" ,object_get_typename (obj));
Signature · 1 line
2.41.0
[PULL 42/76] hw/ppc: Avoid using Monitor in xive2_end_eas_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/pnv_xive2.c | 10 +++++----- hw/intc/xive2.c | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-)
include/hw/ppc/xive2_regs.h +1 -1
@@ -134,7 +134,7 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon);void xive2_end_queue_pic_print_info (Xive2End *end,uint32_t width,Monitor *mon);void xive2_end_eas_pic_print_info (Xive2End *end,uint32_t end_idx, -Monitor *mon); +GString *buf);/* * Notification Virtual Processor (NVP)
hw/intc/pnv_xive2.c +5 -5
@@ -2135,14 +2135,14 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) } } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); - -monitor_printf (mon,"XIVE[%x] #%d END Escalation EAT\n" , chip_id, blk); +g_string_append_printf (buf,"XIVE[%x] #%d END Escalation EAT\n" , + chip_id, blk); i =0 ;while (!xive2_router_get_end (xrtr, blk, i, &end)) { -xive2_end_eas_pic_print_info (&end, i++, mon); +xive2_end_eas_pic_print_info (&end, i++, buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] #%d ENDT\n" , chip_id, blk); i =0 ;
hw/intc/xive2.c +10 -10
@@ -116,7 +116,7 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) }void xive2_end_eas_pic_print_info (Xive2End *end,uint32_t end_idx, -Monitor *mon) +GString *buf) {Xive2Eas *eas = (Xive2Eas *) &end->w4;uint8_t pq;
@@ -127,15 +127,15 @@ void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, pq =xive_get_field32 (END2_W1_ESe, end->w1); -monitor_printf (mon," %08x %c%c %c%c end:%02x/%04x data:%08x\n" , - end_idx, - pq &XIVE_ESB_VAL_P ?'P' :'-' , - pq &XIVE_ESB_VAL_Q ?'Q' :'-' , -xive2_eas_is_valid (eas) ?'v' :' ' , -xive2_eas_is_masked (eas) ?'M' :' ' , - (uint8_t )xive_get_field64 (EAS2_END_BLOCK , eas->w), - (uint32_t )xive_get_field64 (EAS2_END_INDEX , eas->w), - (uint32_t )xive_get_field64 (EAS2_END_DATA , eas->w)); +g_string_append_printf (buf," %08x %c%c %c%c end:%02x/%04x data:%08x\n" , + end_idx, + pq &XIVE_ESB_VAL_P ?'P' :'-' , + pq &XIVE_ESB_VAL_Q ?'Q' :'-' , +xive2_eas_is_valid (eas) ?'v' :' ' , +xive2_eas_is_masked (eas) ?'M' :' ' , + (uint8_t )xive_get_field64 (EAS2_END_BLOCK , eas->w), + (uint32_t )xive_get_field64 (EAS2_END_INDEX , eas->w), + (uint32_t )xive_get_field64 (EAS2_END_DATA , eas->w)); }static void xive2_end_enqueue (Xive2End *end,uint32_t data)
Signature · 1 line
2.41.0
[PULL 67/76] target/s390x: Use s390_skeys_get|set() helper
In reply to Philippe Mathieu-DaudéCommit c9274b6bf0 ("target/s390x: start moving TCG-only code to tcg/") moved mem_helper.c, but the trace-events file is still in the parent directory, so is the generated trace.h.
Call the s390_skeys_get|set() helper, removing the need for the trace event shared with the tcg/ sub-directory, fixing the following build failure:
In file included from ../target/s390x/tcg/mem_helper.c:33:
../target/s390x/tcg/trace.h:1:10: fatal error: 'trace/trace-target_s390x_tcg.h' file not found #include "trace/trace-target_s390x_tcg.h"
Message-Id: <[email protected]>
--- target/s390x/mmu_helper.c | 11 ++--------- target/s390x/tcg/mem_helper.c | 16 ++++------------ target/s390x/trace-events | 4 ---- 3 files changed, 6 insertions(+), 25 deletions(-)
target/s390x/mmu_helper.c +2 -9
@@ -25,7 +25,6 @@#include "sysemu/tcg.h" #include "exec/exec-all.h" #include "exec/page-protection.h" -#include "trace.h" #include "hw/hw.h" #include "hw/s390x/storage-keys.h" #include "hw/boards.h"
@@ -303,7 +302,6 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags)static S390SKeysClass *skeyclass;static S390SKeysState *ss;uint8_t key, old_key; -int rc;/* * We expect to be called with an absolute address that has already been
@@ -341,9 +339,7 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags)* * TODO: we have races between getting and setting the key. */ - rc = skeyclass->get_skeys (ss, addr /TARGET_PAGE_SIZE ,1 , &key); -if (rc) { -trace_get_skeys_nonzero (rc); +if (s390_skeys_get (ss, addr /TARGET_PAGE_SIZE ,1 , &key)) {return ; } old_key = key;
@@ -371,10 +367,7 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags) key |=SK_R ;if (key != old_key) { - rc = skeyclass->set_skeys (ss, addr /TARGET_PAGE_SIZE ,1 , &key); -if (rc) { -trace_set_skeys_nonzero (rc); - } +s390_skeys_set (ss, addr /TARGET_PAGE_SIZE ,1 , &key); } }
target/s390x/tcg/mem_helper.c +4 -12
@@ -30,7 +30,6 @@#include "hw/core/tcg-cpu-ops.h" #include "qemu/int128.h" #include "qemu/atomic128.h" -#include "trace.h" #if !defined(CONFIG_USER_ONLY )#include "hw/s390x/storage-keys.h"
@@ -2093,9 +2092,8 @@ uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2) } } - rc = skeyclass->get_skeys (ss, addr /TARGET_PAGE_SIZE ,1 , &key); + rc =s390_skeys_get (ss, addr /TARGET_PAGE_SIZE ,1 , &key);if (rc) { -trace_get_skeys_nonzero (rc);return 0 ; }return key;
@@ -2108,7 +2106,6 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2)static S390SKeysClass *skeyclass;uint64_t addr =wrap_address (env, r2);uint8_t key; -int rc; addr =mmu_real2abs (env, addr);if (!mmu_absolute_addr_valid (addr, false)) {
@@ -2124,10 +2121,7 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2) } key = r1 &0xfe ; - rc = skeyclass->set_skeys (ss, addr /TARGET_PAGE_SIZE ,1 , &key); -if (rc) { -trace_set_skeys_nonzero (rc); - } +s390_skeys_set (ss, addr /TARGET_PAGE_SIZE ,1 , &key);/* * As we can only flush by virtual address and not all the entries * that point to a physical address we have to flush the whole TLB.
@@ -2157,18 +2151,16 @@ uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2) } } - rc = skeyclass->get_skeys (ss, addr /TARGET_PAGE_SIZE ,1 , &key); + rc =s390_skeys_get (ss, addr /TARGET_PAGE_SIZE ,1 , &key);if (rc) { -trace_get_skeys_nonzero (rc);return 0 ; } re = key & (SK_R |SK_C ); key &= ~SK_R ; - rc = skeyclass->set_skeys (ss, addr /TARGET_PAGE_SIZE ,1 , &key); + rc =s390_skeys_set (ss, addr /TARGET_PAGE_SIZE ,1 , &key);if (rc) { -trace_set_skeys_nonzero (rc);return 0 ; }/*
target/s390x/trace-events +0 -4
@@ -1,9 +1,5 @@ # See docs/devel/tracing.rst for syntax documentation. -# mmu_helper.c -get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d" -set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" - # ioinst.c ioinst(const char *insn) "IOINST: %s" ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)"
Signature · 1 line
2.41.0
[PULL 48/76] hw/ppc: Avoid using Monitor in spapr_irq_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/spapr_irq.h | 2 +- hw/ppc/spapr.c | 11 ++++++++--- hw/ppc/spapr_irq.c | 8 +------- 3 files changed, 10 insertions(+), 11 deletions(-)
include/hw/ppc/spapr_irq.h +1 -1
@@ -85,7 +85,7 @@ int spapr_irq_cpu_intc_create(struct SpaprMachineState *spapr, PowerPCCPU *cpu, Error **errp);void spapr_irq_cpu_intc_reset (struct SpaprMachineState *spapr,PowerPCCPU *cpu);void spapr_irq_cpu_intc_destroy (struct SpaprMachineState *spapr,PowerPCCPU *cpu); -void spapr_irq_print_info (struct SpaprMachineState *spapr,Monitor *mon); +void spapr_irq_print_info (struct SpaprMachineState *spapr,GString *buf);void spapr_irq_dt (struct SpaprMachineState *spapr,uint32_t nr_servers,void *fdt,uint32_t phandle);
hw/ppc/spapr.c +8 -3
@@ -31,6 +31,7 @@#include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/qapi-events-qdev.h" +#include "qapi/type-helpers.h" #include "qapi/visitor.h" #include "sysemu/sysemu.h" #include "sysemu/hostmem.h"
@@ -4530,10 +4531,14 @@ static void spapr_pic_print_info(InterruptStatsProvider *obj, Monitor *mon) {SpaprMachineState *spapr =SPAPR_MACHINE (obj); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; -spapr_irq_print_info (spapr, mon); -monitor_printf (mon,"irqchip: %s\n" , -kvm_irqchip_in_kernel () ?"in-kernel" :"emulated" ); +spapr_irq_print_info (spapr, buf); +g_string_append_printf (buf,"irqchip: %s\n" , +kvm_irqchip_in_kernel () ?"in-kernel" :"emulated" ); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }/*
hw/ppc/spapr_irq.c +1 -7
@@ -11,7 +11,6 @@#include "qemu/log.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "hw/irq.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h"
@@ -19,7 +18,6 @@#include "hw/ppc/xics.h" #include "hw/ppc/xics_spapr.h" #include "hw/qdev-properties.h" -#include "monitor/monitor.h" #include "cpu-models.h" #include "sysemu/kvm.h"
@@ -267,16 +265,12 @@ static void spapr_set_irq(void *opaque, int irq, int level) sicc->set_irq (spapr->active_intc, irq, level); } -void spapr_irq_print_info (SpaprMachineState *spapr,Monitor *mon) +void spapr_irq_print_info (SpaprMachineState *spapr,GString *buf) {SpaprInterruptControllerClass *sicc =SPAPR_INTC_GET_CLASS (spapr->active_intc); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; sicc->print_info (spapr->active_intc, buf); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); } void spapr_irq_dt(SpaprMachineState *spapr, uint32_t nr_servers,
Signature · 1 line
2.41.0
[PULL 41/76] hw/ppc: Avoid using Monitor in xive2_eas_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/pnv_xive2.c | 16 ++++++++-------- hw/intc/xive2.c | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-)
include/hw/ppc/xive2_regs.h +1 -1
@@ -48,7 +48,7 @@ typedef struct Xive2Eas {#define xive2_eas_is_valid (eas) (be64_to_cpu((eas)->w) & EAS2_VALID)#define xive2_eas_is_masked (eas) (be64_to_cpu((eas)->w) & EAS2_MASKED) -void xive2_eas_pic_print_info (Xive2Eas *eas,uint32_t lisn,Monitor *mon); +void xive2_eas_pic_print_info (Xive2Eas *eas,uint32_t lisn,GString *buf);/* * Event Notifification Descriptor (END)
hw/intc/pnv_xive2.c +8 -8
@@ -2120,24 +2120,24 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)g_autoptr (GString) buf =g_string_new ("" );g_autoptr (HumanReadableText) info =NULL ; -monitor_printf (mon,"XIVE[%x] Source %08x .. %08x\n" , blk, srcno0, - srcno0 + nr_esbs -1 ); +g_string_append_printf (buf,"XIVE[%x] Source %08x .. %08x\n" , + blk, srcno0, srcno0 + nr_esbs -1 );xive_source_pic_print_info (&xive->ipi_source, srcno0, buf); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); - -monitor_printf (mon,"XIVE[%x] EAT %08x .. %08x\n" , blk, srcno0, - srcno0 + nr_esbs -1 ); +g_string_append_printf (buf,"XIVE[%x] EAT %08x .. %08x\n" , + blk, srcno0, srcno0 + nr_esbs -1 );for (i =0 ; i < nr_esbs; i++) {if (xive2_router_get_eas (xrtr, blk, i, &eas)) {break ; }if (!xive2_eas_is_masked (&eas)) { -xive2_eas_pic_print_info (&eas, i, mon); +xive2_eas_pic_print_info (&eas, i, buf); } } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); +monitor_printf (mon,"XIVE[%x] #%d END Escalation EAT\n" , chip_id, blk); i =0 ;while (!xive2_router_get_end (xrtr, blk, i, &end)) {
hw/intc/xive2.c +6 -6
@@ -27,17 +27,17 @@ uint32_t xive2_router_get_config(Xive2Router *xrtr)return xrc->get_config (xrtr); } -void xive2_eas_pic_print_info (Xive2Eas *eas,uint32_t lisn,Monitor *mon) +void xive2_eas_pic_print_info (Xive2Eas *eas,uint32_t lisn,GString *buf) {if (!xive2_eas_is_valid (eas)) {return ; } -monitor_printf (mon," %08x %s end:%02x/%04x data:%08x\n" , - lisn,xive2_eas_is_masked (eas) ?"M" :" " , - (uint8_t )xive_get_field64 (EAS2_END_BLOCK , eas->w), - (uint32_t )xive_get_field64 (EAS2_END_INDEX , eas->w), - (uint32_t )xive_get_field64 (EAS2_END_DATA , eas->w)); +g_string_append_printf (buf," %08x %s end:%02x/%04x data:%08x\n" , + lisn,xive2_eas_is_masked (eas) ?"M" :" " , + (uint8_t )xive_get_field64 (EAS2_END_BLOCK , eas->w), + (uint32_t )xive_get_field64 (EAS2_END_INDEX , eas->w), + (uint32_t )xive_get_field64 (EAS2_END_DATA , eas->w)); } void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width,
Signature · 1 line
2.41.0
[PULL 75/76] ui+display: rename is_placeholder() -> surface_is_placeholder()
In reply to Philippe Mathieu-DaudéFrom: Gerd Hoffmann <[email protected]>
No functional change.
Message-ID: <[email protected]>
--- include/ui/surface.h | 2 +- ui/console.c | 2 +- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
include/ui/surface.h +1 -1
@@ -50,7 +50,7 @@ static inline int is_buffer_shared(DisplaySurface *surface)return !(surface->flags &QEMU_ALLOCATED_FLAG ); } -static inline int is_placeholder (DisplaySurface *surface) +static inline int surface_is_placeholder (DisplaySurface *surface) {return surface->flags &QEMU_PLACEHOLDER_FLAG ; }
ui/console.c +1 -1
@@ -1510,7 +1510,7 @@ void qemu_console_resize(QemuConsole *s, int width, int height)assert (QEMU_IS_GRAPHIC_CONSOLE (s));if ((s->scanout.kind !=SCANOUT_SURFACE || - (surface && !is_buffer_shared (surface) && !is_placeholder (surface))) && + (surface && !is_buffer_shared (surface) && !surface_is_placeholder (surface))) &&qemu_console_get_width (s,-1 ) == width &&qemu_console_get_height (s,-1 ) == height) {return ;
ui/sdl2-2d.c +1 -1
@@ -72,7 +72,7 @@ void sdl2_2d_switch(DisplayChangeListener *dcl, scon->texture =NULL ; } -if (is_placeholder (new_surface) &&qemu_console_get_index (dcl->con)) { +if (surface_is_placeholder (new_surface) &&qemu_console_get_index (dcl->con)) {sdl2_window_destroy (scon);return ; }
ui/sdl2-gl.c +1 -1
@@ -89,7 +89,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl, scon->surface = new_surface; -if (is_placeholder (new_surface) &&qemu_console_get_index (dcl->con)) { +if (surface_is_placeholder (new_surface) &&qemu_console_get_index (dcl->con)) {qemu_gl_fini_shader (scon->gls); scon->gls =NULL ;sdl2_window_destroy (scon);
Signature · 1 line
2.41.0
[PULL 27/76] hw/ppc: Avoid using Monitor in xive_tctx_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive.h | 2 +- hw/intc/spapr_xive.c | 7 ++++++- hw/intc/xive.c | 11 ++++++----- hw/ppc/pnv.c | 16 ++++++++++++++-- 4 files changed, 27 insertions(+), 9 deletions(-)
include/hw/ppc/xive.h +1 -1
@@ -528,7 +528,7 @@ void xive_tctx_tm_write(XivePresenter *xptr, XiveTCTX *tctx, hwaddr offset,uint64_t xive_tctx_tm_read (XivePresenter *xptr,XiveTCTX *tctx,hwaddr offset,unsigned size); -void xive_tctx_pic_print_info (XiveTCTX *tctx,Monitor *mon); +void xive_tctx_pic_print_info (XiveTCTX *tctx,GString *buf);Object *xive_tctx_create (Object *cpu,XivePresenter *xptr,Error **errp);void xive_tctx_reset (XiveTCTX *tctx);void xive_tctx_destroy (XiveTCTX *tctx);
hw/intc/spapr_xive.c +6 -1
@@ -11,6 +11,7 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "qemu/error-report.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h"
@@ -703,12 +704,16 @@ static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon) {SpaprXive *xive =SPAPR_XIVE (intc);CPUState *cs; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;CPU_FOREACH (cs) {PowerPCCPU *cpu =POWERPC_CPU (cs); -xive_tctx_pic_print_info (spapr_cpu_state (cpu)->tctx, mon); +xive_tctx_pic_print_info (spapr_cpu_state (cpu)->tctx, buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);spapr_xive_pic_print_info (xive, mon); }
hw/intc/xive.c +6 -5
@@ -669,7 +669,7 @@ static const char * const xive_tctx_ring_names[] = { xpc->in_kernel ? xpc->in_kernel (xptr) : false; \ })) -void xive_tctx_pic_print_info (XiveTCTX *tctx,Monitor *mon) +void xive_tctx_pic_print_info (XiveTCTX *tctx,GString *buf) {int cpu_index;int i;
@@ -693,13 +693,14 @@ void xive_tctx_pic_print_info(XiveTCTX *tctx, Monitor *mon) } } -monitor_printf (mon,"CPU[%04x]: QW NSR CPPR IPB LSMFB ACK# INC AGE PIPR" -" W2\n" , cpu_index); +g_string_append_printf (buf,"CPU[%04x]: " +"QW NSR CPPR IPB LSMFB ACK# INC AGE PIPR W2\n" , + cpu_index);for (i =0 ; i <XIVE_TM_RING_COUNT ; i++) {char *s =xive_tctx_ring_print (&tctx->regs[i *XIVE_TM_RING_SIZE ]); -monitor_printf (mon,"CPU[%04x]: %4s %s\n" , cpu_index, - xive_tctx_ring_names[i], s); +g_string_append_printf (buf,"CPU[%04x]: %4s %s\n" , + cpu_index, xive_tctx_ring_names[i], s);g_free (s); } }
hw/ppc/pnv.c +14 -2
@@ -1223,7 +1223,13 @@ static void pnv_chip_power9_intc_destroy(PnvChip *chip, PowerPCCPU *cpu)static void pnv_chip_power9_intc_print_info (PnvChip *chip,PowerPCCPU *cpu,Monitor *mon) { -xive_tctx_pic_print_info (XIVE_TCTX (pnv_cpu_state (cpu)->intc), mon); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + +xive_tctx_pic_print_info (XIVE_TCTX (pnv_cpu_state (cpu)->intc), buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); } static void pnv_chip_power10_intc_create(PnvChip *chip, PowerPCCPU *cpu,
@@ -1267,7 +1273,13 @@ static void pnv_chip_power10_intc_destroy(PnvChip *chip, PowerPCCPU *cpu)static void pnv_chip_power10_intc_print_info (PnvChip *chip,PowerPCCPU *cpu,Monitor *mon) { -xive_tctx_pic_print_info (XIVE_TCTX (pnv_cpu_state (cpu)->intc), mon); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; + +xive_tctx_pic_print_info (XIVE_TCTX (pnv_cpu_state (cpu)->intc), buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }/*
Signature · 1 line
2.41.0
[PULL 66/76] hw/s390x: Introduce s390_skeys_get|set() helpers
In reply to Philippe Mathieu-Daudés390_skeys_set() dispatch to S390SKeysClass::set_skeys(), and s390_skeys_get() to S390SKeysClass::get_skeys().
Message-Id: <[email protected]>
--- include/hw/s390x/storage-keys.h | 10 ++++++++++ hw/s390x/s390-skeys.c | 27 +++++++++++++++++++++++++++ hw/s390x/trace-events | 4 ++++ 3 files changed, 41 insertions(+)
include/hw/s390x/storage-keys.h +10 -0
@@ -111,6 +111,16 @@ struct QEMUS390SKeysState { };void s390_skeys_init (void ); +/** +* @s390_skeys_get: See S390SKeysClass::get_skeys() +*/ +int s390_skeys_get (S390SKeysState *ks,uint64_t start_gfn, +uint64_t count,uint8_t *keys); +/** +* @s390_skeys_set: See S390SKeysClass::set_skeys() +*/ +int s390_skeys_set (S390SKeysState *ks,uint64_t start_gfn, +uint64_t count,uint8_t *keys);S390SKeysState *s390_get_skeys_device (void );
hw/s390x/s390-skeys.c +27 -0
@@ -23,6 +23,7 @@#include "sysemu/kvm.h" #include "migration/qemu-file-types.h" #include "migration/register.h" +#include "trace.h" #define S390_SKEYS_BUFFER_SIZE (128 * KiB)/* Room for 128k storage keys */ #define S390_SKEYS_SAVE_FLAG_EOS 0x01
@@ -54,6 +55,32 @@ void s390_skeys_init(void)qdev_realize (DEVICE (obj),NULL , &error_fatal); } +int s390_skeys_get (S390SKeysState *ks,uint64_t start_gfn, +uint64_t count,uint8_t *keys) +{ +S390SKeysClass *kc =S390_SKEYS_GET_CLASS (ks); +int rc; + + rc = kc->get_skeys (ks, start_gfn, count, keys); +if (rc) { +trace_s390_skeys_get_nonzero (rc); + } +return rc; +} + +int s390_skeys_set (S390SKeysState *ks,uint64_t start_gfn, +uint64_t count,uint8_t *keys) +{ +S390SKeysClass *kc =S390_SKEYS_GET_CLASS (ks); +int rc; + + rc = kc->set_skeys (ks, start_gfn, count, keys); +if (rc) { +trace_s390_skeys_set_nonzero (rc); + } +return rc; +} +static void write_keys (FILE *f,uint8_t *keys,uint64_t startgfn,uint64_t count,Error **errp) {
hw/s390x/trace-events +4 -0
@@ -36,3 +36,7 @@ s390_pci_unknown(const char *msg, uint32_t cmd) "%s unknown command 0x%x" s390_pci_bar(uint32_t bar, uint32_t addr, uint64_t size, uint32_t barsize) "bar %d addr 0x%x size 0x%" PRIx64 "barsize 0x%x" s390_pci_nodev(const char *cmd, uint32_t fh) "%s no pci dev fh 0x%x" s390_pci_invalid(const char *cmd, uint32_t fh) "%s invalid space fh 0x%x" + +# s390-skeys.c +s390_skeys_get_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d" +s390_skeys_set_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d"
Signature · 1 line
2.41.0
[PULL 12/76] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()
In reply to Philippe Mathieu-Daudé'smbios_encode_uuid' is always true, remove it,
simplifying smbios_encode_uuid().
Message-Id: <[email protected]>
--- hw/smbios/smbios.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
hw/smbios/smbios.c +3 -6
@@ -30,7 +30,6 @@#include "hw/pci/pci_device.h" #include "smbios_build.h" -static const bool smbios_uuid_encoded = true;/* * SMBIOS tables provided by user with '-smbios file=<foo>' option */
@@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void)static void smbios_encode_uuid (struct smbios_uuid *uuid,QemuUUID *in) {memcpy (uuid, in,16 ); -if (smbios_uuid_encoded) { - uuid->time_low =bswap32 (uuid->time_low); - uuid->time_mid =bswap16 (uuid->time_mid); - uuid->time_hi_and_version =bswap16 (uuid->time_hi_and_version); - } + uuid->time_low =bswap32 (uuid->time_low); + uuid->time_mid =bswap16 (uuid->time_mid); + uuid->time_hi_and_version =bswap16 (uuid->time_hi_and_version); }static void smbios_build_type_1_table (void )
Signature · 1 line
2.41.0
[PULL 72/76] MAINTAINERS: drop spice+ui maintainership
In reply to Philippe Mathieu-DaudéFrom: Gerd Hoffmann <[email protected]>
Remove myself from spice and ui entries.
Flip status to "Orphan" for entries which have nobody else listed.
Message-ID: <[email protected]>
--- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
MAINTAINERS +1 -3
@@ -3058,8 +3058,7 @@ F: stubs/memory_device.c F: docs/nvdimm.txt SPICE -M: Gerd Hoffmann <[email protected]> -S: Odd Fixes +S: Orphan F: include/ui/qemu-spice.h F: include/ui/spice-display.h F: ui/spice-*.c
@@ -3069,7 +3068,6 @@ F: qapi/ui.json F: docs/spice-port-fqdn.txt Graphics -M: Gerd Hoffmann <[email protected]> M: Marc-André Lureau <[email protected]> S: Odd Fixes F: ui/
Signature · 1 line
2.41.0
[PULL 74/76] stdvga: fix screen blanking
In reply to Philippe Mathieu-DaudéFrom: Gerd Hoffmann <[email protected]>
In case the display surface uses a shared buffer (i.e. uses vga vram directly instead of a shadow) go unshare the buffer before clearing it.
This avoids vga memory corruption, which in turn fixes unblanking not working properly with X11.
Cc: [email protected]
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2067
Message-ID: <[email protected]>
--- hw/display/vga.c | 7 +++++++ 1 file changed, 7 insertions(+)
hw/display/vga.c +7 -0
@@ -1762,6 +1762,13 @@ static void vga_draw_blank(VGACommonState *s, int full_update)if (s->last_scr_width <=0 || s->last_scr_height <=0 )return ; +if (is_buffer_shared (surface)) { +/* unshare buffer, otherwise the blanking corrupts vga vram */ + surface =qemu_create_displaysurface (s->last_scr_width, + s->last_scr_height); +dpy_gfx_replace_surface (s->con, surface); + } + w = s->last_scr_width *surface_bytes_per_pixel (surface); d =surface_data (surface);for (i =0 ; i < s->last_scr_height; i++) {
Signature · 1 line
2.41.0
[PULL 31/76] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- hw/intc/spapr_xive.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
hw/intc/spapr_xive.c +10 -10
@@ -133,7 +133,7 @@ static int spapr_xive_target_to_end(uint32_t target, uint8_t prio,* structure dumping only the information related to the OS EQ. */ static void spapr_xive_end_pic_print_info (SpaprXive *xive,XiveEND *end, -Monitor *mon) +GString *buf) {uint64_t qaddr_base =xive_end_qaddr (end);uint32_t qindex =xive_get_field32 (END_W1_PAGE_OFF , end->w1);
@@ -142,17 +142,12 @@ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end,uint32_t qentries =1 << (qsize +10 );uint32_t nvt =xive_get_field32 (END_W6_NVT_INDEX , end->w6);uint8_t priority =xive_get_field32 (END_W7_F0_PRIORITY , end->w7); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ; -monitor_printf (mon,"%3d/%d % 6d/%5d @%" PRIx64" ^%d" , -spapr_xive_nvt_to_target (0 , nvt), - priority, qindex, qentries, qaddr_base, qgen); +g_string_append_printf (buf,"%3d/%d % 6d/%5d @%" PRIx64" ^%d" , +spapr_xive_nvt_to_target (0 , nvt), + priority, qindex, qentries, qaddr_base, qgen);xive_end_queue_pic_print_info (end,6 , buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }/*
@@ -198,13 +193,18 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon)if (!xive_eas_is_masked (eas)) {uint32_t end_idx =xive_get_field64 (EAS_END_INDEX , eas->w);XiveEND *end; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;assert (end_idx < xive->nr_ends); end = &xive->endt[end_idx];if (xive_end_is_valid (end)) { -spapr_xive_end_pic_print_info (xive, end, mon); +spapr_xive_end_pic_print_info (xive, end, buf); } + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }monitor_printf (mon,"\n" ); }
Signature · 1 line
2.41.0
[PULL 64/76] hw/intc/loongson_ipi: Replace ipi_getcpu with cpu_by_arch_id
In reply to Philippe Mathieu-DaudéFrom: Jiaxun Yang <[email protected]>
cpu_by_arch_id is doing the same thing as our ipi_getcpu logic.
Message-ID: <[email protected]>
--- hw/intc/loongson_ipi.c | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-)
hw/intc/loongson_ipi.c +3 -36
@@ -118,39 +118,6 @@ static MemTxResult send_ipi_data(CPUState *cpu, uint64_t val, hwaddr addr,return MEMTX_OK ; } -static int archid_cmp (const void *a,const void *b) -{ -CPUArchId *archid_a = (CPUArchId *)a; -CPUArchId *archid_b = (CPUArchId *)b; - -return archid_a->arch_id - archid_b->arch_id; -} - -static CPUArchId *find_cpu_by_archid (MachineState *ms,uint32_t id) -{ -CPUArchId apic_id, *found_cpu; - - apic_id.arch_id = id; - found_cpu =bsearch (&apic_id, ms->possible_cpus->cpus, - ms->possible_cpus->len,sizeof (*ms->possible_cpus->cpus), - archid_cmp); - -return found_cpu; -} - -static CPUState *ipi_getcpu (int arch_id) -{ -MachineState *machine =MACHINE (qdev_get_machine ()); -CPUArchId *archid; - - archid =find_cpu_by_archid (machine, arch_id); -if (archid) { -return CPU (archid->cpu); - } - -return NULL ; -} -static MemTxResult mail_send (uint64_t val,MemTxAttrs attrs) {uint32_t cpuid;
@@ -158,7 +125,7 @@ static MemTxResult mail_send(uint64_t val, MemTxAttrs attrs)CPUState *cs; cpuid =extract32 (val,16 ,10 ); - cs =ipi_getcpu (cpuid); + cs =cpu_by_arch_id (cpuid);if (cs ==NULL ) {return MEMTX_DECODE_ERROR ; }
@@ -176,7 +143,7 @@ static MemTxResult any_send(uint64_t val, MemTxAttrs attrs)CPUState *cs; cpuid =extract32 (val,16 ,10 ); - cs =ipi_getcpu (cpuid); + cs =cpu_by_arch_id (cpuid);if (cs ==NULL ) {return MEMTX_DECODE_ERROR ; }
@@ -227,7 +194,7 @@ static MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, cpuid =extract32 (val,16 ,10 );/* IPI status vector */ vector =extract8 (val,0 ,5 ); - cs =ipi_getcpu (cpuid); + cs =cpu_by_arch_id (cpuid);if (cs ==NULL || cs->cpu_index >= ipi->num_cpu) {return MEMTX_DECODE_ERROR ; }
Signature · 1 line
2.41.0
[PULL 36/76] hw/ppc: Avoid using Monitor in xive_end_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive_regs.h | 2 +- hw/intc/pnv_xive.c | 8 ++++---- hw/intc/xive.c | 40 +++++++++++++++++--------------------- 3 files changed, 23 insertions(+), 27 deletions(-)
include/hw/ppc/xive_regs.h +1 -1
@@ -261,7 +261,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end)be32_to_cpu (end->w3); } -void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon); +void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,GString *buf);void xive_end_queue_pic_print_info (XiveEND *end,uint32_t width,GString *buf);void xive_end_eas_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon);
hw/intc/pnv_xive.c +4 -4
@@ -1875,14 +1875,14 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)xive_eas_pic_print_info (&eas, i, buf); } } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"XIVE[%x] #%d ENDT\n" , chip_id, blk); +g_string_append_printf (buf,"XIVE[%x] #%d ENDT\n" , chip_id, blk); i =0 ;while (!xive_router_get_end (xrtr, blk, i, &end)) { -xive_end_pic_print_info (&end, i++, mon); +xive_end_pic_print_info (&end, i++, buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] #%d END Escalation EAT\n" , chip_id, blk); i =0 ;
hw/intc/xive.c +18 -22
@@ -11,7 +11,6 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h"
@@ -1352,7 +1351,7 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf)g_string_append_c (buf,']' ); } -void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon) +void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,GString *buf) {uint64_t qaddr_base =xive_end_qaddr (end);uint32_t qindex =xive_get_field32 (END_W1_PAGE_OFF , end->w1);
@@ -1364,8 +1363,6 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon)uint32_t nvt_idx =xive_get_field32 (END_W6_NVT_INDEX , end->w6);uint8_t priority =xive_get_field32 (END_W7_F0_PRIORITY , end->w7);uint8_t pq; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;if (!xive_end_is_valid (end)) {return ;
@@ -1373,28 +1370,27 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) pq =xive_get_field32 (END_W1_ESn, end->w1); -monitor_printf (mon," %08x %c%c %c%c%c%c%c%c%c%c prio:%d nvt:%02x/%04x" , - end_idx, - pq &XIVE_ESB_VAL_P ?'P' :'-' , - pq &XIVE_ESB_VAL_Q ?'Q' :'-' , -xive_end_is_valid (end) ?'v' :'-' , -xive_end_is_enqueue (end) ?'q' :'-' , -xive_end_is_notify (end) ?'n' :'-' , -xive_end_is_backlog (end) ?'b' :'-' , -xive_end_is_escalate (end) ?'e' :'-' , -xive_end_is_uncond_escalation (end) ?'u' :'-' , -xive_end_is_silent_escalation (end) ?'s' :'-' , -xive_end_is_firmware (end) ?'f' :'-' , - priority, nvt_blk, nvt_idx); +g_string_append_printf (buf, +" %08x %c%c %c%c%c%c%c%c%c%c prio:%d nvt:%02x/%04x" , + end_idx, + pq &XIVE_ESB_VAL_P ?'P' :'-' , + pq &XIVE_ESB_VAL_Q ?'Q' :'-' , +xive_end_is_valid (end) ?'v' :'-' , +xive_end_is_enqueue (end) ?'q' :'-' , +xive_end_is_notify (end) ?'n' :'-' , +xive_end_is_backlog (end) ?'b' :'-' , +xive_end_is_escalate (end) ?'e' :'-' , +xive_end_is_uncond_escalation (end) ?'u' :'-' , +xive_end_is_silent_escalation (end) ?'s' :'-' , +xive_end_is_firmware (end) ?'f' :'-' , + priority, nvt_blk, nvt_idx);if (qaddr_base) { -monitor_printf (mon," eq:@%08" PRIx64"% 6d/%5d ^%d" , - qaddr_base, qindex, qentries, qgen); +g_string_append_printf (buf," eq:@%08" PRIx64"% 6d/%5d ^%d" , + qaddr_base, qindex, qentries, qgen);xive_end_queue_pic_print_info (end,6 , buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"\n" ); +g_string_append_c (buf,'\n' ); }static void xive_end_enqueue (XiveEND *end,uint32_t data)
Signature · 1 line
2.41.0
[PULL 44/76] hw/ppc: Avoid using Monitor in xive2_end_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/pnv_xive2.c | 8 +++---- hw/intc/xive2.c | 48 ++++++++++++++++--------------------- 3 files changed, 26 insertions(+), 32 deletions(-)
include/hw/ppc/xive2_regs.h +1 -1
@@ -130,7 +130,7 @@ static inline uint64_t xive2_end_qaddr(Xive2End *end) (be32_to_cpu (end->w3) &END2_W3_EQ_ADDR_LO ); } -void xive2_end_pic_print_info (Xive2End *end,uint32_t end_idx,Monitor *mon); +void xive2_end_pic_print_info (Xive2End *end,uint32_t end_idx,GString *buf);void xive2_end_queue_pic_print_info (Xive2End *end,uint32_t width,GString *buf); void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx,
hw/intc/pnv_xive2.c +4 -4
@@ -2141,14 +2141,14 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)while (!xive2_router_get_end (xrtr, blk, i, &end)) {xive2_end_eas_pic_print_info (&end, i++, buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"XIVE[%x] #%d ENDT\n" , chip_id, blk); +g_string_append_printf (buf,"XIVE[%x] #%d ENDT\n" , chip_id, blk); i =0 ;while (!xive2_router_get_end (xrtr, blk, i, &end)) { -xive2_end_pic_print_info (&end, i++, mon); +xive2_end_pic_print_info (&end, i++, buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] #%d NVPT %08x .. %08x\n" , chip_id, blk,0 ,XIVE2_NVP_COUNT -1 );
hw/intc/xive2.c +21 -27
74 lines not on this page · raw message
Signature · 1 line
2.41.0
[PULL 65/76] hw/mips/loongson3_virt: Wire up loongson_ipi device
In reply to Philippe Mathieu-DaudéFrom: Jiaxun Yang <[email protected]>
Wire up loongson_ipi device for loongson3_virt machine, so we can have SMP support for TCG backend as well.
Message-ID: <[email protected]>
--- hw/mips/loongson3_bootp.h | 3 +++ hw/mips/loongson3_bootp.c | 2 -- hw/mips/loongson3_virt.c | 39 +++++++++++++++++++++++++++++++++++++-- hw/mips/Kconfig | 1 + 4 files changed, 41 insertions(+), 4 deletions(-)
hw/mips/loongson3_bootp.h +3 -0
@@ -200,6 +200,8 @@ struct boot_params {struct efi_reset_system_t reset_system; }; +#define LOONGSON3_CORE_PER_NODE 4 +/* Overall MMIO & Memory layout */ enum {VIRT_LOWMEM ,
@@ -211,6 +213,7 @@ enum {VIRT_BIOS_ROM ,VIRT_UART ,VIRT_LIOINTC , +VIRT_IPI ,VIRT_PCIE_MMIO , VIRT_HIGHMEM };
hw/mips/loongson3_bootp.c +0 -2
@@ -25,8 +25,6 @@#include "hw/boards.h" #include "hw/mips/loongson3_bootp.h" -#define LOONGSON3_CORE_PER_NODE 4 -static void init_cpu_info (void *g_cpuinfo,uint64_t cpu_freq) {struct efi_cpuinfo_loongson *c = g_cpuinfo;
hw/mips/loongson3_virt.c +37 -2
@@ -36,6 +36,7 @@#include "hw/mips/loongson3_bootp.h" #include "hw/misc/unimp.h" #include "hw/intc/i8259.h" +#include "hw/intc/loongson_ipi.h" #include "hw/loader.h" #include "hw/isa/superio.h" #include "hw/pci/msi.h"
@@ -74,6 +75,7 @@ const MemMapEntry virt_memmap[] = { [VIRT_PCIE_ECAM] = { 0x1a000000, 0x2000000 }, [VIRT_BIOS_ROM] = { 0x1fc00000, 0x200000 }, [VIRT_UART] = { 0x1fe001e0, 0x8 }, + [VIRT_IPI] = { 0x3ff01000, 0x400 }, [VIRT_LIOINTC] = { 0x3ff01400, 0x64 }, [VIRT_PCIE_MMIO] = { 0x40000000, 0x40000000 }, [VIRT_HIGHMEM] = { 0x80000000, 0x0 }, /* Variable */
@@ -485,6 +487,7 @@ static void mips_loongson3_virt_init(MachineState *machine)Clock *cpuclk;CPUMIPSState *env;DeviceState *liointc; +DeviceState *ipi =NULL ;char *filename;const char *kernel_cmdline = machine->kernel_cmdline;const char *kernel_filename = machine->kernel_filename;
@@ -494,6 +497,7 @@ static void mips_loongson3_virt_init(MachineState *machine)MemoryRegion *ram =g_new (MemoryRegion,1 );MemoryRegion *bios =g_new (MemoryRegion,1 );MemoryRegion *iomem =g_new (MemoryRegion,1 ); +MemoryRegion *iocsr =g_new (MemoryRegion,1 );/* TODO: TCG will support all CPU types */ if (!kvm_enabled ()) {
@@ -527,6 +531,19 @@ static void mips_loongson3_virt_init(MachineState *machine)create_unimplemented_device ("mmio fallback 0" ,0x10000000 ,256 * MiB);create_unimplemented_device ("mmio fallback 1" ,0x30000000 ,256 * MiB); +memory_region_init (iocsr,OBJECT (machine),"loongson3.iocsr" ,UINT32_MAX ); + +/* IPI controller is in kernel for KVM */ +if (!kvm_enabled ()) { + ipi =qdev_new (TYPE_LOONGSON_IPI ); +qdev_prop_set_uint32 (ipi,"num-cpu" , machine->smp.cpus); +sysbus_realize_and_unref (SYS_BUS_DEVICE (ipi), &error_fatal); +memory_region_add_subregion (iocsr,SMP_IPI_MAILBOX , +sysbus_mmio_get_region (SYS_BUS_DEVICE (ipi),0 )); +memory_region_add_subregion (iocsr,MAIL_SEND_ADDR , +sysbus_mmio_get_region (SYS_BUS_DEVICE (ipi),1 )); + } + liointc =qdev_new ("loongson.liointc" );sysbus_realize_and_unref (SYS_BUS_DEVICE (liointc), &error_fatal);
@@ -543,6 +560,8 @@ static void mips_loongson3_virt_init(MachineState *machine)clock_set_hz (cpuclk,DEF_LOONGSON3_FREQ );for (i =0 ; i < machine->smp.cpus; i++) { +int node = i /LOONGSON3_CORE_PER_NODE ; +int core = i %LOONGSON3_CORE_PER_NODE ;int ip;/* init CPUs */
@@ -553,12 +572,28 @@ static void mips_loongson3_virt_init(MachineState *machine)cpu_mips_clock_init (cpu);qemu_register_reset (main_cpu_reset, cpu); -if (i >=4 ) { +if (ipi) { +hwaddr base = ((hwaddr )node <<44 ) + virt_memmap[VIRT_IPI ].base; + base += core *0x100 ; +qdev_connect_gpio_out (ipi, i, cpu->env.irq[6 ]); +sysbus_mmio_map (SYS_BUS_DEVICE (ipi), i +2 , base); + } + +if (ase_lcsr_available (&MIPS_CPU (cpu)->env)) { +MemoryRegion *core_iocsr =g_new (MemoryRegion,1 ); + g_autofree char *name = g_strdup_printf("core%d_iocsr", i); +memory_region_init_alias (core_iocsr,OBJECT (cpu), name, + iocsr,0 ,UINT32_MAX ); +memory_region_add_subregion (&MIPS_CPU (cpu)->env.iocsr.mr, +0 , core_iocsr); + } + +if (node >0 ) {continue ;/* Only node-0 can be connected to LIOINTC */ }for (ip =0 ; ip <4 ; ip++) { -int pin = i *4 + ip; +int pin = core *LOONGSON3_CORE_PER_NODE + ip;sysbus_connect_irq (SYS_BUS_DEVICE (liointc), pin, cpu->env.irq[ip +2 ]); }
hw/mips/Kconfig +1 -0
@@ -67,6 +67,7 @@ config LOONGSON3V imply USB_OHCI_PCI select SERIAL select GOLDFISH_RTC + select LOONGSON_IPI select LOONGSON_LIOINTC select PCI_EXPRESS_GENERIC_BRIDGE select MSI_NONBROKEN
Signature · 1 line
2.41.0
Re: [PULL 65/76] hw/mips/loongson3_virt: Wire up loongson_ipi device
Hi Jiaxun,
Quoted 97 lines · Philippe Mathieu-Daudé
From: Jiaxun Yang <[email protected]>
Wire up
loongson_ipidevice forloongson3_virtmachine, so we can have SMP support for TCG backend as well.Signed-off-by Jiaxun Yang <[email protected]>Acked-by Song Gao <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Message-ID: <[email protected]>
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/mips/loongson3_bootp.h | 3 +++ hw/mips/loongson3_bootp.c | 2 -- hw/mips/loongson3_virt.c | 39 +++++++++++++++++++++++++++++++++++++-- hw/mips/Kconfig | 1 + 4 files changed, 41 insertions(+), 4 deletions(-)hw/mips/loongson3_bootp.c +0
-2@@ -25,8 +25,6 @@#include "hw/boards.h" #include "hw/mips/loongson3_bootp.h" -#define LOONGSON3_CORE_PER_NODE 4 -static void init_cpu_info (void *g_cpuinfo,uint64_t cpu_freq) {struct efi_cpuinfo_loongson *c = g_cpuinfo;hw/mips/loongson3_virt.c +19
-0@@ -36,6 +36,7 @@#include "hw/mips/loongson3_bootp.h" #include "hw/misc/unimp.h" #include "hw/intc/i8259.h" +#include "hw/intc/loongson_ipi.h" #include "hw/loader.h" #include "hw/isa/superio.h" #include "hw/pci/msi.h" @@ -74,6 +75,7 @@ const MemMapEntry virt_memmap[] = { [VIRT_PCIE_ECAM] = { 0x1a000000, 0x2000000 }, [VIRT_BIOS_ROM] = { 0x1fc00000, 0x200000 }, [VIRT_UART] = { 0x1fe001e0, 0x8 }, + [VIRT_IPI] = { 0x3ff01000, 0x400 }, [VIRT_LIOINTC] = { 0x3ff01400, 0x64 }, [VIRT_PCIE_MMIO] = { 0x40000000, 0x40000000 }, [VIRT_HIGHMEM] = { 0x80000000, 0x0 }, /* Variable */@@ -485,6 +487,7 @@ static void mips_loongson3_virt_init(MachineState *machine)Clock *cpuclk;CPUMIPSState *env;DeviceState *liointc; +DeviceState *ipi =NULL ;char *filename;const char *kernel_cmdline = machine->kernel_cmdline;const char *kernel_filename = machine->kernel_filename;@@ -494,6 +497,7 @@ static void mips_loongson3_virt_init(MachineState *machine)MemoryRegion *ram =g_new (MemoryRegion,1 );MemoryRegion *bios =g_new (MemoryRegion,1 );MemoryRegion *iomem =g_new (MemoryRegion,1 ); +MemoryRegion *iocsr =g_new (MemoryRegion,1 );/* TODO: TCG will support all CPU types */ if (!kvm_enabled ()) {@@ -527,6 +531,19 @@ static void mips_loongson3_virt_init(MachineState *machine)create_unimplemented_device ("mmio fallback 0" ,0x10000000 ,256 * MiB);create_unimplemented_device ("mmio fallback 1" ,0x30000000 ,256 * MiB); +memory_region_init (iocsr,OBJECT (machine),"loongson3.iocsr" ,UINT32_MAX ); + +/* IPI controller is in kernel for KVM */ +if (!kvm_enabled ()) { + ipi =qdev_new (TYPE_LOONGSON_IPI ); +qdev_prop_set_uint32 (ipi,"num-cpu" , machine->smp.cpus); +sysbus_realize_and_unref (SYS_BUS_DEVICE (ipi), &error_fatal); +memory_region_add_subregion (iocsr,SMP_IPI_MAILBOX , +sysbus_mmio_get_region (SYS_BUS_DEVICE (ipi),0 )); +memory_region_add_subregion (iocsr,MAIL_SEND_ADDR , +sysbus_mmio_get_region (SYS_BUS_DEVICE (ipi),1 )); + } + liointc =qdev_new ("loongson.liointc" );sysbus_realize_and_unref (SYS_BUS_DEVICE (liointc), &error_fatal);@@ -543,6 +560,8 @@ static void mips_loongson3_virt_init(MachineState *machine)clock_set_hz (cpuclk,DEF_LOONGSON3_FREQ );for (i =0 ; i < machine->smp.cpus; i++) { +int node = i /LOONGSON3_CORE_PER_NODE ; +int core = i %LOONGSON3_CORE_PER_NODE ;int ip;/* init CPUs */
hw/mips/loongson3_virt.c static void mips_loongson3_virt_init(MachineState *machine) · line 575
Quoted 5 lines
hw/mips/loongson3_virt.c +1
-1@@ -553,12 +572,28 @@ static void mips_loongson3_virt_init(MachineState *machine)cpu_mips_clock_init (cpu);qemu_register_reset (main_cpu_reset, cpu); -if (i >=4 ) { +if (ipi) {
Coverity mentions a Null pointer dereference (REVERSE_INULL) here (CID 1547264):
Null-checking "ipi" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Maybe this silences it:
- if (ipi) {
+ if (!kvm_enabled()) {
Still I'd rather using tcg_enabled() in this file.
Do you mind posting a patch fixing it?
Quoted 25 lines
hw/mips/loongson3_virt.c +17
-1+hwaddr base = ((hwaddr )node <<44 ) + virt_memmap[VIRT_IPI ].base; + base += core *0x100 ; +qdev_connect_gpio_out (ipi, i, cpu->env.irq[6 ]); +sysbus_mmio_map (SYS_BUS_DEVICE (ipi), i +2 , base); + } + +if (ase_lcsr_available (&MIPS_CPU (cpu)->env)) { +MemoryRegion *core_iocsr =g_new (MemoryRegion,1 ); + g_autofree char *name = g_strdup_printf("core%d_iocsr", i); +memory_region_init_alias (core_iocsr,OBJECT (cpu), name, + iocsr,0 ,UINT32_MAX ); +memory_region_add_subregion (&MIPS_CPU (cpu)->env.iocsr.mr, +0 , core_iocsr); + } + +if (node >0 ) {continue ;/* Only node-0 can be connected to LIOINTC */ }for (ip =0 ; ip <4 ; ip++) { -int pin = i *4 + ip; +int pin = core *LOONGSON3_CORE_PER_NODE + ip;sysbus_connect_irq (SYS_BUS_DEVICE (liointc), pin, cpu->env.irq[ip +2 ]); }
Re: [PULL 65/76] hw/mips/loongson3_virt: Wire up loongson_ipi device
在2024年6月20日六月 下午8:50,Philippe Mathieu-Daudé写道:
[...]
Quoted 1 line
Do you mind posting a patch fixing it?
I'll prepare a series tomorrow with your comments on this patch before.
Thanks
- Jiaxun
Quoted 26 lines
Quoted 26 lines
hw/mips/loongson3_virt.c +17
-1+hwaddr base = ((hwaddr )node <<44 ) + virt_memmap[VIRT_IPI ].base; + base += core *0x100 ; +qdev_connect_gpio_out (ipi, i, cpu->env.irq[6 ]); +sysbus_mmio_map (SYS_BUS_DEVICE (ipi), i +2 , base); + } + +if (ase_lcsr_available (&MIPS_CPU (cpu)->env)) { +MemoryRegion *core_iocsr =g_new (MemoryRegion,1 ); + g_autofree char *name = g_strdup_printf("core%d_iocsr", i); +memory_region_init_alias (core_iocsr,OBJECT (cpu), name, + iocsr,0 ,UINT32_MAX ); +memory_region_add_subregion (&MIPS_CPU (cpu)->env.iocsr.mr, +0 , core_iocsr); + } + +if (node >0 ) {continue ;/* Only node-0 can be connected to LIOINTC */ }for (ip =0 ; ip <4 ; ip++) { -int pin = i *4 + ip; +int pin = core *LOONGSON3_CORE_PER_NODE + ip;sysbus_connect_irq (SYS_BUS_DEVICE (liointc), pin, cpu->env.irq[ip +2 ]); }
Signature · 1 line
- Jiaxun
[PULL 56/76] accel/tcg: Make TCGCPUOps::cpu_exec_halt mandatory
In reply to Philippe Mathieu-DaudéFrom: Peter Maydell <[email protected]>
Now that all targets set TCGCPUOps::cpu_exec_halt, we can make it mandatory and remove the fallback handling that calls cpu_has_work.
Message-ID: <[email protected]>
--- include/hw/core/tcg-cpu-ops.h | 9 ++++++--- accel/tcg/cpu-exec.c | 12 ++++++------ 2 files changed, 12 insertions(+), 9 deletions(-)
include/hw/core/tcg-cpu-ops.h +6 -3
@@ -122,10 +122,13 @@ struct TCGCPUOps {* to do when the CPU is in the halted state. * * Return true to indicate that the CPU should now leave halt, false -* if it should remain in the halted state. +* if it should remain in the halted state. (This should generally +* be the same value that cpu_has_work() would return.) * -* If this method is not provided, the default is to do nothing, and -* to leave halt if cpu_has_work() returns true. +* This method must be provided. If the target does not need to +* do anything special for halt, the same function used for its +* CPUClass::has_work method can be used here, as they have the +* same function signature. */ bool (*cpu_exec_halt)(CPUState *cpu);/**
accel/tcg/cpu-exec.c +6 -6
@@ -682,13 +682,8 @@ static inline bool cpu_handle_halt(CPUState *cpu)#ifndef CONFIG_USER_ONLY if (cpu->halted) {const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; -bool leave_halt; +bool leave_halt = tcg_ops->cpu_exec_halt (cpu); -if (tcg_ops->cpu_exec_halt) { - leave_halt = tcg_ops->cpu_exec_halt (cpu); - }else { - leave_halt =cpu_has_work (cpu); - }if (!leave_halt) {return true; }
@@ -1082,6 +1077,11 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp)static bool tcg_target_initialized;if (!tcg_target_initialized) { +/* Check mandatory TCGCPUOps handlers */ +#ifndef CONFIG_USER_ONLY +assert (cpu->cc->tcg_ops->cpu_exec_halt); +#endif /* !CONFIG_USER_ONLY */ + cpu->cc->tcg_ops->initialize (); tcg_target_initialized = true; }
Signature · 1 line
2.41.0
[PULL 68/76] util/readline: Fix lints for readline_handle_byte
In reply to Philippe Mathieu-DaudéFrom: Manos Pitsidianakis <[email protected]>
While they do not give warnings under our current buildsystem configuration, my clang's language server daemon was complaining about missing default: labels in switch statements.
While at it, add /* fallthrough */ annotations where appropriate.
This is a purely style and not functional change.
Message-ID: <16f745ac7f5fef74498709ffd98857e76edff6aa.1718265822.git.manos.pitsidianakis@linaro.org>
--- util/readline.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
util/readline.c +11 -4
@@ -405,7 +405,7 @@ void readline_handle_byte(ReadLineState *rs, int ch)case 12 :readline_clear_screen (rs);break ; -case 10 : +case 10 :/* fallthrough */ case 13 : rs->cmd_buf[rs->cmd_buf_size] ='\0' ;if (!rs->read_password) {
@@ -425,7 +425,7 @@ void readline_handle_byte(ReadLineState *rs, int ch)case 27 : rs->esc_state =IS_ESC ;break ; -case 127 : +case 127 :/* fallthrough */ case 8 :readline_backspace (rs);break ;
@@ -452,11 +452,11 @@ void readline_handle_byte(ReadLineState *rs, int ch)break ;case IS_CSI :switch (ch) { -case 'A' : +case 'A' :/* fallthrough */ case 'F' :readline_up_char (rs);break ; -case 'B' : +case 'B' :/* fallthrough */ case 'E' :readline_down_char (rs);break ;
@@ -480,12 +480,15 @@ void readline_handle_byte(ReadLineState *rs, int ch)case 4 :readline_eol (rs);break ; +default : +break ; }break ;default :break ; } rs->esc_state =IS_NORM ; +/* fallthrough */ the_end:break ;case IS_SS3 :
@@ -496,9 +499,13 @@ void readline_handle_byte(ReadLineState *rs, int ch)case 'H' :readline_bol (rs);break ; +default : +break ; } rs->esc_state =IS_NORM ;break ; +default : +break ; }readline_update (rs); }
Signature · 1 line
2.41.0
[PULL 57/76] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one()
In reply to Philippe Mathieu-Daudé@event access is read-only.
Message-Id: <[email protected]>
--- include/exec/memory.h | 2 +- system/memory.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
include/exec/memory.h +1 -1
@@ -1852,7 +1852,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,* range. */ void memory_region_notify_iommu_one (IOMMUNotifier *notifier, -IOMMUTLBEvent *event); +const IOMMUTLBEvent *event);/** * memory_region_unmap_iommu_notifier_range: notify a unmap for an IOMMU
system/memory.c +2 -2
@@ -2006,9 +2006,9 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr, }void memory_region_notify_iommu_one (IOMMUNotifier *notifier, -IOMMUTLBEvent *event) +const IOMMUTLBEvent *event) { -IOMMUTLBEntry *entry = &event->entry; +const IOMMUTLBEntry *entry = &event->entry;hwaddr entry_end = entry->iova + entry->addr_mask;IOMMUTLBEntry tmp = *entry;
Signature · 1 line
2.41.0
[PULL 32/76] hw/ppc: Avoid using Monitor in spapr_xive_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- hw/intc/spapr_xive.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
hw/intc/spapr_xive.c +12 -16
@@ -157,7 +157,7 @@ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end,#define spapr_xive_in_kernel (xive) \ (kvm_irqchip_in_kernel() && (xive)->fd != -1) -static void spapr_xive_pic_print_info (SpaprXive *xive,Monitor *mon) +static void spapr_xive_pic_print_info (SpaprXive *xive,GString *buf) {XiveSource *xsrc = &xive->source;int i;
@@ -172,7 +172,7 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon) } } -monitor_printf (mon," LISN PQ EISN CPU/PRIO EQ\n" ); +g_string_append_printf (buf," LISN PQ EISN CPU/PRIO EQ\n" );for (i =0 ; i < xive->nr_irqs; i++) {uint8_t pq =xive_source_esb_get (xsrc, i);
@@ -182,19 +182,17 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon)continue ; } -monitor_printf (mon," %08x %s %c%c%c %s %08x " , i, -xive_source_irq_is_lsi (xsrc, i) ?"LSI" :"MSI" , - pq &XIVE_ESB_VAL_P ?'P' :'-' , - pq &XIVE_ESB_VAL_Q ?'Q' :'-' , -xive_source_is_asserted (xsrc, i) ?'A' :' ' , -xive_eas_is_masked (eas) ?"M" :" " , - (int )xive_get_field64 (EAS_END_DATA , eas->w)); +g_string_append_printf (buf," %08x %s %c%c%c %s %08x " , i, +xive_source_irq_is_lsi (xsrc, i) ?"LSI" :"MSI" , + pq &XIVE_ESB_VAL_P ?'P' :'-' , + pq &XIVE_ESB_VAL_Q ?'Q' :'-' , +xive_source_is_asserted (xsrc, i) ?'A' :' ' , +xive_eas_is_masked (eas) ?"M" :" " , + (int )xive_get_field64 (EAS_END_DATA , eas->w));if (!xive_eas_is_masked (eas)) {uint32_t end_idx =xive_get_field64 (EAS_END_INDEX , eas->w);XiveEND *end; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;assert (end_idx < xive->nr_ends); end = &xive->endt[end_idx];
@@ -203,10 +201,8 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon)spapr_xive_end_pic_print_info (xive, end, buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); } -monitor_printf (mon,"\n" ); +g_string_append_c (buf,'\n' ); } }
@@ -717,10 +713,10 @@ static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon)xive_tctx_pic_print_info (spapr_cpu_state (cpu)->tctx, buf); } +spapr_xive_pic_print_info (xive, buf); + info =human_readable_text_from_str (buf);monitor_puts (mon, info->human_readable_text); - -spapr_xive_pic_print_info (xive, mon); } static void spapr_xive_dt(SpaprInterruptController *intc, uint32_t nr_servers,
Signature · 1 line
2.41.0
[PULL 47/76] hw/ppc: Avoid using Monitor in SpaprInterruptControllerClass::print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/spapr_irq.h | 2 +- hw/intc/spapr_xive.c | 9 +-------- hw/intc/xics_spapr.c | 9 +-------- hw/ppc/spapr_irq.c | 8 +++++++- 4 files changed, 10 insertions(+), 18 deletions(-)
include/hw/ppc/spapr_irq.h +1 -1
@@ -73,7 +73,7 @@ struct SpaprInterruptControllerClass {/* These methods should only be called on the active intc */ void (*set_irq)(SpaprInterruptController *intc,int irq,int val); -void (*print_info)(SpaprInterruptController *intc,Monitor *mon); +void (*print_info)(SpaprInterruptController *intc,GString *buf);void (*dt)(SpaprInterruptController *intc,uint32_t nr_servers,void *fdt,uint32_t phandle);int (*post_load)(SpaprInterruptController *intc,int version_id);
hw/intc/spapr_xive.c +1 -8
@@ -11,13 +11,11 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "qemu/error-report.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/reset.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h"
@@ -701,12 +699,10 @@ static void spapr_xive_set_irq(SpaprInterruptController *intc, int irq, int val) } } -static void spapr_xive_print_info (SpaprInterruptController *intc,Monitor *mon) +static void spapr_xive_print_info (SpaprInterruptController *intc,GString *buf) {SpaprXive *xive =SPAPR_XIVE (intc);CPUState *cs; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;CPU_FOREACH (cs) {PowerPCCPU *cpu =POWERPC_CPU (cs);
@@ -714,9 +710,6 @@ static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon)xive_tctx_pic_print_info (spapr_cpu_state (cpu)->tctx, buf); }spapr_xive_pic_print_info (xive, buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); } static void spapr_xive_dt(SpaprInterruptController *intc, uint32_t nr_servers,
hw/intc/xics_spapr.c +1 -8
@@ -34,8 +34,6 @@#include "hw/ppc/xics_spapr.h" #include "hw/ppc/fdt.h" #include "qapi/visitor.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" /* * Guest interfaces
@@ -397,12 +395,10 @@ static void xics_spapr_set_irq(SpaprInterruptController *intc, int irq, int val)ics_set_irq (ics, srcno, val); } -static void xics_spapr_print_info (SpaprInterruptController *intc,Monitor *mon) +static void xics_spapr_print_info (SpaprInterruptController *intc,GString *buf) {ICSState *ics =ICS_SPAPR (intc);CPUState *cs; -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;CPU_FOREACH (cs) {PowerPCCPU *cpu =POWERPC_CPU (cs);
@@ -410,9 +406,6 @@ static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon)icp_pic_print_info (spapr_cpu_state (cpu)->icp, buf); }ics_pic_print_info (ics, buf); - - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); }static int xics_spapr_post_load (SpaprInterruptController *intc,int version_id)
hw/ppc/spapr_irq.c +7 -1
@@ -11,6 +11,7 @@#include "qemu/log.h" #include "qemu/error-report.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "hw/irq.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h"
@@ -18,6 +19,7 @@#include "hw/ppc/xics.h" #include "hw/ppc/xics_spapr.h" #include "hw/qdev-properties.h" +#include "monitor/monitor.h" #include "cpu-models.h" #include "sysemu/kvm.h"
@@ -269,8 +271,12 @@ void spapr_irq_print_info(SpaprMachineState *spapr, Monitor *mon) {SpaprInterruptControllerClass *sicc =SPAPR_INTC_GET_CLASS (spapr->active_intc); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; - sicc->print_info (spapr->active_intc, mon); + sicc->print_info (spapr->active_intc, buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); } void spapr_irq_dt(SpaprMachineState *spapr, uint32_t nr_servers,
Signature · 1 line
2.41.0
[PULL 69/76] util/readline: Add C-n, C-p shortcuts
In reply to Philippe Mathieu-DaudéFrom: Manos Pitsidianakis <[email protected]>
C-n and C-p are the default bindings for readline's next-history and previous-history respectively. They have the same functionality as the Down and Up arrow keys.
Message-ID: <9876594132d1f2e7210ab3f7ca01a82f95206447.1718265822.git.manos.pitsidianakis@linaro.org>
--- util/readline.c | 8 ++++++++ 1 file changed, 8 insertions(+)
util/readline.c +8 -0
@@ -418,6 +418,14 @@ void readline_handle_byte(ReadLineState *rs, int ch) rs->last_cmd_buf_size =0 ; rs->readline_func (rs->opaque, rs->cmd_buf, rs->readline_opaque);break ; +case 14 : +/* ^N Next line in history */ +readline_down_char (rs); +break ; +case 16 : +/* ^P Prev line in history */ +readline_up_char (rs); +break ;case 23 :/* ^W */ readline_backword (rs);
Signature · 1 line
2.41.0
[PULL 70/76] util/readline: Add C-u shortcut
In reply to Philippe Mathieu-DaudéFrom: Manos Pitsidianakis <[email protected]>
Add support for the unix-line-discard readline action, which erases from the cursor position up to the beginning of the line. The default binding, C-u, was chosen.
This is useful to quickly erase command input while working on the monitor interface.
Message-ID: <6772067e1c0d4b1c5310e5446e9e3e1c6b3b5bc0.1718265822.git.manos.pitsidianakis@linaro.org>
--- util/readline.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
util/readline.c +12 -0
@@ -271,6 +271,14 @@ static void readline_hist_add(ReadLineState *rs, const char *cmdline) rs->hist_entry =-1 ; } +static void readline_kill_line (ReadLineState *rs) +{ +while (rs->cmd_buf_index >0 ) { +readline_backward_char (rs); +readline_delete_char (rs); + } +} +/* completion support */ void readline_add_completion (ReadLineState *rs,const char *str)
@@ -426,6 +434,10 @@ void readline_handle_byte(ReadLineState *rs, int ch)/* ^P Prev line in history */ readline_up_char (rs);break ; +case 21 : +/* ^U Kill backward from point to the beginning of the line. */ +readline_kill_line (rs); +break ;case 23 :/* ^W */ readline_backword (rs);
Signature · 1 line
2.41.0
[PULL 45/76] hw/ppc: Avoid using Monitor in xive2_nvp_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- hw/intc/pnv_xive2.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-)
hw/intc/pnv_xive2.c +15 -14
@@ -2028,7 +2028,7 @@ static void pnv_xive2_register_types(void)type_init (pnv_xive2_register_types) static void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx, -Monitor *mon) +GString *buf) {uint8_t eq_blk =xive_get_field32 (NVP2_W5_VP_END_BLOCK , nvp->w5);uint32_t eq_idx =xive_get_field32 (NVP2_W5_VP_END_INDEX , nvp->w5);
@@ -2037,21 +2037,21 @@ static void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx,return ; } -monitor_printf (mon," %08x end:%02x/%04x IPB:%02x" , - nvp_idx, eq_blk, eq_idx, -xive_get_field32 (NVP2_W2_IPB , nvp->w2)); +g_string_append_printf (buf," %08x end:%02x/%04x IPB:%02x" , + nvp_idx, eq_blk, eq_idx, +xive_get_field32 (NVP2_W2_IPB , nvp->w2));/* * When the NVP is HW controlled, more fields are updated */ if (xive2_nvp_is_hw (nvp)) { -monitor_printf (mon," CPPR:%02x" , -xive_get_field32 (NVP2_W2_CPPR , nvp->w2)); +g_string_append_printf (buf," CPPR:%02x" , +xive_get_field32 (NVP2_W2_CPPR , nvp->w2));if (xive2_nvp_is_co (nvp)) { -monitor_printf (mon," CO:%04x" , -xive_get_field32 (NVP2_W1_CO_THRID , nvp->w1)); +g_string_append_printf (buf," CO:%04x" , +xive_get_field32 (NVP2_W1_CO_THRID , nvp->w1)); } } -monitor_printf (mon,"\n" ); +g_string_append_c (buf,'\n' ); }/*
@@ -2147,15 +2147,16 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)while (!xive2_router_get_end (xrtr, blk, i, &end)) {xive2_end_pic_print_info (&end, i++, buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"XIVE[%x] #%d NVPT %08x .. %08x\n" , chip_id, blk, -0 ,XIVE2_NVP_COUNT -1 ); +g_string_append_printf (buf,"XIVE[%x] #%d NVPT %08x .. %08x\n" , + chip_id, blk,0 ,XIVE2_NVP_COUNT -1 ); xive_nvp_per_subpage =pnv_xive2_vst_per_subpage (xive,VST_NVP );for (i =0 ; i <XIVE2_NVP_COUNT ; i += xive_nvp_per_subpage) {while (!xive2_router_get_nvp (xrtr, blk, i, &nvp)) { -xive2_nvp_pic_print_info (&nvp, i++, mon); +xive2_nvp_pic_print_info (&nvp, i++, buf); } } + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }
Signature · 1 line
2.41.0
[PULL 59/76] hw/i386/iommu: Constify IOMMUTLBEvent in vtd_page_walk_hook prototype
In reply to Philippe Mathieu-Daudé@event access is read-only.
Message-Id: <[email protected]>
--- hw/i386/intel_iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/i386/intel_iommu.c +4 -4
@@ -1170,7 +1170,7 @@ static int vtd_iova_to_slpte(IntelIOMMUState *s, VTDContextEntry *ce, } } -typedef int (*vtd_page_walk_hook )(IOMMUTLBEvent *event,void *private); +typedef int (*vtd_page_walk_hook )(const IOMMUTLBEvent *event,void *private);/** * Constant information used during page walking
@@ -1533,7 +1533,7 @@ static int vtd_dev_to_context_entry(IntelIOMMUState *s, uint8_t bus_num,return 0 ; } -static int vtd_sync_shadow_page_hook (IOMMUTLBEvent *event, +static int vtd_sync_shadow_page_hook (const IOMMUTLBEvent *event,void *private) {memory_region_notify_iommu (private,0 , *event);
@@ -2219,7 +2219,7 @@ static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s,* page tables. We just deliver the PSI down to * invalidate caches. */ -IOMMUTLBEvent event = { +const IOMMUTLBEvent event = { .type =IOMMU_NOTIFIER_UNMAP , .entry = { .target_as = &address_space_memory,
@@ -3889,7 +3889,7 @@ static void vtd_address_space_refresh_all(IntelIOMMUState *s)vtd_switch_address_space_all (s); } -static int vtd_replay_hook (IOMMUTLBEvent *event,void *private) +static int vtd_replay_hook (const IOMMUTLBEvent *event,void *private) {memory_region_notify_iommu_one (private, event);return 0 ;
Signature · 1 line
2.41.0
[PULL 58/76] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu()
In reply to Philippe Mathieu-Daudé@event access is read-only.
Message-Id: <[email protected]>
--- include/exec/memory.h | 2 +- system/memory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/exec/memory.h +1 -1
@@ -1837,7 +1837,7 @@ uint64_t memory_region_iommu_get_min_page_size(IOMMUMemoryRegion *iommu_mr);*/ void memory_region_notify_iommu (IOMMUMemoryRegion *iommu_mr,int iommu_idx, -IOMMUTLBEvent event); +const IOMMUTLBEvent event);/** * memory_region_notify_iommu_one: notify a change in an IOMMU translation
system/memory.c +1 -1
@@ -2052,7 +2052,7 @@ void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier)void memory_region_notify_iommu (IOMMUMemoryRegion *iommu_mr,int iommu_idx, -IOMMUTLBEvent event) +const IOMMUTLBEvent event) {IOMMUNotifier *iommu_notifier;
Signature · 1 line
2.41.0
[PULL 20/76] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine
In reply to Philippe Mathieu-DaudéThe pc-i440fx-2.3 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it.
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 4 ++-- docs/about/removed-features.rst | 2 +- hw/i386/pc.c | 25 ------------------------- hw/i386/pc_piix.c | 19 ------------------- 4 files changed, 3 insertions(+), 47 deletions(-)
docs/about/deprecated.rst +2 -2
@@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type
docs/about/removed-features.rst +1 -1
@@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live
hw/i386/pc.c +0 -25
@@ -265,31 +265,6 @@ GlobalProperty pc_compat_2_4[] = { };const size_t pc_compat_2_4_len =G_N_ELEMENTS (pc_compat_2_4); -GlobalProperty pc_compat_2_3[] = { - PC_CPU_MODEL_IDS("2.3.0") - {TYPE_X86_CPU ,"arat" ,"off" }, - {"qemu64" "-" TYPE_X86_CPU ,"min-level" ,"4" }, - {"kvm64" "-" TYPE_X86_CPU ,"min-level" ,"5" }, - {"pentium3" "-" TYPE_X86_CPU ,"min-level" ,"2" }, - {"n270" "-" TYPE_X86_CPU ,"min-level" ,"5" }, - {"Conroe" "-" TYPE_X86_CPU ,"min-level" ,"4" }, - {"Penryn" "-" TYPE_X86_CPU ,"min-level" ,"4" }, - {"Nehalem" "-" TYPE_X86_CPU ,"min-level" ,"4" }, - {"n270" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Penryn" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Conroe" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Nehalem" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Westmere" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"SandyBridge" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"IvyBridge" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Haswell" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Haswell-noTSX" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Broadwell" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {"Broadwell-noTSX" "-" TYPE_X86_CPU ,"min-xlevel" ,"0x8000000a" }, - {TYPE_X86_CPU ,"kvm-no-smi-migration" ,"on" }, -}; -const size_t pc_compat_2_3_len =G_N_ELEMENTS (pc_compat_2_3); -GSIState *pc_gsi_create (qemu_irq **irqs,bool pci_enabled) {GSIState *s;
hw/i386/pc_piix.c +0 -19
@@ -421,14 +421,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)* hw_compat_*, pc_compat_*, or * pc_*_machine_options(). */ -static void pc_compat_2_3_fn (MachineState *machine) -{ -X86MachineState *x86ms =X86_MACHINE (machine); -if (kvm_enabled ()) { - x86ms->smm =ON_OFF_AUTO_OFF ; - } -} -#ifdef CONFIG_ISAPC static void pc_init_isa (MachineState *machine) {
@@ -827,17 +819,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v2_4,"pc-i440fx-2.4" ,NULL , pc_i440fx_2_4_machine_options) -static void pc_i440fx_2_3_machine_options (MachineClass *m) -{ -pc_i440fx_2_4_machine_options (m); - m->hw_version ="2.3.0" ; -compat_props_add (m->compat_props, hw_compat_2_3, hw_compat_2_3_len); -compat_props_add (m->compat_props, pc_compat_2_3, pc_compat_2_3_len); -} - -DEFINE_I440FX_MACHINE (v2_3,"pc-i440fx-2.3" , pc_compat_2_3_fn, - pc_i440fx_2_3_machine_options); -#ifdef CONFIG_ISAPC static void isapc_machine_options (MachineClass *m) {
Signature · 1 line
2.41.0
[PULL 09/76] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'
In reply to Philippe Mathieu-Daudéx86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Make it static, and remove its declaration. "kvm-cpu.h" is now empty, remove it.
Message-Id: <[email protected]>
--- target/i386/kvm/kvm-cpu.h | 41 --------------------------------------- target/i386/kvm/kvm-cpu.c | 3 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 target/i386/kvm/kvm-cpu.h
target/i386/kvm/kvm-cpu.h deleted +0 -41
@@ -1,41 +0,0 @@ -/* -* i386 KVM CPU type and functions -* -* Copyright (c) 2003 Fabrice Bellard -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2 of the License, or (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef KVM_CPU_H -#define KVM_CPU_H - -#ifdef CONFIG_KVM -/* -* Change the value of a KVM-specific default -* -* If value is NULL, no default will be set and the original -* value from the CPU model table will be kept. -* -* It is valid to call this function only for properties that -* are already present in the kvm_default_props table. -*/ -void x86_cpu_change_kvm_default (const char *prop,const char *value); - -#else /* !CONFIG_KVM */ - -#define x86_cpu_change_kvm_default (a, b) - -#endif /* CONFIG_KVM */ - -#endif /* KVM_CPU_H */
target/i386/kvm/kvm-cpu.c +1 -2
@@ -10,7 +10,6 @@#include "qemu/osdep.h" #include "cpu.h" #include "host-cpu.h" -#include "kvm-cpu.h" #include "qapi/error.h" #include "sysemu/sysemu.h" #include "hw/boards.h"
@@ -178,7 +177,7 @@ static PropValue kvm_default_props[] = {/* * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -void x86_cpu_change_kvm_default (const char *prop,const char *value) +static void x86_cpu_change_kvm_default (const char *prop,const char *value) {PropValue *pv;for (pv = kvm_default_props; pv->prop; pv++) {
Signature · 1 line
2.41.0
[PULL 60/76] hw/usb: Remove unused 'host.h' header
In reply to Philippe Mathieu-DaudéSince commit 99761176ee ("usb: Remove legacy -usbdevice options (host, serial, disk and net)") hw/usb/host.h is not used, remove it.
Message-Id: <[email protected]>
--- hw/usb/host.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 hw/usb/host.h
hw/usb/host.h deleted +0 -44
@@ -1,44 +0,0 @@ -/* -* Linux host USB redirector -* -* Copyright (c) 2005 Fabrice Bellard -* -* Copyright (c) 2008 Max Krasnyansky -* Support for host device auto connect & disconnect -* Major rewrite to support fully async operation -* -* Copyright 2008 TJ <[email protected]> -* Added flexible support for /dev/bus/usb /sys/bus/usb/devices in addition -* to the legacy /proc/bus/usb USB device discovery and handling -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -#ifndef QEMU_USB_HOST_H -#define QEMU_USB_HOST_H - -struct USBAutoFilter { -uint32_t bus_num; -uint32_t addr; -char *port; -uint32_t vendor_id; -uint32_t product_id; -}; - -#endif /* QEMU_USB_HOST_H */
Signature · 1 line
2.41.0
[PULL 61/76] hw/usb/dev-mtp: Correctly report free space
In reply to Philippe Mathieu-DaudéFrom: Fabio D'Urso <[email protected]>
In order to compute the amount of free space (in bytes), the number of available blocks (f_bavail) should be multiplied by the block size (f_frsize) instead of the total number of blocks (f_blocks).
Message-ID: <[email protected]>
--- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/usb/dev-mtp.c +1 -1
@@ -886,7 +886,7 @@ static MTPData *usb_mtp_get_storage_info(MTPState *s, MTPControl *c) rc =statvfs (s->root, &buf);if (rc ==0 ) {usb_mtp_add_u64 (d, (uint64_t )buf.f_frsize * buf.f_blocks); -usb_mtp_add_u64 (d, (uint64_t )buf.f_bavail * buf.f_blocks); +usb_mtp_add_u64 (d, (uint64_t )buf.f_frsize * buf.f_bavail);usb_mtp_add_u32 (d, buf.f_ffree); }else {usb_mtp_add_u64 (d,0xffffffff );
Signature · 1 line
2.41.0
[PULL 33/76] hw/ppc: Avoid using Monitor in xive_source_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive.h | 2 +- hw/intc/pnv_xive.c | 11 ++++++++--- hw/intc/pnv_xive2.c | 8 +++++++- hw/intc/xive.c | 16 +++++++--------- hw/pci-host/pnv_phb4.c | 20 ++++++++++++++------ hw/ppc/pnv_psi.c | 12 +++++++++--- 6 files changed, 46 insertions(+), 23 deletions(-)
include/hw/ppc/xive.h +1 -1
@@ -314,7 +314,7 @@ static inline bool xive_source_is_asserted(XiveSource *xsrc, uint32_t srcno) }void xive_source_pic_print_info (XiveSource *xsrc,uint32_t offset, -Monitor *mon); +GString *buf);static inline bool xive_source_irq_is_lsi (XiveSource *xsrc,uint32_t srcno) {
hw/intc/pnv_xive.c +8 -3
@@ -11,6 +11,7 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h"
@@ -1857,10 +1858,14 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)XiveNVT nvt;int i;uint64_t xive_nvt_per_subpage; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; -monitor_printf (mon,"XIVE[%x] #%d Source %08x .. %08x\n" , chip_id, blk, - srcno0, srcno0 + nr_ipis -1 ); -xive_source_pic_print_info (&xive->ipi_source, srcno0, mon); +g_string_append_printf (buf,"XIVE[%x] #%d Source %08x .. %08x\n" , + chip_id, blk, srcno0, srcno0 + nr_ipis -1 ); +xive_source_pic_print_info (&xive->ipi_source, srcno0, buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] #%d EAT %08x .. %08x\n" , chip_id, blk, srcno0, srcno0 + nr_ipis -1 );
hw/intc/pnv_xive2.c +7 -1
@@ -10,6 +10,7 @@#include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h"
@@ -2116,10 +2117,15 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon)Xive2Nvp nvp;int i;uint64_t xive_nvp_per_subpage; +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;monitor_printf (mon,"XIVE[%x] Source %08x .. %08x\n" , blk, srcno0, srcno0 + nr_esbs -1 ); -xive_source_pic_print_info (&xive->ipi_source, srcno0, mon); +xive_source_pic_print_info (&xive->ipi_source, srcno0, buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] EAT %08x .. %08x\n" , blk, srcno0, srcno0 + nr_esbs -1 );
hw/intc/xive.c +7 -9
@@ -1209,22 +1209,20 @@ void xive_source_set_irq(void *opaque, int srcno, int val) } } -void xive_source_pic_print_info (XiveSource *xsrc,uint32_t offset,Monitor *mon) +void xive_source_pic_print_info (XiveSource *xsrc,uint32_t offset,GString *buf) { -int i; - -for (i =0 ; i < xsrc->nr_irqs; i++) { +for (unsigned i =0 ; i < xsrc->nr_irqs; i++) {uint8_t pq =xive_source_esb_get (xsrc, i);if (pq ==XIVE_ESB_OFF ) {continue ; } -monitor_printf (mon," %08x %s %c%c%c\n" , i + offset, -xive_source_irq_is_lsi (xsrc, i) ?"LSI" :"MSI" , - pq &XIVE_ESB_VAL_P ?'P' :'-' , - pq &XIVE_ESB_VAL_Q ?'Q' :'-' , -xive_source_is_asserted (xsrc, i) ?'A' :' ' ); +g_string_append_printf (buf," %08x %s %c%c%c\n" , i + offset, +xive_source_irq_is_lsi (xsrc, i) ?"LSI" :"MSI" , + pq &XIVE_ESB_VAL_P ?'P' :'-' , + pq &XIVE_ESB_VAL_Q ?'Q' :'-' , +xive_source_is_asserted (xsrc, i) ?'A' :' ' ); } }
hw/pci-host/pnv_phb4.c +14 -6
@@ -10,6 +10,7 @@#include "qemu/log.h" #include "qapi/visitor.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "monitor/monitor.h" #include "target/ppc/cpu.h" #include "hw/pci-host/pnv_phb4_regs.h"
@@ -1807,11 +1808,18 @@ void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon) phb->regs[PHB_INT_NOTIFY_ADDR >>3 ] & ~PHB_INT_NOTIFY_ADDR_64K ;uint32_t offset = phb->regs[PHB_INT_NOTIFY_INDEX >>3 ];bool abt = !!(phb->regs[PHB_CTRLR >>3 ] &PHB_CTRLR_IRQ_ABT_MODE ); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; -monitor_printf (mon,"PHB4[%x:%x] Source %08x .. %08x %s @%" HWADDR_PRIx"\n" , - phb->chip_id, phb->phb_id, - offset, offset + phb->xsrc.nr_irqs -1 , - abt ?"ABT" :"" , - notif_port); -xive_source_pic_print_info (&phb->xsrc,0 , mon); +g_string_append_printf (buf, +"PHB4[%x:%x] Source %08x .. %08x " +"%s @%" HWADDR_PRIx"\n" , + phb->chip_id, phb->phb_id, + offset, offset + phb->xsrc.nr_irqs -1 , + abt ?"ABT" :"" , + notif_port); +xive_source_pic_print_info (&phb->xsrc,0 , buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }
hw/ppc/pnv_psi.c +9 -3
@@ -25,6 +25,7 @@#include "qemu/module.h" #include "sysemu/reset.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "monitor/monitor.h"
@@ -980,11 +981,16 @@ type_init(pnv_psi_register_types);void pnv_psi_pic_print_info (Pnv9Psi *psi9,Monitor *mon) {PnvPsi *psi =PNV_PSI (psi9); +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ;uint32_t offset = (psi->regs[PSIHB_REG (PSIHB9_IVT_OFFSET )] >>PSIHB9_IVT_OFF_SHIFT ); -monitor_printf (mon,"PSIHB Source %08x .. %08x\n" , - offset, offset + psi9->source.nr_irqs -1 ); -xive_source_pic_print_info (&psi9->source, offset, mon); +g_string_append_printf (buf,"PSIHB Source %08x .. %08x\n" , + offset, offset + psi9->source.nr_irqs -1 ); +xive_source_pic_print_info (&psi9->source, offset, buf); + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }
Signature · 1 line
2.41.0
[PULL 55/76] target: Set TCGCPUOps::cpu_exec_halt to target's has_work implementation
In reply to Philippe Mathieu-DaudéFrom: Peter Maydell <[email protected]>
Currently the TCGCPUOps::cpu_exec_halt method is optional, and if it is not set then the default is to call the CPUClass::has_work method (which has an identical function signature).
We would like to make the cpu_exec_halt method mandatory so we can remove the runtime check and fallback handling. In preparation for that, make all the targets which don't need special handling in their cpu_exec_halt set it to their cpu_has_work implementation instead of leaving it unset. (This is every target except for arm and i386.)
In the riscv case this requires us to make the function not be local to the source file it's defined in.
Message-ID: <[email protected]>
--- target/riscv/internals.h | 3 +++ target/alpha/cpu.c | 1 + target/avr/cpu.c | 1 + target/cris/cpu.c | 2 ++ target/hppa/cpu.c | 1 + target/loongarch/cpu.c | 1 + target/m68k/cpu.c | 1 + target/microblaze/cpu.c | 1 + target/mips/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/ppc/cpu_init.c | 2 ++ target/riscv/cpu.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 ++ target/rx/cpu.c | 1 + target/s390x/cpu.c | 1 + target/sh4/cpu.c | 1 + target/sparc/cpu.c | 1 + target/xtensa/cpu.c | 1 + 18 files changed, 23 insertions(+), 1 deletion(-)
target/riscv/internals.h +3 -0
@@ -136,4 +136,7 @@ static inline float16 check_nanbox_h(CPURISCVState *env, uint64_t f) } } +/* Our implementation of CPUClass::has_work */ +bool riscv_cpu_has_work (CPUState *cs); +#endif
target/alpha/cpu.c +1 -0
@@ -219,6 +219,7 @@ static const TCGCPUOps alpha_tcg_ops = {#else .tlb_fill = alpha_cpu_tlb_fill, .cpu_exec_interrupt = alpha_cpu_exec_interrupt, + .cpu_exec_halt = alpha_cpu_has_work, .do_interrupt = alpha_cpu_do_interrupt, .do_transaction_failed = alpha_cpu_do_transaction_failed, .do_unaligned_access = alpha_cpu_do_unaligned_access,
target/avr/cpu.c +1 -0
@@ -210,6 +210,7 @@ static const TCGCPUOps avr_tcg_ops = { .synchronize_from_tb = avr_cpu_synchronize_from_tb, .restore_state_to_opc = avr_restore_state_to_opc, .cpu_exec_interrupt = avr_cpu_exec_interrupt, + .cpu_exec_halt = avr_cpu_has_work, .tlb_fill = avr_cpu_tlb_fill, .do_interrupt = avr_cpu_do_interrupt, };
target/cris/cpu.c +2 -0
@@ -186,6 +186,7 @@ static const TCGCPUOps crisv10_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, .cpu_exec_interrupt = cris_cpu_exec_interrupt, + .cpu_exec_halt = cris_cpu_has_work, .do_interrupt = crisv10_cpu_do_interrupt,#endif /* !CONFIG_USER_ONLY */ };
@@ -197,6 +198,7 @@ static const TCGCPUOps crisv32_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, .cpu_exec_interrupt = cris_cpu_exec_interrupt, + .cpu_exec_halt = cris_cpu_has_work, .do_interrupt = cris_cpu_do_interrupt,#endif /* !CONFIG_USER_ONLY */ };
target/hppa/cpu.c +1 -0
@@ -228,6 +228,7 @@ static const TCGCPUOps hppa_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = hppa_cpu_tlb_fill, .cpu_exec_interrupt = hppa_cpu_exec_interrupt, + .cpu_exec_halt = hppa_cpu_has_work, .do_interrupt = hppa_cpu_do_interrupt, .do_unaligned_access = hppa_cpu_do_unaligned_access, .do_transaction_failed = hppa_cpu_do_transaction_failed,
target/loongarch/cpu.c +1 -0
@@ -736,6 +736,7 @@ static const TCGCPUOps loongarch_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = loongarch_cpu_tlb_fill, .cpu_exec_interrupt = loongarch_cpu_exec_interrupt, + .cpu_exec_halt = loongarch_cpu_has_work, .do_interrupt = loongarch_cpu_do_interrupt, .do_transaction_failed = loongarch_cpu_do_transaction_failed,#endif
target/m68k/cpu.c +1 -0
@@ -536,6 +536,7 @@ static const TCGCPUOps m68k_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = m68k_cpu_tlb_fill, .cpu_exec_interrupt = m68k_cpu_exec_interrupt, + .cpu_exec_halt = m68k_cpu_has_work, .do_interrupt = m68k_cpu_do_interrupt, .do_transaction_failed = m68k_cpu_transaction_failed,#endif /* !CONFIG_USER_ONLY */
target/microblaze/cpu.c +1 -0
@@ -413,6 +413,7 @@ static const TCGCPUOps mb_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = mb_cpu_tlb_fill, .cpu_exec_interrupt = mb_cpu_exec_interrupt, + .cpu_exec_halt = mb_cpu_has_work, .do_interrupt = mb_cpu_do_interrupt, .do_transaction_failed = mb_cpu_transaction_failed, .do_unaligned_access = mb_cpu_do_unaligned_access,
target/mips/cpu.c +1 -0
@@ -555,6 +555,7 @@ static const TCGCPUOps mips_tcg_ops = {#if !defined(CONFIG_USER_ONLY ) .tlb_fill = mips_cpu_tlb_fill, .cpu_exec_interrupt = mips_cpu_exec_interrupt, + .cpu_exec_halt = mips_cpu_has_work, .do_interrupt = mips_cpu_do_interrupt, .do_transaction_failed = mips_cpu_do_transaction_failed, .do_unaligned_access = mips_cpu_do_unaligned_access,
target/openrisc/cpu.c +1 -0
@@ -233,6 +233,7 @@ static const TCGCPUOps openrisc_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = openrisc_cpu_tlb_fill, .cpu_exec_interrupt = openrisc_cpu_exec_interrupt, + .cpu_exec_halt = openrisc_cpu_has_work, .do_interrupt = openrisc_cpu_do_interrupt,#endif /* !CONFIG_USER_ONLY */ };
target/ppc/cpu_init.c +2 -0
@@ -1,3 +1,4 @@ +/* * PowerPC CPU initialization for qemu. *
@@ -7481,6 +7482,7 @@ static const TCGCPUOps ppc_tcg_ops = {#else .tlb_fill = ppc_cpu_tlb_fill, .cpu_exec_interrupt = ppc_cpu_exec_interrupt, + .cpu_exec_halt = ppc_cpu_has_work, .do_interrupt = ppc_cpu_do_interrupt, .cpu_exec_enter = ppc_cpu_exec_enter, .cpu_exec_exit = ppc_cpu_exec_exit,
target/riscv/cpu.c +1 -1
@@ -903,7 +903,7 @@ static vaddr riscv_cpu_get_pc(CPUState *cs)return env->pc; } -static bool riscv_cpu_has_work (CPUState *cs) +bool riscv_cpu_has_work (CPUState *cs) {#ifndef CONFIG_USER_ONLY RISCVCPU *cpu =RISCV_CPU (cs);
target/riscv/tcg/tcg-cpu.c +2 -0
@@ -21,6 +21,7 @@#include "exec/exec-all.h" #include "tcg-cpu.h" #include "cpu.h" +#include "internals.h" #include "pmu.h" #include "time_helper.h" #include "qapi/error.h"
@@ -137,6 +138,7 @@ static const TCGCPUOps riscv_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = riscv_cpu_tlb_fill, .cpu_exec_interrupt = riscv_cpu_exec_interrupt, + .cpu_exec_halt = riscv_cpu_has_work, .do_interrupt = riscv_cpu_do_interrupt, .do_transaction_failed = riscv_cpu_do_transaction_failed, .do_unaligned_access = riscv_cpu_do_unaligned_access,
target/rx/cpu.c +1 -0
@@ -192,6 +192,7 @@ static const TCGCPUOps rx_tcg_ops = {#ifndef CONFIG_USER_ONLY .cpu_exec_interrupt = rx_cpu_exec_interrupt, + .cpu_exec_halt = rx_cpu_has_work, .do_interrupt = rx_cpu_do_interrupt,#endif /* !CONFIG_USER_ONLY */ };
target/s390x/cpu.c +1 -0
@@ -370,6 +370,7 @@ static const TCGCPUOps s390_tcg_ops = {#else .tlb_fill = s390_cpu_tlb_fill, .cpu_exec_interrupt = s390_cpu_exec_interrupt, + .cpu_exec_halt = s390_cpu_has_work, .do_interrupt = s390_cpu_do_interrupt, .debug_excp_handler = s390x_cpu_debug_excp_handler, .do_unaligned_access = s390x_cpu_do_unaligned_access,
target/sh4/cpu.c +1 -0
@@ -254,6 +254,7 @@ static const TCGCPUOps superh_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = superh_cpu_tlb_fill, .cpu_exec_interrupt = superh_cpu_exec_interrupt, + .cpu_exec_halt = superh_cpu_has_work, .do_interrupt = superh_cpu_do_interrupt, .do_unaligned_access = superh_cpu_do_unaligned_access, .io_recompile_replay_branch = superh_io_recompile_replay_branch,
target/sparc/cpu.c +1 -0
@@ -926,6 +926,7 @@ static const TCGCPUOps sparc_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = sparc_cpu_tlb_fill, .cpu_exec_interrupt = sparc_cpu_exec_interrupt, + .cpu_exec_halt = sparc_cpu_has_work, .do_interrupt = sparc_cpu_do_interrupt, .do_transaction_failed = sparc_cpu_do_transaction_failed, .do_unaligned_access = sparc_cpu_do_unaligned_access,
target/xtensa/cpu.c +1 -0
@@ -234,6 +234,7 @@ static const TCGCPUOps xtensa_tcg_ops = {#ifndef CONFIG_USER_ONLY .tlb_fill = xtensa_cpu_tlb_fill, .cpu_exec_interrupt = xtensa_cpu_exec_interrupt, + .cpu_exec_halt = xtensa_cpu_has_work, .do_interrupt = xtensa_cpu_do_interrupt, .do_transaction_failed = xtensa_cpu_do_transaction_failed, .do_unaligned_access = xtensa_cpu_do_unaligned_access,
Signature · 1 line
2.41.0
[PULL 76/76] ui+display: rename is_buffer_shared() -> surface_is_allocated()
In reply to Philippe Mathieu-DaudéFrom: Gerd Hoffmann <[email protected]>
Boolean return value is reversed, to align with QEMU_ALLOCATED_FLAG, so all callers must be adapted. Also rename share_surface variable in vga_draw_graphic() to reduce confusion.
No functional change.
Message-ID: <[email protected]>
--- include/ui/surface.h | 4 ++-- hw/display/qxl-render.c | 2 +- hw/display/vga.c | 20 ++++++++++---------- hw/display/xenfb.c | 5 +++-- ui/console.c | 3 ++- 5 files changed, 18 insertions(+), 16 deletions(-)
include/ui/surface.h +2 -2
@@ -45,9 +45,9 @@ void qemu_displaysurface_win32_set_handle(DisplaySurface *surface,DisplaySurface *qemu_create_displaysurface (int width,int height);void qemu_free_displaysurface (DisplaySurface *surface); -static inline int is_buffer_shared (DisplaySurface *surface) +static inline int surface_is_allocated (DisplaySurface *surface) { -return !(surface->flags &QEMU_ALLOCATED_FLAG ); +return surface->flags &QEMU_ALLOCATED_FLAG ; }static inline int surface_is_placeholder (DisplaySurface *surface)
hw/display/qxl-render.c +1 -1
@@ -31,7 +31,7 @@ static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)uint8_t *src;int len, i; -if (is_buffer_shared (surface)) { +if (!surface_is_allocated (surface)) {return ; } trace_qxl_render_blit(qxl->guest_primary.qxl_stride,
hw/display/vga.c +10 -10
@@ -1487,7 +1487,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)uint8_t *d;uint32_t v, addr1, addr;vga_draw_line_func *vga_draw_line =NULL ; -bool share_surface, force_shadow = false; +bool allocate_surface, force_shadow = false;pixman_format_code_t format;#if HOST_BIG_ENDIAN bool byteswap = !s->big_endian_fb;
@@ -1609,10 +1609,10 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)*/ format =qemu_default_pixman_format (depth, !byteswap);if (format) { - share_surface =dpy_gfx_check_format (s->con, format) - && !s->force_shadow && !force_shadow; + allocate_surface = !dpy_gfx_check_format (s->con, format) + || s->force_shadow || force_shadow; }else { - share_surface = false; + allocate_surface = true; } if (s->params.line_offset != s->last_line_offset ||
@@ -1620,7 +1620,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) height != s->last_height || s->last_depth != depth || s->last_byteswap != byteswap || - share_surface != is_buffer_shared(surface)) { + allocate_surface != surface_is_allocated(surface)) {/* display parameters changed -> need new display surface */ s->last_scr_width = disp_width; s->last_scr_height = height;
@@ -1635,14 +1635,14 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) full_update =1 ; }if (surface_data (surface) != s->vram_ptr + (s->params.start_addr *4 ) - &&is_buffer_shared (surface)) { + && !surface_is_allocated (surface)) {/* base address changed (page flip) -> shared display surfaces * must be updated with the new base address */ full_update =1 ; }if (full_update) { -if (share_surface) { +if (!allocate_surface) { surface =qemu_create_displaysurface_from (disp_width, height, format, s->params.line_offset, s->vram_ptr + (s->params.start_addr *4 ));
@@ -1655,7 +1655,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) vga_draw_line = vga_draw_line_table[v]; -if (!is_buffer_shared (surface) && s->cursor_invalidate) { +if (surface_is_allocated (surface) && s->cursor_invalidate) { s->cursor_invalidate (s); }
@@ -1707,7 +1707,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)if (update) {if (y_start <0 ) y_start = y; -if (!(is_buffer_shared (surface))) { +if (surface_is_allocated (surface)) {uint8_t *p; p =vga_draw_line (s, d, addr, width, hpel);if (p) {
@@ -1762,7 +1762,7 @@ static void vga_draw_blank(VGACommonState *s, int full_update)if (s->last_scr_width <=0 || s->last_scr_height <=0 )return ; -if (is_buffer_shared (surface)) { +if (!surface_is_allocated (surface)) {/* unshare buffer, otherwise the blanking corrupts vga vram */ surface =qemu_create_displaysurface (s->last_scr_width, s->last_scr_height);
hw/display/xenfb.c +3 -2
@@ -638,7 +638,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)int linesize =surface_stride (surface);uint8_t *data =surface_data (surface); -if (!is_buffer_shared (surface)) { +if (surface_is_allocated (surface)) {switch (xenfb->depth) {case 8 :if (bpp ==16 ) {
@@ -756,7 +756,8 @@ static void xenfb_update(void *opaque)xen_pv_printf (&xenfb->c.xendev,1 ,"update: resizing: %dx%d @ %d bpp%s\n" , xenfb->width, xenfb->height, xenfb->depth, -is_buffer_shared (surface) ?" (shared)" :"" ); +surface_is_allocated (surface) + ?" (allocated)" :" (borrowed)" ); xenfb->up_fullscreen =1 ; }
ui/console.c +2 -1
@@ -1510,7 +1510,8 @@ void qemu_console_resize(QemuConsole *s, int width, int height)assert (QEMU_IS_GRAPHIC_CONSOLE (s));if ((s->scanout.kind !=SCANOUT_SURFACE || - (surface && !is_buffer_shared (surface) && !surface_is_placeholder (surface))) && + (surface &&surface_is_allocated (surface) && + !surface_is_placeholder (surface))) &&qemu_console_get_width (s,-1 ) == width &&qemu_console_get_height (s,-1 ) == height) {return ;
Signature · 1 line
2.41.0
[PULL 62/76] hw/intc: Remove loongarch_ipi.c
In reply to Philippe Mathieu-DaudéFrom: Jiaxun Yang <[email protected]>
It was missed out in previous commit.
Message-ID: <[email protected]>
--- hw/intc/loongarch_ipi.c | 347 ---------------------------------------- 1 file changed, 347 deletions(-) delete mode 100644 hw/intc/loongarch_ipi.c
hw/intc/loongarch_ipi.c deleted +0 -347
@@ -1,347 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* -* LoongArch ipi interrupt support -* -* Copyright (C) 2021 Loongson Technology Corporation Limited -*/ - -#include "qemu/osdep.h" -#include "hw/boards.h" -#include "hw/sysbus.h" -#include "hw/intc/loongarch_ipi.h" -#include "hw/irq.h" -#include "hw/qdev-properties.h" -#include "qapi/error.h" -#include "qemu/log.h" -#include "exec/address-spaces.h" -#include "migration/vmstate.h" -#include "target/loongarch/cpu.h" -#include "trace.h" - -static MemTxResult loongarch_ipi_readl (void *opaque,hwaddr addr, -uint64_t *data, -unsigned size,MemTxAttrs attrs) -{ -IPICore *s; -LoongArchIPI *ipi = opaque; -uint64_t ret =0 ; -int index =0 ; - - s = &ipi->cpu[attrs.requester_id]; - addr &=0xff ; -switch (addr) { -case CORE_STATUS_OFF : - ret = s->status; -break ; -case CORE_EN_OFF : - ret = s->en; -break ; -case CORE_SET_OFF : - ret =0 ; -break ; -case CORE_CLEAR_OFF : - ret =0 ; -break ; - case CORE_BUF_20 ... CORE_BUF_38 + 4: - index = (addr -CORE_BUF_20 ) >>2 ; - ret = s->buf[index]; -break ; -default : -qemu_log_mask (LOG_UNIMP ,"invalid read: %x" , (uint32_t )addr); -break ; - } - -trace_loongarch_ipi_read (size, (uint64_t )addr, ret); - *data = ret; -return MEMTX_OK ; -} - -static void send_ipi_data (CPULoongArchState *env,uint64_t val,hwaddr addr, -MemTxAttrs attrs) -{ -int i, mask =0 , data =0 ; - -/* -* bit 27-30 is mask for byte writing, -* if the mask is 0, we need not to do anything. -*/ -if ((val >>27 ) &0xf ) { - data =address_space_ldl (env->address_space_iocsr, addr, - attrs,NULL ); -for (i =0 ; i <4 ; i++) { -/* get mask for byte writing */ -if (val & (0x1 << (27 + i))) { - mask |=0xff << (i *8 ); - } - } - } - - data &= mask; - data |= (val >>32 ) & ~mask; -address_space_stl (env->address_space_iocsr, addr, - data, attrs,NULL ); -} - -static int archid_cmp (const void *a,const void *b) -{ -CPUArchId *archid_a = (CPUArchId *)a; -CPUArchId *archid_b = (CPUArchId *)b; - -return archid_a->arch_id - archid_b->arch_id; -} - -static CPUArchId *find_cpu_by_archid (MachineState *ms,uint32_t id) -{ -CPUArchId apic_id, *found_cpu; - - apic_id.arch_id = id; - found_cpu =bsearch (&apic_id, ms->possible_cpus->cpus, - ms->possible_cpus->len,sizeof (*ms->possible_cpus->cpus), - archid_cmp); - -return found_cpu; -} - -static CPUState *ipi_getcpu (int arch_id) -{ -MachineState *machine =MACHINE (qdev_get_machine ()); -CPUArchId *archid; - - archid =find_cpu_by_archid (machine, arch_id); -if (archid) { -return CPU (archid->cpu); - } - -return NULL ; -} - -static MemTxResult mail_send (uint64_t val,MemTxAttrs attrs) -{ -uint32_t cpuid; -hwaddr addr; -CPUState *cs; - - cpuid =extract32 (val,16 ,10 ); - cs =ipi_getcpu (cpuid); -if (cs ==NULL ) { -return MEMTX_DECODE_ERROR ; - } - -/* override requester_id */ - addr =SMP_IPI_MAILBOX +CORE_BUF_20 + (val &0x1c ); - attrs.requester_id = cs->cpu_index; -send_ipi_data (&LOONGARCH_CPU (cs)->env, val, addr, attrs); -return MEMTX_OK ; -} - -static MemTxResult any_send (uint64_t val,MemTxAttrs attrs) -{ -uint32_t cpuid; -hwaddr addr; -CPUState *cs; - - cpuid =extract32 (val,16 ,10 ); - cs =ipi_getcpu (cpuid); -if (cs ==NULL ) { -return MEMTX_DECODE_ERROR ; - } - -/* override requester_id */ - addr = val &0xffff ; - attrs.requester_id = cs->cpu_index; -send_ipi_data (&LOONGARCH_CPU (cs)->env, val, addr, attrs); -return MEMTX_OK ; -} - -static MemTxResult loongarch_ipi_writel (void *opaque,hwaddr addr,uint64_t val, -unsigned size,MemTxAttrs attrs) -{ -LoongArchIPI *ipi = opaque; -IPICore *s; -int index =0 ; -uint32_t cpuid; -uint8_t vector; -CPUState *cs; - - s = &ipi->cpu[attrs.requester_id]; - addr &=0xff ; -trace_loongarch_ipi_write (size, (uint64_t )addr, val); -switch (addr) { -case CORE_STATUS_OFF : -qemu_log_mask (LOG_GUEST_ERROR ,"can not be written" ); -break ; -case CORE_EN_OFF : - s->en = val; -break ; -case CORE_SET_OFF : - s->status |= val; -if (s->status !=0 && (s->status & s->en) !=0 ) { -qemu_irq_raise (s->irq); - } -break ; -case CORE_CLEAR_OFF : - s->status &= ~val; -if (s->status ==0 && s->en !=0 ) { -qemu_irq_lower (s->irq); - } -break ; - case CORE_BUF_20 ... CORE_BUF_38 + 4: - index = (addr -CORE_BUF_20 ) >>2 ; - s->buf[index] = val; -break ; -case IOCSR_IPI_SEND : - cpuid =extract32 (val,16 ,10 ); -/* IPI status vector */ - vector =extract8 (val,0 ,5 ); - cs =ipi_getcpu (cpuid); -if (cs ==NULL ) { -return MEMTX_DECODE_ERROR ; - } - -/* override requester_id */ - attrs.requester_id = cs->cpu_index; -loongarch_ipi_writel (ipi,CORE_SET_OFF ,BIT (vector),4 , attrs); -break ; -default : -qemu_log_mask (LOG_UNIMP ,"invalid write: %x" , (uint32_t )addr); -break ; - } - -return MEMTX_OK ; -} - -static const MemoryRegionOps loongarch_ipi_ops = { - .read_with_attrs = loongarch_ipi_readl, - .write_with_attrs = loongarch_ipi_writel, - .impl.min_access_size =4 , - .impl.max_access_size =4 , - .valid.min_access_size =4 , - .valid.max_access_size =8 , - .endianness =DEVICE_LITTLE_ENDIAN , -}; - -/* mail send and any send only support writeq */ -static MemTxResult loongarch_ipi_writeq (void *opaque,hwaddr addr,uint64_t val, -unsigned size,MemTxAttrs attrs) -{ -MemTxResult ret =MEMTX_OK ; - - addr &=0xfff ; -switch (addr) { -case MAIL_SEND_OFFSET : - ret =mail_send (val, attrs); -break ; -case ANY_SEND_OFFSET : - ret =any_send (val, attrs); -break ; -default : -break ; - } - -return ret; -} - -static const MemoryRegionOps loongarch_ipi64_ops = { - .write_with_attrs = loongarch_ipi_writeq, - .impl.min_access_size =8 , - .impl.max_access_size =8 , - .valid.min_access_size =8 , - .valid.max_access_size =8 , - .endianness =DEVICE_LITTLE_ENDIAN , -}; - -static void loongarch_ipi_realize (DeviceState *dev,Error **errp) -{ -LoongArchIPI *s =LOONGARCH_IPI (dev); -SysBusDevice *sbd =SYS_BUS_DEVICE (dev); -int i; - -if (s->num_cpu ==0 ) { -error_setg (errp,"num-cpu must be at least 1" ); -return ; - } - -memory_region_init_io (&s->ipi_iocsr_mem,OBJECT (dev), &loongarch_ipi_ops, - s,"loongarch_ipi_iocsr" ,0x48 ); - -/* loongarch_ipi_iocsr performs re-entrant IO through ipi_send */ - s->ipi_iocsr_mem.disable_reentrancy_guard = true; - -sysbus_init_mmio (sbd, &s->ipi_iocsr_mem); - -memory_region_init_io (&s->ipi64_iocsr_mem,OBJECT (dev), - &loongarch_ipi64_ops, - s,"loongarch_ipi64_iocsr" ,0x118 ); -sysbus_init_mmio (sbd, &s->ipi64_iocsr_mem); - - s->cpu =g_new0 (IPICore, s->num_cpu); -if (s->cpu ==NULL ) { -error_setg (errp,"Memory allocation for ExtIOICore faile" ); -return ; - } - -for (i =0 ; i < s->num_cpu; i++) { -qdev_init_gpio_out (dev, &s->cpu[i].irq,1 ); - } -} - -static const VMStateDescription vmstate_ipi_core = { - .name ="ipi-single" , - .version_id =2 , - .minimum_version_id =2 , - .fields = (const VMStateField []) { -VMSTATE_UINT32 (status, IPICore), -VMSTATE_UINT32 (en, IPICore), -VMSTATE_UINT32 (set, IPICore), -VMSTATE_UINT32 (clear, IPICore), -VMSTATE_UINT32_ARRAY (buf, IPICore,IPI_MBX_NUM *2 ), -VMSTATE_END_OF_LIST () - } -}; - -static const VMStateDescription vmstate_loongarch_ipi = { - .name =TYPE_LOONGARCH_IPI , - .version_id =2 , - .minimum_version_id =2 , - .fields = (const VMStateField []) { -VMSTATE_STRUCT_VARRAY_POINTER_UINT32 (cpu, LoongArchIPI, num_cpu, - vmstate_ipi_core, IPICore), -VMSTATE_END_OF_LIST () - } -}; - -static Property ipi_properties[] = { -DEFINE_PROP_UINT32 ("num-cpu" , LoongArchIPI, num_cpu,1 ), -DEFINE_PROP_END_OF_LIST (), -}; - -static void loongarch_ipi_class_init (ObjectClass *klass,void *data) -{ -DeviceClass *dc =DEVICE_CLASS (klass); - - dc->realize = loongarch_ipi_realize; -device_class_set_props (dc, ipi_properties); - dc->vmsd = &vmstate_loongarch_ipi; -} - -static void loongarch_ipi_finalize (Object *obj) -{ -LoongArchIPI *s =LOONGARCH_IPI (obj); - -g_free (s->cpu); -} - -static const TypeInfo loongarch_ipi_info = { - .name =TYPE_LOONGARCH_IPI , - .parent =TYPE_SYS_BUS_DEVICE , - .instance_size =sizeof (LoongArchIPI), - .class_init = loongarch_ipi_class_init, - .instance_finalize = loongarch_ipi_finalize, -}; - -static void loongarch_ipi_register_types (void ) -{ -type_register_static (&loongarch_ipi_info); -} - -type_init (loongarch_ipi_register_types)
Signature · 1 line
2.41.0
[PULL 71/76] MAINTAINERS: drop virtio-gpu maintainership
In reply to Philippe Mathieu-DaudéFrom: Gerd Hoffmann <[email protected]>
Remove myself from virtio-gpu entries.
Flip status to "Orphan" for entries which have nobody else listed.
Message-ID: <[email protected]>
--- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
MAINTAINERS +1 -3
@@ -2579,8 +2579,7 @@ F: hw/display/ramfb*.c F: include/hw/display/ramfb.h virtio-gpu -M: Gerd Hoffmann <[email protected]> -S: Odd Fixes +S: Orphan F: hw/display/virtio-gpu* F: hw/display/virtio-vga.* F: include/hw/virtio/virtio-gpu.h
@@ -2602,7 +2601,6 @@ F: include/hw/virtio/virtio-blk-common.h vhost-user-gpu M: Marc-André Lureau <[email protected]> -R: Gerd Hoffmann <[email protected]> S: Maintained F: docs/interop/vhost-user-gpu.rst F: contrib/vhost-user-gpu
Signature · 1 line
2.41.0
[PULL 38/76] hw/ppc: Avoid using Monitor in xive_nvt_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- hw/intc/pnv_xive.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
hw/intc/pnv_xive.c +10 -9
@@ -1832,7 +1832,7 @@ static const MemoryRegionOps pnv_xive_pc_ops = { };static void xive_nvt_pic_print_info (XiveNVT *nvt,uint32_t nvt_idx, -Monitor *mon) +GString *buf) {uint8_t eq_blk =xive_get_field32 (NVT_W1_EQ_BLOCK , nvt->w1);uint32_t eq_idx =xive_get_field32 (NVT_W1_EQ_INDEX , nvt->w1);
@@ -1841,9 +1841,9 @@ static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx,return ; } -monitor_printf (mon," %08x end:%02x/%04x IPB:%02x\n" , nvt_idx, - eq_blk, eq_idx, -xive_get_field32 (NVT_W4_IPB , nvt->w4)); +g_string_append_printf (buf," %08x end:%02x/%04x IPB:%02x\n" , + nvt_idx, eq_blk, eq_idx, +xive_get_field32 (NVT_W4_IPB , nvt->w4)); }void pnv_xive_pic_print_info (PnvXive *xive,Monitor *mon)
@@ -1888,17 +1888,18 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)while (!xive_router_get_end (xrtr, blk, i, &end)) {xive_end_eas_pic_print_info (&end, i++, buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"XIVE[%x] #%d NVTT %08x .. %08x\n" , chip_id, blk, -0 ,XIVE_NVT_COUNT -1 ); +g_string_append_printf (buf,"XIVE[%x] #%d NVTT %08x .. %08x\n" , + chip_id, blk,0 ,XIVE_NVT_COUNT -1 ); xive_nvt_per_subpage =pnv_xive_vst_per_subpage (xive,VST_TSEL_VPDT );for (i =0 ; i <XIVE_NVT_COUNT ; i += xive_nvt_per_subpage) {while (!xive_router_get_nvt (xrtr, blk, i, &nvt)) { -xive_nvt_pic_print_info (&nvt, i++, mon); +xive_nvt_pic_print_info (&nvt, i++, buf); } } + + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }static void pnv_xive_reset (void *dev)
Signature · 1 line
2.41.0
[PULL 37/76] hw/ppc: Avoid using Monitor in xive_end_eas_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive_regs.h | 2 +- hw/intc/pnv_xive.c | 9 +++++---- hw/intc/xive.c | 22 ++++++++++------------ 3 files changed, 16 insertions(+), 17 deletions(-)
include/hw/ppc/xive_regs.h +1 -1
@@ -263,7 +263,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end)void xive_end_pic_print_info (XiveEND *end,uint32_t end_idx,GString *buf);void xive_end_queue_pic_print_info (XiveEND *end,uint32_t width,GString *buf); -void xive_end_eas_pic_print_info (XiveEND *end,uint32_t end_idx,Monitor *mon); +void xive_end_eas_pic_print_info (XiveEND *end,uint32_t end_idx,GString *buf);/* Notification Virtual Target (NVT) */ typedef struct XiveNVT {
hw/intc/pnv_xive.c +5 -4
@@ -1881,14 +1881,15 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon)while (!xive_router_get_end (xrtr, blk, i, &end)) {xive_end_pic_print_info (&end, i++, buf); } - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text); -monitor_printf (mon,"XIVE[%x] #%d END Escalation EAT\n" , chip_id, blk); +g_string_append_printf (buf,"XIVE[%x] #%d END Escalation EAT\n" , + chip_id, blk); i =0 ;while (!xive_router_get_end (xrtr, blk, i, &end)) { -xive_end_eas_pic_print_info (&end, i++, mon); +xive_end_eas_pic_print_info (&end, i++, buf); } + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text);monitor_printf (mon,"XIVE[%x] #%d NVTT %08x .. %08x\n" , chip_id, blk,0 ,XIVE_NVT_COUNT -1 );
hw/intc/xive.c +10 -12
@@ -17,7 +17,6 @@#include "sysemu/reset.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/irq.h" #include "hw/ppc/xive.h" #include "hw/ppc/xive2.h"
@@ -1419,8 +1418,7 @@ static void xive_end_enqueue(XiveEND *end, uint32_t data) end->w1 =xive_set_field32 (END_W1_PAGE_OFF , end->w1, qindex); } -void xive_end_eas_pic_print_info (XiveEND *end,uint32_t end_idx, -Monitor *mon) +void xive_end_eas_pic_print_info (XiveEND *end,uint32_t end_idx,GString *buf) {XiveEAS *eas = (XiveEAS *) &end->w4;uint8_t pq;
@@ -1431,15 +1429,15 @@ void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, pq =xive_get_field32 (END_W1_ESe, end->w1); -monitor_printf (mon," %08x %c%c %c%c end:%02x/%04x data:%08x\n" , - end_idx, - pq &XIVE_ESB_VAL_P ?'P' :'-' , - pq &XIVE_ESB_VAL_Q ?'Q' :'-' , -xive_eas_is_valid (eas) ?'V' :' ' , -xive_eas_is_masked (eas) ?'M' :' ' , - (uint8_t )xive_get_field64 (EAS_END_BLOCK , eas->w), - (uint32_t )xive_get_field64 (EAS_END_INDEX , eas->w), - (uint32_t )xive_get_field64 (EAS_END_DATA , eas->w)); +g_string_append_printf (buf," %08x %c%c %c%c end:%02x/%04x data:%08x\n" , + end_idx, + pq &XIVE_ESB_VAL_P ?'P' :'-' , + pq &XIVE_ESB_VAL_Q ?'Q' :'-' , +xive_eas_is_valid (eas) ?'V' :' ' , +xive_eas_is_masked (eas) ?'M' :' ' , + (uint8_t )xive_get_field64 (EAS_END_BLOCK , eas->w), + (uint32_t )xive_get_field64 (EAS_END_INDEX , eas->w), + (uint32_t )xive_get_field64 (EAS_END_DATA , eas->w)); }/*
Signature · 1 line
2.41.0
[PULL 49/76] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- hw/ppc/pnv.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
hw/ppc/pnv.c +6 -12
@@ -789,18 +789,14 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon)static int pnv_chip_power9_pic_print_info_child (Object *child,void *opaque) { -Monitor *mon = opaque; +GString *buf = opaque;PnvPHB *phb = (PnvPHB *)object_dynamic_cast (child,TYPE_PNV_PHB ); -g_autoptr (GString) buf =g_string_new ("" ); -g_autoptr (HumanReadableText) info =NULL ;if (!phb) {return 0 ; }pnv_phb4_pic_print_info (PNV_PHB4 (phb->backend), buf); - info =human_readable_text_from_str (buf); -monitor_puts (mon, info->human_readable_text);return 0 ; }
@@ -813,12 +809,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon)pnv_xive_pic_print_info (&chip9->xive, buf);pnv_psi_pic_print_info (&chip9->psi, buf); +object_child_foreach_recursive (OBJECT (chip), + pnv_chip_power9_pic_print_info_child, buf); info =human_readable_text_from_str (buf);monitor_puts (mon, info->human_readable_text); - -object_child_foreach_recursive (OBJECT (chip), - pnv_chip_power9_pic_print_info_child, mon); } static uint64_t pnv_chip_power8_xscom_core_base(PnvChip *chip,
@@ -865,13 +860,12 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon)g_autoptr (HumanReadableText) info =NULL ;pnv_xive2_pic_print_info (&chip10->xive, buf); -pnv_psi_pic_print_info (&chip10->psi, buf); +object_child_foreach_recursive (OBJECT (chip), + pnv_chip_power9_pic_print_info_child, buf); + info =human_readable_text_from_str (buf);monitor_puts (mon, info->human_readable_text); - -object_child_foreach_recursive (OBJECT (chip), - pnv_chip_power9_pic_print_info_child, mon); }/* Always give the first 1GB to chip 0 else we won't boot */
Signature · 1 line
2.41.0
[PULL 73/76] ui/cocoa: Use qemu_add_mouse_change_notifier
In reply to Philippe Mathieu-DaudéFrom: Akihiko Odaki <[email protected]>
This eliminates the polling in cocoa_refresh and implements the propagation of the mouse mode change from absolute to relative.
Message-ID: <[email protected]>
--- ui/cocoa.m | 62 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 24 deletions(-)
ui/cocoa.m +38 -24
@@ -296,6 +296,14 @@ @interface QemuCocoaView : NSView { QEMUScreen screen; pixman_image_t *pixman_image; + /* The state surrounding mouse grabbing is potentially confusing. + * isAbsoluteEnabled tracks qemu_input_is_absolute() [ie "is the emulated + * pointing device an absolute-position one?"], but is only updated on + * next refresh. + * isMouseGrabbed tracks whether GUI events are directed to the guest; + * it controls whether special keys like Cmd get sent to the guest, + * and whether we capture the mouse when in non-absolute mode. + */ BOOL isMouseGrabbed; BOOL isAbsoluteEnabled; CFMachPortRef eventsTap;
@@ -307,17 +315,8 @@ - (void) setFullGrab:(id)sender; - (void) handleMonitorInput:(NSEvent *)event; - (bool) handleEvent:(NSEvent *)event; - (bool) handleEventLocked:(NSEvent *)event; -- (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled; -/* The state surrounding mouse grabbing is potentially confusing. - * isAbsoluteEnabled tracks qemu_input_is_absolute() [ie "is the emulated - * pointing device an absolute-position one?"], but is only updated on - * next refresh. - * isMouseGrabbed tracks whether GUI events are directed to the guest; - * it controls whether special keys like Cmd get sent to the guest, - * and whether we capture the mouse when in non-absolute mode. - */ +- (void) notifyMouseModeChange; - (BOOL) isMouseGrabbed; -- (BOOL) isAbsoluteEnabled; - (QEMUScreen) gscreen; - (void) raiseAllKeys; @end
@@ -404,6 +403,7 @@ - (void) selectConsoleLocked:(unsigned int)index qkbd_state_switch_console(kbd, con); dcl.con = con; register_displaychangelistener(&dcl); + [self notifyMouseModeChange]; [self updateUIInfo]; }
@@ -1109,14 +1109,26 @@ - (void) ungrabMouse [self raiseAllButtons]; } -- (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled { +- (void) notifyMouseModeChange { + bool tIsAbsoluteEnabled = bool_with_bql(^{ + return qemu_input_is_absolute(dcl.con); + }); + + if (tIsAbsoluteEnabled == isAbsoluteEnabled) { + return; + } + isAbsoluteEnabled = tIsAbsoluteEnabled; + if (isMouseGrabbed) { - CGAssociateMouseAndMouseCursorPosition(isAbsoluteEnabled); + if (isAbsoluteEnabled) { + [self ungrabMouse]; + } else { + CGAssociateMouseAndMouseCursorPosition(isAbsoluteEnabled); + } } } - (BOOL) isMouseGrabbed {return isMouseGrabbed;} -- (BOOL) isAbsoluteEnabled {return isAbsoluteEnabled;} - (QEMUScreen) gscreen {return screen;} /*
@@ -1791,6 +1803,17 @@ static void addRemovableDevicesMenuItems(void) qapi_free_BlockInfoList(pointerToFree); } +static void cocoa_mouse_mode_change_notify(Notifier *notifier, void *data) +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [cocoaView notifyMouseModeChange]; + }); +} + +static Notifier mouse_mode_change_notifier = { + .notify = cocoa_mouse_mode_change_notify +}; + @interface QemuCocoaPasteboardTypeOwner : NSObject<NSPasteboardTypeOwner> @end
@@ -1975,17 +1998,6 @@ static void cocoa_refresh(DisplayChangeListener *dcl) COCOA_DEBUG("qemu_cocoa: cocoa_refresh\n"); graphic_hw_update(dcl->con); - if (qemu_input_is_absolute(dcl->con)) { - dispatch_async(dispatch_get_main_queue(), ^{ - if (![cocoaView isAbsoluteEnabled]) { - if ([cocoaView isMouseGrabbed]) { - [cocoaView ungrabMouse]; - } - } - [cocoaView setAbsoluteEnabled:YES]; - }); - } - if (cbchangecount != [[NSPasteboard generalPasteboard] changeCount]) { qemu_clipboard_info_unref(cbinfo); cbinfo = qemu_clipboard_info_new(&cbpeer, QEMU_CLIPBOARD_SELECTION_CLIPBOARD);
@@ -2062,6 +2074,8 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) // register vga output callbacks register_displaychangelistener(&dcl); + qemu_add_mouse_mode_change_notifier(&mouse_mode_change_notifier); + [cocoaView notifyMouseModeChange]; [cocoaView updateUIInfo]; qemu_event_init(&cbevent, false);
Signature · 1 line
2.41.0
[PULL 53/76] ppc/pnv: Introduce pnv_chip_foreach_cpu()
In reply to Philippe Mathieu-DaudéFrom: Cédric Le Goater <[email protected]>
This helper routine uses the machine definition, sockets, cores and threads, to loop on all CPUs of the machine. Replace CPU_FOREACH() with it.
Message-ID: <[email protected]>
--- hw/ppc/pnv.c | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-)
hw/ppc/pnv.c +37 -13
@@ -2261,6 +2261,21 @@ PowerPCCPU *pnv_chip_find_cpu(PnvChip *chip, uint32_t pir)return NULL ; } +static void pnv_chip_foreach_cpu (PnvChip *chip, +void (*fn)(PnvChip *chip,PowerPCCPU *cpu,void *opaque), +void *opaque) +{ +int i, j; + +for (i =0 ; i < chip->nr_cores; i++) { +PnvCore *pc = chip->cores[i]; + +for (j =0 ; j <CPU_CORE (pc)->nr_threads; j++) { +fn (chip, pc->threads[j], opaque); + } + } +} +static ICSState *pnv_ics_get (XICSFabric *xi,int irq) {PnvMachineState *pnv =PNV_MACHINE (xi);
@@ -2329,22 +2344,25 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir)return cpu ?ICP (pnv_cpu_state (cpu)->intc) :NULL ; } +static void pnv_pic_intc_print_info (PnvChip *chip,PowerPCCPU *cpu, +void *opaque) +{ +PNV_CHIP_GET_CLASS (chip)->intc_print_info (chip, cpu, opaque); +} +static void pnv_pic_print_info (InterruptStatsProvider *obj,GString *buf) {PnvMachineState *pnv =PNV_MACHINE (obj);int i; -CPUState *cs; - -CPU_FOREACH (cs) { -PowerPCCPU *cpu =POWERPC_CPU (cs); - -/* XXX: loop on each chip/core/thread instead of CPU_FOREACH() */ -PNV_CHIP_GET_CLASS (pnv->chips[0 ])->intc_print_info (pnv->chips[0 ], cpu, - buf); - }for (i =0 ; i < pnv->num_chips; i++) { -PNV_CHIP_GET_CLASS (pnv->chips[i])->pic_print_info (pnv->chips[i], buf); +PnvChip *chip = pnv->chips[i]; + +/* First CPU presenters */ +pnv_chip_foreach_cpu (chip, pnv_pic_intc_print_info, buf); + +/* Then other devices, PHB, PSI, XIVE */ +PNV_CHIP_GET_CLASS (chip)->pic_print_info (chip, buf); } }
@@ -2545,12 +2563,18 @@ static void pnv_cpu_do_nmi_on_cpu(CPUState *cs, run_on_cpu_data arg) } } +static void pnv_cpu_do_nmi (PnvChip *chip,PowerPCCPU *cpu,void *opaque) +{ +async_run_on_cpu (CPU (cpu), pnv_cpu_do_nmi_on_cpu,RUN_ON_CPU_NULL ); +} +static void pnv_nmi (NMIState *n,int cpu_index,Error **errp) { -CPUState *cs; +PnvMachineState *pnv =PNV_MACHINE (qdev_get_machine ()); +int i; -CPU_FOREACH (cs) { -async_run_on_cpu (cs, pnv_cpu_do_nmi_on_cpu,RUN_ON_CPU_NULL ); +for (i =0 ; i < pnv->num_chips; i++) { +pnv_chip_foreach_cpu (pnv->chips[i], pnv_cpu_do_nmi,NULL ); } }
Signature · 1 line
2.41.0
[PULL 63/76] hw/intc/loongson_ipi: Provide per core MMIO address spaces
In reply to Philippe Mathieu-DaudéFrom: Jiaxun Yang <[email protected]>
The real IPI hardware have dedicated MMIO registers mapped into memory address space for every core. This is not used by LoongArch guest software but it is essential for CPU without IOCSR such as Loongson-3A1000.
Implement it with existing infrastructure.
Message-ID: <[email protected]>
--- include/hw/intc/loongson_ipi.h | 2 + hw/intc/loongson_ipi.c | 86 +++++++++++++++++++++++++--------- 2 files changed, 67 insertions(+), 21 deletions(-)
include/hw/intc/loongson_ipi.h +2 -0
@@ -34,6 +34,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(LoongsonIPI, LOONGSON_IPI) typedef struct IPICore { + LoongsonIPI *ipi; + MemoryRegion *ipi_mmio_mem; uint32_t status; uint32_t en; uint32_t set;
hw/intc/loongson_ipi.c +65 -21
144 lines not on this page · raw message
Signature · 1 line
2.41.0
[PULL 43/76] hw/ppc: Avoid using Monitor in xive2_end_queue_pic_print_info()
In reply to Philippe Mathieu-DaudéReplace Monitor API by HumanReadableText one.
Message-Id: <[email protected]>
--- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/xive2.c | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-)
include/hw/ppc/xive2_regs.h +1 -1
@@ -132,7 +132,7 @@ static inline uint64_t xive2_end_qaddr(Xive2End *end)void xive2_end_pic_print_info (Xive2End *end,uint32_t end_idx,Monitor *mon);void xive2_end_queue_pic_print_info (Xive2End *end,uint32_t width, -Monitor *mon); +GString *buf);void xive2_end_eas_pic_print_info (Xive2End *end,uint32_t end_idx,GString *buf);
hw/intc/xive2.c +12 -7
@@ -11,6 +11,7 @@#include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h"
@@ -40,8 +41,7 @@ void xive2_eas_pic_print_info(Xive2Eas *eas, uint32_t lisn, GString *buf) (uint32_t) xive_get_field64(EAS2_END_DATA, eas->w)); } -void xive2_end_queue_pic_print_info (Xive2End *end,uint32_t width, -Monitor *mon) +void xive2_end_queue_pic_print_info (Xive2End *end,uint32_t width,GString *buf) {uint64_t qaddr_base =xive2_end_qaddr (end);uint32_t qsize =xive_get_field32 (END2_W3_QSIZE , end->w3);
@@ -52,7 +52,7 @@ void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width,/* * print out the [ (qindex - (width - 1)) .. (qindex + 1)] window */ -monitor_printf (mon," [ " ); +g_string_append_printf (buf," [ " ); qindex = (qindex - (width -1 )) & (qentries -1 );for (i =0 ; i < width; i++) {uint64_t qaddr = qaddr_base + (qindex <<2 );
@@ -64,11 +64,11 @@ void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, HWADDR_PRIx "\n", qaddr);return ; } -monitor_printf (mon,"%s%08x " , i == width -1 ?"^" :"" , -be32_to_cpu (qdata)); +g_string_append_printf (buf,"%s%08x " , i == width -1 ?"^" :"" , +be32_to_cpu (qdata)); qindex = (qindex +1 ) & (qentries -1 ); } -monitor_printf (mon,"]" ); +g_string_append_printf (buf,"]" ); }void xive2_end_pic_print_info (Xive2End *end,uint32_t end_idx,Monitor *mon)
@@ -108,9 +108,14 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) priority, nvp_blk, nvp_idx);if (qaddr_base) { +g_autoptr (GString) buf =g_string_new ("" ); +g_autoptr (HumanReadableText) info =NULL ; +monitor_printf (mon," eq:@%08" PRIx64"% 6d/%5d ^%d" , qaddr_base, qindex, qentries, qgen); -xive2_end_queue_pic_print_info (end,6 , mon); +xive2_end_queue_pic_print_info (end,6 , buf); + info =human_readable_text_from_str (buf); +monitor_puts (mon, info->human_readable_text); }monitor_printf (mon,"\n" ); }
Signature · 1 line
2.41.0
Quoted 23 lines · Philippe Mathieu-Daudé
The following changes since commit
900536d3e97aed7fdd9cb4dadd3bf7023360e819:Merge tag 'dirtylimit-dirtyrate-pull-request-20240617' ofhttps://github.com/newfriday/qemu into staging (2024-06-17 11:40:24 -0700)are available in the Git repository at:
https://github.com/philmd/qemu.git tags/misc-20240618for you to fetch changes up to
02ad1f5b04bf2941852f405c87535307365f7041:ui+display: rename is_buffer_shared() -> surface_is_allocated() (2024-06-18 17:54:40 +0200)Spurious warning (3 times):
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating?Deliberately ignored in ui/ (also 3 times):
WARNING: line over 80 characters
----------------------------------------------------------------
Misc patches queue
Quoted 14 lines
. Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil)
. Always use little endian audio format in virtio-snd (Phil)
. Avoid using Monitor inINTERRUPT_STATS_PROVIDER::print_info(Phil) . Introduce x-query-interrupt-controllers QMP command (Phil)
. Introducepnv_chip_foreach_cpu()to remove oneCPU_FOREACHuse (Cédric) . Setarm_v7m_tcg_ops::cpu_exec_halt& mandateTCGCPUOps::cpu_exec_halt(Peter) . Constify few uses of IOMMUTLBEvent (Phil)
. Wireloongson_ipidevice to loongson3_virt/TCG (Jiaxun)
. Fix inclusion of tracing headers on s390x/TCG (Phil)
. Add few shortcuts missing to readline (Manos)
. Update ui/display entries inMAINTAINERS(Gerd)
. Useqemu_add_mouse_change_notifieron Cocoa (Akihiko)
. Fix Standard VGA screen blanking and cleanups (Gerd)
. Fix USB/MTP reported "free space" value (Fabio)
Fails testing:
https://gitlab.com/qemu-project/qemu/-/jobs/7129004955
qemu-system-tricore: ../accel/tcg/cpu-exec.c:1082: tcg_exec_realizefn: Assertion `cpu->cc->tcg_ops->cpu_exec_halt' failed.
r~
Quoted 40 lines · Richard Henderson
Quoted 24 lines · Philippe Mathieu-Daudé
The following changes since commit
900536d3e97aed7fdd9cb4dadd3bf7023360e819:Merge tag 'dirtylimit-dirtyrate-pull-request-20240617' ofhttps://github.com/newfriday/qemu into staging (2024-06-17 11:40:24 -0700)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/misc-20240618
for you to fetch changes up to
02ad1f5b04bf2941852f405c87535307365f7041:ui+display: rename
is_buffer_shared()->surface_is_allocated()(2024-06-18 17:54:40 +0200)Spurious warning (3 times):
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating?Deliberately ignored in ui/ (also 3 times):
WARNING: line over 80 characters
----------------------------------------------------------------
Misc patches queueQuoted 14 lines
. Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil)
. Always use little endian audio format in virtio-snd (Phil)
. Avoid using Monitor inINTERRUPT_STATS_PROVIDER::print_info(Phil) . Introduce x-query-interrupt-controllers QMP command (Phil)
. Introducepnv_chip_foreach_cpu()to remove oneCPU_FOREACHuse (Cédric) . Setarm_v7m_tcg_ops::cpu_exec_halt& mandateTCGCPUOps::cpu_exec_halt(Peter) . Constify few uses of IOMMUTLBEvent (Phil)
. Wireloongson_ipidevice to loongson3_virt/TCG (Jiaxun)
. Fix inclusion of tracing headers on s390x/TCG (Phil)
. Add few shortcuts missing to readline (Manos)
. Update ui/display entries inMAINTAINERS(Gerd)
. Useqemu_add_mouse_change_notifieron Cocoa (Akihiko)
. Fix Standard VGA screen blanking and cleanups (Gerd)
. Fix USB/MTP reported "free space" value (Fabio)
Quoted 5 lines
Fails testing:
https://gitlab.com/qemu-project/qemu/-/jobs/7129004955
qemu-system-tricore:
../accel/tcg/cpu-exec.c:1082:tcg_exec_realizefn: Assertion `cpu->cc->tcg_ops->cpu_exec_halt' failed.
Doh sorry, I tested but hit a libusb issue on this target and mingw64, tested there and thought this was the only issue and missed that.
Hmm cpu_has_work() is defined inlined. I'll just drop the 3 lines I added to Peter's patch and send his unmodified.
Regards,
Phil.
Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 44 lines · Richard Henderson
Quoted 24 lines · Philippe Mathieu-Daudé
The following changes since commit
900536d3e97aed7fdd9cb4dadd3bf7023360e819:Merge tag 'dirtylimit-dirtyrate-pull-request-20240617' ofhttps://github.com/newfriday/qemu into staging (2024-06-17 11:40:24 -0700)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/misc-20240618
for you to fetch changes up to
02ad1f5b04bf2941852f405c87535307365f7041:ui+display: rename
is_buffer_shared()->surface_is_allocated()(2024-06-18 17:54:40 +0200)Spurious warning (3 times):
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating?Deliberately ignored in ui/ (also 3 times):
WARNING: line over 80 characters
----------------------------------------------------------------
Misc patches queueQuoted 14 lines
. Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil)
. Always use little endian audio format in virtio-snd (Phil)
. Avoid using Monitor inINTERRUPT_STATS_PROVIDER::print_info(Phil) . Introduce x-query-interrupt-controllers QMP command (Phil)
. Introducepnv_chip_foreach_cpu()to remove oneCPU_FOREACHuse (Cédric) . Setarm_v7m_tcg_ops::cpu_exec_halt& mandateTCGCPUOps::cpu_exec_halt(Peter) . Constify few uses of IOMMUTLBEvent (Phil)
. Wireloongson_ipidevice to loongson3_virt/TCG (Jiaxun)
. Fix inclusion of tracing headers on s390x/TCG (Phil)
. Add few shortcuts missing to readline (Manos)
. Update ui/display entries inMAINTAINERS(Gerd)
. Useqemu_add_mouse_change_notifieron Cocoa (Akihiko)
. Fix Standard VGA screen blanking and cleanups (Gerd)
. Fix USB/MTP reported "free space" value (Fabio)Fails testing:
Quoted 7 lines
Quoted 1 line
qemu-system-tricore:
../accel/tcg/cpu-exec.c:1082:tcg_exec_realizefn: Assertion `cpu->cc->tcg_ops->cpu_exec_halt' failed.Doh sorry, I tested but hit a libusb issue on this target and mingw64, tested there and thought this was the only issue and missed that.
Hmm
cpu_has_work()is defined inlined. I'll just drop the 3 lines I added to Peter's patch and send his unmodified.
No, the assert is exactly correct, and caught a bug in the previous patch (55/76). Without your assert, we will just SEGV in cpu_handle_halt instead with patch (56/76).
r~
Quoted 47 lines · Richard Henderson
Quoted 46 lines · Philippe Mathieu-Daudé
Quoted 44 lines · Richard Henderson
Quoted 23 lines · Philippe Mathieu-Daudé
The following changes since commit
900536d3e97aed7fdd9cb4dadd3bf7023360e819:Merge tag 'dirtylimit-dirtyrate-pull-request-20240617' ofhttps://github.com/newfriday/qemu into staging (2024-06-17 11:40:24 -0700)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/misc-20240618
for you to fetch changes up to
02ad1f5b04bf2941852f405c87535307365f7041:ui+display: rename
is_buffer_shared()->surface_is_allocated()(2024-06-18 17:54:40 +0200)Spurious warning (3 times):
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating?Deliberately ignored in ui/ (also 3 times):
WARNING: line over 80 characters
----------------------------------------------------------------
Misc patches queueQuoted 14 lines
. Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil)
. Always use little endian audio format in virtio-snd (Phil)
. Avoid using Monitor inINTERRUPT_STATS_PROVIDER::print_info(Phil) . Introduce x-query-interrupt-controllers QMP command (Phil)
. Introducepnv_chip_foreach_cpu()to remove oneCPU_FOREACHuse (Cédric) . Setarm_v7m_tcg_ops::cpu_exec_halt& mandateTCGCPUOps::cpu_exec_halt(Peter) . Constify few uses of IOMMUTLBEvent (Phil)
. Wireloongson_ipidevice to loongson3_virt/TCG (Jiaxun)
. Fix inclusion of tracing headers on s390x/TCG (Phil)
. Add few shortcuts missing to readline (Manos)
. Update ui/display entries inMAINTAINERS(Gerd)
. Useqemu_add_mouse_change_notifieron Cocoa (Akihiko)
. Fix Standard VGA screen blanking and cleanups (Gerd)
. Fix USB/MTP reported "free space" value (Fabio)Fails testing:
https://gitlab.com/qemu-project/qemu/-/jobs/7129004955
qemu-system-tricore:
../accel/tcg/cpu-exec.c:1082:tcg_exec_realizefn: Assertion `cpu->cc->tcg_ops->cpu_exec_halt' failed.
Quoted 8 lines
Quoted 5 lines
Doh sorry, I tested but hit a libusb issue on this target and mingw64, tested there and thought this was the only issue and missed that.
Hmm
cpu_has_work()is defined inlined. I'll just drop the 3 lines I added to Peter's patch and send his unmodified.No, the assert is exactly correct, and caught a bug in the previous patch (55/76). Without your assert, we will just SEGV in
cpu_handle_haltinstead with patch (56/76).
Yeah, it was too late here to realize that.
Peter, I'll respin without your series. Do you mind taking your "target/arm: Set arm_v7m_tcg_ops cpu_exec_halt to arm_cpu_exec_halt" patch via your ARM tree, that way I don't delay you further.
Thanks,
Phil.
Quoted 69 lines · Philippe Mathieu-Daudé
Quoted 59 lines · Richard Henderson
Quoted 58 lines · Philippe Mathieu-Daudé
Quoted 47 lines · Richard Henderson
Quoted 29 lines · Philippe Mathieu-Daudé
The following changes since commit
900536d3e97aed7fdd9cb4dadd3bf7023360e819:Merge tag 'dirtylimit-dirtyrate-pull-request-20240617'ofhttps://github.com/newfriday/qemu into staging (2024-06-17 11:40:24 -0700)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/misc-20240618for you to fetch changes up to
02ad1f5b04bf2941852f405c87535307365f7041:ui+display: rename is_buffer_shared() -> surface_is_allocated()(2024-06-18 17:54:40 +0200)
Spurious warning (3 times):
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed
updating?Deliberately ignored in ui/ (also 3 times):
WARNING: line over 80 characters
----------------------------------------------------------------
Misc patches queueQuoted 16 lines
. Remove deprecated pc-i440fx-2.0 -> 2.3 machines (Phil) . Always use little endian audio format in virtio-snd (Phil) . Avoid using Monitor in
INTERRUPT_STATS_PROVIDER::print_info(Phil) . Introduce x-query-interrupt-controllers QMP command (Phil) . Introducepnv_chip_foreach_cpu()to remove oneCPU_FOREACHuse (Cédric)
. Setarm_v7m_tcg_ops::cpu_exec_halt& mandateTCGCPUOps::cpu_exec_halt(Peter)
. Constify few uses of IOMMUTLBEvent (Phil)
. Wireloongson_ipidevice to loongson3_virt/TCG (Jiaxun) . Fix inclusion of tracing headers on s390x/TCG (Phil)
. Add few shortcuts missing to readline (Manos)
. Update ui/display entries inMAINTAINERS(Gerd)
. Useqemu_add_mouse_change_notifieron Cocoa (Akihiko)
. Fix Standard VGA screen blanking and cleanups (Gerd)
. Fix USB/MTP reported "free space" value (Fabio)Quoted 6 lines
Fails testing:
https://gitlab.com/qemu-project/qemu/-/jobs/7129004955
qemu-system-tricore:
../accel/tcg/cpu-exec.c:1082:tcg_exec_realizefn: Assertion `cpu->cc->tcg_ops->cpu_exec_halt' failed.Doh sorry, I tested but hit a libusb issue on this target and mingw64, tested there and thought this was the only issue and missed that.
Quoted 7 lines
Quoted 2 lines
Hmm
cpu_has_work()is defined inlined. I'll just drop the 3 lines I added to Peter's patch and send his unmodified.No, the assert is exactly correct, and caught a bug in the previous patch (55/76).
Without your assert, we will just SEGV incpu_handle_haltinstead with patch (56/76).
Quoted 5 lines
Yeah, it was too late here to realize that.
Peter, I'll respin without your series. Do you mind taking your "target/arm: Set
arm_v7m_tcg_opscpu_exec_halttoarm_cpu_exec_halt" patch via your ARM tree, that way I don't delay you further.
Sure, I can do that. (I don't think this series particularly is likely to conflict with anything else in flight.)
-- PMM
Quoted 10 lines · Richard Henderson
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Richard Henderson
Fails testing:
https://gitlab.com/qemu-project/qemu/-/jobs/7129004955
qemu-system-tricore:
../accel/tcg/cpu-exec.c:1082:tcg_exec_realizefn: Assertion `cpu->cc->tcg_ops->cpu_exec_halt' failed.
Quoted 8 lines
Quoted 5 lines
Doh sorry, I tested but hit a libusb issue on this target and mingw64, tested there and thought this was the only issue and missed that.
Hmm
cpu_has_work()is defined inlined. I'll just drop the 3 lines I added to Peter's patch and send his unmodified.No, the assert is exactly correct, and caught a bug in the previous patch (55/76). Without your assert, we will just SEGV in
cpu_handle_haltinstead with patch (56/76).
Yep, we're missing the setup of .cpu_exec_halt for tricore. I missed this because I used a grep for the setup of .cpu_exec_interrupt to find all the TCGCPUOps I needed to update, and for some reason tricore doesn't implement that hook. (This surprises me because I expected every guest CPU to need to provide handling for interrupts. But looking at the callsite in accel/tcg it does indeed allow a target to leave cpu_exec_interrupt NULL.)
Though we won't ever segv without the assert() in patch 3:
tricore doesn't implement a halt state, so we won't ever try to call the non-existent cpu_exec_halt method. (This is why my local testing didn't catch the missing method.)
Anyway, I've squashed this in to patch 2 and re-queued the series to target-arm.next:
target/tricore/cpu.c +1 -1
@@ -169,6 +169,7 @@ static const TCGCPUOps tricore_tcg_ops = { .synchronize_from_tb = tricore_cpu_synchronize_from_tb, .restore_state_to_opc = tricore_restore_state_to_opc, .tlb_fill = tricore_cpu_tlb_fill, + .cpu_exec_halt = tricore_cpu_has_work, }; --PMM