Re: [PATCH v6 3/4] qcow2: add zoned emulation capability

2023-11-26 Thread Damien Le Moal
On 11/27/23 13:37, Sam Li wrote: > By adding zone operations and zoned metadata, the zoned emulation > capability enables full emulation support of zoned device using > a qcow2 file. The zoned device metadata includes zone type, > zoned device state and write pointer of each zone, which is stored

Re: [PATCH v2 for-8.2] ppc/amigaone: Allow running AmigaOS without firmware image

2023-11-26 Thread Nicholas Piggin
On Sun Nov 26, 2023 at 2:34 AM AEST, BALATON Zoltan wrote: > The machine uses a modified U-Boot under GPL license but the sources > of it are lost with only a binary available so it cannot be included > in QEMU. Allow running without the firmware image with -bios none > which can be used when

[PATCH 2/4] tests/qtest: Reorganize common code in ivshmem-test

2023-11-26 Thread Gustavo Romero
This commit reorganizes the ivshmem-test qtest by moving common structs, functions, and code that can be utilized by other ivshmem qtests into two new files: ivshmem-utils.h and ivshmem-utils.c. Enum Reg, struct ServerThread, and mktempshm() have been relocated to these new files. Two new

[PATCH 4/4] hw/misc/ivshmem: Rename ivshmem to ivshmem-pci

2023-11-26 Thread Gustavo Romero
Because now there is also an MMIO ivshmem device (ivshmem-flat.c), and ivshmem.c is a PCI specific implementation, rename it to ivshmem-pci.c. Signed-off-by: Gustavo Romero --- hw/misc/{ivshmem.c => ivshmem-pci.c} | 0 hw/misc/meson.build | 2 +- 2 files changed, 1

[PATCH 3/4] tests/qtest: Add ivshmem-flat test

2023-11-26 Thread Gustavo Romero
Add qtest for the ivshmem-flat device. Based-on: <20231113230149.321304-1-gustavo.rom...@linaro.org> Signed-off-by: Gustavo Romero --- tests/qtest/ivshmem-flat-test.c | 319 tests/qtest/meson.build | 2 + 2 files changed, 321 insertions(+) create mode

[PATCH 1/4] Add ivshmem-flat device

2023-11-26 Thread Gustavo Romero
Add a new device, ivshmem-flat, which is similar to the ivshmem PCI but does not require a PCI bus. It's meant to be used on machines like those with Cortex-M MCUs, which usually lack a PCI/PCIe bus, e.g. lm3s6965evb and mps2-an385. The device currently only supports the sysbus bus. The

[PATCH 0/4] Add ivshmem-flat device

2023-11-26 Thread Gustavo Romero
This patchset introduces a new device, ivshmem-flat, which is similar to the current ivshmem device but does not require a PCI bus. It implements the ivshmem status and control registers as MMRs and the shared memory as a directly accessible memory region in the VM memory layout. It's meant to be

Re: [PATCH-for-9.0 v2 5/8] hw: Prefer qdev_prop_set_bit over object_property_set_bool for QDev

2023-11-26 Thread Harsh Prateek Bora
On 11/23/23 20:08, Philippe Mathieu-Daudé wrote: The QOM API is lower level than the QDev one. When an instance is QDev and setting the property can not fail (using _abort), prefer qdev_prop_set_bit() over object_property_set_bool(). Mechanical transformation using the following coccinelle

Re: [PATCH-for-9.0 v2 1/8] hw/ppc/spapr_cpu_core: Access QDev properties with proper API

2023-11-26 Thread Harsh Prateek Bora
On 11/23/23 20:08, Philippe Mathieu-Daudé wrote: CPUState::start_powered_off field is part of the internal implementation of a QDev CPU. It is exposed as the QDev "start-powered-off" property. External components should use the qdev properties API to access it. Signed-off-by: Philippe

[PATCH v6 0/4] Add full zoned storage emulation to qcow2 driver

2023-11-26 Thread Sam Li
This patch series add a new extension - zoned format - to the qcow2 driver thereby allowing full zoned storage emulation on the qcow2 img file. Users can attach such a qcow2 file to the guest as a zoned device. Write pointer are preserved in the zoned metadata. It will be recovered after power

[PATCH v6 4/4] iotests: test the zoned format feature for qcow2 file

2023-11-26 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 126 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 118 + 2 files

