Re: [PATCH v1 2/2] memory-device: reintroduce memory region size check

2024-01-19 Thread Mario Casquero
This series has also been successfully tested in x86_64. Tested-by: Mario Casquero On Thu, Jan 18, 2024 at 4:08 AM Zhenyu Zhang wrote: > > [PATCH v1 2/2] memory-device: reintroduce memory region size check > > Test on 64k basic page size aarch64 > The patches work well on my Ampere host. > The

Re: [PATCH 00/26] target/ppc: TCG improvements and fixes

2024-01-19 Thread Cédric Le Goater
Hello Nick, On 1/18/24 16:06, Nicholas Piggin wrote: This is mostly TCG core emulation improvements and fixes. I got the chiptod model in there because it's intertwined with TFMR SPR. Other non-TCG patches are spapr MSR entry point change which goes together with the other machine check / MSR[M

Re: [PATCH 8/8] ppc/pnv: Update skiboot to v7.1

2024-01-19 Thread Cédric Le Goater
On 1/18/24 15:09, Nicholas Piggin wrote: This includes a number of improvements and fixes. Importantly there is a change for QEMU platforms to permit the ChipTOD to be initialised if it is present in the device tree. This will facilitate ChipTOD enablement in pnv. Signed-off-by: Nicholas Piggin

Re: [PATCH 2/2] ppc/pnv: Change powernv default to powernv10

2024-01-19 Thread Cédric Le Goater
On 1/18/24 15:14, Nicholas Piggin wrote: 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. Signed-off-by: Nich

Re: [PATCH v4 0/3] migration & CI: Add a CI job for migration compat testing

2024-01-19 Thread Peter Xu
Fabiano, On Thu, Jan 18, 2024 at 01:49:48PM -0300, Fabiano Rosas wrote: > Here's the second half of adding a migration compatibility test to CI. > > We've already added support for running the full set of migration > tests with two QEMU binaries since commit 5050ad2a380 > ("tests/qtest/migration:

Re: Re: [PATCH v2] tests/docker: Add sqlite3 module to openSUSE Leap container

2024-01-19 Thread Andrea Bolognani
On Fri, Jan 19, 2024 at 10:12:37AM +0300, Michael Tokarev wrote: > 17.01.2024 19:42, Fabiano Rosas : > > Avocado needs sqlite3: > > > --- a/tests/docker/dockerfiles/opensuse-leap.docker > > +++ b/tests/docker/dockerfiles/opensuse-leap.docker > > @@ -90,6 +90,7 @@ RUN zypper update -y && \ > >

Re: [PULL 0/5] qtest timeouts and ROP mitigation

2024-01-19 Thread Peter Maydell
On Tue, 16 Jan 2024 at 07:57, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 977542ded7e6b28d2bc077bcda24568c716e393c: > > Merge tag 'pull-testing-updates-120124-2' of > https://gitlab.com/stsquad/qemu into staging (2024-01-12 14:02:53 +) > > are available in the G

Re: [PATCH v2] acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM

2024-01-19 Thread Peter Maydell
On Wed, 17 Jan 2024 at 09:43, Daniel P. Berrangé wrote: > > On Wed, Jan 17, 2024 at 09:55:56AM +0530, Ani Sinha wrote: > > By default, the timeout to receive any specified event from the QEMU VM is > > 60 > > seconds set by the python avocado test framework. Please see event_wait() > > and > > e

Re: [PULL v2 00/12] target-arm queue

2024-01-19 Thread Peter Maydell
On Thu, 18 Jan 2024 at 12:45, Peter Maydell wrote: > > v2: dropped the nuvoton changes as the tests didn't pass > on big-endian hosts. > > -- PMM > > The following changes since commit 977542ded7e6b28d2bc077bcda24568c716e393c: > > Merge tag 'pull-testing-updates-120124-2' of > https://gitlab.co

Re: [PATCH v3 13/14] hw/arm: Prefer arm_feature(AARCH64) over object_property_find(aarch64)

2024-01-19 Thread Kevin Wolf
Am 11.01.2024 um 11:08 hat Philippe Mathieu-Daudé geschrieben: > On 11/1/24 10:47, Marc Zyngier wrote: > > On Thu, 11 Jan 2024 09:39:18 +, > > Philippe Mathieu-Daudé wrote: > > > > > > On 10/1/24 20:53, Philippe Mathieu-Daudé wrote: > > > > The "aarch64" property is added to ARMCPU when the >

Re: FW: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature

2024-01-19 Thread Eugenio Perez Martin
On Fri, Jan 19, 2024 at 7:42 AM Wentao Jia wrote: > > > VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature are important feature > for dpdk vdpa packets transmitting performance, add the 2 features at > vhost-user > front-end to negotiation with backend. > > Signed-off-by: Kyle Xu > Signed

Re: Re: [PATCH 1/2] target/s390x: Emulate CVDG

2024-01-19 Thread Ilya Leoshkevich
On Fri, Jan 19, 2024 at 08:12:18AM +1100, Richard Henderson wrote: > On 1/16/24 07:21, Ilya Leoshkevich wrote: > > CVDG is the same as CVD, except that it converts 64 bits into 128, > > rather than 32 into 64. Use larger data types in the CVD helper and > > reuse it. > > > > Reported-by: Ido Plat

Re: [PATCH 0/4] intel_iommu: Reset vIOMMU after all the rest of devices

2024-01-19 Thread Peter Xu
On Wed, Jan 17, 2024 at 11:29:08AM +0100, Eric Auger wrote: > Hi Peter, Hi, Eric, Thanks for the reviews! > > On 1/17/24 10:15, pet...@redhat.com wrote: > > From: Peter Xu > > > > There're issue reported that when syetem_reset the VM with an intel iommu > system_reset > > device and MT2892 PF(

Re: [PATCH 2/4] reset: Allow multiple stages of system resets

2024-01-19 Thread Peter Xu
Hello, Phil, PeterM, On Thu, Jan 18, 2024 at 04:53:42PM +0100, Philippe Mathieu-Daudé wrote: > I concur. Devices reset is hard, but bus reset is even harder. > Having a quick look, the issues tracked by Alex & Peter might > come from the PCI bridges using the legacy DeviceReset. The challenges w

Re: [PATCH 2/2] target/riscv: Check 'A' and split extensions for atomic instructions

2024-01-19 Thread Rob Bradford
On Thu, 2024-01-18 at 16:49 -0300, Daniel Henrique Barboza wrote: > > > On 1/15/24 13:25, Rob Bradford wrote: > > Following the pattern for 'M' and Zmmul check if either the 'A' > > extension is enabled or the appropriate split extension for the > > instruction. > > > > Also remove the assumptio

[PATCH 0/6] hw/{arm,xen} convert printfs to trace/reports

2024-01-19 Thread Manos Pitsidianakis
This series changes some printfs to use the trace event framework. Additionally, it converts some error/warning reporting fprintfs to error_report/warn_report. Manos Pitsidianakis (6): hw/arm/z2: convert DPRINTF to tracepoints hw/arm/strongarm.c: convert DPRINTF to tracepoints hw/arm/xen_a

[PATCH 3/6] hw/arm/xen_arm.c: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH 1/6] hw/arm/z2: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH 2/6] hw/arm/strongarm.c: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH 6/6] hw/xen: convert stderr prints to error/warn reports

