[PATCH 06/10] target/arm: Move arm_current_el() and arm_el_is_aa64() to internals.h

2025-03-06 Thread Peter Maydell
The functions arm_current_el() and arm_el_is_aa64() are used only in target/arm and in hw/intc/arm_gicv3_cpuif.c. They're functions that query internal state of the CPU. Move them out of cpu.h and into internals.h. This means we need to include internals.h in arm_gicv3_cpuif.c, but this is justi

Re: [PATCH 01/10] target/arm: Move A32_BANKED_REG_{GET, SET} macros to cpregs.h

2025-03-06 Thread Richard Henderson
On 3/6/25 08:39, Peter Maydell wrote: The A32_BANKED_REG_{GET,SET} macros are only used inside target/arm; move their definitions to cpregs.h. There's no need to have them defined in all the code that includes cpu.h. Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 28 +++

[PATCH] include/exec: Move TARGET_PAGE_{SIZE, MASK, BITS} to target_page.h

2025-03-06 Thread Richard Henderson
Re-use the TARGET_PAGE_BITS_VARY mechanism to define TARGET_PAGE_SIZE and friends when not compiling per-target. Inline qemu_target_page_{size,mask,bits} as they are now trivial. Signed-off-by: Richard Henderson --- After this, we could in fact remove qemu_target_page_foo(), etc. We certainly do

Re: [PATCH] accel/tcg: Restrict CPU_TLB_DYN_*_BITS definitions to accel/tcg/

2025-03-06 Thread Richard Henderson
On 3/5/25 11:18, Philippe Mathieu-Daudé wrote: CPU_TLB_DYN_*_BITS definitions are only used by accel/tcg/cputlb.c and accel/tcg/translate-all.c. Move them to accel/tcg/tb-internal.h. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tb-internal.h | 27 +++ include/e

Re: [PATCH 10/10] target/arm: Forbid return to AArch32 when CPU is AArch64-only

2025-03-06 Thread Richard Henderson
On 3/6/25 08:39, Peter Maydell wrote: In the Arm ARM, rule R_TYTWB states that returning to AArch32 is an illegal exception return if: * AArch32 is not supported at any exception level * the target EL is configured for AArch64 via SCR_EL3.RW or HCR_EL2.RW or via CPU state at reset We che

Re: [PATCH 04/10] linux-user/arm: Remove unused get_put_user macros

2025-03-06 Thread Richard Henderson
On 3/6/25 08:39, Peter Maydell wrote: In linux-user/arm/cpu_loop.c we define a full set of get/put macros for both code and data (since the endianness handling is different between the two). However the only one we actually use is get_user_code_u32(). Remove the rest. We leave a comment noting h

Re: [PATCH 2/7] target/riscv: env->misa_mxl is a constant

2025-03-06 Thread Alistair Francis
On Thu, Mar 6, 2025 at 11:00 PM Paolo Bonzini wrote: > > On 3/6/25 02:16, Alistair Francis wrote: > > On Wed, Feb 19, 2025 at 3:01 AM Paolo Bonzini wrote: > >> > >> There is nothing that overwrites env->misa_mxl, so it is a constant. Do > > > > The idea is that misa_mxl can change, although that

[PATCH v6 03/29] hw/intc/aspeed: Introduce dynamic allocation for regs array

2025-03-06 Thread Jamin Lin via
Currently, the size of the "regs" array is 0x2000, which is too large. To save code size and avoid mapping large unused gaps, will update it to only map the useful set of registers. This update will support multiple sub-regions with different sizes. To address the redundant size issue, replace the

[PATCH v5 14/29] hw/intc/aspeed: Introduce AspeedINTCIRQ structure to save the irq index and register address

2025-03-06 Thread Jamin Lin via
The INTC controller supports GICINT128 to GICINT136, mapping 1:1 to input and output IRQs 0 to 8. Previously, the formula "address & 0x0f00" was used to derive the IRQ index numbers. However, the INTC controller also supports GICINT192_201, mapping 1 input IRQ pin to 10 output IRQ pins. The pin nu

[PATCH] tests/functional/test_virtio_balloon: Only use KVM for running this test

2025-03-06 Thread Thomas Huth
The virtio_balloon test is currently hanging for unknown reasons when being run on the shared gitlab CI runners (which don't provide KVM, thus it's running in TCG mode there). All other functional tests that use the same asset (the Fedora 31 kernel) have already been marked to work only with KVM in

[PATCH v6 13/29] hw/intc/aspeed: Refactor INTC to support separate input and output pin indices

2025-03-06 Thread Jamin Lin via
Refactors the INTC to distinguish between input and output pin indices, improving interrupt handling clarity and accuracy. Updated the functions to handle both input and output pin indices. Added detailed logging for input and output pin indices in trace events. These changes ensure that the INTC

[PATCH v6 14/29] hw/intc/aspeed: Introduce AspeedINTCIRQ structure to save the irq index and register address

2025-03-06 Thread Jamin Lin via
The INTC controller supports GICINT128 to GICINT136, mapping 1:1 to input and output IRQs 0 to 8. Previously, the formula "address & 0x0f00" was used to derive the IRQ index numbers. However, the INTC controller also supports GICINT192_201, mapping 1 input IRQ pin to 10 output IRQ pins. The pin nu