[PATCH v6 2/4] qcow2: add configurations for zoned format extension

2023-11-26 Thread Sam Li
To configure the zoned format feature on the qcow2 driver, it requires settings as: the device size, zone model, zone size, zone capacity, number of conventional zones, limits on zone resources (max append bytes, max open zones, and max_active_zones). To create a qcow2 image with zoned format

[PATCH v6 3/4] qcow2: add zoned emulation capability

2023-11-26 Thread Sam Li
By adding zone operations and zoned metadata, the zoned emulation capability enables full emulation support of zoned device using a qcow2 file. The zoned device metadata includes zone type, zoned device state and write pointer of each zone, which is stored to an array of unsigned integers. Each

[PATCH v6 1/4] docs/qcow2: add the zoned format feature

2023-11-26 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi ---

Re: [PATCH-for-9.0 16/16] target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument

2023-11-26 Thread Gavin Shan
Hi Phil, On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 6

Re: [PATCH-for-9.0 15/16] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 8

Re: [PATCH-for-9.0 14/16] target/arm/kvm: Have kvm_arm_handle_dabt_nisv take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 10

Re: [PATCH-for-9.0 13/16] target/arm/kvm: Have kvm_arm_verify_ext_dabt_pending take a ARMCPU arg

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 8

Re: [PATCH-for-9.0 12/16] target/arm/kvm: Have kvm_arm_[get|put]_virtual_time take ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 23

Re: [PATCH-for-9.0 10/16] target/arm/kvm: Have kvm_arm_vcpu_init take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 11

Re: [PATCH-for-9.0 11/16] target/arm/kvm: Have kvm_arm_vcpu_finalize take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 8

Re: [PATCH-for-9.0 10/16] target/arm/kvm: Have kvm_arm_vcpu_init take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 11

Re: [PATCH-for-9.0 09/16] target/arm/kvm: Have kvm_arm_pmu_set_irq take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h | 4

Re: [PATCH-for-9.0 08/16] target/arm/kvm: Have kvm_arm_pmu_init take a ARMCPU argument

2023-11-26 Thread Gavin Shan
Hi Phil, On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h

Re: [PATCH-for-9.0 07/16] target/arm/kvm: Have kvm_arm_pvtime_init take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h | 6

RE: [PULL v2 25/30] Hexagon HVX (target/hexagon) instruction decoding

2023-11-26 Thread Brian Cain
> -Original Message- > From: Brian Cain > Sent: Tuesday, November 21, 2023 9:52 AM > To: Peter Maydell > Cc: qemu-devel@nongnu.org; richard.hender...@linaro.org; f4...@amsat.org > Subject: RE: [PULL v2 25/30] Hexagon HVX (target/hexagon) instruction > decoding > > > > > -Original

Re: [PATCH-for-9.0 06/16] target/arm/kvm: Have kvm_arm_set_device_attr take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 12

Re: [PATCH-for-9.0 05/16] target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argument

2023-11-26 Thread Gavin Shan
Hi Phil, On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h

Re: [PATCH-for-9.0 04/16] target/arm/kvm: Have kvm_arm_sve_set_vls take a ARMCPU argument

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 7 +++

Re: [PATCH-for-9.0 03/16] target/arm/kvm: Have kvm_arm_add_vcpu_properties take a ARMCPU argument

2023-11-26 Thread Gavin Shan
Hi Phil, On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h

[PATCH] hw/loongarch/virt: Align high memory base address with super page size

2023-11-26 Thread Bibo Mao
With LoongArch virt machine, there is low memory space with region 0--0x1000, and high memory space with started from 0x9000. High memory space is aligned with 256M, it will be better if it is aligned with 1G, which is super page aligned for 4K page size. Currently linux kernel and uefi

Re: [PATCH-for-9.0 02/16] target/arm/kvm: Remove unused includes

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Both MemoryRegion and Error types are forward declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH-for-9.0 01/16] hw/intc/arm_gicv3: Include missing 'qemu/error-report.h' header

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: kvm_arm_its_reset_hold() calls warn_report(), itself declared in "qemu/error-report.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/arm_gicv3_its_kvm.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Gavin Shan

[PATCH] avr: Fix wrong initial value of stack pointer

2023-11-26 Thread Gihun Nam
The current implementation initializes the stack pointer of AVR devices to 0, but it should be set to RAMEND according to the specs. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1525 Signed-off-by: Gihun Nam --- hw/avr/atmega.c | 3 +++ target/avr/cpu.c | 2 +- target/avr/cpu.h | 3

