[PATCH 4/4] cxl/vendor: SK hynix Niagara Multi-Headed SLD Device

2023-07-21 Thread Gregory Price
Create a new device to emulate the SK hynix Niagara MHSLD platform. This device has custom CCI commands that allow for applying isolation to each memory block between hosts. This enables an early form of dynamic capacity, whereby the NUMA node maps the entire region, but the host is responsible fo

[PATCH] tests/avocado/migration: Remove the malfunctioning s390x tests

2023-07-21 Thread Thomas Huth
The tests from tests/avocado/migration.py do not work at all on s390x - the bios shuts down immediately when it cannot find a boot disk, so there is nothing left to migrate here. For doing a proper migration test, we would need a proper payload, but we already do such tests in the migration *qtest*

Re: [PATCH v6 3/5] target/riscv: Create an KVM AIA irqchip

2023-07-21 Thread Andrew Jones
On Fri, Jul 14, 2023 at 08:44:25AM +, Yong-Xuan Wang wrote: > We create a vAIA chip by using the KVM_DEV_TYPE_RISCV_AIA and then set up > the chip with the KVM_DEV_RISCV_AIA_GRP_* APIs. > > Signed-off-by: Yong-Xuan Wang > Reviewed-by: Jim Shu > Reviewed-by: Daniel Henrique Barboza > Reviewe

Re: [PATCH v6 5/5] target/riscv: select KVM AIA in riscv virt machine

2023-07-21 Thread Andrew Jones
On Fri, Jul 14, 2023 at 08:44:27AM +, Yong-Xuan Wang wrote: ... > +#if defined(CONFIG_KVM) > +static char *virt_get_kvm_aia(Object *obj, Error **errp) > +{ > +RISCVVirtState *s = RISCV_VIRT_MACHINE(obj); > + > +return g_strdup(kvm_aia_mode_str(s->kvm_aia_mode)); > +} > + > +static void

Re: [PATCH 0/3] pegasos2 fixes for 8.1

2023-07-21 Thread Daniel Henrique Barboza
On 7/18/23 21:32, BALATON Zoltan wrote: These are some small fixes when using pegasos2 with the QEMU built in VOF instead of the non-free board firmware that fix bugs in the generated device tree and matches the board firmware in the reset state of on-board USB devices. This fixes booting Amig

Re: [PATCH 1/2] Reduce vdpa initialization / startup overhead

2023-07-21 Thread Si-Wei Liu
On 7/21/2023 3:39 AM, Eugenio Perez Martin wrote: On Tue, Jul 18, 2023 at 12:55 PM Michael S. Tsirkin wrote: On Thu, Apr 20, 2023 at 10:59:56AM +0200, Eugenio Perez Martin wrote: On Thu, Apr 20, 2023 at 7:25 AM Pei Li wrote: Hi all, My bad, I just submitted the kernel patch. If we are pa

[PATCH 4/9] target: Use vaddr for hvf_arch_[insert|remove]_hw_breakpoint

2023-07-21 Thread Anton Johansson via
Changes the signature of the target-defined functions for inserting/removing hvf hw breakpoints. The address and length arguments are now of vaddr type, which both matches the type used internally in accel/hvf/hvf-all.c and makes the api target-agnostic. Signed-off-by: Anton Johansson --- includ

[PATCH 3/9] target: Use vaddr for kvm_arch_[insert|remove]_hw_breakpoint

2023-07-21 Thread Anton Johansson via
Changes the signature of the target-defined functions for inserting/removing kvm hw breakpoints. The address and length arguments are now of vaddr type, which both matches the type used internally in accel/kvm/kvm-all.c and makes the api target-agnostic. Signed-off-by: Anton Johansson --- includ

[PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-07-21 Thread Anton Johansson via
This patchset replaces the remaining uses of target_ulong in the accel/ directory. Specifically, the address type of a few kvm/hvf functions is widened to vaddr, and the address type of the cpu_[st|ld]*() functions is changed to abi_ptr (which is re-typedef'd to vaddr in system mode). As a starti

[PATCH 5/9] Replace target_ulong with abi_ptr in cpu_[st|ld]*()

2023-07-21 Thread Anton Johansson via
Changes the address type of the guest memory read/write functions from target_ulong to abi_ptr. (abi_ptr is currently typedef'd to target_ulong but that will change in a following commit.) This will reduce the coupling between accel/ and target/. Note: Function pointers that point to cpu_[st|ld]*(

[PATCH 9/9] accel/tcg: Update run_on_cpu_data static assert

2023-07-21 Thread Anton Johansson via
As we are now using vaddr for representing guest addresses, update the static assert to check that vaddr fits in the run_on_cpu_data union. Signed-off-by: Anton Johansson --- accel/tcg/cputlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tc

[PATCH 7/9] include/exec: Widen tlb_hit/tlb_hit_page()

2023-07-21 Thread Anton Johansson via
tlb_addr is changed from target_ulong to uint64_t to match the type of a CPUTLBEntry value, and the addressed is changed to vaddr. Signed-off-by: Anton Johansson --- include/exec/cpu-all.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-all.h b/include/ex

[PATCH 8/9] accel/tcg: Widen address arg. in tlb_compare_set()

2023-07-21 Thread Anton Johansson via
Signed-off-by: Anton Johansson --- accel/tcg/cputlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 8e9dc51cd1..2f97ae2fda 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1108,7 +1108,7 @@ static void tlb_add_large_p

[PATCH 2/9] accel/hvf: Widen pc/saved_insn for hvf_sw_breakpoint

2023-07-21 Thread Anton Johansson via
Widens the pc and saved_insn fields of hvf_sw_breakpoint from target_ulong to vaddr. Other hvf_* functions accessing hvf_sw_breakpoint are also widened to match. Signed-off-by: Anton Johansson --- include/sysemu/hvf.h | 6 +++--- accel/hvf/hvf-accel-ops.c | 4 ++-- accel/hvf/hvf-all.c

[PATCH 1/9] accel/kvm: Widen pc/saved_insn for kvm_sw_breakpoint

2023-07-21 Thread Anton Johansson via
Widens the pc and saved_insn fields of kvm_sw_breakpoint from target_ulong to vaddr. The pc argument of kvm_find_sw_breakpoint is also widened to match. Signed-off-by: Anton Johansson --- include/sysemu/kvm.h | 6 +++--- accel/kvm/kvm-all.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions

[PATCH 6/9] include/exec: typedef abi_ptr to vaddr in softmmu

2023-07-21 Thread Anton Johansson via
In system mode, abi_ptr is primarily used for representing addresses when accessing guest memory with cpu_[st|ld]*(). Widening it from target_ulong to vaddr reduces the target dependence of these functions and is step towards building accel/ once for system mode. Signed-off-by: Anton Johansson --

Re: [PULL 5/5] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-21 Thread Helge Deller
On 7/21/23 17:14, Michael Tokarev wrote: 19.07.2023 18:52, Helge Deller wrote: qemu-user crashes immediately when running static binaries on the armhf architecture. The problem is the memory layout where the executable is loaded before the interpreter library, in which case the reserved brk regi

Re: [RFC PATCH 07/12] vdpa: add vhost_vdpa_reset_queue

2023-07-21 Thread Si-Wei Liu
On 7/20/2023 11:14 AM, Eugenio Pérez wrote: Split out vq reset operation in its own function, as it may be called with ring reset. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virt

[PATCH] ppc/pegasos2: Fix reg property of 64 bit BARs in device tree

2023-07-21 Thread BALATON Zoltan
The board firmware handles this correctly following the Open Firmware standard which we missed. This fixes 64 bit BARs when using VOF. Signed-off-by: BALATON Zoltan --- hw/ppc/pegasos2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.

Re: [PATCH 0/3] pegasos2 fixes for 8.1

2023-07-21 Thread BALATON Zoltan
On Fri, 21 Jul 2023, Daniel Henrique Barboza wrote: On 7/18/23 21:32, BALATON Zoltan wrote: These are some small fixes when using pegasos2 with the QEMU built in VOF instead of the non-free board firmware that fix bugs in the generated device tree and matches the board firmware in the reset stat

Re: [PATCH] ppc/pegasos2: Fix reg property of 64 bit BARs in device tree

2023-07-21 Thread BALATON Zoltan
On Sat, 22 Jul 2023, BALATON Zoltan wrote: The board firmware handles this correctly following the Open Firmware standard which we missed. This fixes 64 bit BARs when using VOF. In case it helps review this is defined in page 5 of this document: https://www.openbios.org/data/docs/bus.pci.pdf

Re: [RFC PATCH 11/12] vdpa: use SVQ to stall dataplane while NIC state is being restored

2023-07-21 Thread Si-Wei Liu
On 7/20/2023 11:14 AM, Eugenio Pérez wrote: Some dynamic state of a virtio-net vDPA devices is restored from CVQ in the event of a live migration. However, dataplane needs to be disabled so the NIC does not receive buffers in the invalid ring. As a default method to achieve it, let's offer a

Re: [PATCH 1/3] target/riscv: Add cycle & instret privilege mode filtering properties

2023-07-21 Thread Kevin Xue
On Tue, Jul 18, 2023 at 6:21 PM Weiwei Li wrote: > > > On 2023/7/19 06:47, Kaiwen Xue wrote: > > This adds the properties for ISA extension smcntrpmf. Patches > > implementing it will follow. > > > > Signed-off-by: Kaiwen Xue > > Signed-off-by: Kaiwen Xue > > --- > > target/riscv/cpu.c | 2

Re: [PATCH 3/3] target/riscv: Add cycle & instret privilege mode filtering support

2023-07-21 Thread Kevin Xue
On Tue, Jul 18, 2023 at 6:25 PM Weiwei Li wrote: > > > On 2023/7/19 06:47, Kaiwen Xue wrote: > > QEMU only calculates dummy cycles and instructions, so there is no > > actual means to stop the icount in QEMU. Hence this patch merely adds > > the functionality of accessing the cfg registers, and ca

[PULL 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-07-21 Thread Stefano Stabellini
From: Oleksandr Tyshchenko In order to use virtio backends we need to initialize RAM for the xen-mapcache (which is responsible for mapping guest memory using foreign mapping) to work. Calculate and add hi/low memory regions based on machine->ram_size. Use the constants defined in public header

[PULL 0/2] xen-virtio-1-tag

2023-07-21 Thread Stefano Stabellini
The following changes since commit d1181d29370a4318a9f11ea92065bea6bb159f83: Merge tag 'pull-nbd-2023-07-19' of https://repo.or.cz/qemu/ericb into staging (2023-07-20 09:54:07 +0100) are available in the Git repository at: https://gitlab.com/sstabellini/qemu.git xen-virtio-1-tag for you to

[PULL 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-07-21 Thread Stefano Stabellini
From: Oleksandr Tyshchenko In order to use virtio backends we need to allocate virtio-mmio parameters (irq and base) and register corresponding buses. Use the constants defined in public header arch-arm.h to be aligned with the toolstack. So the number of current supported virtio-mmio devices is

[PATCH] kvm: Remove KVM_CREATE_IRQCHIP support assumption

2023-07-21 Thread Andrew Jones
Since Linux commit 00f918f61c56 ("RISC-V: KVM: Skeletal in-kernel AIA irqchip support") checking KVM_CAP_IRQCHIP returns non-zero when the RISC-V platform has AIA. The cap indicates KVM supports at least one of the following ioctls: KVM_CREATE_IRQCHIP KVM_IRQ_LINE KVM_GET_IRQCHIP KVM_SET_I

[PATCH v3 0/2] accel/kvm: Specify default IPA size for arm64

2023-07-21 Thread Akihiko Odaki
Some Arm systems such as Apple Silicon Macs have IPA size smaller than the default used by KVM. Introduce our own default IPA size that fits on such a system. V2 -> V3: Changed to use the maximum IPA size as the default. V1 -> V2: Introduced an arch hook Akihiko Odaki (2): kvm: Introduce kvm_ar

[PATCH v3 2/2] accel/kvm: Specify default IPA size for arm64

2023-07-21 Thread Akihiko Odaki
Before this change, the default KVM type, which is used for non-virt machine models, was 0. The kernel documentation says: > On arm64, the physical address size for a VM (IPA Size limit) is > limited to 40bits by default. The limit can be configured if the host > supports the extension KVM_CAP_ARM

[PATCH v3 1/2] kvm: Introduce kvm_arch_get_default_type hook

2023-07-21 Thread Akihiko Odaki
kvm_arch_get_default_type() returns the default KVM type. This hook is particularly useful to derive a KVM type that is valid for "none" machine model, which is used by libvirt to probe the availability of KVM. For MIPS, the existing mips_kvm_type() is reused. This function ensures the availabilit

[PATCH] vl: Free machine list

2023-07-21 Thread Akihiko Odaki
Free machine list and make LeakSanitizer happy. Signed-off-by: Akihiko Odaki --- softmmu/vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index b0b96f67fa..802f728298 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1484,7 +1484,8 @@ static g

<    1   2