Re: [PATCH 12/57] docs/qapi-domain: add :since: directive option

2025-03-06 Thread Markus Armbruster
John Snow writes: > Add a little special markup for registering "Since:" information. Adding > it as an option instead of generic content lets us hoist the information > into the Signature bar, optionally put it in the index, etc. > > Signed-off-by: John Snow > --- > docs/sphinx/qapi_domain.py

[PATCH] util/loongarch64: Add clang compiler support

2025-03-06 Thread Bibo Mao
Float register name f0 - f31 is not recognized with clang compiler with LoongArch64 target, its name should be $f0 - $f31. It is ok for both gcc and clang compiler. Signed-off-by: Bibo Mao --- host/include/loongarch64/host/bufferiszero.c.inc | 6 -- 1 file changed, 4 insertions(+), 2 deletio

Re: [PATCH v2 02/10] target/i386: disable PERFCORE when "-pmu" is configured

2025-03-06 Thread Zhao Liu
> 1. Remove "kvm_enabled() && IS_AMD_CPU(env)" since the bit is reserved by > Intel. > > 2. Add your Reviewed-by. Yes, this is exactly what I mean! Regards, Zhao

Re: [PATCH v3 00/10] vfio/igd: Decoupling quirks with legacy mode

2025-03-06 Thread Corvin Köhne
On Thu, 2025-03-06 at 15:49 -0700, Alex Williamson wrote: > On Fri,  7 Mar 2025 02:01:20 +0800 > Tomita Moeko wrote: > > > This patchset intends to decouple existing quirks from legacy mode. > > Currently all quirks depends on legacy mode (except x-igd-opregion), > > which includes following cond

Re: [PATCH v6 03/29] hw/intc/aspeed: Introduce dynamic allocation for regs array

2025-03-06 Thread Cédric Le Goater
On 3/7/25 04:59, Jamin Lin wrote: Currently, the size of the "regs" array is 0x2000, which is too large. To save code size and avoid mapping large unused gaps, will update it to only map the useful set of registers. This update will support multiple sub-regions with different sizes. To address t

[PULL 26/54] target/microblaze: Explode MO_TExx -> MO_TE | MO_xx

2025-03-06 Thread Philippe Mathieu-Daudé
Extract the implicit MO_TE definition in order to replace it by runtime variable in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/microblaze); \ done Signed-off-by: Philip

[PULL 1/2] target/loongarch: fix 'make check-functional' failed

2025-03-06 Thread Song Gao
some tlb instructions get the tlb_ps from tlb->misc but the value may has been initialized to 0,just check the tlb_ps skip the function and write a log. Signed-off-by: Song Gao Reviewed-by: Bibo Mao Message-Id: <20250305063311.830674-2-gaos...@loongson.cn> --- target/loongarch/tcg/tlb_helpe

[PULL 0/2] loongarch tcg queue

2025-03-06 Thread Song Gao
The following changes since commit e8a01102936286e012ed0f00bd7f3b7474d415c9: Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2025-03-05 21:58:23 +0800) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20250

[PULL 2/2] target/loongarch: check tlb_ps

2025-03-06 Thread Song Gao
For LoongArch th min tlb_ps is 12(4KB), for TLB code, the tlb_ps may be 0,this may case UndefinedBehavior Add a check-tlb_ps fuction to check tlb_ps, to make sure the tlb_ps is avalablie. we check tlb_ps when get the tlb_ps from tlb->misc or CSR bits. 1. cpu reset set CSR_PWCL.PTBASE and CSR_STL

Re: [PATCH v2 2/2] target/riscv: fixes a bug against `ssamoswap` behavior in M-mode

2025-03-06 Thread Alistair Francis
On Thu, Mar 6, 2025 at 4:47 PM Deepak Gupta wrote: > > Commit f06bfe3dc38c ("target/riscv: implement zicfiss instructions") adds > `ssamoswap` instruction. `ssamoswap` takes the code-point from existing > reserved encoding (and not a zimop like other shadow stack instructions). > If shadow stack i

[PATCH v6 10/29] hw/intc/aspeed: Support different memory region ops

2025-03-06 Thread Jamin Lin via
The previous implementation set the "aspeed_intc_ops" struct, containing read and write callbacks, to be used when I/O is performed on the INTC region. Both "aspeed_intc_read" and "aspeed_intc_write" callback functions were used for INTC (CPU Die). To support the INTCIO (IO Die) model, introduces

[PATCH v6 01/29] hw/intc/aspeed: Support setting different memory size

2025-03-06 Thread Jamin Lin via
According to the AST2700 datasheet, the INTC(CPU DIE) controller has 16KB (0x4000) of register space, and the INTCIO (I/O DIE) controller has 1KB (0x400) of register space. Introduced a new class attribute "mem_size" to set different memory sizes for the INTC models in AST2700. Signed-off-by: Jam

[PATCH v6 05/29] hw/intc/aspeed: Reduce regs array size by adding a register sub-region