[PATCH v2] target/i386/kvm: Refine VMX controls setting for backward compatibility

2023-11-26 Thread EwanHai
Commit 4a910e1 ("target/i386: do not set unsupported VMX secondary execution controls") implemented a workaround for hosts that have specific CPUID features but do not support the corresponding VMX controls, e.g., hosts support RDSEED but do not support RDSEED-Exiting. In detail, commit 4a910e1

Re: [PATCH-for-9.0 20/25] hw: Simplify memory_region_init_ram() calls

2023-11-26 Thread Andrew Jeffery
On Mon, 2023-11-20 at 22:32 +0100, Philippe Mathieu-Daudé wrote: > Mechanical change using the following coccinelle script: > > @@ > expression mr, owner, arg3, arg4, errp; > @@ > - memory_region_init_ram(mr, owner, arg3, arg4, ); > if ( > - errp > + !memory_region_init_ram(mr,

Re: [PATCH 21/21] target/arm/kvm: Unexport kvm_arm_vm_state_change

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 2 -- target/arm/kvm.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Gavin Shan

[PATCH v2 1/2] vhost: Add worker backend callouts

2023-11-26 Thread Mike Christie
This adds the vhost backend callouts for the worker ioctls added in the 6.4 linux kernel commit: c1ecd8e95007 ("vhost: allow userspace to create workers") Signed-off-by: Mike Christie --- hw/virtio/vhost-backend.c | 28 include/hw/virtio/vhost-backend.h |

[PATCH v2 0/2] vhost-scsi: Support worker ioctls

2023-11-26 Thread Mike Christie
The following patches allow users to configure the vhost worker threads for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue pair, but for vhost-scsi we get one worker for all workqueues. This becomes a bottlneck after 2 queues are used. In the upstream linux kernel commit:

[PATCH v2 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-26 Thread Mike Christie
This adds support for vhost-scsi to be able to create a worker thread per virtqueue. Right now for vhost-net we get a worker thread per tx/rx virtqueue pair which scales nicely as we add more virtqueues and CPUs, but for scsi we get the single worker thread that's shared by all virtqueues. When

Re: [PATCH 20/21] target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Drop fprintfs and actually use the return values in the callers. Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 20 target/arm/kvm.c | 23 ++- 2 files changed, 6 insertions(+), 37

Re: [PATCH 19/21] target/arm/kvm: Unexport kvm_{get,put}_vcpu_events

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 20 target/arm/kvm.c | 20 ++-- 2 files changed, 18 insertions(+), 22 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 18/21] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: There is no need to do this in kvm_arch_init_vcpu per vcpu. Inline kvm_arm_init_serror_injection rather than keep separate. Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 8 target/arm/kvm.c | 13 - 2 files

Re: [PATCH 17/21] target/arm/kvm: Unexport kvm_arm_init_cpreg_list

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 12 target/arm/kvm.c | 10 -- 2 files changed, 8 insertions(+), 14 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 16/21] target/arm/kvm: Unexport kvm_arm_vcpu_finalize

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 14 -- target/arm/kvm.c | 14 +- 2 files changed, 13 insertions(+), 15 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 15/21] target/arm/kvm: Unexport kvm_arm_vcpu_init

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 12 target/arm/kvm.c | 12 +++- 2 files changed, 11 insertions(+), 13 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 14/21] target/arm/kvm: Merge kvm64.c into kvm.c

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Since kvm32.c was removed, there is no need to keep them separate. This will allow more symbols to be unexported. Signed-off-by: Richard Henderson --- target/arm/kvm.c | 789 +++ target/arm/kvm64.c |

Re: [PATCH 13/21] target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport

2023-11-26 Thread Gavin Shan
Hi Richard, On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 10 -- target/arm/kvm.c | 23 +++ target/arm/kvm64.c | 15 --- 3 files changed, 23 insertions(+), 25 deletions(-) With the

Re: [PATCH 12/21] target/arm/kvm: Move kvm_arm_cpreg_level and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 9 - target/arm/kvm.c | 22 ++ target/arm/kvm64.c | 15 --- 3 files changed, 22 insertions(+), 24 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 11/21] target/arm/kvm: Use a switch for kvm_arm_cpreg_level

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Use a switch instead of a linear search through data. Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) With the following nits addressed:

