Re: [PATCH v3 14/26] memory: Add Error** argument to .log_global*() handlers

2024-03-04 Thread Peter Xu
On Mon, Mar 04, 2024 at 01:28:32PM +0100, Cédric Le Goater wrote: > @@ -2936,15 +2975,22 @@ void memory_global_dirty_log_start(unsigned int flags) > trace_global_dirty_changed(global_dirty_tracking); > > if (!old_flags) { > -MEMORY_LISTENER_CALL_GLOBAL(log_global_start,

Re: [PATCH v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup()

2024-03-04 Thread Cédric Le Goater
On 3/5/24 04:32, Peter Xu wrote: On Mon, Mar 04, 2024 at 01:28:28PM +0100, Cédric Le Goater wrote: This will help preserving the error set by .save_setup() handlers. Signed-off-by: Cédric Le Goater IIUC this is about the next patch. I got fully confused before reading into the next one.

Re: [PATCH v4 1/3] qga/commands-win32: Declare const qualifier before type

2024-03-04 Thread Yan Vugenfirer
On Mon, Mar 4, 2024 at 3:45 PM Konstantin Kostiuk wrote: > > From: Philippe Mathieu-Daudé > > Most of the code base use the 'const' qualifier *before* > the type being qualified. Use the same style to unify. > > Signed-off-by: Philippe Mathieu-Daudé > Message-ID:

Re: [PATCH v4 3/3] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-03-04 Thread Yan Vugenfirer
On Mon, Mar 4, 2024 at 3:45 PM Konstantin Kostiuk wrote: > > From: Dehan Meng > > Add support of Windows Server 2025 in get-osinfo command > > Signed-off-by: Dehan Meng > Message-ID: <20240222152835.72095-4-phi...@linaro.org> > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Konstantin

Re: [PATCH v4 2/3] qga/commands-win32: Do not set matrix_lookup_t/win_10_0_t arrays size

2024-03-04 Thread Yan Vugenfirer
On Mon, Mar 4, 2024 at 3:45 PM Konstantin Kostiuk wrote: > > From: Philippe Mathieu-Daudé > > ga_get_win_name() iterates over all elements in the arrays by > checking the 'version' field is non-NULL. Since the arrays are > guarded by a NULL terminating element, we don't need to specify > their

Re: [PATCH v3 05/26] migration: Add Error** argument to vmstate_save()

2024-03-04 Thread Prasad Pandit
On Mon, 4 Mar 2024 at 19:38, Cédric Le Goater wrote: > This will prepare ground for futur changes adding an Error** argument * futur -> furure > > -static int vmstate_save(QEMUFile *f, SaveStateEntry *se, JSONWriter *vmdesc) > +static int vmstate_save(QEMUFile *f, SaveStateEntry *se, JSONWriter

Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-04 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > On Mon, Mar 4, 2024 at 10:36 PM Huang, Ying wrote: >> >> "Ho-Ren (Jack) Chuang" writes: >> >> > On Sun, Mar 3, 2024 at 6:47 PM Huang, Ying wrote: >> >> >> >> "Ho-Ren (Jack) Chuang" writes: >> >> >> >> > The memory tiering component in the kernel is

[PATCH v2 03/13] contrib/elf2dmp: Continue even contexts are lacking

2024-03-04 Thread Akihiko Odaki
Let fill_context() continue even if it fails to fill contexts of some CPUs. A dump may still contain valuable information even if it lacks contexts of some CPUs due to dump corruption or a failure before starting CPUs. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell ---

[PATCH v2 07/13] contrib/elf2dmp: Ensure segment fits in file

2024-03-04 Thread Akihiko Odaki
This makes elf2dmp more robust against corrupted inputs. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/addrspace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c index e01860d15b07..81295a11534a 100644 ---

[PATCH v2 05/13] contrib/elf2dmp: Always check for PA resolution failure

2024-03-04 Thread Akihiko Odaki
Not checking PA resolution failure can result in NULL deference. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/addrspace.c | 46 - 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/contrib/elf2dmp/addrspace.c

[PATCH v2 08/13] contrib/elf2dmp: Use lduw_le_p() to read PDB

2024-03-04 Thread Akihiko Odaki
This resolved UBSan warnings. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/pdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c index 1c5051425185..492aca4434c8 100644 --- a/contrib/elf2dmp/pdb.c +++

[PATCH v2 06/13] contrib/elf2dmp: Always destroy PA space

2024-03-04 Thread Akihiko Odaki
Destroy PA space even if paging base couldn't be found, fixing memory leak. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- contrib/elf2dmp/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index

[PATCH v2 12/13] contrib/elf2dmp: Use GPtrArray

2024-03-04 Thread Akihiko Odaki
This removes the need to enumarate QEMUCPUState twice and saves code. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/qemu_elf.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/contrib/elf2dmp/qemu_elf.c b/contrib/elf2dmp/qemu_elf.c index

[PATCH v2 13/13] contrib/elf2dmp: Clamp QEMU note to file size

2024-03-04 Thread Akihiko Odaki
This fixes crashes with truncated dumps. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2202 Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/qemu_elf.c | 87 +- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git

[PATCH v2 11/13] contrib/elf2dmp: Build only for little endian host

2024-03-04 Thread Akihiko Odaki
elf2dmp assumes little endian host in many places. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elf2dmp/meson.build b/contrib/elf2dmp/meson.build index 6707d43c4fa5..046569861f7a 100644 ---

[PATCH v2 10/13] MAINTAINERS: Add Akihiko Odaki as a elf2dmp reviewer

2024-03-04 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 65dfdc9677e4..d25403f3709b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3583,6 +3583,7 @@ F: util/iova-tree.c elf2dmp M: Viktor

[PATCH v2 09/13] contrib/elf2dmp: Use rol64() to decode

2024-03-04 Thread Akihiko Odaki
rol64() is roubust against too large shift values and fixes UBSan warnings. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- contrib/elf2dmp/main.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index

[PATCH v2 01/13] contrib/elf2dmp: Remove unnecessary err flags

2024-03-04 Thread Akihiko Odaki
They are always evaluated to 1. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/pdb.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c index 40991f5f4c34..abf17c2e7c12 100644 --- a/contrib/elf2dmp/pdb.c +++

[PATCH v2 02/13] contrib/elf2dmp: Assume error by default

2024-03-04 Thread Akihiko Odaki
A common construct in contrib/elf2dmp is to set "err" flag and goto in error paths. In such a construct, there is only one successful path while there are several error paths, so it will be more simpler to initialize "err" flag set, and clear it in the successful path. Signed-off-by: Akihiko

[PATCH v2 04/13] contrib/elf2dmp: Conform to the error reporting pattern

2024-03-04 Thread Akihiko Odaki
include/qapi/error.h says: > We recommend > * bool-valued functions return true on success / false on failure, > ... Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/addrspace.h | 6 +-- contrib/elf2dmp/download.h | 2 +- contrib/elf2dmp/pdb.h | 2 +- contrib/elf2dmp/qemu_elf.h |

[PATCH v2 00/13] contrib/elf2dmp: Improve robustness

2024-03-04 Thread Akihiko Odaki
elf2dmp sometimes fails to work with partially corrupted dumps, and also emits warnings when sanitizers are in use. This series are collections of changes to improve the situation. Signed-off-by: Akihiko Odaki --- Changes in v2: - Added patch "contrib/elf2dmp: Remove unnecessary err flags". -

Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-04 Thread Zhao Liu
Hi Prasad, > On Mon, 4 Mar 2024 at 12:19, Zhao Liu wrote: > > > unsigned maxcpus = config->has_maxcpus ? config->maxcpus : 0; > > > > This indicates the default maxcpus is initialized as 0 if user doesn't > > specifies it. > > * 'has_maxcpus' should be set only if maxcpus > 0. If maxcpus == 0,

Re: [PATCH 3/3] hw/mem/cxl_type3: Fix problem with g_steal_pointer()

2024-03-04 Thread Thomas Huth
On 04/03/2024 16.10, Jonathan Cameron wrote: On Mon, 4 Mar 2024 11:44:06 +0100 Thomas Huth wrote: When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher, glib adds type safety checks to the g_steal_pointer() macro. This triggers errors in the ct3_build_cdat_entries_for_mr()

[RFC PATCH v6 10/23] hw/arm/virt: Wire NMI and VNMI irq lines from GIC to CPU

2024-03-04 Thread Jinjie Ruan via
Wire the new NMI and VNMI interrupt line from the GIC to each CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. v3: - Also add VNMI wire. --- hw/arm/virt.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c

[RFC PATCH v6 22/23] target/arm: Add FEAT_NMI to max

2024-03-04 Thread Jinjie Ruan via
Enable FEAT_NMI on the 'max' CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v3: - Add Reviewed-by. - Sorted to last. --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 1 + 2 files changed, 2 insertions(+) diff --git a/docs/system/arm/emulation.rst

[RFC PATCH v6 21/23] hw/intc/arm_gicv3: Report the VNMI interrupt

2024-03-04 Thread Jinjie Ruan via
In vCPU Interface, if the vIRQ has the superpriority property, report vNMI to the corresponding vPE. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v6: - Add Reviewed-by. --- hw/intc/arm_gicv3_cpuif.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

Re: [PATCH v3 01/26] s390/stattrib: Add Error** argument to set_migrationmode() handler

2024-03-04 Thread Cédric Le Goater
On 3/4/24 21:49, Fabiano Rosas wrote: Cédric Le Goater writes: This will prepare ground for futur changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, set_migrationmode() always sets a new error. See the Rules section in qapi/error.h. Cc:

[RFC PATCH v6 17/23] hw/intc/arm_gicv3: Add NMI handling CPU interface registers

2024-03-04 Thread Jinjie Ruan via
Add the NMIAR CPU interface registers which deal with acknowledging NMI. When introduce NMI interrupt, there are some updates to the semantics for the register ICC_IAR1_EL1 and ICC_HPPIR1_EL1. For ICC_IAR1_EL1 register, it should return 1022 if the intid has super priority. And for ICC_NMIAR1_EL1

Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-04 Thread Ho-Ren (Jack) Chuang
On Mon, Mar 4, 2024 at 10:36 PM Huang, Ying wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > On Sun, Mar 3, 2024 at 6:47 PM Huang, Ying wrote: > >> > >> "Ho-Ren (Jack) Chuang" writes: > >> > >> > The memory tiering component in the kernel is functionally useless for > >> > CPUless

[RFC PATCH v6 11/23] hw/intc/arm_gicv3: Add external IRQ lines for NMI

2024-03-04 Thread Jinjie Ruan via
Augment the GICv3's QOM device interface by adding one new set of sysbus IRQ line, to signal NMI to each CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. v3: - Add support for VNMI. --- hw/intc/arm_gicv3_common.c | 6 ++

[RFC PATCH v6 07/23] target/arm: Add support for NMI in arm_phys_excp_target_el()

2024-03-04 Thread Jinjie Ruan via
According to Arm GIC section 4.6.3 Interrupt superpriority, the interrupt with superpriority is always IRQ, never FIQ, so handle NMI same as IRQ in arm_phys_excp_target_el(). Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. v3: - Remove nmi_is_irq flag in

[RFC PATCH v6 12/23] target/arm: Handle NMI in arm_cpu_do_interrupt_aarch64()

2024-03-04 Thread Jinjie Ruan via
According to Arm GIC section 4.6.3 Interrupt superpriority, the interrupt with superpriority is always IRQ, never FIQ, so the NMI exception trap entry behave like IRQ. And VNMI(vIRQ with Superpriority) can be raised from the GIC or come from the hcrx_el2.HCRX_VINMI bit. Signed-off-by: Jinjie Ruan

Re: [PATCH v7 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-03-04 Thread Cédric Le Goater
On 3/5/24 06:59, Ankit Agrawal wrote: One thing I forgot. Please add a test.  tests/qtest/bios-tables-test.c + relevant table dumps. Here I need to add a test that creates a vfio-pci device and numa nodes and link using the acpi-generic-initiator object. One thing here is that the -device

[RFC PATCH v6 01/23] target/arm: Handle HCR_EL2 accesses for bits introduced with FEAT_NMI

2024-03-04 Thread Jinjie Ruan via
FEAT_NMI defines another three new bits in HCRX_EL2: TALLINT, HCRX_VINMI and HCRX_VFNMI. When the feature is enabled, allow these bits to be written in HCRX_EL2. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Update the comment for FEAT_NMI in hcrx_write(). - Update the

[RFC PATCH v6 23/23] hw/arm/virt: Add FEAT_GICv3_NMI feature support in virt GIC

2024-03-04 Thread Jinjie Ruan via
A PE that implements FEAT_NMI and FEAT_GICv3 also implements FEAT_GICv3_NMI. A PE that does not implement FEAT_NMI, does not implement FEAT_GICv3_NMI So included support FEAT_GICv3_NMI feature as part of virt platform GIC initialization if FEAT_NMI and FEAT_GICv3 supported. Signed-off-by: Jinjie

[RFC PATCH v6 18/23] hw/intc/arm_gicv3: Handle icv_nmiar1_read() for icc_nmiar1_read()

2024-03-04 Thread Jinjie Ruan via
Implement icv_nmiar1_read() for icc_nmiar1_read(), so add definition for ICH_LR_EL2.NMI and ICH_AP1R_EL2.NMI bit. If FEAT_GICv3_NMI is supported, ich_ap_write() should consider ICH_AP1R_EL2.NMI bit. In icv_activate_irq() and icv_eoir_write(), the ICH_AP1R_EL2.NMI bit should be set or clear

[RFC PATCH v6 04/23] target/arm: Implement ALLINT MSR (immediate)

2024-03-04 Thread Jinjie Ruan via
Add ALLINT MSR (immediate) to decodetree, in which the CRm is 0b000x. The EL0 check is necessary to ALLINT, and the EL1 check is necessary when imm == 1. So implement it inline for EL2/3, or EL1 with imm==0. Avoid the unconditional write to pc and use raise_exception_ra to unwind. Signed-off-by:

[RFC PATCH v6 14/23] hw/intc/arm_gicv3_redist: Implement GICR_INMIR0

2024-03-04 Thread Jinjie Ruan via
Add GICR_INMIR0 register and support access GICR_INMIR0. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v6: - Add Reviewed-by. v4: - Make the GICR_INMIR0 implementation more clearer. --- hw/intc/arm_gicv3_redist.c | 19 +++ hw/intc/gicv3_internal.h | 1 + 2

[RFC PATCH v6 08/23] target/arm: Handle IS/FS in ISR_EL1 for NMI

2024-03-04 Thread Jinjie Ruan via
Add IS and FS bit in ISR_EL1 and handle the read. With CPU_INTERRUPT_NMI or CPU_INTERRUPT_VNMI, both CPSR_I and ISR_IS must be set. With CPU_INTERRUPT_VFIQ and HCRX_EL2.VFNMI set, both CPSR_F and ISR_FS must be set. Signed-off-by: Jinjie Ruan --- v6: - Verify that HCR_EL2.VF is set before

[RFC PATCH v6 15/23] hw/intc/arm_gicv3: Implement GICD_INMIR

2024-03-04 Thread Jinjie Ruan via
Add GICD_INMIR, GICD_INMIRnE register and support access GICD_INMIR0. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Make the GICD_INMIR implementation more clearer. - Udpate the commit message. v3: - Add Reviewed-by. --- hw/intc/arm_gicv3_dist.c | 34

[RFC PATCH v6 20/23] hw/intc/arm_gicv3: Report the NMI interrupt in gicv3_cpuif_update()

2024-03-04 Thread Jinjie Ruan via
In CPU Interface, if the IRQ has the superpriority property, report NMI to the corresponding PE. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v6: - Add Reviewed-by. v4: - Swap the ordering of the IFs. v3: - Remove handling nmi_is_irq flag. --- hw/intc/arm_gicv3_cpuif.c | 4

[RFC PATCH v6 02/23] target/arm: Add PSTATE.ALLINT

2024-03-04 Thread Jinjie Ruan via
When PSTATE.ALLINT is set, an IRQ or FIQ interrupt that is targeted to ELx, with or without superpriority is masked. As Richard suggested, place ALLINT bit in PSTATE in env->pstate. With the change to pstate_read/write, exception entry and return are automatically handled. Signed-off-by: Jinjie

[RFC PATCH v6 05/23] target/arm: Support MSR access to ALLINT

2024-03-04 Thread Jinjie Ruan via
Support ALLINT msr access as follow: mrs , ALLINT// read allint msr ALLINT, // write allint with imm Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v5: - Add Reviewed-by. v4: - Remove arm_is_el2_enabled() check in allint_check(). - Change to

[RFC PATCH v6 16/23] hw/intc: Enable FEAT_GICv3_NMI Feature

2024-03-04 Thread Jinjie Ruan via
Added properties to enable FEAT_GICv3_NMI feature, setup distributor and redistributor registers to indicate NMI support. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v4: - Add Reviewed-by. --- hw/intc/arm_gicv3_common.c | 1 + hw/intc/arm_gicv3_dist.c | 2 ++

[RFC PATCH v6 09/23] target/arm: Handle PSTATE.ALLINT on taking an exception

2024-03-04 Thread Jinjie Ruan via
Set or clear PSTATE.ALLINT on taking an exception to ELx according to the SCTLR_ELx.SPINTMASK bit. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v3: - Add Reviewed-by. --- target/arm/helper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/arm/helper.c

[RFC PATCH v6 13/23] hw/intc/arm_gicv3: Add irq superpriority information

2024-03-04 Thread Jinjie Ruan via
A SPI, PPI or SGI interrupt can have a superpriority property. So maintain superpriority information in PendingIrq and GICR/GICD. Signed-off-by: Jinjie Ruan Acked-by: Richard Henderson --- v3: - Place this ahead of implement GICR_INMIR. - Add Acked-by. --- include/hw/intc/arm_gicv3_common.h |

[RFC PATCH v6 19/23] hw/intc/arm_gicv3: Implement NMI interrupt prioirty

2024-03-04 Thread Jinjie Ruan via
If GICD_CTLR_DS bit is zero and the NMI is non-secure, the NMI prioirty is higher than 0x80, otherwise it is higher than 0x0. And save NMI super prioirty information in hppi.superprio to deliver NMI exception. Since both GICR and GICD can deliver NMI, it is both necessary to check whether the

[RFC PATCH v6 03/23] target/arm: Add support for FEAT_NMI, Non-maskable Interrupt

2024-03-04 Thread Jinjie Ruan via
Add support for FEAT_NMI. NMI (FEAT_NMI) is an mandatory feature in ARMv8.8-A and ARM v9.3-A. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v3: - Add Reviewed-by. - Adjust to before the MSR patches. --- target/arm/internals.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[RFC PATCH v6 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-04 Thread Jinjie Ruan via
This only implements the external delivery method via the GICv3. Signed-off-by: Jinjie Ruan --- v6: - env->cp15.hcr_el2 -> arm_hcr_el2_eff(). - env->cp15.hcrx_el2 -> arm_hcrx_el2_eff(). - Not include VF && VFNMI in CPU_INTERRUPT_VNMI. v4: - Accept NMI unconditionally for arm_cpu_has_work() but

Re: [PATCH v5 1/5] target/riscv: Fix the predicate functions for mhpmeventhX CSRs

2024-03-04 Thread LIU Zhiwei
On 2024/2/29 2:51, Atish Patra wrote: mhpmeventhX CSRs are available for RV32. The predicate function should check that first before checking sscofpmf extension. Fixes: 14664483457b ("target/riscv: Add sscofpmf extension support") Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair

Re: [PATCH v5 2/5] target/riscv: Add cycle & instret privilege mode filtering properties

2024-03-04 Thread LIU Zhiwei
On 2024/2/29 2:51, Atish Patra wrote: From: Kaiwen Xue This adds the properties for ISA extension smcntrpmf. Patches implementing it will follow. Signed-off-by: Atish Patra Signed-off-by: Kaiwen Xue --- target/riscv/cpu.c | 2 ++ target/riscv/cpu_cfg.h | 1 + 2 files changed, 3

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-04 Thread Thomas Huth
On 05/03/2024 04.21, Xinying Yu wrote: One more thing, I would ask how do  I get the full series patch? Do I copy the RFC line by line from this link[1]? For getting patches that you might have missed on the mailing list, I recommend lore.kernel.org :

Re: [PATCH v5 5/5] target/riscv: Implement privilege mode filtering for cycle/instret

2024-03-04 Thread LIU Zhiwei
On 2024/2/29 2:51, Atish Patra wrote: Privilege mode filtering can also be emulated for cycle/instret by tracking host_ticks/icount during each privilege mode switch. This patch implements that for both cycle/instret and mhpmcounters. The first one requires Smcntrpmf while the other one

Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-04 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > On Sun, Mar 3, 2024 at 6:47 PM Huang, Ying wrote: >> >> "Ho-Ren (Jack) Chuang" writes: >> >> > The memory tiering component in the kernel is functionally useless for >> > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because the nodes >> > are lumped

[PATCH v3] target/loongarch: Add TCG macro in structure CPUArchState

2024-03-04 Thread Bibo Mao
In structure CPUArchState some struct elements are only used in TCG mode, and it is not used in KVM mode. Macro CONFIG_TCG is added to make it simpiler in KVM mode, also there is the same modification in c code when these struct elements are used. When VM runs in KVM mode, TLB entries are not

Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-04 Thread Ho-Ren (Jack) Chuang
On Sun, Mar 3, 2024 at 6:47 PM Huang, Ying wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > The memory tiering component in the kernel is functionally useless for > > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because the nodes > > are lumped together in the DRAM tier. > >

Re: [PATCH V2 1/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-04 Thread lixianglai
Hi Richard: On 3/4/24 17:51, Xianglai Li wrote: When we use qemu tcg simulation, the page size of bios is 4KB. When using the level 2 super large page (page size is 1G) to create the page table, it is found that the content of the corresponding address space is abnormal, resulting in the bios

Re: [PATCH v7 7/9] misc: Add a pca9554 GPIO device model

2024-03-04 Thread Cédric Le Goater
On 3/4/24 23:32, Paolo Bonzini wrote: On 1/25/24 23:48, Glenn Miles wrote: Specs are available here: https://www.nxp.com/docs/en/data-sheet/PCA9554_9554A.pdf This is a simple model supporting the basic registers for GPIO mode.  The device also supports an interrupt output line but the

Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-04 Thread Ho-Ren (Jack) Chuang
On Sun, Mar 3, 2024 at 6:47 PM Huang, Ying wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > The memory tiering component in the kernel is functionally useless for > > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because the nodes > > are lumped together in the DRAM tier. > >

Re: [PATCH 14/19] smbios: in case of entry point is 'auto' try to build v2 tables 1st

2024-03-04 Thread Ani Sinha
> On 27-Feb-2024, at 21:17, Igor Mammedov wrote: > > QEMU for some time now uses SMBIOS 3.0 for PC/Q35 machines by > default, however Windows has a bug in locating SMBIOS 3.0 > entrypoint and fails to find tables when booted on SeaBIOS > (on UEFI SMBIOS 3.0 tables work fine since firmware

Re: [PATCH v7 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-03-04 Thread Ankit Agrawal
> One thing I forgot. > > Please add a test.  tests/qtest/bios-tables-test.c > + relevant table dumps. Here I need to add a test that creates a vfio-pci device and numa nodes and link using the acpi-generic-initiator object. One thing here is that the -device vfio-pci needs a host= argument. I

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-04 Thread Wu, Fei
On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: > > > On 3/4/24 07:25, Fei Wu wrote: >> The harts requirements of RISC-V server platform [1] require RVA23 ISA >> profile support, plus Sv48, Svadu, H, Sscofmpf etc. This patch provides >> a virt CPU type (rvsp-ref) as compliant as possible. >>

Re: [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-04 Thread Wu, Fei
On 3/5/2024 3:35 AM, Daniel Henrique Barboza wrote: > > > On 3/4/24 07:25, Fei Wu wrote: >> The RISC-V Server Platform specification[1] defines a standardized set >> of hardware and software capabilities, that portable system software, >> such as OS and hypervisors can rely on being present in a

Re: [RFC PATCH] tests: bump QOS_PATH_MAX_ELEMENT_SIZE again

2024-03-04 Thread Thomas Huth
On 04/03/2024 20.37, Alex Bennée wrote: We "fixed" a bug with LTO builds with 100c459f194 (tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE) but it seems it has triggered again. Lets be more assertive raising QOS_PATH_MAX_ELEMENT_SIZE to make it go away again. Resolves:

[PATCH v4 6/8] migration/multifd: implement qpl compression and decompression

2024-03-04 Thread Yuan Liu
each qpl job is used to (de)compress a normal page and it can be processed independently by the IAA hardware. All qpl jobs are submitted to the hardware at once, and wait for all jobs completion. Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou --- migration/multifd-qpl.c | 219

[PATCH v4 5/8] migration/multifd: implement initialization of qpl compression

2024-03-04 Thread Yuan Liu
the qpl initialization includes memory allocation for compressed data and the qpl job initialization. the qpl initialization will check whether the In-Memory Analytics Accelerator(IAA) hardware is available, if the platform does not have IAA hardware or the IAA hardware is not available, the QPL

[PATCH v4 2/8] migration/multifd: add get_iov_count in the multifd method

2024-03-04 Thread Yuan Liu
the new function get_iov_count is used to get the number of IOVs required by a specified multifd method Different multifd methods may require different numbers of IOVs. Based on streaming compression of zlib and zstd, all pages will be compressed to a data block, so an IOV is required to send

[PATCH v4 8/8] tests/migration-test: add qpl compression test

2024-03-04 Thread Yuan Liu
add qpl to compression method test for multifd migration the migration with qpl compression needs to access IAA hardware resource, please run "check-qtest" with sudo or root permission, otherwise migration test will fail Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou ---

[PATCH v4 4/8] migration/multifd: add qpl compression method

2024-03-04 Thread Yuan Liu
add the Query Processing Library (QPL) compression method Although both qpl and zlib support deflate compression, qpl will only use the In-Memory Analytics Accelerator(IAA) for compression and decompression, and IAA is not compatible with the Zlib in migration, so qpl is used as a new compression

[PATCH v4 3/8] configure: add --enable-qpl build option

2024-03-04 Thread Yuan Liu
add --enable-qpl and --disable-qpl options to enable and disable the QPL compression method for multifd migration. the Query Processing Library (QPL) is an open-source library that supports data compression and decompression features. The QPL compression is based on the deflate compression

[PATCH v4 7/8] migration/multifd: fix zlib and zstd compression levels not working

2024-03-04 Thread Yuan Liu
add zlib and zstd compression levels in multifd parameter testing and application and add compression level tests Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou Reported-by: Xiaohui Li --- migration/options.c | 12 tests/qtest/migration-test.c | 16 2

[PATCH v4 1/8] docs/migration: add qpl compression feature

2024-03-04 Thread Yuan Liu
add QPL compression method introduction Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou --- docs/devel/migration/features.rst| 1 + docs/devel/migration/qpl-compression.rst | 231 +++ 2 files changed, 232 insertions(+) create mode 100644

[PATCH] qemu-options.hx: Fix uncorrect description of "-serial"

2024-03-04 Thread steven.s...@jaguarmicro.com
Before v2.12, serial_hds used MAX_SERIAL_PORTS(4) for resources of serials.The limitaion description of "-serial" option: "This option can be used several times to simulate up to 4 serial ports." In latest qemu, serial_hds have been replaced by "Chardev **" and now is dynamically allocated through

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-04 Thread Xinying Yu
Of course, I am glad to do. And I need to clarify that our use case only support VIRTIO_F_NOTIFICATION_DATA transport feature on DPDK vDPA framework which the backend type is NET_CLIENT_DRIVER_VHOST_USER and use user_feature_bits. So the new feature add on vdpa_feature_bits will not under

Re: [PATCH v3 04/26] migration: Always report an error in ram_save_setup()

2024-03-04 Thread Prasad Pandit
On Mon, 4 Mar 2024 at 18:01, Cédric Le Goater wrote: > This will prepare ground for futur changes adding an Error** argument * futur -> future > +ret = qemu_fflush(f); > +if (ret) { * if (ret) -> if (ret < 0) Thank you. --- - Prasad

RE: [PATCH v2 8/9] aspeed: Add an AST2700 eval board

2024-03-04 Thread Jamin Lin
> -Original Message- > From: Cédric Le Goater > Sent: Monday, March 4, 2024 11:40 PM > To: Jamin Lin ; Peter Maydell > ; Andrew Jeffery ; > Joel Stanley ; Alistair Francis ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PATCH v2

Re: [PATCH V2 1/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-04 Thread Richard Henderson
On 3/4/24 17:51, Xianglai Li wrote: When we use qemu tcg simulation, the page size of bios is 4KB. When using the level 2 super large page (page size is 1G) to create the page table, it is found that the content of the corresponding address space is abnormal, resulting in the bios can not start

Re: [RFC PATCH v5 18/22] hw/intc/arm_gicv3: Implement NMI interrupt prioirty

2024-03-04 Thread Jinjie Ruan via
On 2024/3/4 20:18, Jinjie Ruan wrote: > > > On 2024/3/1 7:50, Richard Henderson wrote: >> On 2/29/24 03:10, Jinjie Ruan via wrote: >>> If GICD_CTLR_DS bit is zero and the NMI is non-secure, the NMI prioirty >>> is higher than 0x80, otherwise it is higher than 0x0. And save NMI >>> super

RE: [PATCH v1 7/8] aspeed/soc: Add AST2700 support

2024-03-04 Thread Jamin Lin
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Thursday, February 29, 2024 5:38 PM > To: Jamin Lin ; Cédric Le Goater ; > Peter Maydell ; Andrew Jeffery > ; Joel Stanley ; Alistair > Francis ; open list:ASPEED BMCs > ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin

Re: [PATCH 3/7] contrib/elf2dmp: Ensure segment fits in file

2024-03-04 Thread Akihiko Odaki
On 2024/03/05 2:52, Peter Maydell wrote: On Sun, 3 Mar 2024 at 10:53, Akihiko Odaki wrote: This makes elf2dmp more robust against corrupted inputs. Signed-off-by: Akihiko Odaki --- contrib/elf2dmp/addrspace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH V2 0/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-04 Thread Xianglai Li
When we use qemu tcg simulation, the page size of bios is 4KB. When using the level 2 super large page (page size is 1G) to create the page table, it is found that the content of the corresponding address space is abnormal, resulting in the bios can not start the operating system and graphical

[PATCH V2 1/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-04 Thread Xianglai Li
When we use qemu tcg simulation, the page size of bios is 4KB. When using the level 2 super large page (page size is 1G) to create the page table, it is found that the content of the corresponding address space is abnormal, resulting in the bios can not start the operating system and graphical

RE: [PATCH v2 0/9] Add AST2700 support

2024-03-04 Thread Jamin Lin
> -Original Message- > From: Cédric Le Goater > Sent: Monday, March 4, 2024 11:54 PM > To: Jamin Lin ; Peter Maydell > ; Andrew Jeffery ; > Joel Stanley ; Alistair Francis ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PATCH v2

Re: [PATCH v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup()

2024-03-04 Thread Peter Xu
On Mon, Mar 04, 2024 at 01:28:28PM +0100, Cédric Le Goater wrote: > This will help preserving the error set by .save_setup() handlers. > > Signed-off-by: Cédric Le Goater IIUC this is about the next patch. I got fully confused before reading into the next one. IMHO we can squash it into where

RE: [PATCH v2 2/9] aspeed/sli: Add AST2700 support

2024-03-04 Thread Jamin Lin
> -Original Message- > From: Cédric Le Goater > Sent: Monday, March 4, 2024 10:36 PM > To: Jamin Lin ; Peter Maydell > ; Andrew Jeffery ; > Joel Stanley ; Alistair Francis ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PATCH v2

Re: Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-04 Thread Jim Mattson
On Mon, Mar 4, 2024 at 6:11 PM Xu Liu wrote: > > Hey Alex and Paolo, > > I saw there is some code related to AVX > https://elixir.bootlin.com/linux/latest/source/arch/x86/kvm/emulate.c#L668 > > Does that mean in some special cases, kvm supports AVX instructions ? > I didn’t really know the big

RE: [PATCH v2 1/9] aspeed/wdt: Add AST2700 support

2024-03-04 Thread Jamin Lin
> -Original Message- > From: Cédric Le Goater > Sent: Monday, March 4, 2024 10:32 PM > To: Jamin Lin ; Peter Maydell > ; Andrew Jeffery ; > Joel Stanley ; Alistair Francis ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PATCH v2

Re: [PATCH 1/1] kvm: add support for guest physical bits

2024-03-04 Thread Xiaoyao Li
On 3/4/2024 10:58 PM, Gerd Hoffmann wrote: On Mon, Mar 04, 2024 at 09:54:40AM +0800, Xiaoyao Li wrote: On 3/1/2024 6:17 PM, Gerd Hoffmann wrote: query kvm for supported guest physical address bits using KVM_CAP_VM_GPA_BITS. Expose the value to the guest via cpuid (leaf 0x8008, eax, bits

[PATCH] target/arm: Fix 32-bit SMOPA

2024-03-04 Thread Richard Henderson
The while the 8-bit input elements are sequential in the input vector, the 32-bit output elements are not sequential in the output matrix. Do not attempt to compute 2 32-bit outputs at the same time. Cc: qemu-sta...@nongnu.org Fixes: 23a5e3859f5 ("target/arm: Implement SME integer outer product")

Re: [PATCH] migration/ram: add additional check

2024-03-04 Thread Peter Xu
On Mon, Mar 04, 2024 at 05:42:03PM +0300, Maksim Davydov wrote: > If a migration stream is broken, the address and flag reading can return > zero. Thus, an irrelevant flag error will be returned instead of EIO. > It can be fixed by additional check after the reading. > > Signed-off-by: Maksim

Re: [PATCH v2 0/3] migration: Don't serialize devices in qemu_savevm_state_iterate()

2024-03-04 Thread Peter Xu
On Mon, Mar 04, 2024 at 12:53:36PM +0200, Avihai Horon wrote: > Hi, > > This small series is v2 of the single patch I previously sent [1]. > > It removes device serialization in qemu_savevm_state_iterate() and does > some VFIO migration touch ups. More info provided in the commit > messages. >

Re: Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-04 Thread Xu Liu
Hey Alex and Paolo, I saw there is some code related to AVX https://elixir.bootlin.com/linux/latest/source/arch/x86/kvm/emulate.c#L668 Does that mean in some special cases, kvm supports AVX instructions ? I didn’t really know the big picture, so just guess what it is doing . Thanks, Xu > On

Re: [PATCH v3 15/26] memory: Add Error** argument to the global_dirty_log routines

2024-03-04 Thread Yong Huang
On Mon, Mar 4, 2024 at 8:29 PM Cédric Le Goater wrote: > Now that the log_global*() handlers take an Error** parameter and > return a bool, do the same for memory_global_dirty_log_start() and > memory_global_dirty_log_stop(). The error is reported in the callers > for now and it will be

Re: [PATCH v6 00/23] migration: File based migration with multifd and mapped-ram

2024-03-04 Thread Peter Xu
On Mon, Mar 04, 2024 at 09:04:51PM +, Daniel P. Berrangé wrote: > On Mon, Mar 04, 2024 at 05:15:05PM -0300, Fabiano Rosas wrote: > > Peter Xu writes: > > > > > On Mon, Mar 04, 2024 at 08:53:24PM +0800, Peter Xu wrote: > > >> On Mon, Mar 04, 2024 at 12:42:25PM +, Daniel P. Berrangé wrote:

Re: [PATCH] Fixed tlb huge page loading issue

2024-03-04 Thread lixianglai
Hi gaosong: Hi, Title 'target/loongarch: ' ... OK! I will fix it in next version. Thanks, Xianglai. Thanks. Song Gao 在 2024/2/28 14:55, Xianglai Li 写道: The lddir and ldpte instruction emulation has a problem with the use of large page processing above level 2. The page size is

Re: [PATCH v2] target/loongarch: Add TCG macro in structure CPUArchState

2024-03-04 Thread maobibo
On 2024/3/5 上午12:53, Richard Henderson wrote: On 3/3/24 16:18, Bibo Mao wrote: @@ -696,11 +700,15 @@ void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)   {   LoongArchCPU *cpu = LOONGARCH_CPU(cs);   CPULoongArchState *env = >env; -    int i; +    int i, fp_status;

Re: [PATCH] oslib-posix: fix memory leak in touch_all_pages

2024-03-04 Thread Mark Kanda
On 3/4/24 4:48 PM, Paolo Bonzini wrote: touch_all_pages() can return early, before creating threads. In this case, however, it leaks the MemsetContext that it has allocated at the beginning of the function. Reported by Coverity as CID 1534922. Fixes: 04accf43df8 ("oslib-posix: initialize

Re: rutabaga 0.1.3

2024-03-04 Thread Gurchetan Singh
On Sat, Mar 2, 2024 at 6:38 AM Alyssa Ross wrote: > Hi Gurchetan, > > > >> > Would this be a suitable commit for the 0.1.3 release of rutabaga? > > >> > > > >> > > https://chromium.googlesource.com/crosvm/crosvm/+/5dfd74a0680d317c6edf44138def886f47cb1c7c > > >> > > > >> > The gfxstream/AEMU

Re: Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-04 Thread Xu Liu
Hey Paolo, Thanks for confirming that the AVX is not supported for MMIO space. So for the emulated device, basically I have to force the compiler avoid using vmovdqu . I am curious about how kvm emulates those instructions. Do you mind sharing some related code pointer ? Thanks, Xu On Mar

Re: Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-04 Thread Xu Liu
Hey Alex, Thanks for the detailed explanation! First answer your question: Is your "program" just doing a memcpy() with an mmap() of the PCI BAR acquired through pci-sysfs or a userspace vfio-pci driver within the guest? My program is using a usersapcee vfio-pci driver for both emulated device

  1   2   3   4   >