2025-03-06 Thread Jamin Lin via
Currently, the size of the "regs" array is 0x2000, which is too large. So far, it only uses "GICINT128 to `GICINT134", and the offsets from 0 to 0x1000 are unused. To save code size and avoid mapping large unused gaps, update to only map the useful set of registers: INTC register [0x1000 – 0x1804]

[PATCH v6 21/29] hw/arm/aspeed_ast27x0: Support two levels of INTC controllers for AST2700 A1

2025-03-06 Thread Jamin Lin via
The design of INTC controllers has significantly changed in AST2700 A1. There are a total of 480 interrupt sources in AST2700 A1. For interrupt numbers from 0 to 127, they can route directly to PSP, SSP, and TSP. Due to the limitation of interrupt numbers of processors, the interrupts are merged e

[PATCH v6 23/29] hw/arm/aspeed: Add Machine Support for AST2700 A1

2025-03-06 Thread Jamin Lin via
Introduce "aspeed_machine_ast2700a1_evb_class_init" to initialize the AST2700 A1 EVB. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/arm/aspeed.c | 24 1 file changed, 24 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 18f7c450da..82f4

[PATCH v6 29/29] docs/specs: Add aspeed-intc

2025-03-06 Thread Jamin Lin via
Add AST2700 INTC design guidance and its block diagram. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- docs/specs/aspeed-intc.rst | 136 + docs/specs/index.rst | 1 + 2 files changed, 137 insertions(+) create mode 100644 docs/specs/aspeed

[PATCH v6 19/29] hw/arm/aspeed_ast27x0.c Support AST2700 A1 GIC Interrupt Mapping

2025-03-06 Thread Jamin Lin via
Currently, these IRQ tables support from GIC 128 - 136 for AST2700 A0. These IRQ tables can be reused for AST2700 A1 from GIC 192 - 197. Updates the interrupt mapping to include support for AST2700 A1 by extending the existing mappings to the new GIC range. Signed-off-by: Jamin Lin Reviewed-by: C

[PATCH v6 17/29] hw/intc/aspeed: Add Support for AST2700 INTCIO Controller

2025-03-06 Thread Jamin Lin via
Introduce a new ast2700 INTCIO class to support AST2700 INTCIO. Added new register definitions for INTCIO, including enable and status registers for IRQs GICINT192 through GICINT197. Created a dedicated IRQ array for INTCIO, supporting six input pins and six output pins, aligning with the newly def

[PATCH v6 16/29] hw/intc/aspeed: Add Support for Multi-Output IRQ Handling

2025-03-06 Thread Jamin Lin via
This update introduces support for handling multi-output IRQs in the AST2700 interrupt controller (INTC), specifically for GICINT192_201. GICINT192_201 maps 1:10 to input IRQ 0 and output IRQs 0 to 9. Each status bit corresponds to a specific IRQ. Implemented "aspeed_intc_set_irq_handler_multi_out

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-06 Thread Suthikulpanit, Suravee
On 3/5/2025 1:52 PM, Michael S. Tsirkin wrote: On Tue, Mar 04, 2025 at 06:37:47PM +, Suravee Suthikulpanit wrote: The QEMU-emulated AMD IOMMU PCI device is implemented based on the AMD I/O Virtualization Technology (IOMMU) Specification [1]. The PCI id for this device is platform-specific

Re: [PATCH v3 00/10] vfio/igd: Decoupling quirks with legacy mode

2025-03-06 Thread Alex Williamson
On Fri, 7 Mar 2025 02:01:20 +0800 Tomita Moeko wrote: > This patchset intends to decouple existing quirks from legacy mode. > Currently all quirks depends on legacy mode (except x-igd-opregion), > which includes following conditions: > * Machine type is i440fx > * IGD device is at guest BDF 00:0

Re: [PATCH 04/57] docs/sphinx: add compat.py module and nested_parse helper

2025-03-06 Thread Markus Armbruster
John Snow writes: > Create a compat module that handles sphinx cross-version compatibility > issues. For the inaugural function, add a nested_parse() helper that > handles differences in line number tracking for nested directive body > parsing. > > Spoilers: there are more cross-version hacks to

Re: [qemu-web PATCH] Announce Google Summer of Code 2025

2025-03-06 Thread Thomas Huth
On 06/03/2025 13.46, Stefan Hajnoczi wrote: Let people know that QEMU is participating in Google Summer of Code so that they can apply for an internship this summer. Thanks, looks good, applied now: https://www.qemu.org/2025/03/06/gsoc-2025/ Thomas

Re: [PATCH 15/57] docs/qapi-domain: add "Errors:" field lists

2025-03-06 Thread Markus Armbruster
John Snow writes: > ``:error: descr`` can now be used to document error conditions. The > format of the description is not defined here; so the ability to name > specific types is left to the document writer. > > Signed-off-by: John Snow By convention, the description is a bullet list, but we d

Re: [PATCH 13/57] docs/qapi-domain: add "Arguments:" field lists

