[PATCH 0/2] chardev: fixes for recent record/replay on muxed

2024-08-27 Thread Nicholas Piggin
Fix a couple of issues that Peter found with recent record/replay fix for muxed device. Thanks, Nick Nicholas Piggin (2): chardev: Fix record/replay error path NULL deref in device creation chardev: Remove __-prefixed names chardev/char.c | 22 -- 1 file changed, 12

[PATCH 1/2] chardev: Fix record/replay error path NULL deref in device creation

2024-08-27 Thread Nicholas Piggin
verity CID 1559470 Fixes: 4c193bb129dae ("chardev: set record/replay on the base device of a muxed device") Signed-off-by: Nicholas Piggin --- chardev/char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index ba847b6e9e..47a744ebeb

[PATCH 2/2] chardev: Remove __-prefixed names

2024-08-27 Thread Nicholas Piggin
Peter points out double underscore prefix names tend to be reserved for the system. Clean these up. Suggested-by: Peter Maydell Signed-off-by: Nicholas Piggin --- chardev/char.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/chardev/char.c b/chardev

Re: [PATCH v2 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-15 Thread Nicholas Piggin
On Fri Aug 16, 2024 at 12:28 AM AEST, Michael S. Tsirkin wrote: > On Thu, Aug 15, 2024 at 05:12:32PM +1000, Nicholas Piggin wrote: > > Could be a good idea. Although I'm not sure what to do with > > all types, maybe we can restrict what is supported. > > > > > I

Re: [RFC PATCH 0/2] async: rework async event API for replay

2024-08-15 Thread Nicholas Piggin
On Fri Aug 16, 2024 at 1:30 AM AEST, Michael S. Tsirkin wrote: > On Thu, Aug 15, 2024 at 11:28:35PM +1000, Nicholas Piggin wrote: > > Continuing the conversation from the thread about record/replay > > virtio fix. Here is a sketch of how we could improve the naming > > conv

Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-15 Thread Nicholas Piggin
On Fri Aug 16, 2024 at 3:52 AM AEST, Cédric Le Goater wrote: > On 8/15/24 09:31, Nicholas Piggin wrote: > > On Tue Aug 13, 2024 at 11:45 PM AEST, Aditya Gupta wrote: > >> Currently any device tree passed with -dtb option in QEMU, was ignored > >> by the PowerNV code.

[RFC PATCH 0/2] async: rework async event API for replay

2024-08-15 Thread Nicholas Piggin
Continuing the conversation from the thread about record/replay virtio fix. Here is a sketch of how we could improve the naming convention so users of bh don't have to know about record/replay. Thanks, Nick Nicholas Piggin (2): async: rework async event API for replay async: add debu

[RFC PATCH 1/2] async: rework async event API for replay

2024-08-15 Thread Nicholas Piggin
Replace the functions replay_bh_schedule_event() and replay_bh_schedule_oneshot_event() with qemu_bh_schedule_event() and aio_bh_schedule_oneshot_event(), respectively. Signed-off-by: Nicholas Piggin --- docs/devel/replay.rst | 7 --- include/block/aio.h | 35

[RFC PATCH 2/2] async: add debugging assertions for record/replay in bh APIs

2024-08-15 Thread Nicholas Piggin
Code using old bh APIs should be updated to account for whether the bh is related to the target machine model or host QEMU operation, for record/replay to work properly. Add some assertions in the old APIs to catch unconverted code when record/replay is active. Some of the bh APIs like cancel and

Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-15 Thread Nicholas Piggin
On Tue Aug 13, 2024 at 11:45 PM AEST, Aditya Gupta wrote: > Currently any device tree passed with -dtb option in QEMU, was ignored > by the PowerNV code. > > Read and pass the passed -dtb to the kernel, thus enabling easier > debugging with custom DTBs. > > The existing behaviour when -dtb is 'not'

Re: [PATCH v2 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-15 Thread Nicholas Piggin
On Thu Aug 15, 2024 at 3:25 AM AEST, Alex Bennée wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Aug 14, 2024 at 04:05:34PM +1000, Nicholas Piggin wrote: > >> On Wed Aug 14, 2024 at 6:48 AM AEST, Michael S. Tsirkin wrote: > >> > On Tue, Aug 13,

Re: [RFC PATCH] accel/tcg: clear all TBs from a page when it is written to

2024-08-13 Thread Nicholas Piggin
On Mon Aug 12, 2024 at 11:25 AM AEST, Richard Henderson wrote: > On 8/9/24 17:47, Nicholas Piggin wrote: > > This is not a clean patch, but does fix a problem I hit with TB > > invalidation due to the target software writing to memory with TBs. > > > > Lockup messages

Re: [PATCH v2 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-13 Thread Nicholas Piggin
On Wed Aug 14, 2024 at 6:48 AM AEST, Michael S. Tsirkin wrote: > On Tue, Aug 13, 2024 at 09:23:24PM +0100, Alex Bennée wrote: > > From: Nicholas Piggin > > > > The regular qemu_bh_schedule() calls result in non-deterministic > > execution of the bh in record-repla

[PATCH v6 09/10] virtio-net: Use virtual time for RSC timers

2024-08-12 Thread Nicholas Piggin
Receive coalescing is visible to the target machine, so its timers should use virtual time like other timers in virtio-net, to be compatible with record-replay. Signed-off-by: Nicholas Piggin --- hw/net/virtio-net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw

[PATCH v6 06/10] tests/avocado: replay_kernel.py add x86-64 q35 machine test

2024-08-12 Thread Nicholas Piggin
The x86-64 pc machine is flaky with record/replay, but q35 is more stable. Add a q35 test to replay_kernel.py. Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Nicholas Piggin --- tests/avocado/replay_kernel.py | 18 +- 1 file changed, 17 insertions(+), 1

[PATCH v6 05/10] Revert "replay: stop us hanging in rr_wait_io_event"

2024-08-12 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- include/sysemu/replay.h | 5 - accel/tcg/tcg-accel-ops-rr.c | 2 +- replay/replay.c | 21 - 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index f229b2109c

[PATCH v6 08/10] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-12 Thread Nicholas Piggin
The regular qemu_bh_schedule() calls result in non-deterministic execution of the bh in record-replay mode, which causes replay failure. Reviewed-by: Alex Bennée Reviewed-by: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin --- hw/net/virtio-net.c | 11 ++- 1 file changed, 6 insertions

[PATCH v6 04/10] replay: allow runstate shutdown->running when replaying trace

2024-08-12 Thread Nicholas Piggin
d-off-by: Nicholas Piggin --- include/sysemu/runstate.h | 1 + replay/replay.c | 2 ++ system/runstate.c | 31 --- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index e210a

[PATCH v6 01/10] scripts/replay-dump.py: Update to current rr record format

2024-08-12 Thread Nicholas Piggin
The v12 format support for replay-dump has a few issues still. This fixes async decoding; adds event, shutdown, and end decoding; fixes audio in / out events, fixes checkpoint checking of following async events. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin --- scripts/replay-dump.py

[PATCH v6 10/10] savevm: Fix load_snapshot error path crash

2024-08-12 Thread Nicholas Piggin
An error path missed setting *errp, which can cause a NULL deref. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin --- migration/savevm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/savevm.c b/migration/savevm.c index 85958d7b09..6bb404b9c8 100644 --- a/migration

[PATCH v6 03/10] tests/avocado: excercise scripts/replay-dump.py in replay tests

2024-08-12 Thread Nicholas Piggin
This runs replay-dump.py after recording a trace, and fails the test if the script fails. replay-dump.py is modified to exit with non-zero if an error is encountered while parsing, to support this. Reviewed-by: Alex Bennée Reviewed-by: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin v5

[PATCH v6 07/10] chardev: set record/replay on the base device of a muxed device

2024-08-12 Thread Nicholas Piggin
tting QEMU_CHAR_FEATURE_REPLAY on the base chardev fixes the problem. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin --- chardev/char.c | 71 +++--- 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/chardev/char.c b/chardev/char.c

[PATCH v6 02/10] scripts/replay-dump.py: rejig decoders in event number order

2024-08-12 Thread Nicholas Piggin
Sort decoder functions to be ascending in order of event number, same as the decoder tables. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin --- scripts/replay-dump.py | 56 +- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a

[PATCH v6 00/10] replay: fixes and new test cases

2024-08-12 Thread Nicholas Piggin
esn't keep breaking. Thanks, Nick Nicholas Piggin (10): scripts/replay-dump.py: Update to current rr record format scripts/replay-dump.py: rejig decoders in event number order tests/avocado: excercise scripts/replay-dump.py in replay tests replay: allow runstate shutdown->running wh

[RFC PATCH] accel/tcg: clear all TBs from a page when it is written to

2024-08-09 Thread Nicholas Piggin
This is not a clean patch, but does fix a problem I hit with TB invalidation due to the target software writing to memory with TBs. Lockup messages are triggering in Linux due to page clearing taking a long time when a code page has been freed, because it takes a lot of notdirty notifiers, which m

Re: [PATCH for-9.1] tcg/ppc: Sync tcg_out_test and constraints

2024-08-08 Thread Nicholas Piggin
On Thu Aug 8, 2024 at 2:46 AM AEST, Philippe Mathieu-Daudé wrote: > On 7/8/24 06:08, Richard Henderson wrote: > > Ensure the code structure is the same for matching constraints > > and emitting code, lest we allow constants that cannot be > > trivially tested. > > > > Cc: qemu-sta...@nongnu.org >

[PATCH] ppc/pnv: ADU fix possible buffer overrun with invalid size

2024-08-06 Thread Nicholas Piggin
: 24bd283bccb33 ("ppc/pnv: Implement ADU access to LPC space") Signed-off-by: Nicholas Piggin --- hw/ppc/pnv_adu.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ppc/pnv_adu.c b/hw/ppc/pnv_adu.c index 81b7d6e526..f636dedf79 100644 --- a/hw/ppc/pnv_adu.c +++ b/hw/ppc

[PATCH 4/7] target/ppc: PMIs are level triggered

2024-08-06 Thread Nicholas Piggin
In Book-S / Power processors, the performance monitor interrupts are driven by the MMCR0[PMAO] bit, which is level triggered and not cleared by the interrupt. Others may have different performance monitor architecture, but none of those are implemented by QEMU. Signed-off-by: Nicholas Piggin

[PATCH 6/7] target/ppc: Fix HFSCR facility checks

2024-08-06 Thread Nicholas Piggin
The HFSCR defines were being encoded as bit masks, but the users expect (and analogous FSCR defines are) bit numbers. Signed-off-by: Nicholas Piggin --- target/ppc/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index bd32a1a5f8

[PATCH 7/7] target/ppc: Fix VRMA to not check virtual page class key protection

2024-08-06 Thread Nicholas Piggin
Hash virtual real mode addressing is defined by the architecture to not perform virtual page class key protection checks. Signed-off-by: Nicholas Piggin --- target/ppc/mmu-hash64.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/ppc/mmu-hash64.c b/target/ppc

[PATCH 5/7] target/ppc: Fix doorbell delivery to threads in powersave

2024-08-06 Thread Nicholas Piggin
Doorbell exceptions are not not cleared when they cause a wake from powersave state, only when they take the corresponding interrupt. The sreset-on-wake logic must avoid clearing the interrupt in this case. Signed-off-by: Nicholas Piggin --- target/ppc/excp_helper.c | 17 + 1

[PATCH 1/7] ppc/pnv: Fix LPC serirq routing calculation

2024-08-06 Thread Nicholas Piggin
29 (partially) Signed-off-by: Nicholas Piggin --- target/ppc/cpu.h | 1 + hw/ppc/pnv_lpc.c | 10 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 321ed2da75..bd32a1a5f8 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @

[PATCH 0/7] various ppc fixes

2024-08-06 Thread Nicholas Piggin
This fixes LPC serirq Coverity issues introduced in the merge window that Cedric reported. Also fixes for an assorted bunch of emulation issues recently turned up when running PowerVM firmware on the model. Thanks, Nick Nicholas Piggin (7): ppc/pnv: Fix LPC serirq routing calculation ppc

[PATCH 3/7] target/ppc: Fix mtDPDES targeting SMT siblings

2024-08-06 Thread Nicholas Piggin
A typo in the loop over SMT threads to set irq level for doorbells when storing to DPDES meant everything was aimed at the CPU executing the instruction. Signed-off-by: Nicholas Piggin --- target/ppc/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc

[PATCH 2/7] ppc/pnv: Fix LPC POWER8 register sanity check

2024-08-06 Thread Nicholas Piggin
ere incorrectly specified because of ppc bit numbering fun. Coverity detected this as an always-zero expression. Reported-by: Cédric Le Goater Resolves: Coverity CID 1558829 (partially) Signed-off-by: Nicholas Piggin --- hw/ppc/pnv_lpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[PATCH 2/2] tests/avocado: Mark ppc_hv_tests.py as non-flaky after fixed console interaction

2024-08-05 Thread Nicholas Piggin
Now that exec_command doesn't incorrectly consume console output, and guest time is set correctly, ppc_hv_tests.py is working more reliably. Try marking it non-flaky. Signed-off-by: Nicholas Piggin --- tests/avocado/ppc_hv_tests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/

[PATCH 0/2] tests/avocado: Fix exec_command and enable ppc_hv_tests.py

2024-08-05 Thread Nicholas Piggin
This fixes an issue with exec_command eating console output and causing the ppc_hv_tests.py to fail. A few other tests also use exec_command but I didn't see any that subsequently checked console output. Thanks, Nick Nicholas Piggin (2): tests/avocado: exec_command should not consume co

[PATCH 1/2] tests/avocado: exec_command should not consume console output

2024-08-05 Thread Nicholas Piggin
. This solves occasional hangs in ppc_hv_tests.py, usually when run on KVM hosts that are fast enough to output important lines quickly enough to be consumed by exec_command, so they get missed by subsequent wait for pattern calls. Signed-off-by: Nicholas Piggin --- tests/avocado/avocado_qemu

Re: [PATCH v3 20/24] tests/functional: Convert the ppc_hv avocado test into a standalone test

2024-08-05 Thread Nicholas Piggin
Thanks for doing this. I have a fix for this problem, it's a bug with the test harness code but was not merged yet. I'll re-send it. Thanks, Nick On Wed Jul 31, 2024 at 3:03 AM AEST, Daniel P. Berrangé wrote: > From: Thomas Huth > > Note: The original Avocado test seems currently to be broken,

Re: u-boot-sam460ex fixes

2024-08-05 Thread Nicholas Piggin
On Sat Aug 3, 2024 at 6:40 PM AEST, Michael Tokarev wrote: > Hi! > > It's been a long time since everyone's fighting with u-boot-sam460ex code > which is > very bad, suffers from countless issues. > > For one, it does not compile for quite a long time with current compilers. > > For example, here

Re: [PATCH v4 04/11] pnv/xive2: Add NVG and NVC to cache watch facility

2024-08-01 Thread Nicholas Piggin
On Thu Jul 25, 2024 at 7:21 AM AEST, Michael Kowal wrote: > From: Frederic Barrat > > The cache watch facility uses the same register interface to handle > entries in the NVP, NVG and NVC tables. A bit-field in the 'watchX > specification' register tells the table type. So far, that bit-field > wa

Re: [PATCH v6 0/5] Power11 support for QEMU [PSeries]

2024-07-31 Thread Nicholas Piggin
Hey Aditya, Thanks for this, I think since we're past the hard freeze it may have to wait until next release. If it was simply a new PRV maybe it could be squeezed in, but since it has this PCR tangle then it's a bit non-trivial. Apologies I didn't get to reviewing it earlier, will get it in 9.2.

Re: [PULL 00/96] ppc-for-9.1-2 queue

2024-07-31 Thread Nicholas Piggin
On Mon Jul 29, 2024 at 7:43 PM AEST, Philippe Mathieu-Daudé wrote: > Hi Nick, > > On 26/7/24 01:52, Nicholas Piggin wrote: > > Apologies this is so late after soft-freeze, apologies. I was waiting > > on "accel/kvm: Extract common KVM vCPU {creation,parking} code&

Re: [PATCH v2] tests/tcg: Skip failing ppc64 multi-threaded tests

2024-07-26 Thread Nicholas Piggin
On Fri Jul 26, 2024 at 7:11 PM AEST, Thomas Huth wrote: > On 25/07/2024 17.40, Nicholas Piggin wrote: > > In Gitlab CI, some ppc64 multi-threaded tcg tests crash when run in the > > clang-user job with an assertion failure in glibc that seems to > > indicate corruption

Re: [PATCH v2] tests/tcg: Skip failing ppc64 multi-threaded tests

2024-07-26 Thread Nicholas Piggin
On Fri Jul 26, 2024 at 7:11 PM AEST, Thomas Huth wrote: > On 25/07/2024 17.40, Nicholas Piggin wrote: > > In Gitlab CI, some ppc64 multi-threaded tcg tests crash when run in the > > clang-user job with an assertion failure in glibc that seems to > > indicate corruption

[PULL 60/96] target/ppc: Move VSX vector storage access insns to decodetree.

2024-07-25 Thread Nicholas Piggin
using the '-d in_asm,op' flag. Signed-off-by: Chinmay Rath Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/insn32.decode| 10 ++ target/ppc/translate/vsx-impl.c.inc | 199 target/ppc/translate/vsx-ops.c.inc |

[PULL 63/96] target/ppc: Update VMX storage access insns to use tcg_gen_qemu_ld/st_i128.

2024-07-25 Thread Nicholas Piggin
: Richard Henderson Signed-off-by: Chinmay Rath Signed-off-by: Nicholas Piggin --- target/ppc/translate/vmx-impl.c.inc | 42 ++--- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc index

[PULL 59/96] target/ppc: Move VSX vector with length storage access insns to decodetree.

2024-07-25 Thread Nicholas Piggin
so added a new function do_ea_calc_ra to calculate the effective address : EA <- (RA == 0) ? 0 : GPR[RA], which is now used by the above-said insns, and shall be used later by (p){lx, stx}vp insns. Reviewed-by: Richard Henderson Signed-off-by: Chinmay Rath [np: Fix 32-bit build] Signed-off

[PULL 90/96] target/ppc/mmu_common.c: Stop using ctx in get_bat_6xx_tlb()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Pass raddr and prot in function parameters instead Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/target/ppc

[PULL 93/96] target/ppc/mmu-hash32.c: Move get_pteg_offset32() to the header

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan This function is a simple shared function, move it to other similar static inline functions in the header. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu-hash32.c | 7 --- target/ppc/mmu-hash32.h | 6

[PULL 94/96] target/ppc: Unexport some functions from mmu-book3s-v3.h

2024-07-25 Thread Nicholas Piggin
the header. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- hw/ppc/spapr_vhyp_mmu.c| 21 target/ppc/mmu-book3s-v3.h | 40 --- target/ppc/mmu-hash64.c| 49

[PULL 50/96] pnv/xive2: Move xive2_nvp_pic_print_info() to xive2.c

2024-07-25 Thread Nicholas Piggin
From: Frederic Barrat Moving xive2_nvp_pic_print_info() to align with the other "pic_print_info" functions. Signed-off-by: Frederic Barrat Signed-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/pnv_xive2.c

[PULL 70/96] target/ppc/mmu_common.c: Remove yet another single use local variable

2024-07-25 Thread Nicholas Piggin
Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index b21f52290f..799d2ced9b 100644 --- a/target/ppc/mmu_common.c +++ b/target/ppc/mmu_common.c @@ -98,13 +98,12

[PULL 36/96] ppc/pnv: Remove ppc target dependency from pnv_xscom.h

2024-07-25 Thread Nicholas Piggin
From: Chalapathi V In this commit target specific dependency from include/hw/ppc/pnv_xscom.h has been removed so that pnv_xscom.h can be included outside hw/ppc. Signed-off-by: Chalapathi V Reviewed-by: Cédric Le Goater Reviewed-by: Caleb Schlossin Signed-off-by: Nicholas Piggin

[PULL 95/96] target/ppc/mmu-radix64: Remove externally unused parts from header

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Move the parts not needed outside of mmu-radix64.c from the header to the C file to leave only parts in the header that need to be exported. Also drop unneded include of this header. Signed-off-by: BALATON Zoltan Acked-by: Nicholas Piggin Signed-off-by: Nicholas Piggin

[PULL 37/96] hw/ssi: Add SPI model

2024-07-25 Thread Nicholas Piggin
-by: Cédric Le Goater Reviewed-by: Glenn Miles [np: Fix FDT macro compile for qtest] Signed-off-by: Nicholas Piggin --- hw/ppc/Kconfig| 3 + hw/ssi/Kconfig| 4 + hw/ssi/meson.build| 1 + hw/ssi/pnv_spi.c | 215

[PULL 54/96] target/ppc: Improve VMX integer add/sub saturate instructions.

2024-07-25 Thread Nicholas Piggin
From: Chinmay Rath No need for a full comparison; xor produces non-zero bits for QC just fine. Suggested-by: Richard Henderson Signed-off-by: Chinmay Rath Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/translate/vmx-impl.c.inc | 14 +++--- 1 file

[PULL 80/96] target/ppc/mmu_common.c: Inline and remove ppc6xx_tlb_pte_check()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan This function is only called once and we can make the caller simpler by inlining it. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 71 + 1 file changed, 22

[PULL 33/96] ppc/pnv: Add a CPU nmi and resume function

2024-07-25 Thread Nicholas Piggin
Power CPUs have an execution control facility that can pause, resume, and cause NMIs, among other things. Add a function that will nmi a CPU and resume it if it was paused, in preparation for implementing the control facility. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw

[PULL 88/96] target/ppc/mmu_common.c: Use defines instead of numeric constants

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Replace some BAT related constants with defines from mmu-hash32.h Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions

[PULL 34/96] ppc/pnv: Implement POWER10 PC xscom registers for direct controls

2024-07-25 Thread Nicholas Piggin
larly with respect to QME and special wakeup) that it is not trivial to implement POWER9 support by reusing the code. Signed-off-by: Nicholas Piggin --- hw/ppc/pnv_core.c | 89 --- include/hw/ppc/pnv_core.h | 3 ++ 2 files changed, 87 insertions(+), 5

[PULL 96/96] target/ppc: Remove includes from mmu-book3s-v3.h

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Drop includes from header that is not needed by the header itself and only include them from C files that really need it. Signed-off-by: BALATON Zoltan Acked-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu-book3s-v3.h | 3 --- target/ppc/mmu-hash64

[PULL 84/96] target/ppc/mmu_common.c: Init variable in function that relies on it

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan The ppc6xx_tlb_check() relies on the caller to initialise raddr field in ctx. Move this init from the only caller into the function. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 4 ++-- 1 file

[PULL 72/96] target/ppc/mmu_common.c: Simplify ppc6xx_tlb_pte_check()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Invert conditions to avoid deep nested ifs and return early instead. Remove some obvious comments that don't add more clarity. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c

[PULL 83/96] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_prot()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan This is used only once and can be inlined. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu-hash32.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/target/ppc/mmu

[PULL 30/96] ppc/pnv: Implement Power9 CPU core thread state indirect register

2024-07-25 Thread Nicholas Piggin
Power9 CPUs have a core thread state register accessible via SPRC/SPRD indirect registers. This register includes a bit for big-core mode, which skiboot requires. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/misc_helper.c | 17 + 1 file changed

[PULL 65/96] target/ppc: Reorganise and rename ppc_hash32_pp_prot()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Reorganise ppc_hash32_pp_prot() swapping the if legs so it does not test for negative first and clean up to make it shorter. Also rename it to ppc_hash32_prot(). Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu

[PULL 45/96] pnv/xive2: Add NVG and NVC to cache watch facility

2024-07-25 Thread Nicholas Piggin
ble. This patch allows to read/write entries in the NVG and NVC table as well. Signed-off-by: Frederic Barrat Signed-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/pnv_xive2.c | 49 +++-- 1 file c

[PULL 62/96] target/ppc: Move get/set_avr64 functions to vmx-impl.c.inc.

2024-07-25 Thread Nicholas Piggin
From: Chinmay Rath Those functions are used to ld/st data to and from Altivec registers, in 64 bits chunks, and are only used in vmx-impl.c.inc file, hence the clean-up movement. Reviewed-by: Richard Henderson Signed-off-by: Chinmay Rath Signed-off-by: Nicholas Piggin --- target/ppc

[PULL 52/96] pnv/xive2: Dump more END state with 'info pic'

2024-07-25 Thread Nicholas Piggin
d-off-by: Frederic Barrat Signed-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/xive2.c | 7 +-- include/hw/ppc/xive2_regs.h | 7 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/intc/xive2.c b/hw/intc/xiv

[PULL 86/96] target/ppc/mmu_common.c: Stop using ctx in ppc6xx_tlb_check()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Pass raddr and prot in function parameters instead. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a

[PULL 82/96] target/ppc: Add function to get protection key for hash32 MMU

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Add a function to get key bit from SR and use it instead of open coded version. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu-hash32.c | 9 ++--- target/ppc/mmu-hash32.h | 5 + target/ppc

[PULL 57/96] target/ppc: Move VSX logical instructions to decodetree.

2024-07-25 Thread Nicholas Piggin
27;-d in_asm,op' flag. Signed-off-by: Chinmay Rath Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/insn32.decode| 11 target/ppc/translate/vsx-impl.c.inc | 39 + target/ppc/translate/vsx-ops.c.inc | 11 3 fil

[PULL 15/96] ppc/pnv: Implement POWER9 LPC PSI serirq outputs and auto-clear function

2024-07-25 Thread Nicholas Piggin
psi#0:lpc_serirq_mux1 Whereas they previously turn up on lpchc. Reviewed-by: Glenn Miles Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 36 +-- hw/ppc/pnv_lpc.c | 128 --- include/hw/ppc/pnv_lpc.h | 14 - 3 files changed, 148 inser

[PULL 35/96] ppc/pnv: Add an LPAR per core machine option

2024-07-25 Thread Nicholas Piggin
w works sufficiently to run Linux, with a single socket. Multi-threaded KVM guests still have problems, as does multi-socket Linux boot. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 38 ++ hw/ppc/pnv

[PULL 47/96] pnv/xive2: Enable VST NVG and NVC index compression

2024-07-25 Thread Nicholas Piggin
bit shift 1001- - No compression Signed-off-by: Frederic Barrat Signed-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/pnv_xive2.c | 20 hw/intc/pnv_xive2_regs.h | 2 ++ 2 files changed, 22 insertions(+) diff

[PULL 49/96] pnv/xive2: Fail VST entry address computation if table has no VSD

2024-07-25 Thread Nicholas Piggin
at Signed-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/pnv_xive2.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 08b9166a09..9fbd44f974 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/p

[PULL 46/96] pnv/xive2: Configure Virtualization Structure Tables through the PC

2024-07-25 Thread Nicholas Piggin
definitions are still shared, since the VST tables can be set through both the VC and/or PC, they are dynamically re-mapped in memory by first deleting the memory subregion. Signed-off-by: Frederic Barrat Signed-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin

[PULL 56/96] target/ppc: Move VSX arithmetic and max/min insns to decodetree.

2024-07-25 Thread Nicholas Piggin
the same, which were captured with the '-d in_asm,op' flag. Signed-off-by: Chinmay Rath Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/fpu_helper.c | 44 ++-- target/ppc/helper.h | 44 ++--

[PULL 81/96] target/ppc/mmu_common.c: Remove ptem field from mmu_ctx_t

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Instead of passing around ptem in context use it once in the same function so it can be removed from mmu_ctx_t. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 23 ++- 1 file

[PULL 68/96] target/ppc/mmu_common.c: Remove single use local variable

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan The ptev variable in ppc6xx_tlb_pte_check() is used only once and just obfuscates an otherwise clear value. Get rid of it. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 5 ++--- 1 file changed, 2

[PULL 73/96] target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan The eaddr field of mmu_ctx_t is set once but never used so can be removed. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/ppc/mmu_common.c

[PULL 89/96] target/ppc: Remove bat_size_prot()

2024-07-25 Thread Nicholas Piggin
Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu-hash32.c | 18 +- target/ppc/mmu-hash32.h | 14 +++ target/ppc/mmu_common.c | 52 ++--- 3 files changed, 27 insertions(+), 57 deletions(-) diff --git a/target/ppc/mmu-hash32.c b/target

[PULL 69/96] target/ppc/mmu_common.c: Remove another single use local variable

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan In ppc6xx_tlb_pte_check() the pteh variable is used only once to compare to the h parameter of the function. Inline its value and use pteh name for the function parameter which is more descriptive. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by

[PULL 79/96] target/ppc/mmu_common.c: Simplify a switch statement

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan In mmu6xx_get_physical_address() the switch handles all cases so the default is never reached and can be dropped. Also group together cases which just return -4. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc

[PULL 92/96] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_raddr()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan This function is used only once and does not add more clarity than doing it inline. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu-hash32.c | 18 +- 1 file changed, 5 insertions(+), 13

[PULL 71/96] target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check()

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Instead of using a local ret variable return directly and remove the local. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git

[PULL 64/96] target/ppc : Update VSX storage access insns to use tcg_gen_qemu _ld/st_i128.

2024-07-25 Thread Nicholas Piggin
-off-by: Chinmay Rath Signed-off-by: Nicholas Piggin --- target/ppc/translate/vsx-impl.c.inc | 74 + 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx-impl.c.inc index 26ebf3fedf..40a87d

[PULL 23/96] ppc/pnv: Extend chip_pir class method to TIR as well

2024-07-25 Thread Nicholas Piggin
by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 85 +-- hw/ppc/pnv_core.c | 10 +++-- include/hw/ppc/pnv_chip.h | 4 +- 3 files changed, 64 insertions(+), 35 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/p

[PULL 61/96] target/ppc: Move VSX fp compare insns to decodetree.

2024-07-25 Thread Nicholas Piggin
#x27; flag. Signed-off-by: Chinmay Rath Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- target/ppc/fpu_helper.c | 16 +- target/ppc/helper.h | 16 +- target/ppc/insn32.decode| 12 target/ppc/translate/vsx-impl.

[PULL 27/96] ppc/pnv: Add a big-core mode that joins two regular cores

2024-07-25 Thread Nicholas Piggin
ok like an SMT8 core in TCG. Then the xscom and pervasive models mostly do not need to differentiate big and small core modes. This change adds initial mode bits and QEMU topology handling to split SMT8 cores into 2xSMT4 cores. Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c

[PULL 76/96] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Pass it as a parameter instead. Also use named constants instead of hex values when extracting bits from SR. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 24 1 file

[PULL 67/96] target/ppc/mmu_common.c: Remove single use local variable

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan The ptem variable in ppc6xx_tlb_pte_check() is used only once, simplify by removing it as the value is already clear itself without adding a local name for it. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc

[PULL 91/96] target/ppc/mmu_common.c: Remove mmu_ctx_t

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Completely get rid of mmu_ctx_t after converting the remaining functions to pass raddr and prot without the context struct. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 25

[PULL 87/96] target/ppc/mmu_common.c: Rename function parameter

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Rename parameter of get_bat_6xx_tlb() from virtual to eaddr to match other functions. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 18 +- 1 file changed, 9 insertions(+), 9

[PULL 74/96] target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t

2024-07-25 Thread Nicholas Piggin
From: BALATON Zoltan Return hash value via a parameter and remove it from mmu_ctx.t. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- target/ppc/mmu_common.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a

[PULL 25/96] target/ppc: Add helpers to check for SMT sibling threads

2024-07-25 Thread Nicholas Piggin
Add helpers for TCG code to determine if there are SMT siblings sharing per-core and per-lpar registers. This simplifies the callers and makes SMT register topology simpler to modify with later changes. Reviewed-by: Harsh Prateek Bora Signed-off-by: Nicholas Piggin --- target/ppc/cpu.h

[PULL 41/96] tests/qtest: Add pnv-spi-seeprom qtest

2024-07-25 Thread Nicholas Piggin
From: Chalapathi V In this commit Write a qtest pnv-spi-seeprom-test to check the SPI transactions between spi controller and seeprom device. Signed-off-by: Chalapathi V Acked-by: Cédric Le Goater Reviewed-by: Caleb Schlossin Signed-off-by: Nicholas Piggin --- tests/qtest/meson.build

[PULL 42/96] pnv/xive2: XIVE2 Cache Watch, Cache Flush and Sync Injection support

2024-07-25 Thread Nicholas Piggin
-off-by: Michael Kowal Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/pnv_xive2.c | 251 +-- hw/intc/pnv_xive2_regs.h | 90 ++ 2 files changed, 305 insertions(+), 36 deletions(-) diff --git a/hw/intc/pnv_xive2.c b/h

[PULL 18/96] target/ppc: Fix msgsnd for POWER8

2024-07-25 Thread Nicholas Piggin
implements the v3.0 semantics, which can make multi-threaded POWER8 hang when booting Linux (due to IPIs failing). This change adds v2.07 semantics. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/excp_helper.c | 74 1 file

  1   2   3   4   5   6   7   8   9   10   >