Re: [PATCH] targer/riscv: Implement Zabha extension

2024-05-27 Thread LIU Zhiwei
Hi Alexandre, I have sent the patch set about Zabha before last week. https://lore.kernel.org/all/fed99165-58da-458c-b68f-a9717fc15...@linux.alibaba.com/T/ Welcome to review it and give comments. Thanks, Zhiwei On 2024/5/28 13:45, Alexandre Ghiti wrote: From: Gianluca Guida Add Zabha imple

Re: [SPAM] Re: [PATCH v4 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-27 Thread Cédric Le Goater
On 5/27/24 18:06, Philippe Mathieu-Daudé wrote: Hi Jamin, On 27/5/24 10:02, Jamin Lin wrote: AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM Side Address High Part(0x7C)" register to support 64 bits dma dram address. Add helper routines functions to compute the dma dram addres

Re: [RFC PATCH 03/10] target/ppc: Improve SPR indirect registers

2024-05-27 Thread Harsh Prateek Bora
Hi Nick, On 5/26/24 17:56, Nicholas Piggin wrote: SPRC/SPRD were recently added to all BookS CPUs supported, but they are only tested on POWER9 and POWER10, so restrict them to those CPUs. Hope you mean to restrict to P9/10 for both spapr and pnv or just pnv ? SPR indirect scratch registe

Re: [PATCH 3/4] tests/vm: update centos.aarch64 image to 9

2024-05-27 Thread Thomas Huth
On 21/05/2024 14.53, Alex Bennée wrote: As Centos Stream 8 goes out of support we need to update. To do this powertools is replaced by crb and we don't over specify the python3 we want. Signed-off-by: Alex Bennée --- tests/vm/centos.aarch64 | 10 +- 1 file changed, 5 insertions(+), 5

Re: [PATCH 2/4] docs/devel: update references to centos to later version

2024-05-27 Thread Thomas Huth
On 21/05/2024 14.53, Alex Bennée wrote: From the website: "After May 31, 2024, CentOS Stream 8 will be archived and no further updates will be provided." We have updated a few bits but there are still references that need fixing. Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 8 ++

Re: [PATCH v3 02/13] hw/riscv: add riscv-iommu-bits.h

2024-05-27 Thread Eric Cheng
On 5/24/2024 1:39 AM, Daniel Henrique Barboza wrote: ... +/* 5.4 Features control register (32bits) */ +#define RISCV_IOMMU_REG_FCTL0x0008 Looks like doesn't support RISCV_IOMMU_FCTL_BE? If so, need to implement it as read-only? along with other 2 bits. IIUC, diff --git a/hw/riscv

Re: [PATCH v2 4/6] tests/qtest/migration-test: Quieten ppc64 QEMU warnigns

2024-05-27 Thread Thomas Huth
I just noticed that there is a typo in the subject: s/warnigns/warnings/ On 28/05/2024 02.42, Nicholas Piggin wrote: Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- tests/qtest/migration-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest

Re: [PATCH v2 3/6] tests/qtest: Move common define from libqos-spapr.h to new ppc-util.h

2024-05-27 Thread Thomas Huth
On 28/05/2024 02.42, Nicholas Piggin wrote: The spapr QEMU machine defaults is useful outside libqos, so create a new header for ppc specific qtests and move it there. Signed-off-by: Nicholas Piggin --- tests/qtest/libqos/libqos-spapr.h | 7 --- tests/qtest/ppc-util.h| 19 ++

Re: [PATCH v4 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-27 Thread Cédric Le Goater
On 5/28/24 03:34, Jamin Lin wrote: Hi Cedric, On 5/27/24 10:02, Jamin Lin wrote: AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM Side Address High Part(0x7C)" register to support 64 bits dma dram address. Add helper routines functions to compute the dma dram address, new fe

Re: [PATCH v2 1/6] tests/qtest/migration: Run test_mode_reboot outside gitlab CI

2024-05-27 Thread Thomas Huth
On 28/05/2024 02.42, Nicholas Piggin wrote: As Fabiano points out, this test isn't flaky it just can't run under gitlab CI since runners have a very small shm size. Suggested-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- tests/qtest/migration-test.c | 18 +- 1 file ch

Re: [PATCH v4 05/16] aspeed/sdmc: Add AST2700 support

2024-05-27 Thread Cédric Le Goater
On 5/28/24 03:26, Jamin Lin wrote: Hi Philippe, Cedric On 27/5/24 13:18, Cédric Le Goater wrote: On 5/27/24 12:24, Philippe Mathieu-Daudé wrote: Hi Jamin, On 27/5/24 10:02, Jamin Lin wrote: The SDRAM memory controller(DRAMC) controls the access to external DDR4 and DDR5 SDRAM and power up t

Re: [RFC 0/6] scripts: Rewrite simpletrace printer in Rust

2024-05-27 Thread Zhao Liu
Hi Stefan, On Mon, May 27, 2024 at 03:59:44PM -0400, Stefan Hajnoczi wrote: > Date: Mon, 27 May 2024 15:59:44 -0400 > From: Stefan Hajnoczi > Subject: Re: [RFC 0/6] scripts: Rewrite simpletrace printer in Rust > > On Mon, May 27, 2024 at 04:14:15PM +0800, Zhao Liu wrote: > > Hi maintainers and l

Re: [RFC PATCH 02/10] ppc/pnv: Move timebase state into PnvCore

2024-05-27 Thread Harsh Prateek Bora
On 5/26/24 17:56, Nicholas Piggin wrote: The timebase state machine is per per-core state and can be driven by any thread in the core. It is currently implemented as a hack where the state is in a CPU structure and only thread 0's state is accessed by the chiptod, which limits programming the

[PATCH 1/2] ppc/pnv: Fix loss of LPC SERIRQ interrupts

2024-05-27 Thread Nicholas Piggin
From: Glenn Miles The LPC HC irq status register bits are set when an LPC IRQSER input is asserted. These irq status bits drive the PSI irq to the CPU interrupt controller. The LPC HC irq status bits are cleared by software writing to the register with 1's for the bits to clear. Existing registe

[PATCH 2/2] ppc/pnv: Implement POWER9 LPC PSI serirq outputs and auto-clear function

2024-05-27 Thread Nicholas Piggin
The POWER8 LPC ISA device irqs all get combined and reported to the line connected the PSI LPCHC irq. POWER9 changed this so only internal LPC host controller irqs use that line, and the device irqs get routed to 4 new lines connected to PSI SERIRQ0-3. POWER9 also introduced a new feature that aut

Re: [RFC PATCH 01/10] ppc/pnv: Add pointer from PnvCPUState to PnvCore

2024-05-27 Thread Harsh Prateek Bora
On 5/26/24 17:56, Nicholas Piggin wrote: This helps move core state from CPU to core structures. Signed-off-by: Nicholas Piggin --- include/hw/ppc/pnv_core.h | 1 + hw/ppc/pnv_core.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/hw/ppc/pnv_core.h b/include/hw/pp

[PATCH 0/2] ppc/pnv: LPC interrupt fixes

2024-05-27 Thread Nicholas Piggin
Here is v2 of the POWER9 PSI serirq patch with changes suggested by Cedric and some other things. But also in front of that we have a fix from Glenn for a lost interrupt problem. I rebased Glenn's patch and also changed some comments and changelog a bit so any bugs or silly comments are probably m

[PULL 2/2] hw/ufs: Add support MCQ of UFSHCI 4.0

2024-05-27 Thread Jeuk Kim
From: Minwoo Im This patch adds support for MCQ defined in UFSHCI 4.0. This patch utilized the legacy I/O codes as much as possible to support MCQ. MCQ operation & runtime register is placed at 0x1000 offset of UFSHCI register statically with no spare space among four registers (48B):

[PULL 1/2] hw/ufs: Update MCQ-related fields to block/ufs.h

2024-05-27 Thread Jeuk Kim
From: Minwoo Im This patch is a prep patch for the following MCQ support patch for hw/ufs. This patch updated minimal mandatory fields to support MCQ based on UFSHCI 4.0. Signed-off-by: Minwoo Im Reviewed-by: Jeuk Kim Message-Id: <20240528023106.856777-2-minwoo...@samsung.com> Signed-off-by:

[PULL 0/2] ufs queue

2024-05-27 Thread Jeuk Kim
From: Jeuk Kim The following changes since commit ad10b4badc1dd5b28305f9b9f1168cf0aa3ae946: Merge tag 'pull-error-2024-05-27' of https://repo.or.cz/qemu/armbru into staging (2024-05-27 06:40:42 -0700) are available in the Git repository at: https://gitlab.com/jeuk20.kim/qemu.git tags/pull

Re: [PATCH v3 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-27 Thread Aditya Gupta
On Mon, May 27, 2024 at 05:15:05PM GMT, Cédric Le Goater wrote: > On 5/27/24 09:10, Aditya Gupta wrote: > > Power11 core is same as Power10, use the existing functionalities to > > introduce a Power11 chip and machine, with Power10 chip as parent of > > Power11 chip, thus going through similar clas

Re: [RFC 0/6] scripts: Rewrite simpletrace printer in Rust

2024-05-27 Thread Zhao Liu
Hi Mads, On Mon, May 27, 2024 at 12:49:06PM +0200, Mads Ynddal wrote: > Date: Mon, 27 May 2024 12:49:06 +0200 > From: Mads Ynddal > Subject: Re: [RFC 0/6] scripts: Rewrite simpletrace printer in Rust > X-Mailer: Apple Mail (2.3774.600.62) > > Hi, > > Interesting work. I don't have any particula

[PATCH] targer/riscv: Implement Zabha extension

2024-05-27 Thread Alexandre Ghiti
From: Gianluca Guida Add Zabha implementation. Signed-off-by: Gianluca Guida Signed-off-by: Alexandre Ghiti --- target/riscv/cpu.c | 2 + target/riscv/cpu_cfg.h | 1 + target/riscv/insn32.decode | 22 +++ target/riscv/insn_tr

[PATCH] tests/qtest/migrate-test: Use regular file file for shared-memory tests

2024-05-27 Thread Nicholas Piggin
There is no need to use /dev/shm for file-backed memory devices, and it is too small to be usable in gitlab CI. Switch to using a regular file in /tmp/ which will usually have more space available. Signed-off-by: Nicholas Piggin --- Am I missing something? AFAIKS there is not even any point using

Re: [PATCH] x86: cpu: fixup number of addressable IDs for processor cores in the physical package

2024-05-27 Thread Chuang Xu
Hi Zhao, On 2024/5/28 上午10:31, Zhao Liu wrote: Hi Chuang, On Mon, May 27, 2024 at 11:13:33AM +0800, Chuang Xu wrote: Date: Mon, 27 May 2024 11:13:33 +0800 From: Chuang Xu Subject: [PATCH] x86: cpu: fixup number of addressable IDs for processor cores in the physical package According to the

Re: TCG change broke MorphOS boot on sam460ex

2024-05-27 Thread Nicholas Piggin
On Tue May 28, 2024 at 8:23 AM AEST, BALATON Zoltan wrote: > On Wed, 3 Apr 2024, Nicholas Piggin wrote: > > On Tue Apr 2, 2024 at 9:32 PM AEST, BALATON Zoltan wrote: > >> On Thu, 21 Mar 2024, BALATON Zoltan wrote: > >>> On 27/2/24 17:47, BALATON Zoltan wrote: > Hello, > > Commit 18a5

Re: [PATCH 1/1] vhost-vsock: add VIRTIO_F_RING_PACKED to feaure_bits

2024-05-27 Thread Jason Wang
On Mon, May 27, 2024 at 7:27 PM Halil Pasic wrote: > > On Thu, 16 May 2024 10:39:42 +0200 > Stefano Garzarella wrote: > > [..] > > >--- > > > > > >This is a minimal fix, that follows the current patterns in the > > >codebase, and not necessarily the best one. > > > > Yeah, I did something similar

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-27 Thread Jason Wang
On Mon, May 27, 2024 at 2:50 PM Michael S. Tsirkin wrote: > > On Mon, May 27, 2024 at 06:44:58AM +, Duan, Zhenzhong wrote: > > Hi Jason, > > > > >-Original Message- > > >From: Duan, Zhenzhong > > >Subject: RE: [PATCH] intel_iommu: Use the latest fault reasons defined by > > >spec > > >

Re: [PATCH v2 0/2] hw/ufs: Add support MCQ

2024-05-27 Thread Jeuk Kim
On 5/28/2024 11:31 AM, Minwoo Im wrote: UFSHCI 4.0 spec introduced MCQ(Multi-Circular Queue) to support multiple command queues for UFS controller. To test ufs-mcq path of kernel, MCQ emulated device would be a good choice to go with. The first patch added newly introduced fields in UFSHCI 4.

RE: [PATCH v5 19/19] intel_iommu: Check compatibility with host IOMMU capabilities

2024-05-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v5 19/19] intel_iommu: Check compatibility with host >IOMMU capabilities > >On 5/8/24 11:03, Zhenzhong Duan wrote: >> If check fails, host device (either VFIO or VDPA device) is not >> compatible with current vIOMMU config

[PULL 26/28] riscv, gdbstub.c: fix reg_width in ricsv_gen_dynamic_vector_feature()

2024-05-27 Thread Alistair Francis
From: Daniel Henrique Barboza Commit 33a24910ae changed 'reg_width' to use 'vlenb', i.e. vector length in bytes, when in this context we want 'reg_width' as the length in bits. Fix 'reg_width' back to the value in bits like 7cb59921c05a ("target/riscv/gdbstub.c: use 'vlenb' instead of shifting '

[PULL 22/28] target/riscv: do not set mtval2 for non guest-page faults

2024-05-27 Thread Alistair Francis
From: Alexei Filippov Previous patch fixed the PMP priority in raise_mmu_exception() but we're still setting mtval2 incorrectly. In riscv_cpu_tlb_fill(), after pmp check in 2 stage translation part, mtval2 will be set in case of successes 2 stage translation but failed pmp check. In this case w

[PULL 12/28] target/riscv: Relax vector register check in RISCV gdbstub

2024-05-27 Thread Alistair Francis
From: Jason Chien In current implementation, the gdbstub allows reading vector registers only if V extension is supported. However, all vector extensions and vector crypto extensions have the vector registers and they all depend on Zve32x. The gdbstub should check for Zve32x instead. Signed-off-

[PULL 10/28] target/riscv: Add support for Zve32x extension

2024-05-27 Thread Alistair Francis
From: Jason Chien Add support for Zve32x extension and replace some checks for Zve32f with Zve32x, since Zve32f depends on Zve32x. Signed-off-by: Jason Chien Reviewed-by: Frank Chang Reviewed-by: Max Chou Reviewed-by: Daniel Henrique Barboza Message-ID: <20240328022343.6871-2-jason.ch...@sif

Re: [PATCH v1 1/4] target/riscv/kvm: add software breakpoints support

2024-05-27 Thread Chao Du
On 2024-05-27 23:41, Andrew Jones wrote: > On Mon, May 27, 2024 at 02:19:13AM GMT, Chao Du wrote: > > This patch implements insert/remove software breakpoint process: > > > > Add an input parameter for kvm_arch_insert_sw_breakpoint() and > > kvm_arch_remove_sw_breakpoint() to pass the length info

[PULL 14/28] target/riscv/cpu.c: fix Zvkb extension config

2024-05-27 Thread Alistair Francis
From: Yangyu Chen This code has a typo that writes zvkb to zvkg, causing users can't enable zvkb through the config. This patch gets this fixed. Signed-off-by: Yangyu Chen Fixes: ea61ef7097d0 ("target/riscv: Move vector crypto extensions to riscv_cpu_extensions") Reviewed-by: LIU Zhiwei Revie

[PULL 06/28] target/riscv: change RISCV_EXCP_SEMIHOST exception number to 63

2024-05-27 Thread Alistair Francis
From: Clément Léger The current semihost exception number (16) is a reserved number (range [16-17]). The upcoming double trap specification uses that number for the double trap exception. Since the privileged spec (Table 22) defines ranges for custom uses change the semihosting exception number t

[PULL 04/28] target/riscv/kvm: implement SBI debug console (DBCN) calls

2024-05-27 Thread Alistair Francis
From: Daniel Henrique Barboza SBI defines a Debug Console extension "DBCN" that will, in time, replace the legacy console putchar and getchar SBI extensions. The appeal of the DBCN extension is that it allows multiple bytes to be read/written in the SBI console in a single SBI call. As far as K

[PULL 23/28] target/riscv: Remove experimental prefix from "B" extension

2024-05-27 Thread Alistair Francis
From: Rob Bradford This extension has now been ratified: https://jira.riscv.org/browse/RVS-2006 so the "x-" prefix can be removed. Since this is now a ratified extension add it to the list of extensions included in the "max" CPU variant. Signed-off-by: Rob Bradford Reviewed-by: Andrew Jones R

[PULL 25/28] target/riscv/kvm.c: Fix the hart bit setting of AIA

2024-05-27 Thread Alistair Francis
From: Yong-Xuan Wang In AIA spec, each hart (or each hart within a group) has a unique hart number to locate the memory pages of interrupt files in the address space. The number of bits required to represent any hart number is equal to ceil(log2(hmax + 1)), where hmax is the largest hart number a

[PULL 27/28] disas/riscv: Decode all of the pmpcfg and pmpaddr CSRs

2024-05-27 Thread Alistair Francis
From: Alistair Francis Previously we only listed a single pmpcfg CSR and the first 16 pmpaddr CSRs. This patch fixes this to list all 16 pmpcfg and all 64 pmpaddr CSRs are part of the disassembly. Reported-by: Eric DeVolder Signed-off-by: Alistair Francis Fixes: ea10325917 ("RISC-V Disassemble

[PULL 17/28] target/riscv: rvv: Fix Zvfhmin checking for vfwcvt.f.f.v and vfncvt.f.f.w instructions

2024-05-27 Thread Alistair Francis
From: Max Chou According v spec 18.4, only the vfwcvt.f.f.v and vfncvt.f.f.w instructions will be affected by Zvfhmin extension. And the vfwcvt.f.f.v and vfncvt.f.f.w instructions only support the conversions of * From 1*SEW(16/32) to 2*SEW(32/64) * From 2*SEW(32/64) to 1*SEW(16/32) Signed-off-

[PULL 15/28] target/riscv: Implement dynamic establishment of custom decoder

2024-05-27 Thread Alistair Francis
From: Huang Tao In this patch, we modify the decoder to be a freely composable data structure instead of a hardcoded one. It can be dynamically builded up according to the extensions. This approach has several benefits: 1. Provides support for heterogeneous cpu architectures. As we add decoder in

[PULL 24/28] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-05-27 Thread Alistair Francis
From: Alistair Francis When running the instruction ``` cbo.flush 0(x0) ``` QEMU would segfault. The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gpr[0] allocated. In order to fix this let's use the existing get_address() helper. This also has the benefit of performing pointer m

[PULL 21/28] target/riscv: prioritize pmp errors in raise_mmu_exception()

2024-05-27 Thread Alistair Francis
From: Daniel Henrique Barboza raise_mmu_exception(), as is today, is prioritizing guest page faults by checking first if virt_enabled && !first_stage, and then considering the regular inst/load/store faults. There's no mention in the spec about guest page fault being a higher priority that PMP f

[PULL 28/28] target/riscv: raise an exception when CSRRS/CSRRC writes a read-only CSR

2024-05-27 Thread Alistair Francis
From: Yu-Ming Chang Both CSRRS and CSRRC always read the addressed CSR and cause any read side effects regardless of rs1 and rd fields. Note that if rs1 specifies a register holding a zero value other than x0, the instruction will still attempt to write the unmodified value back to the CSR and wi

[PULL 20/28] target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions

2024-05-27 Thread Alistair Francis
From: Max Chou If the checking functions check both the single and double width operators at the same time, then the single width operator checking functions (require_rvf[min]) will check whether the SEW is 8. Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza Cc: qemu-stable Messag

[PULL 13/28] target/riscv: Fix the element agnostic function problem

2024-05-27 Thread Alistair Francis
From: Huang Tao In RVV and vcrypto instructions, the masked and tail elements are set to 1s using vext_set_elems_1s function if the vma/vta bit is set. It is the element agnostic policy. However, this function can't deal the big endian situation. This patch fixes the problem by adding handling o

[PULL 19/28] target/riscv: rvv: Check single width operator for vfncvt.rod.f.f.w

2024-05-27 Thread Alistair Francis
From: Max Chou The opfv_narrow_check needs to check the single width float operator by require_rvf. Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza Cc: qemu-stable Message-ID: <20240322092600.1198921-4-max.c...@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/insn_t

[PULL 05/28] hw/riscv/boot.c: Support 64-bit address for initrd

2024-05-27 Thread Alistair Francis
From: Cheng Yang Use qemu_fdt_setprop_u64() instead of qemu_fdt_setprop_cell() to set the address of initrd in FDT to support 64-bit address. Signed-off-by: Cheng Yang Reviewed-by: Alistair Francis Message-ID: Signed-off-by: Alistair Francis --- hw/riscv/boot.c | 4 ++-- 1 file changed, 2 i

[PULL 11/28] target/riscv: Add support for Zve64x extension

2024-05-27 Thread Alistair Francis
From: Jason Chien Add support for Zve64x extension. Enabling Zve64f enables Zve64x and enabling Zve64x enables Zve32x according to their dependency. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2107 Signed-off-by: Jason Chien Reviewed-by: Frank Chang Reviewed-by: Max Chou Reviewed-

[PULL 07/28] target/riscv/kvm: tolerate KVM disable ext errors

2024-05-27 Thread Alistair Francis
From: Daniel Henrique Barboza Running a KVM guest using a 6.9-rc3 kernel, in a 6.8 host that has zkr enabled, will fail with a kernel oops SIGILL right at the start. The reason is that we can't expose zkr without implementing the SEED CSR. Disabling zkr in the guest would be a workaround, but if

[PULL 16/28] riscv: thead: Add th.sxstatus CSR emulation

2024-05-27 Thread Alistair Francis
From: Christoph Müllner The th.sxstatus CSR can be used to identify available custom extension on T-Head CPUs. The CSR is documented here: https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadsxstatus.adoc An important property of this patch is, that the th.sxstatus MAEE fiel

[PULL 18/28] target/riscv: rvv: Check single width operator for vector fp widen instructions

2024-05-27 Thread Alistair Francis
From: Max Chou The require_scale_rvf function only checks the double width operator for the vector floating point widen instructions, so most of the widen checking functions need to add require_rvf for single width operator. The vfwcvt.f.x.v and vfwcvt.f.xu.v instructions convert single width in

[PULL 08/28] target/riscv/debug: set tval=pc in breakpoint exceptions

2024-05-27 Thread Alistair Francis
From: Daniel Henrique Barboza We're not setting (s/m)tval when triggering breakpoints of type 2 (mcontrol) and 6 (mcontrol6). According to the debug spec section 5.7.12, "Match Control Type 6": "The Privileged Spec says that breakpoint exceptions that occur on instruction fetches, loads, or stor

[PULL 09/28] trans_privileged.c.inc: set (m|s)tval on ebreak breakpoint

2024-05-27 Thread Alistair Francis
From: Daniel Henrique Barboza Privileged spec section 4.1.9 mentions: "When a trap is taken into S-mode, stval is written with exception-specific information to assist software in handling the trap. (...) If stval is written with a nonzero value when a breakpoint, address-misaligned, access-fau

[PULL 02/28] target/riscv/kvm: Fix exposure of Zkr

2024-05-27 Thread Alistair Francis
From: Andrew Jones The Zkr extension may only be exposed to KVM guests if the VMM implements the SEED CSR. Use the same implementation as TCG. Without this patch, running with a KVM which does not forward the SEED CSR access to QEMU will result in an ILL exception being injected into the guest (

[PULL 03/28] target/riscv: Raise exceptions on wrs.nto

2024-05-27 Thread Alistair Francis
From: Andrew Jones Implementing wrs.nto to always just return is consistent with the specification, as the instruction is permitted to terminate the stall for any reason, but it's not useful for virtualization, where we'd like the guest to trap to the hypervisor in order to allow scheduling of th

[PULL 01/28] hw/intc/riscv_aplic: APLICs should add child earlier than realize

2024-05-27 Thread Alistair Francis
From: "yang.zhang" Since only root APLICs can have hw IRQ lines, aplic->parent should be initialized first. Fixes: e8f79343cf ("hw/intc: Add RISC-V AIA APLIC device emulation") Reviewed-by: Daniel Henrique Barboza Signed-off-by: yang.zhang Cc: qemu-stable Message-ID: <20240409014445.278-1-gao

[PULL 00/28] riscv-to-apply queue

2024-05-27 Thread Alistair Francis
The following changes since commit ad10b4badc1dd5b28305f9b9f1168cf0aa3ae946: Merge tag 'pull-error-2024-05-27' of https://repo.or.cz/qemu/armbru into staging (2024-05-27 06:40:42 -0700) are available in the Git repository at: https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-2

[PATCH v2 2/2] hw/ufs: Add support MCQ of UFSHCI 4.0

2024-05-27 Thread Minwoo Im
This patch adds support for MCQ defined in UFSHCI 4.0. This patch utilized the legacy I/O codes as much as possible to support MCQ. MCQ operation & runtime register is placed at 0x1000 offset of UFSHCI register statically with no spare space among four registers (48B): UfsMcqSqReg, UfsMc

[PATCH v2 1/2] hw/ufs: Update MCQ-related fields to block/ufs.h

2024-05-27 Thread Minwoo Im
This patch is a prep patch for the following MCQ support patch for hw/ufs. This patch updated minimal mandatory fields to support MCQ based on UFSHCI 4.0. Signed-off-by: Minwoo Im --- include/block/ufs.h | 108 +++- 1 file changed, 106 insertions(+), 2 de

[PATCH v2 0/2] hw/ufs: Add support MCQ

2024-05-27 Thread Minwoo Im
UFSHCI 4.0 spec introduced MCQ(Multi-Circular Queue) to support multiple command queues for UFS controller. To test ufs-mcq path of kernel, MCQ emulated device would be a good choice to go with. The first patch added newly introduced fields in UFSHCI 4.0 to support MCQ. The other one made the ac

Re: [PATCH] x86: cpu: fixup number of addressable IDs for processor cores in the physical package

2024-05-27 Thread Zhao Liu
Hi Chuang, On Mon, May 27, 2024 at 11:13:33AM +0800, Chuang Xu wrote: > Date: Mon, 27 May 2024 11:13:33 +0800 > From: Chuang Xu > Subject: [PATCH] x86: cpu: fixup number of addressable IDs for processor > cores in the physical package According to the usual practice of QEMU commits, people tend

Re: [PATCH 2/2] hw/ufs: Add support MCQ of UFSHCI 4.0

2024-05-27 Thread Minwoo Im
On 24-05-28 10:00:35, Jeuk Kim wrote: > Thanks for your contribution! > > There are only two minor comments. Thanks for your review. > > Please check it and send patch v2. > > > Thank you! > > On 5/21/2024 8:05 PM, Minwoo Im wrote: > > @@ -1288,12 +1717,21 @@ static void ufs_exit(PCIDevice *

RE: [PATCH v4 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-27 Thread Jamin Lin
Hi Philippe, > Hi Jamin, > > On 27/5/24 10:02, Jamin Lin wrote: > > AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM > Side > > Address High Part(0x7C)" > > register to support 64 bits dma dram address. > > Add helper routines functions to compute the dma dram address, new > > fe

RE: [PATCH v4 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-27 Thread Jamin Lin
Hi Cedric, > On 5/27/24 10:02, Jamin Lin wrote: > > AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM > Side > > Address High Part(0x7C)" > > register to support 64 bits dma dram address. > > Add helper routines functions to compute the dma dram address, new > > features and update

RE: [PATCH] aspeed/smc: Reintroduce "dram-base" property for AST2700

2024-05-27 Thread Jamin Lin
> > The Aspeed SMC device model use to have a 'sdram_base' property. It was > removed by commit d177892d4a48 ("aspeed/smc: Remove unused > "sdram-base" property") because previous changes simplified the DMA > transaction model to use an offset in RAM and not the physical address. > > The AST2700

RE: [PATCH v4 05/16] aspeed/sdmc: Add AST2700 support

2024-05-27 Thread Jamin Lin
Hi Philippe, Cedric > On 27/5/24 13:18, Cédric Le Goater wrote: > > On 5/27/24 12:24, Philippe Mathieu-Daudé wrote: > >> Hi Jamin, > >> > >> On 27/5/24 10:02, Jamin Lin wrote: > >>> The SDRAM memory controller(DRAMC) controls the access to external > >>> DDR4 and DDR5 SDRAM and power up to DDR4 an

Re: [RFC v2 0/2] target/loongarch: Add loongson binary translation feature

2024-05-27 Thread maobibo
On 2024/5/27 下午6:39, Philippe Mathieu-Daudé wrote: Hi Bibo, On 27/5/24 10:34, Bibo Mao wrote: Loongson Binary Translation (LBT) is used to accelerate binary translation. LBT feature is added in kvm mode, not supported in TCG mode since it is not emulated. And only LBT feature is added here,

Re: [RFC v2 1/2] target/loongarch: Add loongson binary translation feature

2024-05-27 Thread maobibo
Hi Philippe, Thanks for reviewing my patch. I reply inline. On 2024/5/27 下午6:37, Philippe Mathieu-Daudé wrote: Hi Bibo, On 27/5/24 10:35, Bibo Mao wrote: Loongson Binary Translation (LBT) is used to accelerate binary translation, which contains 4 scratch registers (scr0 to scr3), x86/ARM efla

Re: [PATCH 2/2] hw/ufs: Add support MCQ of UFSHCI 4.0

2024-05-27 Thread Jeuk Kim
Thanks for your contribution! There are only two minor comments. Please check it and send patch v2. Thank you! On 5/21/2024 8:05 PM, Minwoo Im wrote: @@ -1288,12 +1717,21 @@ static void ufs_exit(PCIDevice *pci_dev) ufs_clear_req(&u->req_list[i]); } g_free(u->req_list);

[PATCH v2 6/6] tests/qtest/migration-test: Use custom asm bios for ppc64

2024-05-27 Thread Nicholas Piggin
Similar to other archs, build a custom bios memory updater. Running the test with OF code is a cool trick, but SLOF takes a long time to boot. This reduces test time by around 3x (150s to 50s). Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- tests/migration/migration-test.h | 1

[PATCH v2 5/6] tests/qtest/migration-test: Enable on ppc64 TCG

2024-05-27 Thread Nicholas Piggin
ppc64 with TCG seems to no longer be failing this test, perhaps since commit 03bfc2188f061 ("physmem: Fix migration dirty bitmap coherency with TCG memory access") which is not ppc specific but was seen to hit ppc64 quite easily. Let's enable it again. The s390x problem has been identified so men

[PATCH v2 4/6] tests/qtest/migration-test: Quieten ppc64 QEMU warnigns

2024-05-27 Thread Nicholas Piggin
Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- tests/qtest/migration-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 8247ed98f2..7d64696f7a 100644 --- a/tests/qtest/migration-test.c +++ b

[PATCH v2 3/6] tests/qtest: Move common define from libqos-spapr.h to new ppc-util.h

2024-05-27 Thread Nicholas Piggin
The spapr QEMU machine defaults is useful outside libqos, so create a new header for ppc specific qtests and move it there. Signed-off-by: Nicholas Piggin --- tests/qtest/libqos/libqos-spapr.h | 7 --- tests/qtest/ppc-util.h| 19 +++ tests/qtest/boot-serial-test.

[PATCH v2 1/6] tests/qtest/migration: Run test_mode_reboot outside gitlab CI

2024-05-27 Thread Nicholas Piggin
As Fabiano points out, this test isn't flaky it just can't run under gitlab CI since runners have a very small shm size. Suggested-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- tests/qtest/migration-test.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --g

[PATCH v2 2/6] tests/qtest/migration-test: Fix and enable test_ignore_shared

2024-05-27 Thread Nicholas Piggin
This test is already starting to bitrot, so first remove it from ifdef and fix compile issues. ppc64 transfers about 2MB, so bump the size threshold too. It was said to be broken on aarch64 but it may have been the limited shm size under gitlab CI. The test is now excluded from running on CI so it

[PATCH v2 0/6] tests/qtest/migration-test: Improve and enable on ppc64

2024-05-27 Thread Nicholas Piggin
Since v1: - Added "TCG" in subject since it is enabling for TCG - Enable test_mode_reboot with checking GITLAB_CI env that Fabiano suggested. - Move test_ignore_shared patch out of the s390 fix series to here and use GITLAB_CI for it too. - Move ppc64 pseries machine options out of libqos-spapr

Re: [RFC PATCH 4/4] ci: Add the new migration device tests

2024-05-27 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 05:19:22PM -0300, Fabiano Rosas wrote: >> We have two new migration tests that check cross version >> compatibility. One uses the vmstate-static-checker.py script to >> compare the vmstate structures from two different QEMU versions. The >> other runs a

Re: [PATCH] target/riscv: fix instructions count handling in icount mode

2024-05-27 Thread Alistair Francis
On Thu, Apr 11, 2024 at 9:34 PM Clément Léger wrote: > > When icount is enabled, rather than returning the virtual CPU time, we > should return the instruction count itself. Add an instructions bool > parameter to get_ticks() to correctly return icount_get_raw() when > icount_enabled() == 1 and in

Re: [RFC PATCH 3/4] tests/qtest/migration: Add support for simple device tests

2024-05-27 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 05:19:21PM -0300, Fabiano Rosas wrote: >> The current migration-tests are almost entirely focused on catching >> bugs on the migration code itself, not on the device migration >> infrastructure (vmstate). That means we miss catching some low hanging >> f

Re: TCG change broke MorphOS boot on sam460ex

2024-05-27 Thread BALATON Zoltan
On Tue, 28 May 2024, BALATON Zoltan wrote: On Wed, 3 Apr 2024, Nicholas Piggin wrote: On Tue Apr 2, 2024 at 9:32 PM AEST, BALATON Zoltan wrote: On Thu, 21 Mar 2024, BALATON Zoltan wrote: On 27/2/24 17:47, BALATON Zoltan wrote: Hello, Commit 18a536f1f8 (accel/tcg: Always require can_do_io) br

Re: [RFC PATCH 2/4] tests/qtest/migration: Add a test that runs vmstate-static-checker

2024-05-27 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 05:19:20PM -0300, Fabiano Rosas wrote: >> We have the vmstate-static-checker script that takes the output of: >> '$QEMU -M $machine -dump-vmstate' for two different QEMU versions and >> compares them to check for compatibility breakages. This is just too

Re: TCG change broke MorphOS boot on sam460ex

2024-05-27 Thread BALATON Zoltan
On Wed, 3 Apr 2024, Nicholas Piggin wrote: On Tue Apr 2, 2024 at 9:32 PM AEST, BALATON Zoltan wrote: On Thu, 21 Mar 2024, BALATON Zoltan wrote: On 27/2/24 17:47, BALATON Zoltan wrote: Hello, Commit 18a536f1f8 (accel/tcg: Always require can_do_io) broke booting MorphOS on sam460ex (this was be

[PATCH 16/18] tcg/loongarch64: Split out vdvjukN in tcg_out_vec_op

2024-05-27 Thread Richard Henderson
Fixes a bug in the immediate shifts, because the exact encoding depends on the element size. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 58 ++-- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.i

[PATCH 07/18] tcg/loongarch64: Support LASX in tcg_out_dup_vec

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index b1d652355d..cc54bc4a53 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b

[PATCH 05/18] util/loongarch64: Detect LASX vector support

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- host/include/loongarch64/host/cpuinfo.h | 1 + util/cpuinfo-loongarch.c| 1 + 2 files changed, 2 insertions(+) diff --git a/host/include/loongarch64/host/cpuinfo.h b/host/include/loongarch64/host/cpuinfo.h index fab664a10b..d7bf27501d 100644

[PATCH 14/18] tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st}

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 5f4915c6ac..e633d268d0 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/l

[PATCH 10/18] tcg/loongarch64: Support LASX in tcg_out_dupi_vec

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 9a8f67cf3e..c7d0c7839b 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/

[PATCH 13/18] tcg/loongarch64: Split out vdvjvk in tcg_out_vec_op

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 119 --- 1 file changed, 63 insertions(+), 56 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 652aa261a3..5f4915c6ac 100644 --- a/tcg/loongarch6

[PATCH 04/18] tcg/loongarch64: Support TCG_TYPE_V64

2024-05-27 Thread Richard Henderson
We can implement this with fld_d, fst_d for load and store, and then use the normal v128 operations in registers. This will improve support for guests which use v64. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 8 ++-- 2 fil

[PATCH 12/18] tcg/loongarch64: Support LASX in tcg_out_addsub_vec

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 36 ++-- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 47011488dd..652aa261a3 100644 --- a/tcg/loongarch6

[PATCH 18/18] tcg/loongarch64: Enable v256 with LASX

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 11 --- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tcg/loongarch64/tcg-target.h b/tcg/loongarch64/tcg-target.h index 990bad1d51..58bd7d258e 100644 --- a/tc

[PATCH 11/18] tcg/loongarch64: Simplify tcg_out_addsub_vec

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index c7d0c7839b..47011488dd 100644 --- a/tcg/loongarch64/t

[PATCH 00/18] tcg/loongarch64: Support v64 and v256

2024-05-27 Thread Richard Henderson
Some guests only have, or additionally have, 64-bit vectors. For example arm, mips, sparc. So it's best to enable this whenever we can. As with tcg/i386, use 64-bit loads and stores but 128-bit vector registers. If LASX is available (all current loongarch64 cpus?), we have 256-bit vectors as wel

[PATCH 15/18] tcg/loongarch64: Remove temp_vec from tcg_out_vec_op

2024-05-27 Thread Richard Henderson
Use TCG_VEC_TMP0 directly. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index e633d268d0..54f7bc9d14 100644 --- a/tcg/loongarc

[PATCH 06/18] tcg/loongarch64: Simplify tcg_out_dup_vec

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 980ea10211..b1d652355d 100644 --- a/tcg/loongarch64/tcg-targe

[PATCH 08/18] tcg/loongarch64: Support LASX in tcg_out_dupm_vec

2024-05-27 Thread Richard Henderson
Each element size has a different encoding, so code cannot be shared in the same way as with tcg_out_dup_vec. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/tcg/loongarch64/

[PATCH 09/18] tcg/loongarch64: Use tcg_out_dup_vec in tcg_out_dupi_vec

2024-05-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 1e721b8b20..9a8f67cf3e 100644 --- a/tcg/loongarch64/tcg-target.c.i

  1   2   3   4   >