2025-03-06 Thread Markus Armbruster
John Snow writes: > This adds special rendering for Sphinx's typed field lists. > > This patch does not add any QAPI-aware markup, rendering, or > cross-referencing for the type names, yet. That feature requires a > subclass to TypedField which will happen in its own commit quite a bit > later in

[PATCH v6 07/29] hw/intc/aspeed: Add object type name to trace events for better debugging

2025-03-06 Thread Jamin Lin via
Currently, these trace events only refer to INTC. To simplify the INTC model, both INTC(CPU Die) and INTCIO(IO Die) will share the same helper functions. However, it is difficult to recognize whether these trace events are comes from INTC or INTCIO. To make these trace events more readable, adds o

RE: [PATCH v6 00/29] Support AST2700 A1

2025-03-06 Thread Steven Lee
> -Original Message- > From: Cédric Le Goater > Sent: Friday, March 7, 2025 3:44 PM > To: Jamin Lin ; Peter Maydell > ; Steven Lee ; Troy > Lee ; Andrew Jeffery ; > Joel Stanley ; open list:All patches CC here > ; open list:ASPEED BMCs > > Cc: Troy Lee > Subject: Re: [PATCH v6 00/29] Sup

Re: [PATCH] include/exec: Move TARGET_PAGE_{SIZE,MASK,BITS} to target_page.h

2025-03-06 Thread Richard Henderson
On 3/6/25 15:41, Richard Henderson wrote: diff --git a/page-vary-target.c b/page-vary-target.c index 343b4adb95..1b4a9a10be 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -37,5 +37,7 @@ void finalize_target_page_bits(void) { #ifdef TARGET_PAGE_BITS_VARY finalize_target_page

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-06 Thread Suthikulpanit, Suravee
On 3/6/2025 3:58 PM, Daniel P. Berrangé wrote: On Thu, Mar 06, 2025 at 09:11:53AM +0200, Yan Vugenfirer wrote: On Wed, Mar 5, 2025 at 8:54 AM Michael S. Tsirkin wrote: On Tue, Mar 04, 2025 at 06:37:47PM +, Suravee Suthikulpanit wrote: The QEMU-emulated AMD IOMMU PCI device is implement

[PATCH v6 15/29] hw/intc/aspeed: Introduce IRQ handler function to reduce code duplication

2025-03-06 Thread Jamin Lin via
The behavior of the INTC set IRQ is almost identical between INTC and INTCIO. To reduce duplicated code, introduce the "aspeed_intc_set_irq_handler" function to handle both INTC and INTCIO IRQ behavior. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/intc/asp

[PATCH v6 20/29] hw/arm/aspeed_ast27x0: Define an Array of AspeedINTCState with Two Instances

2025-03-06 Thread Jamin Lin via
Updated Aspeed27x0SoCState to include an intc[2] array instead of a single AspeedINTCState instance. Modified aspeed_soc_ast2700_get_irq and aspeed_soc_ast2700_get_irq_index to correctly reference the corresponding interrupt controller instance and OR gate index. Currently, only GIC 192 to 201 are

[PATCH v6 12/29] hw/intc/aspeed: Add support for multiple output pins in INTC

2025-03-06 Thread Jamin Lin via
Added support for multiple output pins in the INTC controller to accommodate the AST2700 A1. Introduced "num_outpins" to represent the number of output pins. Updated the IRQ handling logic to initialize and connect output pins separately from input pins. Modified the "aspeed_soc_ast2700_realize" f

[PATCH v6 25/29] tests/functional/aspeed: Introduce start_ast2700_test API

2025-03-06 Thread Jamin Lin via
Added a new method "start_ast2700_test" to the "AST2x00MachineSDK" class and this method centralizes the logic for starting the AST2700 test, making it reusable for different test cases. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_aarch64_aspeed.py | 29

Re: [PATCH v2 01/10] target/i386: disable PerfMonV2 when PERFCORE unavailable

2025-03-06 Thread Sandipan Das
On 3/3/2025 3:30 AM, Dongli Zhang wrote: > When the PERFCORE is disabled with "-cpu host,-perfctr-core", it is > reflected in in guest dmesg. > > [0.285136] Performance Events: AMD PMU driver. > > However, the guest CPUID indicates the PerfMonV2 is still available. > > CPU: >Extended Per

Re: [PULL 0/4] NBD patches through 2025-03-05

2025-03-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/54] Accelerators & CPU patches

2025-03-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/1] Block patches

2025-03-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/42] vfio queue

2025-03-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v2 03/10] [DO NOT MERGE] kvm: Introduce kvm_arch_pre_create_vcpu()

2025-03-06 Thread Zhao Liu
> I didn't know if I would need to wait until this patch is merged into > mainline QEMU. That's why I didn't add my signed-off. No problem if Xiaoyao is okay with it (copyright of patches need to honor the original author & signed-off). IMO, if your series is accepted first, it also helps to reduc

Re: [PATCH v6 00/29] Support AST2700 A1

2025-03-06 Thread Cédric Le Goater
On 3/7/25 04:59, Jamin Lin wrote: v1: 1. Refactor INTC model to support both INTC0 and INTC1. 2. Support AST2700 A1. 3. Create ast2700a0-evb machine. v2: To streamline the review process, split the following patch series into three parts. https://patchwork.kernel.org/project/q

