[PATCH] m25p80: Add support for the GD25WQ32E flash

2024-03-30 Thread Giacomo Parmeggiani
This introduces the GigaDevice GD25WQ32E flash, including the SFDP table Signed-off-by: Giacomo Parmeggiani --- hw/block/m25p80.c | 2 ++ hw/block/m25p80_sfdp.c | 40 hw/block/m25p80_sfdp.h | 2 ++ 3 files changed, 44 insertions(+) diff --git

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

2024-03-30 Thread Peter Maydell
On Sat, 30 Mar 2024 at 02:44, Jinjie Ruan via wrote: > > > > On 2024/3/28 22:50, Peter Maydell wrote: > > The NMI bit also exists only in the AP1R0 bit, not in every AP > > register. So you can check it before the for() loop, something like this: > > > > if (cs->gic->nmi_support) { > >

Re: [PATCH v10 14/23] hw/intc/arm_gicv3: Add irq non-maskable property

2024-03-30 Thread Peter Maydell
On Sat, 30 Mar 2024 at 01:42, Jinjie Ruan wrote: > > > > On 2024/3/28 22:54, Peter Maydell wrote: > > On Mon, 25 Mar 2024 at 08:52, Jinjie Ruan wrote: > >> > >> A SPI, PPI or SGI interrupt can have non-maskable property. So maintain > >> non-maskable property in PendingIrq and GICR/GICD. Since

[PULL for-9.0 2/2] qtest/virtio-9p-test.c: remove g_test_slow() gate

2024-03-30 Thread Christian Schoenebeck
From: Daniel Henrique Barboza Commit 558f5c42ef gated the local tests with g_test_slow() to skip them in 'make check'. The reported issue back then was this following CI problem: https://lists.nongnu.org/archive/html/qemu-devel/2020-11/msg05510.html This problem ended up being fixed after it

[PULL for-9.0 1/2] qtest/virtio-9p-test.c: create/remove temp dirs after each test

2024-03-30 Thread Christian Schoenebeck
From: Daniel Henrique Barboza The local 9p driver in virtio-9p-test.c its temporary dir right at the start of qos-test (via virtio_9p_create_local_test_dir()) and only deletes it after qos-test is finished (via virtio_9p_remove_local_test_dir()). This means that any qos-test machine that ends

[PULL for-9.0 0/2] 9p queue 2024-03-29

2024-03-30 Thread Christian Schoenebeck
The following changes since commit 5012e522aca161be5c141596c66e5cc6082538a9: Update version for v9.0.0-rc1 release (2024-03-26 19:46:55 +) are available in the Git repository at: https://github.com/cschoenebeck/qemu.git tags/pull-9p-20240329 for you to fetch changes up to

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

2024-03-30 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

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

2024-03-30 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 non-maskable property. And for

[PATCH v11 00/23] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-03-30 Thread Jinjie Ruan via
This patch set implements FEAT_NMI and FEAT_GICv3_NMI for ARMv8. These introduce support for a new category of interrupts in the architecture which we can use to provide NMI like functionality. There are two modes for using this FEAT_NMI. When PSTATE.ALLINT or PSTATE.SP &

[PATCH v11 10/23] hw/arm/virt: Wire NMI and VINMI irq lines from GIC to CPU

2024-03-30 Thread Jinjie Ruan via
Wire the new NMI and VINMI interrupt line from the GIC to each CPU. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v9: - Rename ARM_CPU_VNMI to ARM_CPU_VINMI. - Update the commit message. v4: - Add Reviewed-by. v3: - Also add VNMI wire. --- hw/arm/virt.c | 7 ++- 1 file

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

2024-03-30 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

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

2024-03-30 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 --- v9: - Move nmi_reginfo and related functions inside an existing ifdef TARGET_AARCH64 to solve the

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

2024-03-30 Thread Jinjie Ruan via
This only implements the external delivery method via the GICv3. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v10: - In arm_cpu_exec_interrupt(), if SCTLR_ELx.NMI is 0, NMI -> IRQ, VINMI -> VIRQ, VFNMI -> VFIQ. - Make arm_cpu_update_virq() and arm_cpu_update_vfiq() check that

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

2024-03-30 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

[PATCH v11 16/23] hw/intc/arm_gicv3: Implement GICD_INMIR

2024-03-30 Thread Jinjie Ruan via
Add GICD_INMIR, GICD_INMIRnE register and support access GICD_INMIR0. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell --- v11: - Add new Reviewed-by. v10: - superprio -> nmi. v4: - Make the GICD_INMIR implementation more clearer. - Udpate the commit

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

2024-03-30 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

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

2024-03-30 Thread Jinjie Ruan via
In CPU Interface, if the IRQ has the non-maskable property, report NMI to the corresponding PE. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v10: - superprio -> nmi. - Update the commit message, superpriority -> non-maskable. v6: - Add Reviewed-by. v4: - Swap the ordering of

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

2024-03-30 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 VINMI(vIRQ with Superpriority) can be raised from the GIC or come from the hcrx_el2.HCRX_VINMI bit, VFNMI(vFIQ with

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

2024-03-30 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 --- v9: - Declare cpu variable to reuse latter. v4: - Update the comment

[PATCH v11 13/23] hw/intc: Enable FEAT_GICv3_NMI Feature

2024-03-30 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 --- v10: - Adjust to before add irq non-maskable property. v4: - Add Reviewed-by. --- hw/intc/arm_gicv3_common.c

[PATCH v11 08/23] target/arm: Handle IS/FS in ISR_EL1 for NMI, VINMI and VFNMI

2024-03-30 Thread Jinjie Ruan via
Add IS and FS bit in ISR_EL1 and handle the read. With CPU_INTERRUPT_NMI or CPU_INTERRUPT_VINMI, both CPSR_I and ISR_IS must be set. With CPU_INTERRUPT_VFNMI, both CPSR_F and ISR_FS must be set. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v9: - CPU_INTERRUPT_VNMI ->

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

2024-03-30 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 --- v9: - Not check SCTLR_NMI in arm_cpu_do_interrupt_aarch64(). v3: - Add Reviewed-by. --- target/arm/helper.c | 8 1 file

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

2024-03-30 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

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

2024-03-30 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 Reviewed-by: Peter Maydell --- v11: - Add new Reviewed-by. v4: - Add Reviewed-by. v3: - Add support for VNMI. ---

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

2024-03-30 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 ICV_AP1R_EL1.NMI bit. In icv_activate_irq() and icv_eoir_write(), the ICV_AP1R_EL1.NMI bit should be set or clear

[PATCH v11 14/23] hw/intc/arm_gicv3: Add irq non-maskable property

2024-03-30 Thread Jinjie Ruan via
A SPI, PPI or SGI interrupt can have non-maskable property. So maintain non-maskable property in PendingIrq and GICR/GICD. Since add new device state, it also needs to be migrated, so also save NMI info in vmstate_gicv3_cpu and vmstate_gicv3. Signed-off-by: Jinjie Ruan Acked-by: Richard

[PATCH v11 15/23] hw/intc/arm_gicv3_redist: Implement GICR_INMIR0

2024-03-30 Thread Jinjie Ruan via
Add GICR_INMIR0 register and support access GICR_INMIR0. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell --- v11: - Add new Reviewed-by. v10: - gicr_isuperprio -> gicr_inmir0. v6: - Add Reviewed-by. v4: - Make the GICR_INMIR0 implementation more clearer.

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

2024-03-30 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:

[PATCH v11 21/23] hw/intc/arm_gicv3: Report the VINMI interrupt

2024-03-30 Thread Jinjie Ruan via
In vCPU Interface, if the vIRQ has the non-maskable property, report vINMI to the corresponding vPE. Signed-off-by: Jinjie Ruan Reviewed-by: Richard Henderson --- v10: - Update the commit message, superpriority -> non-maskable. v9: - Update the commit subject and message, vNMI -> vINMI. v6: -

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

2024-03-30 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

Re: Backdoor in xz, should we switch compression format for tarballs?

2024-03-30 Thread Stefan Hajnoczi
On Fri, 29 Mar 2024 at 14:00, Paolo Bonzini wrote: > > For more info, see > https://lwn.net/ml/oss-security/20240329155126.kjjfduxw2yrlx...@awork3.anarazel.de/ > but, essentially, xz was backdoored and it seems like upstream was directly > responsible for this. > > Based on this, should we