Re: [PATCH 10/21] target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 22 target/arm/kvm.c | 265 +++ target/arm/kvm64.c | 254 - 3 files changed, 265

Re: [PATCH 09/21] target/arm/kvm: Inline kvm_arm_steal_time_supported

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: This function is only used once, and is quite simple. Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 13 - target/arm/kvm64.c | 7 +-- 2 files changed, 1 insertion(+), 19 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 08/21] target/arm/kvm: Unexport kvm_arm_{get, put}_virtual_time

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 16 target/arm/kvm.c | 16 ++-- 2 files changed, 14 insertions(+), 18 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 07/21] target/arm/kvm: Move kvm_arm_handle_debug and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 9 -- target/arm/kvm.c | 77 target/arm/kvm64.c | 70 3 files changed, 77 insertions(+),

Re: [PATCH 06/21] target/arm/kvm: Move kvm_arm_hw_debug_active and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 8 target/arm/kvm.c | 11 +++ target/arm/kvm64.c | 5 - 3 files changed, 11 insertions(+), 13 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 05/21] target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 10 -- target/arm/kvm.c | 24 target/arm/kvm64.c | 17 - 3 files changed, 24 insertions(+), 27 deletions(-) Reviewed-by: Gavin

Re: [PATCH 04/21] target/arm/kvm: Move kvm_arm_verify_ext_dabt_pending and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 10 target/arm/kvm.c | 57 target/arm/kvm64.c | 49 - 3 files changed, 57 insertions(+),

Re: [PATCH 03/21] target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 8 target/arm/kvm.c | 8 +++- target/arm/kvm64.c | 12 3 files changed, 7 insertions(+), 21 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 02/21] target/arm: kvm64: remove a redundant KVM_CAP_SET_GUEST_DEBUG probe

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: From: Chao Du The KVM_CAP_SET_GUEST_DEBUG is probed during kvm_init(). gdbserver will fail to start if the CAP is not supported. So no need to make another probe here, like other targets. Signed-off-by: Chao Du Reviewed-by: Richard Henderson

Re: [PATCH 01/21] accel/kvm: Make kvm_has_guest_debug static

2023-11-26 Thread Gavin Shan
On 11/23/23 15:41, Richard Henderson wrote: This variable is not used or declared outside kvm-all.c. Signed-off-by: Richard Henderson --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Gavin Shan

[PATCH v7 5/8] hw/arm/virt: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do the check by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/virt.c | 62

[PATCH v7 8/8] hw/riscv/shakti_c: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé --- hw/riscv/shakti_c.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-)

[PATCH v7 1/8] machine: Use error handling when CPU type is checked

2023-11-26 Thread Gavin Shan
QEMU will be terminated if the specified CPU type isn't supported in machine_run_board_init(). The list of supported CPU type names is tracked by mc->valid_cpu_types. The error handling can be used to propagate error messages, to be consistent how the errors are handled for other situations in

[PATCH v7 3/8] machine: Print CPU model name instead of CPU type

2023-11-26 Thread Gavin Shan
The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported, to be consistent with the output from '-cpu ?'. Correct the error messages to print CPU model names instead of CPU type names. Signed-off-by: Gavin Shan ---

[PATCH v7 6/8] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm Reviewed-by: Richard Henderson --- hw/arm/sbsa-ref.c | 36

[PATCH v7 2/8] machine: Introduce helper is_cpu_type_supported()

2023-11-26 Thread Gavin Shan
The logic, to check if the specified CPU type is supported in machine_run_board_init(), is independent enough. Factor it out into helper is_cpu_type_supported(). machine_run_board_init() looks a bit clean with this. Since we're here, @machine_class is renamed to @mc to avoid multiple line spanning

[PATCH v7 0/8] Unified CPU type check

2023-11-26 Thread Gavin Shan
This series bases on Phil's repository because the prepatory commits have been queued to the branch. https://gitlab.com/philmd/qemu.git (branch: cpus-next) There are two places where the user specified CPU type is checked to see if it's supported or allowed by the board:

[PATCH v7 4/8] hw/arm/virt: Hide host CPU model for tcg

2023-11-26 Thread Gavin Shan
The 'host' CPU model isn't available until KVM or HVF is enabled. For example, the following error messages are seen when the guest is started with option '-cpu cortex-a8' on tcg after the next commit is applied to check the CPU type in machine_run_board_init().