[qemu-web PATCH] Announce Google Summer of Code 2025

2025-03-06 Thread Stefan Hajnoczi
Let people know that QEMU is participating in Google Summer of Code so that they can apply for an internship this summer. Signed-off-by: Stefan Hajnoczi --- _posts/2025-03-06-gsoc-2025.md | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 _posts/2025-03

Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-03-06 Thread Sandipan Das
On 3/3/2025 3:30 AM, Dongli Zhang wrote: > QEMU uses the kvm_get_msrs() function to save Intel PMU registers from KVM > and kvm_put_msrs() to restore them to KVM. However, there is no support for > AMD PMU registers. Currently, has_pmu_version and num_pmu_gp_counters are > initialized based on cpui

[PATCH v6 08/29] hw/arm/aspeed: Rename IRQ table and machine name for AST2700 A0

2025-03-06 Thread Jamin Lin via
Currently, AST2700 SoC only supports A0. To support AST2700 A1, rename its IRQ table and machine name. To follow the machine deprecation rule, the initial machine "ast2700-evb" is aliased to "ast2700a0-evb." In the future, we will alias "ast2700-evb" to new SoCs, such as "ast2700a1-evb." Signed-o

[PATCH v6 09/29] hw/arm/aspeed_ast27x0: Sort the IRQ table by IRQ number

2025-03-06 Thread Jamin Lin via
To improve readability, sort the IRQ table by IRQ number. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0.c | 50 - 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_as

Re: [v5,1/6] hw/misc/aspeed_scu: Skipping dram_init in u-boot

2025-03-06 Thread Cédric Le Goater
Hello, On 3/6/25 19:05, Nabih Estefan wrote: Hi Cédric, We have a custom machine and a custom image using the AST27x0 A0. I ran some of our internal tests using these patches. They even fixed some of the errors we’d been seeing recently! I’m also working on testing through the A1 patches, will

Re: [PATCH v6 05/29] hw/intc/aspeed: Reduce regs array size by adding a register sub-region

2025-03-06 Thread Cédric Le Goater
On 3/7/25 04:59, Jamin Lin wrote: Currently, the size of the "regs" array is 0x2000, which is too large. So far, it only uses "GICINT128 to `GICINT134", and the offsets from 0 to 0x1000 are unused. To save code size and avoid mapping large unused gaps, update to only map the useful set of registe

[PATCH 6/7] hw/hyperv/balloon: common balloon compilation units

2025-03-06 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- hw/hyperv/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/hyperv/meson.build b/hw/hyperv/meson.build index a9f2045a9af..5acd709bdd5 100644 --- a/hw/hyperv/meson.build +++ b/hw/hyperv/meson.build @@ -2,5 +2,5 @@ specific_ss.add

Re: [PATCH 11/57] docs/qapi-domain: add qapi:command directive

2025-03-06 Thread Markus Armbruster
John Snow writes: > This commit adds a stubbed version of QAPICommand that utilizes the > QAPIObject class, the qapi:command directive, the :qapi:cmd: > cross-reference role, and the "command" object type in the QAPI object > registry. > > This commit also adds the aforementioned generic QAPIObje

[PATCH v6 06/29] hw/intc/aspeed: Introduce helper functions for enable and status registers

2025-03-06 Thread Jamin Lin via
The behavior of the enable and status registers is almost identical between INTC(CPU Die) and INTCIO(IO Die). To reduce duplicated code, adds "aspeed_intc_enable_handler" functions to handle enable register write behavior and "aspeed_intc_status_handler" functions to handle status register write be

[PATCH v6 26/29] tests/functional/aspeed: Update temperature hwmon path

2025-03-06 Thread Jamin Lin via
Modified the temperature hwmon path to use a wildcard to handle different SDK versions: "cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input". Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_aarch64_aspeed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 del

RE: [PATCH v5 04/29] hw/intc/aspeed: Support setting different register size

2025-03-06 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v5 04/29] hw/intc/aspeed: Support setting different > register size > > On 3/6/25 11:38, Jamin Lin wrote: > > Currently, the size of the regs array is 0x2000, which is too large. > > So far, it only use GICINT128 - GICINT134, and the offsets from 0 to 0x1000 > are

[PATCH v6 04/29] hw/intc/aspeed: Support setting different register size

2025-03-06 Thread Jamin Lin via
Currently, the size of the regs array is 0x2000, which is too large. So far, it only use GICINT128 - GICINT134, and the offsets from 0 to 0x1000 are unused. To save code size, introduce a new class attribute "reg_size" to set the different register sizes for the INTC models in AST2700 and add a reg

Re: [PATCH] include/exec: Move TARGET_PAGE_{SIZE,MASK,BITS} to target_page.h

2025-03-06 Thread Pierrick Bouvier
On 3/6/25 15:41, Richard Henderson wrote: Re-use the TARGET_PAGE_BITS_VARY mechanism to define TARGET_PAGE_SIZE and friends when not compiling per-target. Inline qemu_target_page_{size,mask,bits} as they are now trivial. Signed-off-by: Richard Henderson --- After this, we could in fact remove

