Re: [PATCH] pcie: Support PCIe Gen5/Gen6 link speeds

2024-02-15 Thread Manos Pitsidianakis
On Thu, 15 Feb 2024 03:23, Lukas Stockner wrote: This patch extends the PCIe link speed option so that slots can be configured as supporting 32GT/s (Gen5) or 64GT/s (Gen5) speeds. This is as simple as setting the appropriate bit in LnkCap2 and the appropriate value in LnkCap and LnkCtl2.

Re: [PATCH] target: hppa: Fix unaligned double word accesses for hppa64

2024-02-15 Thread Guenter Roeck
On 2/15/24 22:16, Richard Henderson wrote: On 2/15/24 19:34, Guenter Roeck wrote: -    env->psw = psw & ~(PSW_N | PSW_V | PSW_CB); +    if (hppa_is_pa20(env)) { +    env->psw = psw & ~(PSW_N | PSW_V | PSW_CB | 0xffull); +    } else { +    env->psw = psw & ~(PSW_N | PSW_V |

Re: [PATCH v2 1/2] qapi/migration.json: add reason to MIGRATION event

2024-02-15 Thread Markus Armbruster
Roman Khapov writes: > This commit adds the optional field reason for the events, which > contains the string, describing reason of status changing. > For example: reason of migration fail. > > Function migrate_set_state now accepts 4th argument: the reason to > pass to event. Every call of this

Re: [PATCH] target: hppa: Fix unaligned double word accesses for hppa64

2024-02-15 Thread Richard Henderson
On 2/15/24 19:34, Guenter Roeck wrote: -env->psw = psw & ~(PSW_N | PSW_V | PSW_CB); +if (hppa_is_pa20(env)) { +env->psw = psw & ~(PSW_N | PSW_V | PSW_CB | 0xffull); +} else { +env->psw = psw & ~(PSW_N | PSW_V | PSW_CB); +} There are never any bits above

[PATCH 4/4] target/riscv: Set the value of CSR tcontrol when mret is executed

2024-02-15 Thread Alvin Chang via
The RISC-V debug specification defines the following operation for CSR tcontrol when "mret" is executed: - tcontrol.MTE is set to the value of tcontrol.MPTE This commit implements the above operation into helper_mret(). Note that from tech-debug mailing list:

[PATCH 1/4] target/riscv: Add CSR tcontrol of debug trigger module

2024-02-15 Thread Alvin Chang via
The RISC-V debug specification defines an optional CSR "tcontrol" within the trigger module. This commit adds its read/write operations and related bit-field definitions. Signed-off-by: Alvin Chang --- target/riscv/cpu.h | 1 + target/riscv/cpu_bits.h | 3 +++ target/riscv/csr.c |

[PATCH 3/4] target/riscv: Set the value of CSR tcontrol when trapping to M-mode

2024-02-15 Thread Alvin Chang via
>From the RISC-V debug specification, it defines the following operations for CSR tcontrol when any trap into M-mode is taken: 1. tcontrol.MPTE is set to the value of tcontrol.MTE 2. tcontrol.MTE is set to 0 This commit implements the above operations into riscv_cpu_do_interrupt().

[PATCH 0/4] RISC-V: Implement CSR tcontrol in debug spec

2024-02-15 Thread Alvin Chang via
The RISC-V Debug specification defines CSR "tcontrol" in the trigger module: https://github.com/riscv/riscv-debug-spec This series implements it and the related operations. Alvin Chang (4): target/riscv: Add CSR tcontrol of debug trigger module target/riscv: Reset CSR tcontrol when the

[PATCH 2/4] target/riscv: Reset CSR tcontrol when the trigger module resets

2024-02-15 Thread Alvin Chang via
When the trigger module resets, reset the value of CSR tcontrol as zero. Signed-off-by: Alvin Chang --- target/riscv/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/debug.c b/target/riscv/debug.c index e30d99cc2f..e3832a643e 100644 --- a/target/riscv/debug.c +++

Re: [PATCH] target: hppa: Fix unaligned double word accesses for hppa64

2024-02-15 Thread Helge Deller
On 2/16/24 06:58, Charlie Jenkins wrote: On Thu, Feb 15, 2024 at 09:34:15PM -0800, Guenter Roeck wrote: Unaligned 64-bit accesses were found in Linux to clobber carry bits, resulting in bad results if an arithmetic operation involving a carry bit was executed after an unaligned 64-bit

[PATCH] target: hppa: Fix unaligned double word accesses for hppa64

2024-02-15 Thread Guenter Roeck
Unaligned 64-bit accesses were found in Linux to clobber carry bits, resulting in bad results if an arithmetic operation involving a carry bit was executed after an unaligned 64-bit operation. hppa 2.0 defines additional carry bits in PSW register bits 32..39. When restoring PSW after executing

Re: [PATCH v6 2/3] Add RISC-V IOPMP support

2024-02-15 Thread Ethan Chen via
On Wed, Feb 14, 2024 at 11:34:55AM -0300, Daniel Henrique Barboza wrote: > > > On 2/7/24 06:34, Ethan Chen wrote: > > Support specification Version 1.0.0-draft4 rapid-k model. > > The specification url: > > https://github.com/riscv-non-isa/iopmp-spec/blob/main/riscv_iopmp_specification.pdf > > >

Re: [PATCH v3 2/2] target/riscv: UPDATE xATP write CSR

2024-02-15 Thread Alistair Francis
On Wed, Jan 10, 2024 at 2:07 AM Irina Ryapolova wrote: > > Added xATP_MODE validation for vsatp/hgatp CSRs. > The xATP register is an SXLEN-bit read/write WARL register, so > the legal value must be returned (See riscv-privileged-20211203, > SATP/VSATP/HGATP CSRs). > > Signed-off-by: Irina

Re: [PATCH v3 3/6] target/riscv: add remaining named features

2024-02-15 Thread Alistair Francis
On Fri, Feb 16, 2024 at 6:00 AM Conor Dooley wrote: > > On Thu, Feb 15, 2024 at 08:11:45PM +0100, Andrew Jones wrote: > > On Thu, Feb 15, 2024 at 04:34:32PM +, Conor Dooley wrote: > > > On Thu, Feb 15, 2024 at 03:26:18PM +0100, Andrew Jones wrote: > > > > On Thu, Feb 15, 2024 at 01:33:47PM

[PATCH] docs/system/ppc: Document running Linux on AmigaNG machines

2024-02-15 Thread BALATON Zoltan
Documentation on how to run Linux on the amigaone, pegasos2 and sam460ex machines is currently burried in the depths of the qemu-devel mailing list and in the source code. Let's collect the information in the QEMU handbook for a one stop solution. Co-authored-by: Bernhard Beschow Signed-off-by:

Re: [PATCH v4 0/6] riscv: named features riscv,isa, 'svade' rework

2024-02-15 Thread Alistair Francis
On Fri, Feb 16, 2024 at 8:41 AM Daniel Henrique Barboza wrote: > > Hi, > > This new version is rebased with alistair/riscv-to-apply.next and with > more acks added. > > No other changes made. > > Changes from v3: > - rebased with alistair/riscv-to-apply.next @ c93c42a273 > - v3 link: >

Re: [PATCH v4 00/10] Optimize buffer_is_zero

2024-02-15 Thread Alexander Monakov
On Thu, 15 Feb 2024, Richard Henderson wrote: > > Converting a 4.4 GiB Windows 10 image to qcow2. It was mentioned in v1 and > > v2, > > are you saying they did not reach your inbox? > > https://lore.kernel.org/qemu-devel/20231013155856.21475-1-mmroma...@ispras.ru/ > >

[PATCH v4 6/6] target/riscv: Promote svade to a normal extension

2024-02-15 Thread Daniel Henrique Barboza
From: Andrew Jones Named features are extensions which don't make sense for users to control and are therefore not exposed on the command line. However, svade is an extension which makes sense for users to control, so treat it like a "normal" extension. The default is false, even for the max cpu

[PATCH v4 0/6] riscv: named features riscv,isa, 'svade' rework

2024-02-15 Thread Daniel Henrique Barboza
Hi, This new version is rebased with alistair/riscv-to-apply.next and with more acks added. No other changes made. Changes from v3: - rebased with alistair/riscv-to-apply.next @ c93c42a273 - v3 link: https://lore.kernel.org/qemu-riscv/20240202152154.773253-1-dbarb...@ventanamicro.com/ Andrew

[PATCH v4 5/6] target/riscv: Gate hardware A/D PTE bit updating

2024-02-15 Thread Daniel Henrique Barboza
From: Andrew Jones Gate hardware A/D PTE bit updating on {m,h}envcfg.ADUE and only enable menvcfg.ADUE on reset if svade has not been selected. Now that we also consider svade, we have four possible configurations: 1) !svade && !svadu use hardware updating and there's no way to disable it

[PATCH v4 2/6] target/riscv: add riscv,isa to named features

2024-02-15 Thread Daniel Henrique Barboza
Further discussions after the introduction of rva22 support in QEMU revealed that what we've been calling 'named features' are actually regular extensions, with their respective riscv,isa DTs. This is clarified in [1]. [2] is a bug tracker asking for the profile spec to be less cryptic about it.

[PATCH v4 4/6] target/riscv: Reset henvcfg to zero

2024-02-15 Thread Daniel Henrique Barboza
From: Andrew Jones The hypervisor should decide what it wants to enable. Zero all configuration enable bits on reset. Also, commit ed67d63798f2 ("target/riscv: Update CSR bits name for svadu extension") missed one reference to 'hade'. Change it now. Fixes: 0af3f115e68e ("target/riscv: Add

[PATCH v4 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profile()

2024-02-15 Thread Daniel Henrique Barboza
Recent changes in options handling removed the 'mmu' default the bare CPUs had, meaning that we must enable 'mmu' by hand when using the rva22s64 profile CPU. Given that this profile is setting a satp mode, it already implies that we need a 'mmu'. Enable the 'mmu' in this case. Signed-off-by:

[PATCH v4 3/6] target/riscv: add remaining named features

2024-02-15 Thread Daniel Henrique Barboza
The RVA22U64 and RVA22S64 profiles mandates certain extensions that, until now, we were implying that they were available. We can't do this anymore since named features also has a riscv,isa entry. Let's add them to riscv_cpu_named_features[]. Instead of adding one bool for each named feature

Re: [PATCH v4 00/10] Optimize buffer_is_zero

2024-02-15 Thread Richard Henderson
On 2/15/24 11:36, Alexander Monakov wrote: On Thu, 15 Feb 2024, Richard Henderson wrote: On 2/14/24 22:57, Alexander Monakov wrote: On Wed, 14 Feb 2024, Richard Henderson wrote: v3: https://patchew.org/QEMU/20240206204809.9859-1-amona...@ispras.ru/ Changes for v4: - Keep separate >=

Re: [PATCH] target/arm: Advertise Cortex-A53 erratum #843419 fix via REVIDR

2024-02-15 Thread Ard Biesheuvel
On Thu, 15 Feb 2024 at 21:47, Richard Henderson wrote: > > On 2/15/24 06:02, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > The Cortex-A53 r0p4 revision that QEMU emulates is affected by a CatA > > erratum #843419 (i.e., the most severe), which requires workarounds in > > the toolchain

Re: [PATCH v4 00/10] Optimize buffer_is_zero

2024-02-15 Thread Alexander Monakov
On Thu, 15 Feb 2024, Richard Henderson wrote: > On 2/14/24 22:57, Alexander Monakov wrote: > > > > On Wed, 14 Feb 2024, Richard Henderson wrote: > > > >> v3: https://patchew.org/QEMU/20240206204809.9859-1-amona...@ispras.ru/ > >> > >> Changes for v4: > >>- Keep separate >= 256 entry

Re: [PATCH v3 0/6] riscv: named features riscv,isa, 'svade' rework

2024-02-15 Thread Daniel Henrique Barboza
On 2/15/24 06:52, Alistair Francis wrote: On Sat, Feb 3, 2024 at 1:23 AM Daniel Henrique Barboza wrote: Hi, In this new version we changed patch 3 as suggested by Alistair in v1 [1]. Instead of creating individual always-true bool for each named feature, create a bool flag will be always

Re: [PATCH v4 00/10] Optimize buffer_is_zero

2024-02-15 Thread Richard Henderson
On 2/14/24 22:57, Alexander Monakov wrote: On Wed, 14 Feb 2024, Richard Henderson wrote: v3: https://patchew.org/QEMU/20240206204809.9859-1-amona...@ispras.ru/ Changes for v4: - Keep separate >= 256 entry point, but only keep constant length check inline. This allows the indirect

Re: [PATCH v4 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-02-15 Thread Richard Henderson
On 2/15/24 08:46, Alexander Monakov wrote: Right, so we can pick the cheapest reduction method, and if I'm reading Neoverse-N1 SOG right, SHRN is marginally cheaper than ADDV (latency 2 instead of 3), and it should be generally preferable on other cores, no? Fair. For that matter, cannot

Re: [RFC PATCH 3/6] target/riscv: Inline vext_ldst_us and coressponding function for performance

2024-02-15 Thread Daniel Henrique Barboza
On 2/15/24 16:28, Max Chou wrote: In the vector unit-stride load/store helper functions. the vext_ldst_us function corresponding most of the execution time. Inline the functions can avoid the function call overhead to imperove the helper function performance. Signed-off-by: Max Chou ---

Re: [PATCH v2 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-15 Thread Davidlohr Bueso
On Fri, 24 Nov 2023, shiju.j...@huawei.com wrote: From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control feature. The device patrol scrub proactively locates and makes corrections to errors in regular cycle. The patrol scrub control allows the request to

support for having both 32 and 64 bit RISC-V CPUs in one QEMU machine

2024-02-15 Thread Igor Lesik
Hi, I have a situation when I need to use third-party 32-bit RISC-V CPU when rest is all 64-bit RISC-V CPUs. I have seen that some steps were already made in the direction to enable such configuration

Re: [PATCH] target/arm: Advertise Cortex-A53 erratum #843419 fix via REVIDR

2024-02-15 Thread Richard Henderson
On 2/15/24 06:02, Ard Biesheuvel wrote: From: Ard Biesheuvel The Cortex-A53 r0p4 revision that QEMU emulates is affected by a CatA erratum #843419 (i.e., the most severe), which requires workarounds in the toolchain as well as the OS. Since the emulation is obviously not affected in the same

Re: [RFC PATCH 0/6] Improve the performance of RISC-V vector unit-stride ld/st instructions

2024-02-15 Thread Richard Henderson
On 2/15/24 09:28, Max Chou wrote: Hi all, When glibc with RVV support [1], the memcpy benchmark will run 2x to 60x slower than the scalar equivalent on QEMU and it hurts developer productivity. From the performance analysis result, we can observe that the glibc memcpy spends most of the time

Re: [RFC PATCH 2/6] accel/tcg: Avoid uncessary call overhead from qemu_plugin_vcpu_mem_cb

2024-02-15 Thread Daniel Henrique Barboza
On 2/15/24 16:28, Max Chou wrote: If there are not any QEMU plugin memory callback functions, checking before calling the qemu_plugin_vcpu_mem_cb function can reduce the function call overhead. Signed-off-by: Max Chou --- This was in my TODO list for some time. Thanks for looking it up.

Re: [PATCH 0/7] hw/i386: Cleanups around 'hw/i386/pc.h'

2024-02-15 Thread Bernhard Beschow
Am 13. Februar 2024 16:00:26 UTC schrieb "Philippe Mathieu-Daudé" : >On 13/2/24 16:55, Michael S. Tsirkin wrote: >> On Tue, Feb 13, 2024 at 01:01:45PM +0100, Philippe Mathieu-Daudé wrote: >>> Trivial patches removing uses of "hw/i386/pc.h". >> >> How did you test that it's indeed unused? > >I

Re: [RFC PATCH 5/6] accel/tcg: Inline do_ld1_mmu function

2024-02-15 Thread Richard Henderson
On 2/15/24 09:28, Max Chou wrote: Signed-off-by: Max Chou --- accel/tcg/user-exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index c5453810eee..803c271df11 100644 --- a/accel/tcg/user-exec.c +++

Re: [RFC PATCH 4/6] accel/tcg: Inline cpu_mmu_lookup function

2024-02-15 Thread Richard Henderson
On 2/15/24 09:28, Max Chou wrote: Signed-off-by: Max Chou --- accel/tcg/user-exec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 68b252cb8e8..c5453810eee 100644 --- a/accel/tcg/user-exec.c +++

Re: [RFC PATCH 3/6] target/riscv: Inline vext_ldst_us and coressponding function for performance

2024-02-15 Thread Richard Henderson
On 2/15/24 09:28, Max Chou wrote: /* unmasked unit-stride load and store operation */ -static void +static inline QEMU_ALWAYS_INLINE void vext_ldst_us(void *vd, target_ulong base, CPURISCVState *env, uint32_t desc, vext_ldst_elem_fn *ldst_elem, uint32_t log2_esz, uint32_t evl,

Re: [RFC PATCH] tests/tcg: update licenses to GPLv2 as intended

2024-02-15 Thread Philippe Mathieu-Daudé
On 15/2/24 19:40, Alex Bennée wrote: My default header template is GPLv3 but for QEMU code we really should stick to GPLv2-or-later (allowing others to up-license it if they wish). While this is test code we should still be consistent on the source distribution. I wrote all of this code so its

Re: [RFC PATCH 2/6] accel/tcg: Avoid uncessary call overhead from qemu_plugin_vcpu_mem_cb

2024-02-15 Thread Richard Henderson
On 2/15/24 09:28, Max Chou wrote: If there are not any QEMU plugin memory callback functions, checking before calling the qemu_plugin_vcpu_mem_cb function can reduce the function call overhead. Signed-off-by: Max Chou --- accel/tcg/ldst_common.c.inc | 40 +++--

Re: [PATCH v3 3/6] target/riscv: add remaining named features

2024-02-15 Thread Conor Dooley
On Thu, Feb 15, 2024 at 08:11:45PM +0100, Andrew Jones wrote: > On Thu, Feb 15, 2024 at 04:34:32PM +, Conor Dooley wrote: > > On Thu, Feb 15, 2024 at 03:26:18PM +0100, Andrew Jones wrote: > > > On Thu, Feb 15, 2024 at 01:33:47PM +, Conor Dooley wrote: > > > > On Fri, Feb 02, 2024 at

Re: [PATCH] target/ppc: BHRB avoid using host pointer in translated code

2024-02-15 Thread Richard Henderson
On 2/15/24 07:15, Nicholas Piggin wrote: diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 731dd8df35..3541cd83cd 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -724,7 +724,7 @@ static const VMStateDescription vmstate_bhrb = { .minimum_version_id = 1,

Re: [PATCH 2/3] target/i386: Enable page walking from MMIO memory

2024-02-15 Thread Richard Henderson
On 2/15/24 09:21, Richard Henderson wrote: On 2/15/24 05:01, Jonathan Cameron wrote: -static bool ptw_translate(PTETranslate *inout, hwaddr addr) +static bool ptw_translate(PTETranslate *inout, hwaddr addr, uint64_t ra) You do not need to pass in 'ra' here...   flags =

Re: [PATCH 3/3] tcg: Avoid double lock if page tables happen to be in mmio memory.

2024-02-15 Thread Richard Henderson
On 2/15/24 05:01, Jonathan Cameron wrote: On i386, after fixing the page walking code to work with pages in MMIO memory (specifically CXL emulated interleaved memory), a crash was seen in an interrupt handling path. Useful part of bt Peter identified this as being due to the BQL already being

[RFC PATCH 6/6] accel/tcg: Inline do_st1_mmu function

2024-02-15 Thread Max Chou
Signed-off-by: Max Chou --- accel/tcg/user-exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 803c271df11..9ef35a22279 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1050,8 +1050,9 @@ static

[RFC PATCH 2/6] accel/tcg: Avoid uncessary call overhead from qemu_plugin_vcpu_mem_cb

2024-02-15 Thread Max Chou
If there are not any QEMU plugin memory callback functions, checking before calling the qemu_plugin_vcpu_mem_cb function can reduce the function call overhead. Signed-off-by: Max Chou --- accel/tcg/ldst_common.c.inc | 40 +++-- 1 file changed, 30 insertions(+),

[RFC PATCH 3/6] target/riscv: Inline vext_ldst_us and coressponding function for performance

2024-02-15 Thread Max Chou
In the vector unit-stride load/store helper functions. the vext_ldst_us function corresponding most of the execution time. Inline the functions can avoid the function call overhead to imperove the helper function performance. Signed-off-by: Max Chou --- target/riscv/vector_helper.c | 30

[RFC PATCH 4/6] accel/tcg: Inline cpu_mmu_lookup function

2024-02-15 Thread Max Chou
Signed-off-by: Max Chou --- accel/tcg/user-exec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 68b252cb8e8..c5453810eee 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -942,8 +942,11 @@ void

[RFC PATCH 5/6] accel/tcg: Inline do_ld1_mmu function

2024-02-15 Thread Max Chou
Signed-off-by: Max Chou --- accel/tcg/user-exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index c5453810eee..803c271df11 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -963,8 +963,9 @@ static inline

[RFC PATCH 1/6] target/riscv: Seperate vector segment ld/st instructions

2024-02-15 Thread Max Chou
This commit seperate the helper function implementations of vector segment load/store instructions from other vector load/store instructions. This can improve performance by avoiding unnecessary segment operation when NF = 1. Signed-off-by: Max Chou --- target/riscv/helper.h |

[RFC PATCH 0/6] Improve the performance of RISC-V vector unit-stride ld/st instructions

2024-02-15 Thread Max Chou
Hi all, When glibc with RVV support [1], the memcpy benchmark will run 2x to 60x slower than the scalar equivalent on QEMU and it hurts developer productivity. >From the performance analysis result, we can observe that the glibc memcpy spends most of the time in the vector unit-stride load/store

Re: [PATCH 2/3] target/i386: Enable page walking from MMIO memory

2024-02-15 Thread Richard Henderson
On 2/15/24 05:01, Jonathan Cameron wrote: -static bool ptw_translate(PTETranslate *inout, hwaddr addr) +static bool ptw_translate(PTETranslate *inout, hwaddr addr, uint64_t ra) You do not need to pass in 'ra' here... flags = probe_access_full(inout->env, addr, 0, MMU_DATA_STORE, -

Re: [PATCH v3 3/6] target/riscv: add remaining named features

2024-02-15 Thread Andrew Jones
On Thu, Feb 15, 2024 at 04:34:32PM +, Conor Dooley wrote: > On Thu, Feb 15, 2024 at 03:26:18PM +0100, Andrew Jones wrote: > > On Thu, Feb 15, 2024 at 01:33:47PM +, Conor Dooley wrote: > > > On Fri, Feb 02, 2024 at 12:21:51PM -0300, Daniel Henrique Barboza wrote: > > > > The RVA22U64 and

Re: [PATCH 1/3] accel/tcg: Set can_do_io at at start of lookup_tb_ptr helper

2024-02-15 Thread Richard Henderson
On 2/15/24 05:01, Jonathan Cameron wrote: From: Peter Maydell Peter posted this in the thread trying to fix x86 TCG handling of page tables in MMIO space (specifically emulated CXL interleaved memory)

Re: [PATCH v2 3/3] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-02-15 Thread fan
On Fri, Nov 24, 2023 at 09:53:37PM +0800, shiju.j...@huawei.com wrote: > From: Shiju Jose > > CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS) > control feature. > > The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM > Specification (JESD79-5) and

Re: [RFC PATCH] tests/tcg: update licenses to GPLv2 as intended

2024-02-15 Thread Peter Maydell
On Thu, 15 Feb 2024 at 18:40, Alex Bennée wrote: > > My default header template is GPLv3 but for QEMU code we really should > stick to GPLv2-or-later (allowing others to up-license it if they > wish). While this is test code we should still be consistent on the > source distribution. Test code,

Re: [PATCH] .gitlab-ci/windows.yml: Don't install libusb or spice packages on 32-bit

2024-02-15 Thread Michael Tokarev
15.02.2024 18:50, Peter Maydell пишет: When msys2 updated their libusb packages to libusb 1.0.27, they dropped support for building them for mingw32, leaving only mingw64 packages. This broke our CI job, as the 'pacman' package install now fails with: error: target not found:

Re: [PATCH v2 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-15 Thread fan
On Fri, Nov 24, 2023 at 09:53:36PM +0800, shiju.j...@huawei.com wrote: > From: Shiju Jose > > CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control > feature. The device patrol scrub proactively locates and makes corrections > to errors in regular cycle. The patrol scrub

Re: [PATCH v4 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-02-15 Thread Alexander Monakov
On Thu, 15 Feb 2024, Richard Henderson wrote: > On 2/14/24 22:47, Alexander Monakov wrote: > > > > On Wed, 14 Feb 2024, Richard Henderson wrote: > > > >> Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely > >> double-check with the compiler flags for __ARM_NEON and don't

[RFC PATCH] tests/tcg: update licenses to GPLv2 as intended

2024-02-15 Thread Alex Bennée
My default header template is GPLv3 but for QEMU code we really should stick to GPLv2-or-later (allowing others to up-license it if they wish). While this is test code we should still be consistent on the source distribution. I wrote all of this code so its not a problem. However there remains

[PULL 23/56] hw/ppc/prep: Realize ISA bridge before accessing it

2024-02-15 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-6-phi...@linaro.org> --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 0/3] hw/cxl/cxl-mailbox-utils: Add feature commands, device patrol scrub control and DDR5 ECS control features

2024-02-15 Thread fan
On Fri, Nov 24, 2023 at 09:53:34PM +0800, shiju.j...@huawei.com wrote: > From: Shiju Jose > > Add support for the feature commands, device patrol scrub control and > DDR5 ECS control features. > > CXL spec 3.0 section 8.2.9.6 describes optional device specific features. > CXL spec 3.1 section

[PULL 33/56] hw/sparc/grlib: split out the headers for each peripherals

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot Split out the headers for each peripherals and move them in their right hardware directory. Update Copyright and add SPDX-License-Identifier at the same time. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 13/56] target/mips: Remove CPUMIPSState::CP0_SAARI field

2024-02-15 Thread Philippe Mathieu-Daudé
Remove the unused CP0_SAARI register. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-10-phi...@linaro.org> --- target/mips/cpu.h| 1 - target/mips/sysemu/machine.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff

[PULL 36/56] hw/intc/grlib_irqmp: implements multicore irq

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot Now there is an ncpus property, use it in order to deliver the IRQ to multiple CPU. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-5-chi...@adacore.com> Signed-off-by: Philippe

[PULL 22/56] hw/i386/q35: Realize LPC PCI function before accessing it

2024-02-15 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Damien Hedde Reviewed-by: BALATON Zoltan Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-5-phi...@linaro.org> --- hw/i386/pc_q35.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PULL 45/56] MAINTAINERS: Add myself as reviewer for TCG Plugins

2024-02-15 Thread Philippe Mathieu-Daudé
From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier Message-ID: <20240118032400.3762658-14-pierrick.bouv...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS

[PULL 46/56] hw/i386/q35: Simplify pc_q35_init() since PCI is always enabled

2024-02-15 Thread Philippe Mathieu-Daudé
We can not create the Q35 machine without PCI, so simplify pc_q35_init() removing pointless checks. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240213041952.58840-1-phi...@linaro.org> --- hw/i386/pc_q35.c | 32 ++-- 1 file

[PULL 55/56] hw/ide/ahci: Move SysBus definitions to 'ahci-sysbus.h'

2024-02-15 Thread Philippe Mathieu-Daudé
Keep "hw/ide/ahci.h" AHCI-generic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm Reviewed-by: Michael S. Tsirkin Message-Id: <20240213081201.78951-10-phi...@linaro.org> --- include/hw/arm/allwinner-a10.h | 2 +- include/hw/arm/allwinner-r40.h | 2 +-

[PULL 37/56] target/sparc: implement asr17 feature for smp

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot This allows the guest program to know its cpu id. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-6-chi...@adacore.com> Signed-off-by: Philippe

[PULL 54/56] hw/ide/ahci: Remove SysbusAHCIState::num_ports field

2024-02-15 Thread Philippe Mathieu-Daudé
No need to duplicate AHCIState::ports, directly access it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-9-phi...@linaro.org> --- include/hw/ide/ahci.h | 1 - hw/ide/ahci.c | 3 +-- 2 files

Re: [PATCH v2 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2024-02-15 Thread fan
On Fri, Nov 24, 2023 at 09:53:35PM +0800, shiju.j...@huawei.com wrote: > From: Shiju Jose > > CXL spec 3.0 section 8.2.9.6 describes optional device specific features. > CXL devices supports features with changeable attributes. > Get Supported Features retrieves the list of supported device

[PULL 53/56] hw/ide/ahci: Do not pass 'ports' argument to ahci_realize()

2024-02-15 Thread Philippe Mathieu-Daudé
Explicitly set AHCIState::ports before calling ahci_realize(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-8-phi...@linaro.org> --- hw/ide/ahci_internal.h | 2 +- hw/ide/ahci.c | 9 +

[PULL 43/56] hw/sparc/leon3: Initialize GPIO before realizing CPU devices

2024-02-15 Thread Philippe Mathieu-Daudé
Inline cpu_create() in order to call qdev_init_gpio_in_named() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Message-Id: <20240215144623.76233-4-phi...@linaro.org> --- hw/sparc/leon3.c | 7 --- 1 file changed, 4

[PULL 47/56] hw/i386/q35: Use DEVICE() cast macro with PCIDevice object

2024-02-15 Thread Philippe Mathieu-Daudé
QDev API provides the DEVICE() macro to access the 'qdev' parent field of the PCIDevice structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-2-phi...@linaro.org> --- hw/i386/pc_q35.c | 4 ++-- 1 file

[PULL 56/56] hw/ide/ich9: Use AHCIPCIState typedef

2024-02-15 Thread Philippe Mathieu-Daudé
QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20240208181245.96617-2-phi...@linaro.org> --- hw/ide/ich.c | 6 +++---

[PULL 51/56] hw/ide/ahci: Pass AHCI context to ahci_ide_create_devs()

2024-02-15 Thread Philippe Mathieu-Daudé
Since ahci_ide_create_devs() is not PCI specific, pass it an AHCIState argument instead of PCIDevice. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-6-phi...@linaro.org> --- include/hw/ide/ahci.h | 2 +-

[PULL 42/56] hw/sparc/leon3: Pass DeviceState opaque argument to leon3_start_cpu()

2024-02-15 Thread Philippe Mathieu-Daudé
By passing a DeviceState context to a QDev IRQ handler, we can simplify and use qdev_init_gpio_in_named() instead of qdev_init_gpio_in_named_with_opaque(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <20240215144623.76233-3-phi...@linaro.org> ---

[PULL 26/56] hw/dma: Pass parent object to i8257_dma_init()

2024-02-15 Thread Philippe Mathieu-Daudé
Set I8257 instances parent (migration isn't affected). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240213114426.87836-1-phi...@linaro.org> --- include/hw/dma/i8257.h | 2 +- hw/dma/i82374.c| 2 +- hw/dma/i8257.c | 4 +++-

[PULL 44/56] MAINTAINERS: replace Fabien by myself as Leon3 maintainer

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot CC: Fabien Chouteau Signed-off-by: Clément Chigot Reviewed-by: Fabien Chouteau Message-ID: <20240131085047.18458-10-chi...@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS

[PULL 48/56] hw/ide/ahci: Expose AHCIPCIState structure

2024-02-15 Thread Philippe Mathieu-Daudé
In order to be able to QOM-embed a structure, we need its full definition. Move it from "ahci_internal.h" to the new "hw/ide/ahci-pci.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id:

[PULL 17/56] hw/isa: fix ISA_SUPERIO dependencies

2024-02-15 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini ISA_SUPERIO does not provide an ISA bus, so it should not select the symbol: instead it requires one. Among its users, VT82C686 is the only one that is a PCI-ISA bridge and does not already select ISA_BUS. Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé

[PULL 40/56] hw/sparc/leon3: check cpu_id in the tiny bootloader

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot Now that SMP is possible, the asr17 must be checked in the little boot code or the secondary CPU will reinitialize the Timer and the Uart. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 50/56] hw/ide/ahci: Inline ahci_get_num_ports()

2024-02-15 Thread Philippe Mathieu-Daudé
Introduce the 'ich9' variable and inline ahci_get_num_ports(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-5-phi...@linaro.org> --- include/hw/ide/ahci.h | 1 - hw/i386/pc_q35.c | 6 --

[PULL 14/56] target/mips: Remove the unused DisasContext::saar field

2024-02-15 Thread Philippe Mathieu-Daudé
DisasContext::saar is not used, remove it. Reported-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-11-phi...@linaro.org> --- target/mips/tcg/translate.h | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL 39/56] hw/sparc/leon3: implement multiprocessor

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot This allows to register more than one CPU on the leon3_generic machine. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Message-ID: <20240131085047.18458-8-chi...@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 93

[PULL 49/56] hw/ide/ahci: Rename AHCI PCI function as 'pdev'

2024-02-15 Thread Philippe Mathieu-Daudé
We want to access AHCIPCIState::ahci field. In order to keep the code simple (avoiding >ahci), rename the current 'ahci' variable as 'pdev' Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id:

[PULL 15/56] hw/isa: clean up Kconfig selections for ISA_SUPERIO

2024-02-15 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini All users of ISA_SUPERIO include a floppy disk controller, serial port and parallel port via the automatic creation mechanism of isa-superio.c. Select the symbol and remove it from the dependents. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini Message-ID:

[PULL 06/56] target/mips: Remove MIPSITUState::itu field

2024-02-15 Thread Philippe Mathieu-Daudé
Previous commits removed the MT*C0(SAAR) helpers which were using CPUMIPSState::itu, we can now remove it too. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-4-phi...@linaro.org> --- target/mips/cpu.h | 1 - hw/mips/cps.c | 1 - 2

[PULL 52/56] hw/ide/ahci: Convert AHCIState::ports to unsigned

2024-02-15 Thread Philippe Mathieu-Daudé
AHCIState::ports should be unsigned. Besides, we never check it for negative value. It is unlikely it was ever used with more than INT32_MAX ports, so it is safe to convert it to unsigned. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson

[PULL 34/56] hw/intc/grlib_irqmp: add ncpus property

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot This adds a "ncpus" property to the "grlib-irqmp" device to be used later, this required a little refactoring of how we initialize the device (ie: use realize instead of init). Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe

[PULL 27/56] hw/sparc/sun4m: Realize DMA controller before accessing it

2024-02-15 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-9-phi...@linaro.org> --- hw/sparc/sun4m.c | 7 +-- 1 file changed, 5 insertions(+),

[PULL 38/56] hw/sparc/leon3: remove SP initialization

2024-02-15 Thread Philippe Mathieu-Daudé
From: Clément Chigot According to the doc (see §4.2.15 in [1]), the reset operation should not impact %SP. [1] https://gaisler.com/doc/gr712rc-usermanual.pdf Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-7-chi...@adacore.com>

[PULL 32/56] hw/sparc/leon3: Have write_bootloader() take a void pointer argument

2024-02-15 Thread Philippe Mathieu-Daudé
Directly use the void pointer argument returned by memory_region_get_ram_ptr(). Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240215132824.67363-3-phi...@linaro.org> --- hw/sparc/leon3.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

[PULL 21/56] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary

2024-02-15 Thread Philippe Mathieu-Daudé
Instead of filling an array of all the possible IRQs, only call qdev_get_gpio_in() when an IRQ is used. Remove the array from RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori

[PULL 41/56] hw/sparc/leon3: Pass DeviceState opaque argument to leon3_set_pil_in()

2024-02-15 Thread Philippe Mathieu-Daudé
By passing a DeviceState context to a QDev IRQ handler, we can simplify and use qdev_init_gpio_in_named() instead of qdev_init_gpio_in_named_with_opaque(). Suggested-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id:

[PULL 19/56] hw/isa: extract FDC37M81X to a separate file

2024-02-15 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini isa-superio.c currently defines a SuperIO chip that is not used by any other user of the file. Extract the chip to a separate file. Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini Message-ID: <20240213155005.109954-7-pbonz...@redhat.com> [PMD: Update

[PULL 31/56] hw/sparc/leon3: Remove unused 'env' argument of write_bootloader()

2024-02-15 Thread Philippe Mathieu-Daudé
'CPUSPARCState *env' argument is unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20240215132824.67363-2-phi...@linaro.org> --- hw/sparc/leon3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c

  1   2   3   4   >