[PATCH v7 7/8] hw/arm: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Richard Henderson --- hw/arm/bananapi_m2u.c | 12 ++-- hw/arm/cubieboard.c | 12 ++--

Re: [PATCH] qemu/timer: Don't use RDTSC on i486

2023-11-26 Thread Petr Cvek
Dne 26. 11. 23 v 16:56 Paolo Bonzini napsal(a): > > > Il sab 25 nov 2023, 13:23 Petr Cvek > ha scritto: > > GCC defines __i386__ for i386 and i486, which both lack RDTSC instruction. > The i386 seems to be impossible to distinguish, but i486 can be

[PATCH v3 0/4] Fix IRQ routing in via south bridge

2023-11-26 Thread BALATON Zoltan
Philippe, Could this be merged for 8.2 as it fixes USB on the amigaone machine? This would be useful as usb-storage is the simplest way to share data with the host with these machines. This is a slight change from v2 adding more comments and improving commit messages and clean things a bit but

[PATCH v3 1/4] hw/isa/vt82c686: Bring back via_isa_set_irq()

2023-11-26 Thread BALATON Zoltan
The VIA integrated south bridge chips combine several functions and allow routing their interrupts to any of the ISA IRQs also allowing multiple sources to share the same ISA IRQ. E.g. pegasos2 firmware configures everything to use IRQ 9 but amigaone routes them to separate ISA IRQs so the current

[PATCH v3 2/4] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts

2023-11-26 Thread BALATON Zoltan
This device is part of a superio/ISA bridge chip and IRQs from it are routed to an ISA interrupt. Use via_isa_set_irq() function to implement this in a vt82c686-uhci-pci specific irq handler. This reverts commit 422a6e8075752bc5342afd3eace23a4990dd7d98. Signed-off-by: BALATON Zoltan ---

[PATCH v3 4/4] hw/audio/via-ac97: Route interrupts using via_isa_set_irq()

2023-11-26 Thread BALATON Zoltan
This device is a function of VIA south bridge and should allow setting interrupt routing within that chip. This is implemented in via_isa_set_irq(). Fixes: eb604411a78b82c468e2b8d81a9401eb8b9c7658 Signed-off-by: BALATON Zoltan --- hw/audio/via-ac97.c | 8 hw/isa/vt82c686.c | 1 + 2

Re: [PATCH] qemu/timer: Don't use RDTSC on i486

2023-11-26 Thread Petr Cvek
Dne 26. 11. 23 v 14:03 Samuel Tardieu napsal(a): > > Petr Cvek writes: > >> Actually I was thinking about mentioning it in the commit message also, but >> I wasn't able >> to find any specification for that (if all compilers use it). > > Note that this change would be safe: at worst, some

[PATCH v3 3/4] hw/isa/vt82c686: Route PIRQ inputs using via_isa_set_irq()

2023-11-26 Thread BALATON Zoltan
The chip has 4 pins (called PIRQA-D in VT82C686B and PINTA-D in VT8231) that are meant to be connected to PCI IRQ lines and allow routing PCI interrupts to the ISA PIC. Route these in via_isa_set_irq() to make it possible to share them with internal functions that can also be routed to the same

Re: pending hw/audio patches for 8.2

2023-11-26 Thread Michael S. Tsirkin
On Sun, Nov 26, 2023 at 02:32:43PM +0100, Volker Rümelin wrote: > Hi, > > there are five pending reviewed hw/audio patches for 8.2. They are all > bug fixes. It would be good if someone could send a pull request for > rc2. I don't think Gerd will send it. > > The five patches are: > >

Re: [PATCH] sh4: Coding style: Remove tabs

2023-11-26 Thread Thomas Huth
On 24/11/2023 16.30, Philippe Mathieu-Daudé wrote: Hi, On 24/11/23 05:45, xun wrote: From: Yihuan Pan Replaces TABS with spaces to ensure have a consistent coding style with an indentation of 4 spaces in the SH4 subsystem. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/376

Re: [PATCH] qemu/timer: Don't use RDTSC on i486

2023-11-26 Thread Paolo Bonzini
Il sab 25 nov 2023, 13:23 Petr Cvek ha scritto: > GCC defines __i386__ for i386 and i486, which both lack RDTSC instruction. > The i386 seems to be impossible to distinguish, but i486 can be identified > by checking for undefined __i486__. > As far as I know QEMU cannot be run on i486 anyway

