Re: QNX VM hang on Qemu

2024-02-23 Thread Faiq Ali Sayed
So as far as my understanding, we provide these binaries using Qemu command as depicted in the example you provided and there is no way I found to put them into a single image. Regarding the overlapping space, I don't have much idea but I think we could provide a starting address separately to thes

Re: [PATCH v5 7/8] STM32L4x5: Use the RCC Sysclk

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 20:17, Arnaud Minier wrote: > > Now that we can generate reliable clock frequencies from the RCC, remove > the hacky definition of the sysclk in the b_l475e_iot01a initialisation > code and use the correct RCC clock. > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Va

Re: [PATCH v3 0/3] nubus: add nubus-virtio-mmio device

2024-02-23 Thread Laurent Vivier
Le 11/01/2024 à 11:29, Mark Cave-Ayland a écrit : This series introduces a new nubus-virtio-mmio device which can be plugged into the q800 machine to enable a 68k Classic MacOS guest to access virtio devices such as virtio-9p-device (host filesharing), virtio-gpu (extended framebuffer support) an

Re: [External] Re: [PATCH v2 3/7] migration/multifd: Zero page transmission on the multifd thread.

2024-02-23 Thread Fabiano Rosas
Hao Xiang writes: > On Wed, Feb 21, 2024 at 1:04 PM Fabiano Rosas wrote: >> >> Hao Xiang writes: >> >> > 1. Implements the zero page detection and handling on the multifd >> > threads for non-compression, zlib and zstd compression backends. >> > 2. Added a new value 'multifd' in ZeroPageDetecti