2024-01-19 Thread Manos Pitsidianakis
According to the QEMU Coding Style document: > Do not use printf(), fprintf() or monitor_printf(). Instead, use > error_report() or error_vreport() from error-report.h. This ensures the > error is reported in the right place (current monitor or stderr), and in > a uniform format. > Use error_print

[PATCH 4/6] hw/xen/xen-mapcache.c: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH 5/6] hw/xen/xen-hvm-common.c: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH v2 2/2] target/riscv: Check 'A' and split extensions for atomic instructions

2024-01-19 Thread Rob Bradford
Following the pattern for 'M' and Zmmul check if either the 'A' extension is enabled or the appropriate split extension for the instruction. Signed-off-by: Rob Bradford --- target/riscv/insn_trans/trans_rva.c.inc | 56 +++-- 1 file changed, 34 insertions(+), 22 deletions(-)

[PATCH v2 0/2] target/riscv: Add support for Zaamo & Zalrsc

2024-01-19 Thread Rob Bradford
Introduce support for the proposed new (fast-track) Zaamo and Zalrsc extensions [1] which represent the AMO and LR/SC subsets of the A extension. The motivation for the subsets being available separately is that certain classes of CPUs may choose to only implement a subset for architectural conv

[PATCH v2 1/2] target/riscv: Add Zaamo and Zalrsc extensions