[PATCH qemu 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC

2023-11-26 Thread ~inesvarhol
From: Inès Varhol This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board. The implementation is derived from the STM32F405 SoC. The implementation contains no peripherals, only memory regions are implemented. Reviewed-by: Philippe Mathieu-Daudé

[PATCH qemu 2/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-26 Thread ~inesvarhol
From: Inès Varhol This commit adds a new B-L475E-IOT01A board using the STM32L475VG SoC. The implementation is derived from the Netduino Plus 2 machine. There are no peripherals implemented yet, only memory regions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Arnaud Minier

[PATCH qemu 0/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-26 Thread ~inesvarhol
This patch allows to emulate the B-L475E-IOT01A ARM Cortex-M4 board. It's a minimal version without any implemented peripherals yet. We've corrected the patch according to the reviews of Philippe Mathieu- Daudé (thank you !), and additionally completed the MAINTAINERS file with the new devices.

Re: [PATCH-for-9.0 00/16] target/arm/kvm: Unify kvm_arm_FOO() API

2023-11-26 Thread Richard Henderson
On 11/23/23 12:35, Philippe Mathieu-Daudé wrote: Half of the API takes CPUState, the other ARMCPU... $ git grep -F 'CPUState *' target/arm/kvm_arm.h | wc -l 16 $ git grep -F 'ARMCPU *' target/arm/kvm_arm.h | wc -l 14 Since this is ARM specific, have it always take ARMCPU, and

pending hw/audio patches for 8.2

2023-11-26 Thread Volker Rümelin
Hi, there are five pending reviewed hw/audio patches for 8.2. They are all bug fixes. It would be good if someone could send a pull request for rc2. I don't think Gerd will send it. The five patches are: ("hw/audio/hda-codec: fix multiplication overflow")

Re: [PATCH] qemu/timer: Don't use RDTSC on i486

2023-11-26 Thread Samuel Tardieu
Petr Cvek writes: Actually I was thinking about mentioning it in the commit message also, but I wasn't able to find any specification for that (if all compilers use it). Note that this change would be safe: at worst, some compilers don't use __tune_i386__ and the situation would be the

Re: [PATCH] qemu/timer: Don't use RDTSC on i486

2023-11-26 Thread Petr Cvek
Actually I was thinking about mentioning it in the commit message also, but I wasn't able to find any specification for that (if all compilers use it). Other problem is the __tune_i386__ is also set when -mtune=i386 (but with -march=i686). But if the general idea of changing the code for 486

Re: [PATCH] qemu/timer: Don't use RDTSC on i486

2023-11-26 Thread Samuel Tardieu
Petr Cvek writes: GCC defines __i386__ for i386 and i486, which both lack RDTSC instruction. The i386 seems to be impossible to distinguish, but i486 can be identified by checking for undefined __i486__. Couldn't you check for an undefined __tune_i386__, which would be set by both GCC

Re: [PATCH v2] linux-user/riscv: Add Zicboz extensions to hwprobe

2023-11-26 Thread Andrew Jones
On Fri, Nov 24, 2023 at 06:41:25PM +0100, Christoph Müllner wrote: > On Fri, Nov 24, 2023 at 5:59 PM Andrew Jones wrote: > > > > On Thu, Nov 23, 2023 at 07:12:59PM +0100, Christoph Muellner wrote: > > > From: Christoph Müllner > > > > > > Upstream Linux recently added RISC-V Zicboz support to

Re: [PATCH v5 2/3] hw/ppc: Add nest1 chiplet model

2023-11-26 Thread Chalapathi V
On 24-11-2023 18:31, Nicholas Piggin wrote: On Fri Nov 24, 2023 at 10:19 PM AEST, Cédric Le Goater wrote: On 11/24/23 12:26, Nicholas Piggin wrote: For this and actually the last patch too, it would be good to mention (possibly in a header comment in the file too) what actual functionality

Re: [PATCH v5 1/3] hw/ppc: Add pnv pervasive common chiplet units

2023-11-26 Thread Chalapathi V
On 24-11-2023 16:42, Nicholas Piggin wrote: On Fri Nov 24, 2023 at 8:15 PM AEST, Chalapathi V wrote: This part of the patchset creates a common pervasive chiplet model where it houses the common units of a chiplets. The chiplet control unit is common across chiplets and this commit