Re: [PATCH v2 2/2] target/riscv: fixes a bug against `ssamoswap` behavior in M-mode

2025-03-06 Thread Alistair Francis
On Thu, Mar 6, 2025 at 4:47 PM Deepak Gupta wrote: > > Commit f06bfe3dc38c ("target/riscv: implement zicfiss instructions") adds > `ssamoswap` instruction. `ssamoswap` takes the code-point from existing > reserved encoding (and not a zimop like other shadow stack instructions). > If shadow stack i

RE: [PATCH v5 03/29] hw/intc/aspeed: Introduce dynamic allocation for regs array

2025-03-06 Thread Jamin Lin
Hi Cedric > Subject: Re: [PATCH v5 03/29] hw/intc/aspeed: Introduce dynamic allocation > for regs array > > On 3/6/25 11:38, Jamin Lin wrote: > > Currently, the size of the "regs" array is 0x2000, which is too large. > > To save code size and avoid mapping large unused gaps, will update it > > to

Re: [PATCH v5 01/29] hw/intc/aspeed: Support setting different memory size

2025-03-06 Thread Cédric Le Goater
On 3/6/25 11:38, Jamin Lin wrote: According to the AST2700 datasheet, the INTC(CPU DIE) controller has 16KB (0x4000) of register space, and the INTCIO (I/O DIE) controller has 1KB (0x400) of register space. Introduced a new class attribute "mem_size" to set different memory sizes for the INTC mo

[PATCH 3/5] hw/intc/loongarch_extioi: Replace legacy reset callback with new api

2025-03-06 Thread Bibo Mao
Replace legacy reset callback register device_class_set_legacy_reset() with new function resettable_class_set_parent_phases(). With new API, it will call reset callback of parent object and then itself. Signed-off-by: Bibo Mao --- hw/intc/loongarch_extioi.c | 12 include/hw/

[PATCH 2/5] hw/intc/loongarch_extioi: Add reset support

2025-03-06 Thread Bibo Mao
Add reset support with extioi irqchip, and register reset callback support with new API resettable_class_set_parent_phases(). Clear internal HW registers and SW state when virt machine resets. Signed-off-by: Bibo Mao --- hw/intc/loongarch_extioi_common.c | 41 +++ inc

[PATCH 0/5] hw/intc: Add reset support for LoongArch irqchips

2025-03-06 Thread Bibo Mao
Here add reset support with LoongArch irqchips, including pch pic, ipi and extioi interrupt controllers. For ipi irqchip, reset interface is missing. For extioi irqchip, legacy reset callback is replaced with new API and internal HW/SW states are cleared also. For pch pic irqchip, legacy reset call

Re: [PATCH qemu v2 2/3] hw/s390x: add SCLP event type CPI

2025-03-06 Thread shalini
On 2025-03-05 19:04, Thomas Huth wrote: On 24/02/2025 13.04, Shalini Chellathurai Saroja wrote: Implement the SCLP event type Control-Program Identification (CPI) in QEMU. This event is used to send CPI identifiers, which provide information about the guest OS to the host. Save the information

[qemu-web PATCH] download/windows: Drop link to 32-bit builds, add aarch64 instead