2024-01-19 Thread Rob Bradford
These extensions represent the atomic operations from A (Zaamo) and the Load-Reserved/Store-Conditional operations from A (Zalrsc) Signed-off-by: Rob Bradford Reviewed-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 5 + target/riscv/cpu_cfg.h | 2 ++ 2 files changed, 7 insertions(

Re: [PATCH] hw/arm/musicpal: Convert to qemu_add_kbd_event_handler()

2024-01-19 Thread Alex Bennée
Peter Maydell writes: > Convert the musicpal key input device to use > qemu_add_kbd_event_handler(). This lets us simplify it because we no > longer need to track whether we're in the middle of a PS/2 multibyte > key sequence. > > In the conversion we move the keyboard handler registration from

[PULL 03/36] accel: Do not set CPUState::tcg_cflags in non-TCG accels

2024-01-19 Thread Philippe Mathieu-Daudé
'tcg_cflags' is specific to TCG. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231130075958.21285-1-phi...@linaro.org> --- target/arm/cpu.c | 2 +- target/i386/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/

[PULL 13/36] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2024-01-19 Thread Philippe Mathieu-Daudé
pmu_init() register its event checking the pm_event::supported() handler. For INST_RETIRED, the event is only registered and the bit enabled in the PMU Common Event Identification register when icount is enabled as ICOUNT_PRECISE. PMU events are TCG-only, hardware accelerators handle them directly

[PULL 15/36] target/sh4: Deprecate the shix machine

2024-01-19 Thread Philippe Mathieu-Daudé
From: Samuel Tardieu The shix machine has been designed and used at Télécom Paris from 2003 to 2010. It had been added to QEMU in 2005 and has not been maintained since. Since nobody is using the physical board anymore nor interested in maintaining the QEMU port, it is time to deprecate it. Sign

[PULL 23/36] cpus: Restrict 'start-powered-off' property to system emulation

2024-01-19 Thread Philippe Mathieu-Daudé
Since the CPUState::start-powered-off property is irrelevant to user emulation, restrict it to system emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024061817.43150-1-phi...@linaro.org> --- cpu-target.c | 7 ++- 1 file changed, 6 insertions

[PULL 09/36] target/alpha: Extract clk_helper.c from sys_helper.c

2024-01-19 Thread Philippe Mathieu-Daudé
Except helper_load_pcc(), all helpers from sys_helper.c are system-emulation specific. In preparation of restricting sys_helper.c to system emulation, extract helper_load_pcc() to clk_helper.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231207105426.49339

[PULL 21/36] system/replay: Restrict icount to system emulation

2024-01-19 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231208113529.74067-7-phi...@linaro.org> --- include/sysemu/cpu-timers.h | 2 +- include/sysemu/replay.h | 11 --- stubs/icount.c | 19 --- 3 files changed, 9 insertions(+

[PULL 06/36] tests/tcg/xtensa: add icount/ibreak priority test

2024-01-19 Thread Philippe Mathieu-Daudé
From: Max Filippov When icount and ibreak exceptions are due to happen on the same address icount has higher precedence. Signed-off-by: Max Filippov Acked-by: Richard Henderson Message-ID: <20231130171920.3798954-3-jcmvb...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/tcg/xtens

[PULL 16/36] hw/block: Deprecate the TC58128 block device

2024-01-19 Thread Philippe Mathieu-Daudé
From: Samuel Tardieu The 16MiB flash device is only used by the deprecated shix machine. Its code it old and unmaintained, and has never been adapted to the QOM architecture. It still contains debug statements and uses global variables. It is time to deprecate it. Signed-off-by: Samuel Tardieu

[PULL 18/36] hw/pflash: refactor pflash_data_write()

2024-01-19 Thread Philippe Mathieu-Daudé
From: Gerd Hoffmann Move the offset calculation, do it once at the start of the function and let the 'p' variable point directly to the memory location which should be updated. This makes it simpler to update other buffers than pfl->storage in an upcoming patch. No functional change. Signed-of

[PULL 17/36] hw/i386/pc_piix: Make piix_intx_routing_notifier_xen() more device independent

2024-01-19 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow This is a follow-up on commit 89965db43cce "hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()" which introduced piix_intx_routing_notifier_xen(). This function is implemented in board code but accesses the PCI configuration space of the PIIX ISA function to d

[PULL 01/36] hw/timer/hpet: Convert DPRINTF to trace events

2024-01-19 Thread Philippe Mathieu-Daudé
From: Daniel Hoffman This conversion is pretty straight-forward. Standardized some formatting so the +0 and +4 offset cases can recycle the same message. Signed-off-by: Daniel Hoffman Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231118231129.2840388-1-dhoff...@gmail.com> [PMD: Fixed few

[PULL 08/36] accel/tcg: Remove tb_invalidate_phys_page() from system emulation

2024-01-19 Thread Philippe Mathieu-Daudé
Since previous commit, tb_invalidate_phys_page() is not used anymore in system emulation. Make it static for user emulation and remove its public declaration in "exec/translate-all.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231130205600.35727-1-phi...@linaro.org> Reviewed-by: Richar

[PULL 07/36] accel/tcg: Remove unused tb_invalidate_phys_addr()

2024-01-19 Thread Philippe Mathieu-Daudé
Commit e3f7c801f1 introduced the TCGCPUOps::debug_check_breakpoint() handler, and commit 10c37828b2 "moved breakpoint recognition outside of translation", so "we no longer need to flush any TBs when changing BPs". The last target using tb_invalidate_phys_addr() was converted to the debug_check_bre

[PULL 02/36] backends/cryptodev: Do not ignore throttle/backends Errors

2024-01-19 Thread Philippe Mathieu-Daudé
Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Without that, running into another failure trips error_setv()'s assertion. Use the ERRP_GUARD() macro as suggested in commit ae7c80a7bd ("error: New m

[PULL 04/36] accel: Do not set CPUState::can_do_io in non-TCG accels

2024-01-19 Thread Philippe Mathieu-Daudé
'can_do_io' is specific to TCG. It was added to other accelerators in 626cf8f4c6 ("icount: set can_do_io outside TB execution"), then likely copy/pasted in commit c97d6d2cdf ("i386: hvf: add code base from Google's QEMU repository"). Having it set in non-TCG code is confusing, so remove it from QTe

[PULL 28/36] target/riscv: Rename tcg_cpu_FOO() to include 'riscv'

2024-01-19 Thread Philippe Mathieu-Daudé
The tcg_cpu_FOO() names are riscv specific, so rename them as riscv_tcg_cpu_FOO() (as other names in this file) to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Message-ID: <2024020221.35072-6-phi...@linaro

[PULL 20/36] hw/pflash: implement update buffer for block writes

2024-01-19 Thread Philippe Mathieu-Daudé
From: Gerd Hoffmann Add an update buffer where all block updates are staged. Flush or discard updates properly, so we should never see half-completed block writes in pflash storage. Drop a bunch of FIXME comments ;) Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 29/36] hw/scsi/esp-pci: use correct address register for PCI DMA transfers

2024-01-19 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland The current code in esp_pci_dma_memory_rw() sets the DMA address to the value of the DMA_SPA (Starting Physical Address) register which is incorrect: this means that for each callback from the SCSI layer the DMA address is set back to the starting address. In the case wher

[PULL 34/36] MAINTAINERS: Update Raphael Norwitz email

2024-01-19 Thread Philippe Mathieu-Daudé
From: Raphael Norwitz I will be leaving Nutanix so updating my email in MAINTAINERS to my personal email for now. Signed-off-by: Raphael Norwitz Reviewed-by: Philippe Mathieu-Daudé Message-ID: <2024092846.111699-1-raphael.norw...@nutanix.com> Signed-off-by: Philippe Mathieu-Daudé --- MAI

[PULL 24/36] accel: Rename accel_init_ops_interfaces() to include 'system'

2024-01-19 Thread Philippe Mathieu-Daudé
accel_init_ops_interfaces() is system specific, so rename it as accel_system_init_ops_interfaces() to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Message-ID: <2024020221.35072-2-phi...@linaro.org> --- ac

[PULL 10/36] target/alpha: Only build sys_helper.c on system emulation

2024-01-19 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231207105426.49339-3-phi...@linaro.org> --- target/alpha/sys_helper.c | 3 --- target/alpha/meson.build | 6 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/alpha/sys_helper.c b/targ

[PULL 36/36] configure: Add linux header compile support for LoongArch

2024-01-19 Thread Philippe Mathieu-Daudé
From: Bibo Mao When compiling qemu with system KVM mode for LoongArch, header files in directory linux-headers/asm-loongarch should be used firstly. Otherwise it fails to find kvm.h on system with old glibc, since latest kernel header files are not installed. This patch adds linux_arch definitio

[PULL 30/36] hw/scsi/esp-pci: generate PCI interrupt from separate ESP and PCI sources

2024-01-19 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland The am53c974/dc390 PCI interrupt has two separate sources: the first is from the internal ESP device, and the second is from the PCI DMA transfer logic. Update the ESP interrupt handler so that it sets DMA_STAT_SCSIINT rather than driving the PCI IRQ directly, and introduc

Re: [PATCH 1/6] hw/arm/z2: convert DPRINTF to tracepoints

2024-01-19 Thread Alex Bennée
Manos Pitsidianakis writes: > Tracing DPRINTFs to stderr might not be desired. A developer that relies > on tracepoints should be able to opt-in to each tracepoint and rely on > QEMU's log redirection, instead of stderr by default. > > This commit converts DPRINTFs in this file that are used for

[PULL 11/36] system/cpu-timers: Have icount_configure() return a boolean

2024-01-19 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have icount_configure() return a boolean indicating whether an error is set or not. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231208113529.74067-2-phi...@

[PULL 35/36] MAINTAINERS: Update hw/core/cpu.c entry

2024-01-19 Thread Philippe Mathieu-Daudé
From: Zhao Liu The hw/core/cpu.c was split as hw/core/cpu-common.c and hw/core/cpu-sysemu.c in the commit df4fd7d5c8a3 ("cpu: Split as cpu-common / cpu-sysemu"). Update the related entry. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240115094852.3597165-2-zhao1..

[PULL 32/36] hw/scsi/esp-pci: set DMA_STAT_BCMBLT when BLAST command issued

2024-01-19 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Even though the BLAST command isn't fully implemented in QEMU, the DMA_STAT_BCMBLT bit should be set after the command has been issued to indicate that the command has completed. This fixes an issue with the DC390 DOS driver which issues the BLAST command as part of its n

[PULL 00/36] HW core patches for 2024-01-19

2024-01-19 Thread Philippe Mathieu-Daudé
it tags/hw-cpus-20240119 for you to fetch changes up to 7ec5d7d91215815e885d2b38e62256e8fd8e2bce: configure: Add linux header compile support for LoongArch (2024-01-19 12:28:59 +0100) HW core patch queue . Deprecate unmaint

[PULL 14/36] util/async: Only call icount_notify_exit() if icount is enabled

2024-01-19 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231208113529.74067-6-phi...@linaro.org> --- accel/tcg/icount-common.c | 4 +++- stubs/icount.c| 2 +- util/async.c | 16 +--- 3 files changed, 13 insertions(+), 9 deletions(

[PULL 12/36] system/cpu-timers: Introduce ICountMode enumerator

2024-01-19 Thread Philippe Mathieu-Daudé
Rather than having to lookup for what the 0, 1, 2, ... icount values are, use a enum definition. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20231208113529.74067-4-phi...@linaro.org> --- include/sysemu/cpu-timers.h | 20 +--- accel/tcg/icoun

[PULL 27/36] target/i386: Rename tcg_cpu_FOO() to include 'x86'

2024-01-19 Thread Philippe Mathieu-Daudé
The tcg_cpu_FOO() names are x86 specific, so rename them as x86_tcg_cpu_FOO() (as other names in this file) to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Message-ID: <2024020221.35072-5-phi...@linaro.org> --- target/i386/tcg/tcg-cpu.c | 32 +

[PULL 26/36] hw/s390x: Rename cpu_class_init() to include 'sclp'

2024-01-19 Thread Philippe Mathieu-Daudé
cpu_class_init() is specific to s390x SCLP, so rename it as sclp_cpu_class_init() (as other names in this file) to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Eric Farman Message-ID: <2024020221.35072-4-phi...@linaro.org> --- hw/s39

[PULL 22/36] system/watchpoint: Move TCG specific code to accel/tcg/

2024-01-19 Thread Philippe Mathieu-Daudé
Keep system/watchpoint.c accelerator-agnostic by moving TCG specific code to accel/tcg/watchpoint.c. Update meson. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024062032.43378-1-phi...@linaro.org> --- accel/tcg/watchpoint.c | 143 +++

[PULL 33/36] hw/elf_ops: Ignore loadable segments with zero size

2024-01-19 Thread Philippe Mathieu-Daudé
From: Bin Meng Some ELF files really do have segments of zero size, e.g.: Program Headers: Type Offset VirtAddr PhysAddr FileSizMemSiz Flags Align RISCV_ATTRIBUT 0x25b8 0x 0x000

[PULL 25/36] hw/core/cpu: Rename cpu_class_init() to include 'common'

2024-01-19 Thread Philippe Mathieu-Daudé
cpu_class_init() is common, so rename it as cpu_common_class_init() to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Message-ID: <2024020221.35072-3-phi...@linaro.org> --- hw/core/cpu-common.c | 4 ++-- 1 file changed, 2 insertions(+),

[PULL 31/36] hw/scsi/esp-pci: synchronise setting of DMA_STAT_DONE with ESP completion interrupt

2024-01-19 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland The setting of DMA_STAT_DONE at the end of a DMA transfer can be configured to generate an interrupt, however the Linux driver manually checks for DMA_STAT_DONE being set and if it is, considers that a DMA transfer has completed. If DMA_STAT_DONE is set but the ESP device

[PULL 19/36] hw/pflash: use ldn_{be,le}_p and stn_{be,le}_p

2024-01-19 Thread Philippe Mathieu-Daudé
From: Gerd Hoffmann Use the helper functions we have to read/write multi-byte values in correct byte order. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240108160900.104835-3-kra...@redhat.com> Signed-off-by: Philippe Mat

[PULL 05/36] target/xtensa: use generic instruction breakpoint infrastructure

2024-01-19 Thread Philippe Mathieu-Daudé
From: Max Filippov Don't embed ibreak exception generation into TB and don't invalidate TB on ibreak address change. Add CPUBreakpoint pointers to xtensa CPUArchState, use cpu_breakpoint_insert/cpu_breakpoint_remove_by_ref to manage ibreak breakpoints and provide TCGCPUOps::debug_check_breakpoint

RE: [PATCH rfcv1 6/6] intel_iommu: add a framework to check and sync host IOMMU cap/ecap

2024-01-19 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH rfcv1 6/6] intel_iommu: add a framework to check and >sync host IOMMU cap/ecap > > > >On 1/18/24 10:30, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message- >>> From: Eric Auger >>> Subject: Re: [PATCH rfcv1 6/6]

Re: [PATCH 2/6] hw/arm/strongarm.c: convert DPRINTF to tracepoints

2024-01-19 Thread Alex Bennée
Manos Pitsidianakis writes: > Tracing DPRINTFs to stderr might not be desired. A developer that relies > on tracepoints should be able to opt-in to each tracepoint and rely on > QEMU's log redirection, instead of stderr by default. > > This commit converts DPRINTFs in this file that are used for

Re: [PATCH 3/6] hw/arm/xen_arm.c: convert DPRINTF to tracepoints

2024-01-19 Thread Alex Bennée
Manos Pitsidianakis writes: > Tracing DPRINTFs to stderr might not be desired. A developer that relies > on tracepoints should be able to opt-in to each tracepoint and rely on > QEMU's log redirection, instead of stderr by default. > > This commit converts DPRINTFs in this file that are used for

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

2024-01-19 Thread Daniel Henrique Barboza
Hi, I have some code style comments: On 1/12/24 06:43, 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 The memory transaction from source devices connected to

Re: [PATCH v5 3/3] hw/riscv/virt: Add IOPMP support

2024-01-19 Thread Daniel Henrique Barboza
On 1/12/24 06:43, Ethan Chen wrote: If a source device is connected to the IOPMP device, its memory transaction will be checked by the IOPMP rule. When using RISC-V virt machine option "iopmp=on", the generic PCIe host bridge connects to IOPMP. The PCI devices on the brigde will connets to

Re: [PATCH v2 2/2] target/riscv: Check 'A' and split extensions for atomic instructions

2024-01-19 Thread Daniel Henrique Barboza
On 1/19/24 08:21, Rob Bradford wrote: Following the pattern for 'M' and Zmmul check if either the 'A' extension is enabled or the appropriate split extension for the instruction. Signed-off-by: Rob Bradford --- Reviewed-by: Daniel Henrique Barboza target/riscv/insn_trans/trans_rva.c.i

how do the iotests pick a machine model to run on ?

2024-01-19 Thread Peter Maydell
If you build QEMU with support for the sh4 target only (configure --target-list=sh4-softmmu) then 'make check' fails in the iotests, because some iotests, including for instance 040, try to create a machine with a virtio-scsi device, but they don't do anything to ensure that the machine they create

Re: [RFC PATCH v3 18/30] migration/multifd: Allow receiving pages without packets

2024-01-19 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Jan 16, 2024 at 05:25:03PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Mon, Nov 27, 2023 at 05:26:00PM -0300, Fabiano Rosas wrote: >> >> Currently multifd does not need to have knowledge of pages on the >> >> receiving side because all the information n

Re: [PATCH v4 0/3] migration & CI: Add a CI job for migration compat testing

2024-01-19 Thread Fabiano Rosas
Peter Xu writes: > Fabiano, > > On Thu, Jan 18, 2024 at 01:49:48PM -0300, Fabiano Rosas wrote: >> Here's the second half of adding a migration compatibility test to CI. >> >> We've already added support for running the full set of migration >> tests with two QEMU binaries since commit 5050ad2a38

Re: [PATCH v4 3/3] ci: Disable migration compatibility tests for aarch64

2024-01-19 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jan 18, 2024 at 01:49:51PM -0300, Fabiano Rosas wrote: >> Until 9.0 is out, we need to keep the aarch64 job disabled because the >> tests always use the n-1 version of migration-test. That happens to be >> broken for aarch64 in 8.2. Once 9.0 is out, it will become the n

Re: [PATCH 3/3] analyze-migration.py: Remove trick on parsing ramblocks

2024-01-19 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > RAM_SAVE_FLAG_MEM_SIZE contains the total length of ramblock idstr to know > whether scanning of ramblocks is complete. Drop the trick. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

[PATCH v2 5/5] hw/xen: convert stderr prints to error/warn reports

2024-01-19 Thread Manos Pitsidianakis
According to the QEMU Coding Style document: > Do not use printf(), fprintf() or monitor_printf(). Instead, use > error_report() or error_vreport() from error-report.h. This ensures the > error is reported in the right place (current monitor or stderr), and in > a uniform format. > Use error_print

[PATCH v2 1/5] hw/arm/z2: convert DPRINTF to trace events and guest errors

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into trace events. DPRINTFs t

[PATCH v2 4/5] hw/xen/xen-hvm-common.c: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

Re: [PATCH 2/3] migration: Drop unnecessary check in ram's pending_exact()

2024-01-19 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > When the migration frameworks fetches the exact pending sizes, it means > this check: > > remaining_size < s->threshold_size > > Must have been done already, actually at migration_iteration_run(): > > if (must_precopy <= s->threshold_size) { >

[PATCH v2 0/5] hw/{arm,xen} convert printfs to trace/reports

2024-01-19 Thread Manos Pitsidianakis
This series changes some printfs to use the trace event framework. Additionally, it converts some error/warning reporting fprintfs to error_report/warn_report. Differences from v1 : - addressed Alex's review Manos Pitsidianakis (5): hw/arm/z2: convert DPRINTF to trace events and guest er

[PATCH v2 3/5] hw/xen/xen-mapcache.c: convert DPRINTF to tracepoints

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH v2 2/5] hw/arm/xen_arm.c: convert DPRINTF to trace events and error/warn reports

2024-01-19 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into trace events. Errors or

Re: [PATCH 1/3] migration: Make threshold_size an uint64_t

2024-01-19 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > It's always used to compare against another uint64_t. Make it always clear > that it's never a negative. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

[PATCH 0/6] virtio-blk: iothread-vq-mapping cleanups

2024-01-19 Thread Stefan Hajnoczi
Kevin Wolf identified some issues with the virtio-blk iothread-vq-mapping patch series that was merged at the end of 2023: 1. s->rq is restarted from one AioContext and races with the other iothread-vq-mapping AioContexts. 2. Failure to set the AioContext is no longer fatal since the IO_CODE API

[PATCH 4/6] virtio-blk: restart s->rq reqs in vq AioContexts

2024-01-19 Thread Stefan Hajnoczi
A virtio-blk device with the iothread-vq-mapping parameter has per-virtqueue AioContexts. It is not thread-safe to process s->rq requests in the BlockBackend AioContext since that may be different from the virtqueue's AioContext to which this request belongs. The code currently races and could cras

[PATCH 2/6] virtio-blk: rename dataplane create/destroy functions

2024-01-19 Thread Stefan Hajnoczi
virtio_blk_data_plane_create() and virtio_blk_data_plane_destroy() are actually about s->vq_aio_context[] rather than managing dataplane-specific state. As a prerequisite to using s->vq_aio_context[] in all code paths (even when dataplane is not used), rename these functions to reflect that they j

[PATCH 3/6] virtio-blk: rename dataplane to ioeventfd

2024-01-19 Thread Stefan Hajnoczi
The dataplane code is really about using ioeventfd. It's used both for IOThreads (what we think of as dataplane) and for the core virtio-pci code's ioeventfd feature (which is enabled by default and used when no IOThread has been specified). Rename the code to reflect this. Signed-off-by: Stefan H

Re: [PATCH v4 4/4] virtio-blk: add iothread-vq-mapping parameter

2024-01-19 Thread Stefan Hajnoczi
On Thu, Dec 21, 2023 at 02:40:19PM +0100, Kevin Wolf wrote: > Am 20.12.2023 um 14:47 hat Stefan Hajnoczi geschrieben: > > Add the iothread-vq-mapping parameter to assign virtqueues to IOThreads. > > Store the vq:AioContext mapping in the new struct > > VirtIOBlockDataPlane->vq_aio_context[] field a

[PATCH 1/6] virtio-blk: move dataplane code into virtio-blk.c

2024-01-19 Thread Stefan Hajnoczi
The dataplane code used to be significantly different from the non-dataplane code and therefore had a separate source file. Over time the difference has gotten smaller because the I/O code paths were unified. Nowadays the distinction between the VirtIOBlock and VirtIOBlockDataPlane structs is more

[PATCH 5/6] virtio-blk: tolerate failure to set BlockBackend AioContext

2024-01-19 Thread Stefan Hajnoczi
We no longer rely on setting the AioContext since the block layer IO_CODE APIs can be called from any thread. Now it's just a hint to help block jobs and other operations co-locate themselves in a thread with the guest I/O requests. Keep going if setting the AioContext fails. Suggested-by: Kevin W

[PATCH 6/6] virtio-blk: always set ioeventfd during startup

2024-01-19 Thread Stefan Hajnoczi
When starting ioeventfd it is common practice to set the event notifier so that the ioeventfd handler is triggered to run immediately. There may be no requests waiting to be processed, but the idea is that if a request snuck in then we guarantee that it will be detected. One scenario where self-tr

Re: Qemu setting "-cpu host" seems broken with Windows vms

2024-01-19 Thread xtec
So finally tested with this: -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,-vmx The used hyper-v enhancements are the ones generally recommended for Windows vms. Overall it seemed to really work: the performance was like bare metal, and the BSOD second problem was also gone (for th

[PATCH] This patch implements several Octeon +/II instructions.

2024-01-19 Thread owl129
From: owl Octeon+ - SAA - SAAD Octeon2 - LAI - LAID - LAD - LADD - LAS - LASD - LAC - LACD - LAA - LAAD - LAW - LAWD - LWX - LHX - LDX - LBUX - LWUX - LHUX - LBX Signed-off-by: owl --- target/mips/tcg/octeon.decode | 35 target/mips/tcg/octeon_translate.c | 281

回复: FW: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature

2024-01-19 Thread Rick Zhong
Hi Eugenio, Thanks for your comments. Very helpful. Wentao and I will discuss and get back to you later. Also welcome for any comments from other guys. Best Regards, Rick Zhong -邮件原件- 发件人: Eugenio Perez Martin 发送时间: 2024年1月19日 18:26 收件人: Wentao Jia 抄送: qemu-devel@nongnu.org; m...@re

Re: how do the iotests pick a machine model to run on ?

2024-01-19 Thread Kevin Wolf
Am 19.01.2024 um 13:55 hat Peter Maydell geschrieben: > If you build QEMU with support for the sh4 target only > (configure --target-list=sh4-softmmu) then 'make check' fails > in the iotests, because some iotests, including for instance 040, > try to create a machine with a virtio-scsi device, but

Re: [PATCH 2/3] hw/arm: Pack the QEMU generated device tree

2024-01-19 Thread Peter Maydell
On Mon, 15 Jan 2024 at 04:34, Bin Meng wrote: > > By default QEMU generates a 1 MiB sized device tree. Let's pack it > to save some room. > > Signed-off-by: Bin Meng > --- > > hw/arm/boot.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/hw/arm/boot.c b/hw/arm/boot.c > inde

Re: [PATCH 3/3] tests/acpi: Update virt/SSDT.memhp

2024-01-19 Thread Peter Maydell
On Mon, 15 Jan 2024 at 04:35, Bin Meng wrote: > > The Arm dtb changes caused an address change: > > DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x0001) > { > [ ... ] > -Name (MEMA, 0x43C8) > +Name (MEMA, 0x43D8) > } > > Signed-off-by: Bin Meng > > --- You shou

[RFC PATCH 05/34] target/tricore: [VADDR] Use target_ulong for EA

2024-01-19 Thread Anton Johansson via
Prepares target for typedef'ing abi_ptr to vaddr. Fixes sign extension bug that would result from abi_ptr being unsigned in the future. Necessary to make memory access function signatures target agnostic. Signed-off-by: Anton Johansson --- target/tricore/op_helper.c | 8 1 file change

[RFC PATCH 19/34] accel/tcg: [CPUTLB] Use TCGContext.addr_type instead of TARGET_LONG_BITS

2024-01-19 Thread Anton Johansson via
[NOTE: We could also use target_long_bits(), which is introduced later] Signed-off-by: Anton Johansson --- include/exec/cpu_ldst.h | 31 --- accel/tcg/cputlb.c | 34 -- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git

[RFC PATCH 13/34] target: Uninline cpu_get_tb_cpu_state()

2024-01-19 Thread Anton Johansson via
Required to compile accel/tcg/translate-all.c once for softmmu targets. The function gets quite big for some targets so uninlining makes sense. Signed-off-by: Anton Johansson --- include/exec/cpu-common.h | 4 +++ target/alpha/cpu.h| 11 --- target/arm/cpu.h | 3 -- target

  1   2   3   >