Re: [PATCH v5 2/8] Add an internal clock multiplexer object

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 20:12, Arnaud Minier wrote: > > This object is used to represent every multiplexer in the clock tree as > well as every clock output, every presecaler, frequency multiplier, etc. > This allows to use a generic approach for every component of the clock tree > (except the PLLs

Re: [PATCH v5 6/8] Add write protections to CR register

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 20:16, Arnaud Minier wrote: > > Add write protections for the fields in the CR register. > PLL configuration write protections (among others) have not > been handled yet. This is planned in a future patch set. Can you make sure you include a suitable prefix (eg "hw/misc/stm

Re: [PATCH v5 8/8] Add tests for the STM32L4x5_RCC

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 20:18, Arnaud Minier wrote: > > Tests: > - the ability to change the sysclk of the device > - the ability to enable/disable/configure the PLLs > - if the clock multiplexers work > - the register flags and the generation of irqs > > Signed-off-by: Arnaud Minier > Signed-off-

Re: [PATCH v5 0/8] Add device STM32L4x5 RCC

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 20:09, Arnaud Minier wrote: > > This patch adds the STM32L4x5 RCC (Reset and Clock Control) device and is part > of a series implementing the STM32L4x5 with a few peripherals. > > Due to the high number of lines, I tried to split the patch into several > independent commits

[PATCH v2 2/3] qtest: migration: Add negative validation tests for 'uri' and 'channels'

2024-02-23 Thread Het Gala
Ideally 'migrate' and 'migrate-incoming' QAPIs should not allow 'uri' and 'channels' both arguments to be present simultaneously, but also one of them should be present in the QAPI. IOW they are mututally exhaustive arguments for QAPI Add negative test cases to validate the same. Even before the

[PATCH v2 0/3] qtest: migration: Add tests for introducing 'channels' argument in migrate QAPIs

2024-02-23 Thread Het Gala
With recent migrate QAPI changes, enabling the direct use of the 'channels' argument to avoid redundant URI string parsing is achieved. To ensure backward compatibility, both 'uri' and 'channels' are kept as optional parameters in migration QMP commands. However, they are mutually exclusive, requi

[PATCH v2 3/3] qtest: migration: Start migration with 'channels' argument

2024-02-23 Thread Het Gala
'uri' and 'channels' arguments are mutually exhaustive in nature for migration QAPIs. All existing migration qtests solely use 'uri' argument and lack 'channels' as the entrypoint for migration QAPIs. This commit addresses this gap by introducing support for 'channels' as an alternative entrypoin

Re: [PATCH 1/2] hw/intc/arm_gicv3_its_common: Increase DeviceID to 32 bits

2024-02-23 Thread Peter Maydell
On Wed, 21 Feb 2024 at 17:33, Nabih Estefan wrote: > > From: Roque Arcudia Hernandez > > According to the “GICv3 and GICv4 Software Overview” the DeviceID is > IMPLEMENTATION DEFINED. This patch increases the DeviceID in send_msi virtual > function to 32 bits to allow the possibility of a redefin

Re: [PATCH v4] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-02-23 Thread atp exp
On Tue, 23 Jan 2024 at 10:34, Abhiram Tilak wrote: > > When running the command `qemu-img snapshot -l SNAPSHOT` the output of > VM_CLOCK (measures the offset between host and VM clock) cannot to > accommodate values in the order of thousands (4-digit). > > This line [1] hints on the problem. Addit

Re: [PATCH 2/2] hw/intc/arm_gicv3_its: Use send_msi in the GITS_TRANSLATER write

2024-02-23 Thread Peter Maydell
On Wed, 21 Feb 2024 at 17:33, Nabih Estefan wrote: > > From: Roque Arcudia Hernandez > > This is trying to achieve 2 things: To be able to redefine the send_msi in a > derived class of arm_gicv3_its and/or to expose a method call interface to > inject interrupts from another device. But there is

[PATCH v2 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument

2024-02-23 Thread Het Gala
Introduce support for adding a 'channels' argument to migrate_qmp_fail, migrate_incoming_qmp and migrate_qmp functions within the migration qtest framework, enabling enhanced control over migration scenarios. Signed-off-by: Het Gala --- tests/qtest/dbus-vmstate-test.c | 2 +- tests/qtest/migr

[PULL 03/47] tests/avocado: mark boot_linux.py long runtime instead of flaky

2024-02-23 Thread Nicholas Piggin
The ppc64 and s390x tests were first marked skipIf GITLAB_CI by commit c0c8687ef0f ("tests/avocado: disable BootLinuxPPC64 test in CI"), and commit 0f26d94ec9e ("tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab") due to being very heavy-weight for gitlab CI. Commit 9b45cc99318 ("docs/devel: ra

[PULL 22/47] misc/pca9552: Let external devices set pca9552 inputs

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles Allow external devices to drive pca9552 input pins by adding input GPIO's to the model. This allows a device to connect its output GPIO's to the pca9552 input GPIO's. In order for an external device to set the state of a pca9552 pin, the pin must first be configured for high i

[PULL 14/47] hw/ppc/spapr_hcall: Rename {softmmu -> vhyp_mmu}_resize_hpt_pr

2024-02-23 Thread Nicholas Piggin
From: Philippe Mathieu-Daudé Since 'softmmu' is quite a loaded term in QEMU, rename the vhyp MMU facilities to use the vhyp_mmu_ prefix rather than softmmu_. vhyp_mmu_ is chosen because the code that manipulates the hash table via guest software hypercalls is QEMU's implementation of the PAPR hy

[PULL 15/47] hw/ppc/spapr: Rename 'softmmu' -> 'vhyp_mmu'

2024-02-23 Thread Nicholas Piggin
From: Philippe Mathieu-Daudé To reduce the use of the term 'softmmu', rename spapr_softmmu.c to spapr_vhyp_mmu.c. Reviewed-by: Nicholas Piggin Signed-off-by: Philippe Mathieu-Daudé [np: change name] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Nicholas Piggin --- hw/ppc/meson.build

[PULL 01/47] target/ppc: Fix lxv/stxv MSR facility check

2024-02-23 Thread Nicholas Piggin
The move to decodetree flipped the inequality test for the VEC / VSX MSR facility check. This caused application crashes under Linux, where these facility unavailable interrupts are used for lazy-switching of VEC/VSX register sets. Getting the incorrect interrupt would result in wrong registers be

[PULL 23/47] ppc/pnv: New powernv10-rainier machine type

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles Create a new powernv machine type, powernv10-rainier, that will contain rainier-specific devices. Reviewed-by: Cédric Le Goater Signed-off-by: Glenn Miles Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 24 ++-- 1 file changed, 22 insertions(+), 2 dele

[PULL 18/47] ppc/spapr: change pseries machine default to POWER10 CPU

2024-02-23 Thread Nicholas Piggin
POWER10 is the latest pseries CPU. Reviewed-by: Harsh Prateek Bora Signed-off-by: Nicholas Piggin --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0028ce0b67..b442d18317 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c

[PULL 27/47] misc: Add a pca9554 GPIO device model

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles Specs are available here: https://www.nxp.com/docs/en/data-sheet/PCA9554_9554A.pdf This is a simple model supporting the basic registers for GPIO mode. The device also supports an interrupt output line but the model does not yet support this. Reviewed-by: Cédric Le Goate

[PULL 02/47] target/ppc: Fix crash on machine check caused by ifetch

2024-02-23 Thread Nicholas Piggin
is_prefix_insn_excp() loads the first word of the instruction address which caused an exception, to determine whether or not it was prefixed so the prefix bit can be set in [H]SRR1. This works if the instruction image can be loaded, but if the exception was caused by an ifetch, this load could fai

[PULL 11/47] target/ppc: Rename registers to match ISA

2024-02-23 Thread Nicholas Piggin
Several registers have names that don't match the ISA (or convention with other QEMU PPC registers), making them unintuitive to use with GDB. Fortunately most of these registers are obscure and/or have not been correctly implemented in the gdb server (e.g., DEC, TB, CFAR), so risk of breaking user

[PULL 17/47] ppc/spapr: Initialize max_cpus limit to SPAPR_IRQ_NR_IPIS.

2024-02-23 Thread Nicholas Piggin
From: Harsh Prateek Bora Initialize the machine specific max_cpus limit as per the maximum range of CPU IPIs available. Keeping between 4096 to 8192 will throw IRQ not free error due to XIVE/XICS limitation and keeping beyond 8192 will hit assert in tcg_region_init or spapr_xive_claim_irq. Logs:

[PULL 00/47] ppc-for-9.0 queue

2024-02-23 Thread Nicholas Piggin
The following changes since commit 3d54cbf269d63ff1d500b35b2bcf4565ff8ad485: Merge tag 'hw-misc-20240222' of https://github.com/philmd/qemu into staging (2024-02-22 15:44:29 +) are available in the Git repository at: https://gitlab.com/npiggin/qemu.git tags/pull-ppc-for-9.0-20240224 fo

[PULL 47/47] target/ppc: optimise ppcemb_tlb_t flushing

2024-02-23 Thread Nicholas Piggin
Filter TLB flushing by PID and mmuidx. Zoltan reports that, together with the previous TLB flush changes, performance of a sam460ex machine running 'lame' to convert a wav to mp3 is improved nearly 10%: CPU timeTLB partial flushes TLB elided flushes Before37s

[PULL 42/47] target/ppc: Fix 440 tlbwe TLB invalidation gaps

2024-02-23 Thread Nicholas Piggin
The 440 tlbwe (write entry) instruction misses several cases that must flush the TCG TLB: - If the new size is smaller than the existing size, the EA no longer covered should be flushed. This looks like an inverted inequality test. - If the TLB PID changes. - If the TLB attr bit 0 (translation

[PULL 31/47] hw/ppc: Add N1 chiplet model

2024-02-23 Thread Nicholas Piggin
From: Chalapathi V The N1 chiplet handle the high speed i/o traffic over PCIe and others. The N1 chiplet consists of PowerBus Fabric controller, nest Memory Management Unit, chiplet control unit and more. This commit creates a N1 chiplet model and initialize and realize the pervasive chiplet mod

[PULL 26/47] ppc/pnv: Use resettable interface to reset child I2C buses

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles The QEMU I2C buses and devices use the resettable interface for resetting while the PNV I2C controller and parent buses and devices have not yet transitioned to this new interface and use the old reset strategy. This was preventing the I2C buses and devices wired to the PNV I2C

[PULL 25/47] ppc/pnv: Wire up pca9552 GPIO pins for PCIe hotplug power control

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles For power10-rainier, a pca9552 device is used for PCIe slot hotplug power control by the Power Hypervisor code. The code expects that some time after it enables power to a PCIe slot by asserting one of the pca9552 GPIO pins 0-4, it should see a "power good" signal asserted on o

[PULL 39/47] ppc/pnv: Implement the ChipTOD to Core transfer

2024-02-23 Thread Nicholas Piggin
One of the functions of the ChipTOD is to transfer TOD to the Core (aka PC - Pervasive Core) timebase facility. The ChipTOD can be programmed with a target address to send the TOD value to. The hardware implementation seems to perform this by sending the TOD value to a SCOM address. This implemen

[PULL 12/47] hw/ppc/spapr: Add missing license

2024-02-23 Thread Nicholas Piggin
From: Philippe Mathieu-Daudé Commit 9fdf0c2995 ("Start implementing pSeries logical partition machine") added hw/ppc/spapr_hcall.c, then commit 962104f044 ("hw/ppc: moved hcalls that depend on softmmu") extracted the system code to hw/ppc/spapr_softmmu.c. Take the license and copyrights from the

[PULL 05/47] tests/avocado: ppc add powernv10 boot_linux_console test

2024-02-23 Thread Nicholas Piggin
Add test for POWER10. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- tests/avocado/boot_linux_console.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index af104fff1c..a00202df3c 100644 -

[PULL 19/47] spapr: Tag pseries-2.1 - 2.11 machines as deprecated

2024-02-23 Thread Nicholas Piggin
From: Cédric Le Goater pseries machines before version 2.11 have undergone many changes to correct issues, mostly regarding migration compatibility. This is obfuscating the code uselessly and makes maintenance more difficult. Remove them and only keep the last version of the 2.x series, 2.12, sti

[PULL 09/47] tests/avocado: Use default CPU for pseries machine

2024-02-23 Thread Nicholas Piggin
Use the default CPU with the pseries machine unless there is a specific requirement. Signed-off-by: Nicholas Piggin --- tests/avocado/migration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/migration.py b/tests/avocado/migration.py index 09b62f813e..be6234b3c2 100644 --- a/

[PULL 28/47] ppc/pnv: Add a pca9554 I2C device to powernv10-rainier

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles For powernv10-rainier, the Power Hypervisor code expects to see a pca9554 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x25 (or left-justified address of 0x4A). This is used by the hypervisor code to detect if a "Cable Card" is present. Reviewed-by: Cédr

[PULL 04/47] tests/avocado: improve flaky ppc/pnv boot_linux_console.py test

2024-02-23 Thread Nicholas Piggin
The expected MTD partition detection output does not always appear on the console, despite the test reaching the boot loader and the string appearing in dmesg. Possibly due to an init script that quietens the console output. Using an earlier log message improves reliability. Reviewed-by: Cédric Le

[PULL 20/47] ppc/pnv: Change powernv default to powernv10

2024-02-23 Thread Nicholas Piggin
POWER10 is the latest IBM Power machine. Although it is not offered in "OPAL mode" (i.e., powernv configuration), so there is a case that it should remain at powernv9, most of the development work is going into powernv10 at the moment. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin

[PULL 24/47] ppc/pnv: Add pca9552 to powernv10-rainier for PCIe hotplug power control

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles The Power Hypervisor code expects to see a pca9552 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x63 (or left- justified address of 0xC6). This is used by hypervisor code to control PCIe slot power during hotplug events. Reviewed-by: Cédric Le Goater Si

[PULL 46/47] target/ppc: 440 optimise tlbwe TLB flushing

2024-02-23 Thread Nicholas Piggin
Have 440 tlbwe flush only the range corresponding to the addresses covered by the software TLB entry being modified rather than the entire TLB. This matches what 4xx does. Tested-by: BALATON Zoltan Acked-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/mmu_helper.c | 2 +- 1

[PULL 06/47] tests/avocado: Add ppc pseries and powernv hash MMU tests

2024-02-23 Thread Nicholas Piggin
POWER CPUs support hash and radix MMU modes. Linux supports running in either mode, but defaults to radix. To keep up testing of QEMU's hash MMU implementation, add some Linux hash boot tests. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- tests/avocado/ppc_powernv.py | 23 +++

[PULL 21/47] misc/pca9552: Fix inverted input status

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles The pca9552 INPUT0 and INPUT1 registers are supposed to hold the logical values of the LED pins. A logical 0 should be seen in the INPUT0/1 registers for a pin when its corresponding LSn bits are set to 0, which is also the state needed for turning on an LED in a typical usage

[PULL 08/47] tests/avocado: ppc add hypervisor tests

2024-02-23 Thread Nicholas Piggin
The powernv and pseries machines both provide hypervisor facilities that are supported by KVM. This is a large and complicated set of features that don't get much system-level testing in ppc tests. Add a new test case for these which runs QEMU KVM inside the target. This downloads an Alpine VM ima

[PULL 32/47] hw/ppc: N1 chiplet wiring

2024-02-23 Thread Nicholas Piggin
From: Chalapathi V This part of the patchset connects the nest1 chiplet model to p10 chip. Reviewed-by: Cédric Le Goater Signed-off-by: Chalapathi V Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 15 +++ include/hw/ppc/pnv_chip.h | 2 ++ 2 files changed, 17 inser

[PULL 34/47] target/ppc: Rename TBL to TB on 64-bit

2024-02-23 Thread Nicholas Piggin
>From the earliest PowerPC ISA, TBR (later SPR) 268 has been called TB and accessed with mftb instruction. The problem is that TB is the name of the 64-bit register, and 32-bit implementations can only read the lower half with one instruction, so 268 has also been called TBL and it does only read T

[PULL 35/47] target/ppc: Improve timebase register defines naming

2024-02-23 Thread Nicholas Piggin
The timebase in ppc started out with the mftb instruction which is like mfspr but addressed timebase registers (TBRs) rather than SPRs. These instructions could be used to read TB and TBU at 268 and 269. Timebase could be written via the TBL and TBU SPRs at 284 and 285. The ISA changed around v2.0

[PULL 13/47] hw/ppc/spapr_hcall: Allow elision of softmmu_resize_hpt_prep

2024-02-23 Thread Nicholas Piggin
From: Philippe Mathieu-Daudé Check tcg_enabled() before calling softmmu_resize_hpt_prepare() and softmmu_resize_hpt_commit() to allow the compiler to elide their calls. The stubs are then unnecessary, remove them. Reviewed-by: Nicholas Piggin Signed-off-by: Philippe Mathieu-Daudé Signed-off-by

[PULL 37/47] ppc/pnv: Add POWER9/10 chiptod model

2024-02-23 Thread Nicholas Piggin
The ChipTOD (for Time-Of-Day) is a chip pervasive facility in IBM POWER (powernv) processors that keeps a time of day clock. In particular for this model are facilities that initialise and start the time of day clock, and that synchronise that clock to cores on the chip, and to other chips. In thi

[PULL 45/47] target/ppc: 4xx optimise tlbwe_lo TLB flushing

2024-02-23 Thread Nicholas Piggin
Rather than tlbwe_lo always flushing all TCG TLBs, have it flush just those corresponding to the old software TLB, and only if it was valid. Tested-by: BALATON Zoltan Acked-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/mmu_helper.c | 10 -- 1 file changed, 8 insert

[PULL 30/47] hw/ppc: Add pnv nest pervasive common chiplet model

2024-02-23 Thread Nicholas Piggin
From: Chalapathi V A POWER10 chip is divided into logical units called chiplets. Chiplets are broadly divided into "core chiplets" (with the processor cores) and "nest chiplets" (with everything else). Each chiplet has an attachment to the pervasive bus (PIB) and with chiplet-specific registers.

[PULL 33/47] target/ppc: Update gdbstub to read SPR's CFAR, DEC, HDEC, TB-L/U

2024-02-23 Thread Nicholas Piggin
From: Saif Abrar SPR's CFAR, DEC, HDEC, TB-L/U are not implemented as part of CPUPPCState. Hence, gdbstub is not able to access them using (CPUPPCState *)env->spr[] array. Update gdb_get_spr_reg() method to handle these SPR's specifically. Reviewed-by: Nicholas Piggin Signed-off-by: Saif Abrar

[PULL 07/47] tests/avocado: Add pseries KVM boot_linux test

2024-02-23 Thread Nicholas Piggin
ppc has no avocado tests for the KVM backend. Add a KVM boot_linux.py test for pseries. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- tests/avocado/boot_linux.py | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linu

[PULL 29/47] ppc/pnv: Test pnv i2c master and connected devices

2024-02-23 Thread Nicholas Piggin
From: Glenn Miles Tests the following for both P9 and P10: - I2C master POR status - I2C master status after immediate reset Tests the following for powernv10-ranier only: - Config pca9552 hotplug device pins as inputs then Read the INPUT0/1 registers to verify all pins are high - Co

[PULL 36/47] target/ppc: Fix move-to timebase SPR access permissions

2024-02-23 Thread Nicholas Piggin
The move-to timebase registers TBU and TBL can not be read, and they can not be written in supervisor mode on hypervisor-capable CPUs. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/helper_regs.c | 31 +++ 1 file changed, 23 insertions(+)

[PULL 40/47] target/ppc: Implement core timebase state machine and TFMR

2024-02-23 Thread Nicholas Piggin
This implements the core timebase state machine, which is the core side of the time-of-day system in POWER processors. This facility is operated by control fields in the TFMR register, which also contains status fields. The core timebase interacts with the chiptod hardware, primarily to receive TO

[PULL 43/47] target/ppc: Factor out 4xx ppcemb_tlb_t flushing

2024-02-23 Thread Nicholas Piggin
Flushing the TCG TLB pages that cache a software TLB is a common operation, factor it into its own function. Tested-by: BALATON Zoltan Acked-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/mmu_helper.c | 24 +--- 1 file changed, 13 insertions(+), 11 delet

[PULL 38/47] ppc/pnv: Wire ChipTOD model to powernv9 and powernv10 machines

2024-02-23 Thread Nicholas Piggin
Wire the ChipTOD model to powernv9 and powernv10 machines. Suggested-by-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 30 ++ include/hw/ppc/pnv_chip.h | 3 +++ 2 files changed, 33 insertions(+) di

[PULL 41/47] target/ppc: Add SMT support to time facilities

2024-02-23 Thread Nicholas Piggin
The TB, VTB, PURR, HDEC SPRs are per-LPAR registers, and the TFMR is a per-core register. Add the necessary SMT synchronisation and value sharing. The TFMR can only drive the timebase state machine via thread 0 of the core, which is almost certainly not right, but it is enough for skiboot and cert

[PULL 16/47] ppc/spapr: Introduce SPAPR_IRQ_NR_IPIS to refer IRQ range for CPU IPIs.

2024-02-23 Thread Nicholas Piggin
From: Harsh Prateek Bora spapr_irq_init currently uses existing macro SPAPR_XIRQ_BASE to refer to the range of CPU IPIs during initialization of nr-irqs property. It is more appropriate to have its own define which can be further reused as appropriate for correct interpretation. Suggested-by: Ce

[PULL 44/47] target/ppc: 4xx don't flush TLB for a newly written software TLB entry

2024-02-23 Thread Nicholas Piggin
BookE software TLB is implemented by flushing old translations from the relevant TCG TLB whenever software TLB entries change. This means a new software TLB entry should not have any corresponding cached TCG TLB translations, so there is nothing to flush. The exception is multiple software TLBs tha

Re: [PATCH] scripts/qemu-binfmt-conf.sh: refresh

2024-02-23 Thread Peter Maydell
On Sun, 18 Feb 2024 at 09:32, Michael Tokarev wrote: > > 09.09.2023 16:23, Michael Tokarev : > > A friendly ping? > > A friendly ping #2? Looking at the patch, the commit message lists 9 separate things it does. That suggests it ought to be a 9-patch patchset, not a single patch. I bet most of th

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

2024-02-23 Thread Nicholas Piggin
_console_interaction reads data from the console even when there is only an input string to send, and no output data to wait on. This can cause lines to be missed by wait_for_console_pattern calls that follows an exec_command. Fix this by not reading the console if there is no pattern to wait for.

[PATCH] virt: set the CPU type in BOOTINFO

2024-02-23 Thread Laurent Vivier
BI_CPUTYPE/BI_MMUTYPE/BI_FPUTYPE were statically assigned to the 68040 information. This patch changes the code to set in bootinfo the information provided by the command line '-cpu' parameter. Bug: https://gitlab.com/qemu-project/qemu/-/issues/2091 Reported-by: Daniel Palmer Signed-off-by: Laure

Re: [PATCH v2 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument

2024-02-23 Thread Het Gala
CI Run for the whole patchset series: https://gitlab.com/galahet/Qemu/-/pipelines/1188155391 On 23/02/24 8:55 pm, Het Gala wrote: Introduce support for adding a 'channels' argument to migrate_qmp_fail, migrate_incoming_qmp and migrate_qmp functions within the migration qtest framework, enabling

[PATCH] hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later

2024-02-23 Thread Peter Maydell
The sun4v RTC device model added under commit a0e893039cf2ce0 in 2016 was unfortunately added with a license of GPL-v3-or-later, which is not compatible with other QEMU code which has a GPL-v2-only license. Relicense the code in the .c and the .h file to GPL-v2-or-later, to make it compatible with

[PATCH v2 16/27] linux-user: ensure nios2 processes queued work

2024-02-23 Thread Alex Bennée
While async processes are rare for linux-user we do use them from time to time. The most obvious one is tb_flush when we run out of translation space. We will also need this when we move plugin vcpu_init to an async task. Fix nios2 to follow its older, wiser and more stable siblings. Signed-off-b

[PATCH v2 14/27] plugins: add qemu_plugin_num_vcpus function

2024-02-23 Thread Alex Bennée
From: Pierrick Bouvier We now keep track of how many vcpus were started. This way, a plugin can easily query number of any vcpus at any point of execution, which unifies user and system mode workflows. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20240213094009.1

[PATCH v2 01/27] tests/tcg: update licenses to GPLv2 as intended

2024-02-23 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 one

[PATCH v2 18/27] plugins: Use different helpers when reading registers

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki This avoids optimizations incompatible when reading registers. Signed-off-by: Akihiko Odaki Reviewed-by: Pierrick Bouvier Message-Id: <20240103173349.398526-37-alex.ben...@linaro.org> Message-Id: <20231213-gdb-v17-12-777047380...@daynix.com> Signed-off-by: Alex Bennée Revi

[PATCH v2 03/27] target/arm: Use GDBFeature for dynamic XML

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki Acked-by: Richard Henderson Message-Id: <20240103173349.398526-27-al

[PATCH v2 06/27] gdbstub: Use GDBFeature for gdb_register_coprocessor

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki This is a tree-wide change to introduce GDBFeature parameter to gdb_register_coprocessor(). The new parameter just replaces num_regs and xml parameters for now. GDBFeature will be utilized to simplify XML lookup in a following change. Signed-off-by: Akihiko Odaki Acked-by: A

[PATCH v2 13/27] plugins: remove previous n_vcpus functions from API

2024-02-23 Thread Alex Bennée
From: Pierrick Bouvier This information is already accessible using qemu_info_t during plugin install. We will introduce another function (qemu_plugin_num_vcpus) which represent how many cpus were enabled, by tracking new cpu indexes. It's a breaking change, so we bump API version. Signed-off-

[PATCH v2 00/27] maintainer updates for 9.0 pre-PR (tests, plugin register support)

2024-02-23 Thread Alex Bennée
The test patch is a simple house keeping one to clean up some inadvertent GPLv3 tagging to GPLv2-or-later. I've also increased the timeout for check-tcg due to TCI timesouts. The main bulk of this series is register reading support for TCG plugins. The main change to the API is that the get/read_r

[PATCH v2 10/27] gdbstub: Infer number of core registers from XML

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki GDBFeature has the num_regs member so use it where applicable to remove magic numbers. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-34-alex.ben...@linaro.org> Message-Id: <20231213-gdb-v17-8-777047380...@daynix.com> [AJB: remove core reg check from microbl

[PATCH v2 09/27] gdbstub: Simplify XML lookup

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki Now we know all instances of GDBFeature that is used in CPU so we can traverse them to find XML. This removes the need for a CPU-specific lookup function for dynamic XMLs. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20240103173349.398526-33-alex.ben..

[PATCH v2 26/27] docs/devel: document some plugin assumptions

2024-02-23 Thread Alex Bennée
While we attempt to hide implementation details from the plugin we shouldn't be totally obtuse. Let the user know what they can and can't expect with the various instrumentation options. Message-Id: <20240103173349.398526-44-alex.ben...@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Ale

[PATCH v2 11/27] hw/core/cpu: Remove gdb_get_dynamic_xml member

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki This function is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20240103173349.398526-35-alex.ben...@linaro.org> Message-Id: <20231213-gdb-v17-9-777047380...@daynix.com> Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 4 ta

[PATCH v2 07/27] gdbstub: Use GDBFeature for GDBRegisterState

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki Simplify GDBRegisterState by replacing num_regs and xml members with one member that points to GDBFeature. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240103173349.398526-31-alex.ben...@linaro.org> Message-Id: <2

[PATCH v2 17/27] cpu: call plugin init hook asynchronously

2024-02-23 Thread Alex Bennée
From: Pierrick Bouvier This ensures we run during a cpu_exec, which allows to call start/end exclusive from this init hook (needed for new scoreboard API introduced later). async work is run before any tb is translated/executed, so we can guarantee plugin init will be called before any other hoo

[PATCH v2 27/27] docs/devel: plugins can trigger a tb flush

2024-02-23 Thread Alex Bennée
From: Pierrick Bouvier When scoreboards need to be reallocated. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20240213094009.150349-8-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- docs/devel/multi-thread-tcg.rst | 1 + 1 file changed, 1 insertion(+

[PATCH v2 21/27] plugins: add an API to read registers

2024-02-23 Thread Alex Bennée
We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initialisation or during the translation phase. We don't expose the reg number to the plugin instead hiding it behind an opaque handle. As the register set is po

[PATCH v2 04/27] target/ppc: Use GDBFeature for dynamic XML

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki Reviewed-by: Richard Henderson Message-Id: <20240103173349.398526-28

[PATCH v2 15/27] plugins: fix order of init/idle/resume callback

2024-02-23 Thread Alex Bennée
From: Pierrick Bouvier We found that vcpu_init_hook was called *after* idle callback. vcpu_init is called from cpu_realize_fn, while idle/resume cb are called from qemu_wait_io_event (in vcpu thread). This change ensures we only call idle and resume cb only once a plugin was init for a given vcp

[PATCH v2 08/27] gdbstub: Change gdb_get_reg_cb and gdb_set_reg_cb

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki Align the parameters of gdb_get_reg_cb and gdb_set_reg_cb with the gdb_read_register and gdb_write_register members of CPUClass to allow to unify the logic to access registers of the core and coprocessors in the future. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée

[PATCH v2 02/27] tests/tcg: bump TCG test timeout to 120s

2024-02-23 Thread Alex Bennée
This is less than ideal but easier than making sure we get all the iterations of the memory test. Update the comment accordingly. Signed-off-by: Alex Bennée --- tests/tcg/Makefile.target | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/tcg/Makefile.target b/test

Re: [PATCH 18/23] plugins: add an API to read registers

2024-02-23 Thread Alex Bennée
Alex Bennée writes: > Akihiko Odaki writes: >>> What about if I just key based of gdb_regnum and we accept that that >>> might break the one heterogeneous system we model today? >>> >> >> That's the best option in my opinion. gdbstub won't work well with >> such a system anyway, and fixing it

[PATCH v2 19/27] gdbstub: expose api to find registers

2024-02-23 Thread Alex Bennée
Expose an internal API to QEMU to return all the registers for a vCPU. The list containing the details required to called gdb_read_register(). Based-on: <20231025093128.33116-15-akihiko.od...@daynix.com> Cc: Akihiko Odaki Message-Id: <20240103173349.398526-38-alex.ben...@linaro.org> Signed-off-by

[PATCH v2 20/27] plugins: create CPUPluginState and migrate plugin_mask

2024-02-23 Thread Alex Bennée
We are going to want to keep track of some per-vCPU data for plugins and the logical place to do so is in track it in CPUState. For now this just moves the plugin_mask (renamed to event_mask) as the memory callbacks are accessed directly by TCG generated code. Signed-off-by: Alex Bennée --- incl

[PATCH v2 22/27] tests/tcg: expand insn test case to exercise register API

2024-02-23 Thread Alex Bennée
This ensure we at least read every register the plugin API reports at least once during the check-tcg checks. Signed-off-by: Alex Bennée --- tests/plugin/insn.c | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index 5fd3017c2b3.

[PATCH v2 05/27] target/riscv: Use GDBFeature for dynamic XML

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-29-alex.ben...@linaro.org> Message

[PATCH v2 24/27] contrib/plugins: extend execlog to track register changes

2024-02-23 Thread Alex Bennée
With the new plugin register API we can now track changes to register values. Currently the implementation is fairly dumb which will slow down if a large number of register values are being tracked. This could be improved by only instrumenting instructions which mention registers we are interested

[PATCH v2 12/27] gdbstub: Add members to identify registers to GDBFeature

2024-02-23 Thread Alex Bennée
From: Akihiko Odaki These members will be used to help plugins to identify registers. The added members in instances of GDBFeature dynamically generated by CPUs will be filled in later changes. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-36-alex.ben...@linaro.org> Message-Id

[PATCH v2 23/27] contrib/plugins: fix imatch

2024-02-23 Thread Alex Bennée
We can't directly save the ephemeral imatch from argv as that memory will get recycled. Message-Id: <20240103173349.398526-40-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- contrib/plugins/execlog.c | 2 +- 1 file

[PATCH v2 25/27] docs/devel: lift example and plugin API sections up

2024-02-23 Thread Alex Bennée
This makes them a bit more visible in the TCG emulation menu rather than hiding them away bellow the ToC limit. Message-Id: <20240103173349.398526-43-alex.ben...@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- docs/devel/tcg-plugins.

Re: [PATCH] hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later

2024-02-23 Thread Alex Bennée
Peter Maydell writes: > The sun4v RTC device model added under commit a0e893039cf2ce0 in 2016 > was unfortunately added with a license of GPL-v3-or-later, which is > not compatible with other QEMU code which has a GPL-v2-only license. > > Relicense the code in the .c and the .h file to GPL-v2-or-

Re: [PATCH v5 04/41] Introduce BCM2838 SoC

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 01:20, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/arm/bcm2838.c | 98 > hw/arm/bcm2838_peripherals.c | 72 > hw/arm/meson.build | 2 + > include/hw/ar

Re: [PATCH v5 02/41] Split out common part of peripherals

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 01:19, Sergey Kambalin wrote: > > Pre-setup for BCM2838 introduction > > Signed-off-by: Sergey Kambalin > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v5 03/41] Split out raspi machine common part

2024-02-23 Thread Peter Maydell
On Mon, 19 Feb 2024 at 01:23, Sergey Kambalin wrote: > > Pre-setup for raspberry pi 4 introduction > > Signed-off-by: Sergey Kambalin > --- Reviewed-by: Peter Maydell thanks -- PMM

<    1   2   3   >