2025-03-06 Thread Thomas Huth
QEMU does not support 32-bit Windows anymore, so we should not tempt the users to download old builds. OTOH, there is now interest in Windows build on arm computers instead (see e.g. https://gitlab.com/qemu-project/qemu/-/issues/2850 ), so let's add a link to these builds instead. Signed-off-by: T

Re: [PATCH qemu v2 2/3] hw/s390x: add SCLP event type CPI

2025-03-06 Thread shalini
On 2025-03-05 20:00, Nina Schoetterl-Glausch wrote: On Wed, 2025-03-05 at 19:04 +0100, Thomas Huth wrote: [...] > + > +static int write_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr) > +{ > +ControlProgramIdMsg *cpi = container_of(evt_buf_hdr, ControlProgramIdMsg, > +

Re: [PATCH] hw/display/qxl-render.c: fix qxl_unpack_chunks() chunk size calculation

2025-03-06 Thread Michael Tokarev
A friendly ping? This one probably should go to qemu-stable too. Thanks, /mjt 21.02.2025 16:48, Michael Tokarev wrote: In case of multiple chunks, code in qxl_unpack_chunks() takes size of the wrong (next in the chain) chunk, instead of using current chunk size. This leads to wrong number of b

[PULL 03/10] qapi/introspect: Use @dataclass to simplify

2025-03-06 Thread Markus Armbruster
A TODO comment in class Annotated reminds us to simplify it once we can use @dataclass, new in Python 3.7. We have that now, so do it. There's a similar comment in scripts/qapi/source.py, but I can't figure out how to use @dataclass there. Left for another day. Signed-off-by: Markus Armbruster

Re: [RFC PATCH 2/4] hw/arm/raspi: Replace TARGET_AARCH64 by legacy_binary_is_64bit()

2025-03-06 Thread Thomas Huth
On 05/03/2025 20.07, Philippe Mathieu-Daudé wrote: On 5/3/25 19:35, Thomas Huth wrote: On 05/03/2025 19.12, Cédric Le Goater wrote: On 3/5/25 18:40, Thomas Huth wrote: On 05/03/2025 17.12, Philippe Mathieu-Daudé wrote: For legacy ARM binaries, legacy_binary_is_64bit() is equivalent of the com

Re: [RFC PATCH 2/4] hw/arm/raspi: Replace TARGET_AARCH64 by legacy_binary_is_64bit()

2025-03-06 Thread Peter Maydell
On Thu, 6 Mar 2025 at 09:21, Daniel P. Berrangé wrote: > > On Wed, Mar 05, 2025 at 05:12:46PM +0100, Philippe Mathieu-Daudé wrote: > > For legacy ARM binaries, legacy_binary_is_64bit() is > > equivalent of the compile time TARGET_AARCH64 definition. > > > > Use it as TypeInfo::registerable() callb

[PATCH 0/7] hw/hyperv: remove duplication compilation units

2025-03-06 Thread Pierrick Bouvier
Work towards having a single binary, by removing duplicated object files. hw/hyperv/hyperv.c was excluded at this time, because it depends on target dependent symbols: - from system/kvm.h - kvm_check_extension - kvm_vm_ioctl - from exec/cpu-all.h | memory_ldst_phys.h.inc - ldq_phys Pi

[PULL 09/10] qdev: Improve a few more PropertyInfo @description members

2025-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20250227085601.4140852-7-arm...@redhat.com> Reviewed-by: Daniel P. Berrangé --- hw/block/xen-block.c | 2 +- hw/core/qdev-properties-system.c | 2 +- hw/core/qdev-properties.c| 1 + hw/s390x/ccw-device.c| 4 ++-- targe

[PULL 05/10] qdev: Change qdev_prop_pci_devfn member @name from "int32" to "str"

2025-03-06 Thread Markus Armbruster
Properties using qdev_prop_pci_devfn initially accepted a string of the form "DEV.FN" or "DEV" where DEV and FN are in hexadecimal. Member @name was "pci-devfn" initially. Commit b403298adb5 (qdev: make the non-legacy pci address property accept an integer) changed them to additionally accept inte

[PULL 08/10] qdev: Improve PropertyInfo member @description for enum properties

2025-03-06 Thread Markus Armbruster
Consistently use format "DESCRIPTION (VALUE/VALUE...)". Signed-off-by: Markus Armbruster Message-ID: <20250227085601.4140852-6-arm...@redhat.com> Reviewed-by: Daniel P. Berrangé --- hw/core/qdev-properties-system.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(

[PULL 10/10] docs/devel/qapi-code-gen: Discourage use of 'prefix'

2025-03-06 Thread Markus Armbruster
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. Commit 7bbadc60b5..64f5e9db77 eliminated most uses. Discourage new ones. Signed-off-by: Markus Armbruster Message-ID: <20250228134335.132278-1-arm...@redh

Re: [BUG, RFC] cpr-transfer: qxl guest driver crashes after migration

2025-03-06 Thread Denis V. Lunev
On 3/5/25 22:19, Steven Sistare wrote: On 3/5/2025 11:50 AM, Andrey Drobyshev wrote: On 3/4/25 9:05 PM, Steven Sistare wrote: On 2/28/2025 1:37 PM, Andrey Drobyshev wrote: On 2/28/25 8:35 PM, Andrey Drobyshev wrote: On 2/28/25 8:20 PM, Steven Sistare wrote: On 2/28/2025 1:13 PM, Steven Sista

Re: [PATCH v6 30/36] vfio/migration: Multifd device state transfer support - send side

2025-03-06 Thread Cédric Le Goater
On 3/6/25 11:15, Maciej S. Szmigiero wrote: On 6.03.2025 07:47, Avihai Horon wrote: On 05/03/2025 0:03, Maciej S. Szmigiero wrote: External email: Use caution opening links or attachments From: "Maciej S. Szmigiero" Implement the multifd device state transfer via additional per-device thre

[PATCH v5 07/29] hw/intc/aspeed: Add object type name to trace events for better debugging

2025-03-06 Thread Jamin Lin via
Currently, these trace events only refer to INTC. To simplify the INTC model, both INTC(CPU Die) and INTCIO(IO Die) will share the same helper functions. However, it is difficult to recognize whether these trace events are comes from INTC or INTCIO. To make these trace events more readable, adds o

[PATCH v5 05/29] hw/intc/aspeed: Reduce regs array size by adding a register sub-region

2025-03-06 Thread Jamin Lin via
Currently, the size of the "regs" array is 0x2000, which is too large. So far, it only uses "GICINT128 to `GICINT134", and the offsets from 0 to 0x1000 are unused. To save code size and avoid mapping large unused gaps, update to only map the useful set of registers: INTC register [0x1000 – 0x1804]

[PATCH v5 04/29] hw/intc/aspeed: Support setting different register size

2025-03-06 Thread Jamin Lin via
Currently, the size of the regs array is 0x2000, which is too large. So far, it only use GICINT128 - GICINT134, and the offsets from 0 to 0x1000 are unused. To save code size, introduce a new class attribute "reg_size" to set the different register sizes for the INTC models in AST2700 and add a reg

[PATCH v5 25/29] tests/functional/aspeed: Introduce start_ast2700_test API

2025-03-06 Thread Jamin Lin via
Added a new method "start_ast2700_test" to the "AST2x00MachineSDK" class and this method centralizes the logic for starting the AST2700 test, making it reusable for different test cases. Signed-off-by: Jamin Lin --- tests/functional/test_aarch64_aspeed.py | 29 + 1 file c

[PATCH v5 12/29] hw/intc/aspeed: Add support for multiple output pins in INTC

2025-03-06 Thread Jamin Lin via
Added support for multiple output pins in the INTC controller to accommodate the AST2700 A1. Introduced "num_outpins" to represent the number of output pins. Updated the IRQ handling logic to initialize and connect output pins separately from input pins. Modified the "aspeed_soc_ast2700_realize" f

[PATCH v5 29/29] docs/specs: Add aspeed-intc

2025-03-06 Thread Jamin Lin via
Add AST2700 INTC design guidance and its block diagram. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- docs/specs/aspeed-intc.rst | 136 + docs/specs/index.rst | 1 + 2 files changed, 137 insertions(+) create mode 100644 docs/specs/aspeed

[PATCH v5 21/29] hw/arm/aspeed_ast27x0: Support two levels of INTC controllers for AST2700 A1

2025-03-06 Thread Jamin Lin via
The design of INTC controllers has significantly changed in AST2700 A1. There are a total of 480 interrupt sources in AST2700 A1. For interrupt numbers from 0 to 127, they can route directly to PSP, SSP, and TSP. Due to the limitation of interrupt numbers of processors, the interrupts are merged e

[PATCH v5 08/29] hw/arm/aspeed: Rename IRQ table and machine name for AST2700 A0

2025-03-06 Thread Jamin Lin via
Currently, AST2700 SoC only supports A0. To support AST2700 A1, rename its IRQ table and machine name. To follow the machine deprecation rule, the initial machine "ast2700-evb" is aliased to "ast2700a0-evb." In the future, we will alias "ast2700-evb" to new SoCs, such as "ast2700a1-evb." Signed-o

[PATCH v5 28/29] tests/functional/aspeed: Add test case for AST2700 A1

2025-03-06 Thread Jamin Lin via
Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_aarch64_aspeed.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/test_aarch64_aspeed.py index 8df6a97a28..c25c966278 100755 --- a/tests/fu

[PATCH v5 15/29] hw/intc/aspeed: Introduce IRQ handler function to reduce code duplication

2025-03-06 Thread Jamin Lin via
The behavior of the INTC set IRQ is almost identical between INTC and INTCIO. To reduce duplicated code, introduce the "aspeed_intc_set_irq_handler" function to handle both INTC and INTCIO IRQ behavior. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/intc/asp

[PATCH v5 02/29] hw/intc/aspeed: Rename status_addr and addr to status_reg and reg for clarity

2025-03-06 Thread Jamin Lin via
Rename the variables "status_addr" to "status_reg" and "addr" to "reg" because they are used as register index. This change makes the code more appropriate and improves readability. Signed-off-by: Jamin Lin --- hw/intc/aspeed_intc.c | 38 +++--- 1 file changed, 19

Re: [PATCH 04/12] rust: timer: wrap QEMUTimer with Opaque<> and express pinning requirements

2025-03-06 Thread Zhao Liu
> While neither is good, a zeroed area of memory behaves better than an > uninitialized one... In particular, Drop calls timer_del() which works fine > with a zeroed QEMUTimer. With Opaque::uninit() you could have a crash just > with > > drop(Timer::new()); Good point. > > // No compiling

Re: [RFC PATCH 04/18] qemu: Introduce 'qemu/legacy_binary_info.h'

2025-03-06 Thread Daniel P . Berrangé
On Thu, Mar 06, 2025 at 12:34:13PM +0100, Paolo Bonzini wrote: > Il gio 6 mar 2025, 10:27 Philippe Mathieu-Daudé ha > scritto: > > > This API is to allow refactoring code for heterogeneous emulation, > > without changing user-facing behavior of current qemu-system binaries, > > which I now consid

[PATCH v5 19/29] hw/arm/aspeed_ast27x0.c Support AST2700 A1 GIC Interrupt Mapping

2025-03-06 Thread Jamin Lin via
Currently, these IRQ tables support from GIC 128 - 136 for AST2700 A0. These IRQ tables can be reused for AST2700 A1 from GIC 192 - 197. Updates the interrupt mapping to include support for AST2700 A1 by extending the existing mappings to the new GIC range. Signed-off-by: Jamin Lin Reviewed-by: C

[PATCH v5 09/29] hw/arm/aspeed_ast27x0: Sort the IRQ table by IRQ number

2025-03-06 Thread Jamin Lin via
To improve readability, sort the IRQ table by IRQ number. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0.c | 50 - 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_as

  1   2   3   4   >