Re: [PATCH] i386: xen: fix compilation --without-default-devices

2024-02-16 Thread Manos Pitsidianakis
On Fri, 09 Feb 2024 23:59, Paolo Bonzini wrote: The xenpv machine type requires XEN_BUS, so select it. Signed-off-by: Paolo Bonzini --- accel/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/Kconfig b/accel/Kconfig index a30cf2eb483..794e0d18d21 100644 --- a/accel/Kconfig +++ b

Re: [PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-16 Thread Cédric Le Goater
On 2/15/24 08:59, Jamin Lin wrote: In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL and initial

Re: [PATCH v3 1/2] aspeed: introduce a new UART0 device name

2024-02-16 Thread Cédric Le Goater
On 2/15/24 08:59, Jamin Lin wrote: The Aspeed datasheet refers to the UART controllers as UART1 - UART13 for the ast10x0, ast2600, ast2500 and ast2400 SoCs and the Aspeed ast2700 introduces an UART0 and the UART controllers as UART0 - UART12. To keep the naming in the QEMU models in sync with th

Re: [PATCH v4 00/10] Optimize buffer_is_zero

2024-02-16 Thread Richard Henderson
On 2/15/24 13:37, Alexander Monakov wrote: Ah, I guess you might be running at low perf_event_paranoid setting that allows unprivileged sampling of kernel events? In our submissions the percentage was for perf_event_paranoid=2, i.e. relative to Qemu only, excluding kernel time under syscalls. O

Re: [PATCH 5/6] hw/vfio/common: Use RCU_READ macros

2024-02-16 Thread Philippe Mathieu-Daudé
On 24/1/24 15:09, Philippe Mathieu-Daudé wrote: On 24/1/24 10:25, Manos Pitsidianakis wrote: On Wed, 24 Jan 2024 09:42, Philippe Mathieu-Daudé wrote: Replace the manual rcu_read_(un)lock calls by the *RCU_READ_LOCK_GUARD macros (See commit ef46ae67ba "docs/style: call out the use of GUARD macr

Re: [PATCH v4 0/3] Initial support for SPDM Responders

2024-02-16 Thread Klaus Jensen
On Feb 15 14:44, Jonathan Cameron wrote: > On Tue, 13 Feb 2024 12:44:00 +1000 > Alistair Francis wrote: > > Hi All, > > Just wanted to add that back in v2 Klaus Jensen stated: > > "I have no problem with picking this up for nvme, but I'd rather not take > the full series through my tree withou

[PATCH 3/3] qtest: migration: Add negative validation test for 'uri' and 'channels' both set

2024-02-16 Thread Het Gala
Ideally QAPI 'migrate' and 'migrate-incoming' does not allow 'uri' and 'channels' both arguments to be present in the arguments list as they are mutually exhaustive. Add a negative test case to validate the same. Even before the migration connection is established, qmp command will error out with

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

2024-02-16 Thread Het Gala
Introduce support for adding a 'channels' argument to migrate_qmp_fail 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/migration-helpers.c | 93 +++

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

2024-02-16 Thread Het Gala
With recent migrate QAPI changes enabling direct use of the 'channels' argument, avoiding redundant string parsing of the URI is achieved. To ensure backward compatibility, both 'uri' and 'channels' arguments are now optional in migration QMP commands. However, they are mutually exclusive, requiri

[PATCH 2/3] qtest: migration: Introduce 'connect_channels' in MigrateCommon struct

2024-02-16 Thread Het Gala
migration QAPIs can now work with either 'channels' or 'uri' as their argument. Signed-off-by: Het Gala --- tests/qtest/migration-test.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index e7f2719dcf..0bc69b1943 100644 ---

[PATCH v2] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-16 Thread Thomas Huth
When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with: /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function `machine_HP_common_init_tail': hw/hppa/machine.c:399: undefined reference to `usb_bus_find' /usr/bin/ld: hw/hppa

Re: [PATCH 5/6] hw/vfio/common: Use RCU_READ macros

2024-02-16 Thread Cédric Le Goater
On 2/16/24 09:49, Philippe Mathieu-Daudé wrote: On 24/1/24 15:09, Philippe Mathieu-Daudé wrote: On 24/1/24 10:25, Manos Pitsidianakis wrote: On Wed, 24 Jan 2024 09:42, Philippe Mathieu-Daudé wrote: Replace the manual rcu_read_(un)lock calls by the *RCU_READ_LOCK_GUARD macros (See commit ef46a

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

2024-02-16 Thread Shiju Jose via
Hi Fan, Thanks for the feedbacks. >-Original Message- >From: fan >Sent: 15 February 2024 18:06 >To: Shiju Jose >Cc: qemu-devel@nongnu.org; linux-...@vger.kernel.org; Jonathan Cameron >; tanxiaofei ; >Zengtao (B) ; Linuxarm >Subject: Re: [PATCH v2 1/3] hw/cxl/cxl-mailbox-utils: Add supp

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

2024-02-16 Thread Shiju Jose via
Hi Fan, >-Original Message- >From: fan >Sent: 15 February 2024 18:09 >To: Shiju Jose >Cc: qemu-devel@nongnu.org; linux-...@vger.kernel.org; Jonathan Cameron >; tanxiaofei ; >Zengtao (B) ; Linuxarm >Subject: Re: [PATCH v2 0/3] hw/cxl/cxl-mailbox-utils: Add feature commands, >device patro

Re: [RFC PATCH v4 10/10] util/bufferiszero: Add sve acceleration for aarch64

2024-02-16 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > > RFC because I've not benchmarked this on real hw, only run it > through qemu for validation. I think we have an a64fx is the TCWG lab you could probably run the tests on if you want. Otherwise I might be able to spin up a Gr

[PATCH] iotests: adapt to output change for recently introduced 'detached header' field

2024-02-16 Thread Fiona Ebner
Failure was noticed when running the tests for the qcow2 image format. Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS") Signed-off-by: Fiona Ebner --- tests/qemu-iotests/198.out | 2 ++ tests/qemu-iotests/206.out | 1 + 2 files changed, 3 insertions(+) di

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

2024-02-16 Thread Thomas Huth
On 16/02/2024 01.10, BALATON Zoltan wrote: Documentation on how to run Linux on the amigaone, pegasos2 and sam460ex machines is currently burried in the depths of the qemu-devel s/burried/buried/ mailing list and in the source code. Let's collect the information in the QEMU handbook for a one

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

2024-02-16 Thread Shiju Jose via
Hi Fan, >-Original Message- >From: fan >Sent: 15 February 2024 18:47 >To: Shiju Jose >Cc: qemu-devel@nongnu.org; linux-...@vger.kernel.org; Jonathan Cameron >; tanxiaofei ; >Zengtao (B) ; Linuxarm ; >fan...@samsung.com >Subject: Re: [PATCH v2 2/3] hw/cxl/cxl-mailbox-utils: Add device pat

Re: [PATCH v2] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-16 Thread Philippe Mathieu-Daudé
On 16/2/24 10:16, Thomas Huth wrote: When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with: /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function `machine_HP_common_init_tail': hw/hppa/machine.c:399: undefined referenc

Re: [PATCH 1/6] libqos/virtio.c: init all elems in qvring_indirect_desc_setup()

2024-02-16 Thread Thomas Huth
On 13/02/2024 20.17, Daniel Henrique Barboza wrote: The loop isn't setting the values for the last element. Every other element is being initialized with addr = 0, flags = VRING_DESC_F_NEXT and next = i + 1. The last elem is never touched. This became a problem when enabling a RISC-V 'virt' libq

Re: [PATCH v4 0/3] Initial support for SPDM Responders

2024-02-16 Thread Alistair Francis
On Fri, Feb 16, 2024 at 6:52 PM Klaus Jensen wrote: > > On Feb 15 14:44, Jonathan Cameron wrote: > > On Tue, 13 Feb 2024 12:44:00 +1000 > > Alistair Francis wrote: > > > > Hi All, > > > > Just wanted to add that back in v2 Klaus Jensen stated: > > > > "I have no problem with picking this up for n

Re: [PATCH 2/6] libqos/virtio.c: fix 'avail_event' offset in qvring_init()

2024-02-16 Thread Thomas Huth
On 13/02/2024 20.17, Daniel Henrique Barboza wrote: In qvring_init() we're writing vq->used->avail_event at "vq->used + 2 + array_size". The struct pointed by vq->used is, from virtio_ring.h Linux header): * // A ring of used descriptor heads with free-running index. * __virtio16 us

[RFC 3/4] mirror: move some checks to qmp

2024-02-16 Thread Fiona Ebner
From: Fabian Grünbichler and assert the passing conditions in block/mirror.c. while incremental mode was never available for drive-mirror, it makes the interface more uniform w.r.t. backup block jobs. Signed-off-by: Fabian Grünbichler Signed-off-by: Thomas Lamprecht [FE: rebase for 9.0] Signed

[RFC 4/4] iotests: add test for bitmap mirror

2024-02-16 Thread Fiona Ebner
From: Fabian Grünbichler heavily based on/practically forked off iotest 257 for bitmap backups, but: - no writes to filter node 'mirror-top' between completion and finalization, as those seem to deadlock? - no inclusion of not-yet-available full/top sync modes in combination with bitmaps - extra

[RFC 2/4] drive-mirror: add support for conditional and always bitmap sync modes

2024-02-16 Thread Fiona Ebner
From: John Snow Teach mirror two new tricks for using bitmaps: Always: no matter what, we synchronize the copy_bitmap back to the sync_bitmap. In effect, this allows us resume a failed mirror at a later date. Conditional: On success only, we sync the bitmap. This is akin to incremental backup m

[RFC 0/4] mirror: implement incremental and bitmap modes

2024-02-16 Thread Fiona Ebner
Previous discussion from when this was sent upstream [0] (it's been a while). I rebased the patches and re-ordered and squashed like suggested back then [1]. This implements two new mirror modes: - bitmap mirror mode with always/on-success/never bitmap sync mode - incremental mirror mode as sugar

[RFC 1/4] drive-mirror: add support for sync=bitmap mode=never

2024-02-16 Thread Fiona Ebner
From: John Snow This patch adds support for the "BITMAP" sync mode to drive-mirror and blockdev-mirror. It adds support only for the BitmapSyncMode "never," because it's the simplest mode. This mode simply uses a user-provided bitmap as an initial copy manifest, and then does not clear any bits

Re: [PATCH 6/6] tests/libqos: add riscv/virt machine nodes

2024-02-16 Thread Thomas Huth
On 13/02/2024 20.17, Daniel Henrique Barboza wrote: Add a RISC-V 'virt' machine to the graph. This implementation is a modified copy of the existing arm machine in arm-virt-machine.c It contains a virtio-mmio and a generic-pcihost controller. The generic-pcihost controller hardcodes assumptions

Re: [PULL 00/35] target-arm queue

2024-02-16 Thread Peter Maydell
On Thu, 15 Feb 2024 at 17:35, Peter Maydell wrote: > > The following changes since commit 5767815218efd3cbfd409505ed824d5f356044ae: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-02-14 > 15:45:52 +) > > are available in the Git reposit

[PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style

2024-02-16 Thread Philippe Mathieu-Daudé
QEMU's coding style generally forbids C99 mixed declarations. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 196827531a..3c00a87317 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1

[PATCH 12/21] hw/pci-host/q35: Update q35_host_props[] comment

2024-02-16 Thread Philippe Mathieu-Daudé
Commit aff39be0ed ("hw/pci-host: Use object_initialize_child for correct reference counting") replaced object_initialize() by object_initialize_child(), update the comment. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/q35.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH 02/21] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_sysfw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index c8d9e71b88..3efabbbab2 100644 --- a/hw/i386/pc_sy

[PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/pnv_bmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c index 99f1e8d7f9..0c1274df21 100644 --- a/hw/ppc/pnv_bmc

[PATCH 00/21] hw: More QDev cleanups

2024-02-16 Thread Philippe Mathieu-Daudé
Various QDev cleanups extracted to my "enforce QDev API" branch. - When available, instead of plain QOM, use QDev API equivalent - Add missing QOM parentship for some obj created with qdev_*new() - Prefer object_initialize_child() over object_initialize() Philippe Mathieu-Daudé (21): hw/i386/pc:

[PATCH 13/21] hw/pci-host/raven: Embedded OrIRQ in PRePPCIState

2024-02-16 Thread Philippe Mathieu-Daudé
Since we know the size of the OrIRQ object, we can initialize it directly in place with object_initialize_child(). Doing so we also set the QOM parent <-> child relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/raven.c | 12 ++-- 1 file changed, 6 insertions(+), 6 delet

[PATCH 11/21] hw/usb: Add QOM parentship relation with hub devices

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index a599e2552b..baad04f466 100644 --- a/

[PATCH 14/21] hw/pci-host/raven: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/raven.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/raven.c b/hw/p

[PATCH 18/21] hw/pci-host/versatile: Replace object_initialize() -> _child()

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/versatile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/versatile.c b/

[PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/core/qdev.c| 2 +- hw/sparc/sun4m.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 2

[PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 2 +- target/xtensa/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index d644adbc77..6b3909ee08 10

[PATCH 20/21] hw/arm/mps2: Add QOM parentship relation with OR IRQ gates

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- Better would be to embedded an call object_initialize_child()... --- hw/arm/mps2.c | 5 + 1 file changed, 5 insertions(+) diff --

[PATCH 09/21] hw/usb: Inline usb_try_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Inline the single use of usb_try_new(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/bus.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 59c39945dd..148224f06a 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -334,11 +334,6 @@ USBD

[PATCH 17/21] hw/i386/iommu: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Rename the 'klass' variable as 'obj' since the argument holds a reference to an instance object and not a class one. Signed-off-by: Philippe Mathieu-Daudé --- hw

[PATCH 21/21] hw: Add QOM parentship relation with CPUs

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/x86.c| 1 + hw/microblaze/petalogix_ml605_mmu.c | 1 + hw/microblaze/petalogix_s3adsp1800_mmu

[PATCH 16/21] hw/net/can/versal: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/can/xlnx-versal-canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/can/xlnx-versa

Re: [RFC PATCH v4 10/10] util/bufferiszero: Add sve acceleration for aarch64

2024-02-16 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > > RFC because I've not benchmarked this on real hw, only run it > through qemu for validation. > > > +#ifdef CONFIG_SVE_OPT > +static unsigned accel_index; > +static void __attribute__((constructor)) init_accel(void) > +{ >

[PATCH 10/21] hw/usb: Inline usb_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Inline the 2 uses of usb_new(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h| 1 - hw/usb/bus.c| 9 ++--- hw/usb/dev-serial.c | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2..2d820685cc 1006

[PATCH 03/21] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_cpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 0c0fb3f1b0..40b7c52f7f 100644 --- a/hw

[PATCH 08/21] hw/isa: Inline isa_try_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Inline the 2 single uses of isa_try_new(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/isa/isa.h| 1 - include/hw/net/ne2000-isa.h | 2 +- hw/i386/pc.c| 2 +- hw/isa/isa-bus.c| 5 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/in

Re: [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API

2024-02-16 Thread Cédric Le Goater
On 2/16/24 12:02, Philippe Mathieu-Daudé wrote: Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/pnv_bmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) dif

[PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/tricore/tricore_testdevice.h | 3 --- hw/tricore/tricore_testboard.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/hw/tricore/tricore_

[PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s390-pci-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 3e5

[PATCH 15/21] hw/core/register: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/register.c b/hw/core/regi

Re: [PATCH v3 1/9] usb: inline device creation functions

2024-02-16 Thread Philippe Mathieu-Daudé
On 13/2/24 16:49, Paolo Bonzini wrote: Allow boards to use the device creation functions even if USB itself is not available; of course the functions will fail inexorably, but this can be okay if the calls are conditional on the existence of some USB host controller device. This is for example t

[PATCH 1/3] trans_rvv.c.inc: write CSRs must call mark_vs_dirty() too

2024-02-16 Thread Daniel Henrique Barboza
In the Vector spec section 3.2 [1]: "When mstatus.VS is set to Initial or Clean, executing any instruction that changes vector state, including the vector CSRs, will change mstatus.VS to Dirty." ldst_us_trans(), ldst_stride_trans(), ldst_index_trans() and ldst_whole_trans() will change vector s

[PATCH 0/3] riscv: set vstart_eq_zero on mark_vs_dirty

2024-02-16 Thread Daniel Henrique Barboza
Hi, This is my shot to fix https://gitlab.com/qemu-project/qemu/-/issues/1976. First patch ensures that every vector instruction that changes the vector state will call mark_vs_dirty(). Second patch is a trivial simplification. Third patch is where the bug is solved: check if 'vstart' is zeroed

[PATCH 3/3] target/riscv/translate.c: set vstart_eq_zero in mark_vs_dirty()

2024-02-16 Thread Daniel Henrique Barboza
The 'vstart_eq_zero' flag which is used to determine if some insns, like vector reductor operations, should SIGILL. At this moment the flag is being updated only during cpu_get_tb_cpu_state(), at the start of each translation block. This cadence isn't enough and we're facing situations where a vec

[PATCH 2/3] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-02-16 Thread Daniel Henrique Barboza
trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_r

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

2024-02-16 Thread Alex Bennée
Peter Maydell writes: > When msys2 updated their libusb packages to libusb 1.0.27, they > dropped support for building them for mingw32, leaving only mingw64 > packages. This broke our CI job, as the 'pacman' package install now > fails with: > > error: target not found: mingw-w64-i686-libusb >

Re: [PATCH v4 02/36] linux-user: Adjust SVr4 NULL page mapping

2024-02-16 Thread Alex Bennée
Richard Henderson writes: > Use TARGET_PAGE_SIZE and MAP_FIXED_NOREPLACE. > > We really should be attending to this earlier during > probe_guest_base, as well as better detection and > emulation of various Linux personalities. Do we know all our supported systems support this flag now? > > Sig

Re: QEMU 8.2.0 aarch64 sve ldff1b returning 1 byte when 16 are expected

2024-02-16 Thread Alex Bennée
Mark Charney OS writes: > Using QEMU v8.2.0 (and also the HEAD of the git master branch), I > encountered an unexpected situation: an ldff1b is returning 1 byte > when I run with the QEMU user level plugin (and setting FFR as if > there was a fault). > > However the ldff1b actually loads 16 bytes

Re: [PATCH v5 0/3] linux-user: Allow gdbstub to ignore page protection

2024-02-16 Thread Alex Bennée
Ilya Leoshkevich writes: > v4: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05857.html > v4 -> v5: Fix the probe_proc_self_mem vs probe_proc_self_mem() typo. > Add Alex's R-b and A-b. I was going to pull this and realised it already went in via Richard's tcg-next. Did this

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

2024-02-16 Thread Shiju Jose via
Hi Davidlohr, Thanks for the feedback. Please find reply inline. >-Original Message- >From: Davidlohr Bueso >Sent: 15 February 2024 20:56 >To: Shiju Jose >Cc: qemu-devel@nongnu.org; linux-...@vger.kernel.org; Jonathan Cameron >; tanxiaofei ; >Zengtao (B) ; Linuxarm ; >fan...@samsung.com

Re: [RFC PATCH] include/qom/object.h: New OBJECT_DEFINE_SIMPLE_TYPE{,_WITH_INTEFACES} macros

2024-02-16 Thread Daniel P . Berrangé
On Mon, Feb 12, 2024 at 05:49:25PM +, Peter Maydell wrote: > We have an OBJECT_DEFINE_TYPE_EXTENDED macro, plus several variations > on it, which emits the boilerplate for the TypeInfo and ensures it is > registered with the type system. However, all the existing macros > insist that the type

Re: [PATCH v5 0/3] linux-user: Allow gdbstub to ignore page protection

2024-02-16 Thread Ilya Leoshkevich
On Fri, 2024-02-16 at 11:44 +, Alex Bennée wrote: > Ilya Leoshkevich writes: > > > v4: > > https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05857.html > > v4 -> v5: Fix the probe_proc_self_mem vs probe_proc_self_mem() > > typo. > >   Add Alex's R-b and A-b. > > I was going to

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

2024-02-16 Thread Daniel Henrique Barboza
On 2/16/24 03:13, Alvin Chang wrote: The RISC-V debug specification defines an optional CSR "tcontrol" within the trigger module. This commit adds its read/write operations and related bit-field definitions. Signed-off-by: Alvin Chang --- target/riscv/cpu.h | 1 + target/riscv/cpu_b

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

2024-02-16 Thread BALATON Zoltan
On Fri, 16 Feb 2024, Thomas Huth wrote: On 16/02/2024 01.10, BALATON Zoltan wrote: Documentation on how to run Linux on the amigaone, pegasos2 and sam460ex machines is currently burried in the depths of the qemu-devel s/burried/buried/ mailing list and in the source code. Let's collect the i

[PATCH v3 02/11] {linux,bsd}-user: Update ts_tid after fork()

2024-02-16 Thread Ilya Leoshkevich
Currently ts_tid contains the parent tid after fork(), which is not correct. So far it has not affected anything, but the upcoming follow-fork-mode child support relies on the correct value, so fix it. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c | 1 + linux-user/main.c | 1 + 2 files

[PATCH v3 07/11] gdbstub: Introduce gdb_handle_query_supported_user()

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires advertising the fork-events feature, which is user-specific. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 12 +--- gdbstub/internals.h | 1 + gdbstub/user.c | 4 3 files

[PATCH v3 01/11] gdbstub: Support disablement in a multi-threaded process

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support will require disabling gdbstub in the parent process, which may have multiple threads (which are represented as CPUs). Loop over all CPUs in order to remove breakpoints and disable single-step. Move the respective code into a separate function. Signed-o

[PATCH v3 03/11] gdbstub: Introduce gdbserver_fork_start()

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires knowing when fork() is about to happen in order to initialize its state. Add a hook for that. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c| 1 + gdbstub/user.c | 4 include/gdbstub/user.h | 5 + linux-user/main.

[PATCH v3 05/11] {linux,bsd}-user: Pass pid to gdbserver_fork()

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c| 2 +- gdbstub/user.c | 2 +- include/gdbstub/user.h | 2 +- linux-user/main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(

[PATCH v3 00/11] gdbstub: Implement follow-fork-mode child

2024-02-16 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00810.html v2 -> v3: Rebase on top of master. Fix a typo in the 01/11 commit message. v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg06646.html v1 -> v2: Factor out a number of prep patches; Add a state

[PATCH v3 04/11] {linux,bsd}-user: Pass pid to fork_end()

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Signed-off-by: Ilya Leoshkevich --- bsd-user/freebsd/os-proc.h | 6 +++--- bsd-user/main.c | 4 +++- bsd-user/qemu.h | 2 +- linux-user/main.c | 4 +++- linux-user/syscall

[PATCH v3 09/11] gdbstub: Introduce gdb_handle_detach_user()

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support needs to perform certain actions when GDB detaches from the stopped parent or the stopped child. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 6 ++ gdbstub/internals.h | 1 + gdbstub/user.c

[PATCH v3 08/11] gdbstub: Introduce gdb_handle_set_thread_user()

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support needs to perform certain actions when GDB switches between the stopped parent and the stopped child. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 11 +-- gdbstub/internals.h | 1 + gdbstub/

Re: [PATCH 0/2] trace: fix ability to use systemtap with qemu tools

2024-02-16 Thread Daniel P . Berrangé
Ping: Stefan, are you OK with picking up these trace patches for merge ? On Mon, Jan 08, 2024 at 05:13:54PM +, Daniel P. Berrangé wrote: > Currently we're only generating .stp definitions for the system and > user emulators forgetting all about the tools which support tracing > too. > > Danie

[PATCH v3 06/11] gdbstub: Call gdbserver_fork() both in parent and in child

2024-02-16 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires post-fork message exchange between the parent and the child. Prepare gdbserver_fork() for this purpose. Rename it to gdbserver_fork_end() to better reflect its purpose. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c| 3 ++- gdbstu

[PATCH v3 11/11] tests/tcg: Add two follow-fork-mode tests

2024-02-16 Thread Ilya Leoshkevich
Add follow-fork-mode child and and follow-fork-mode parent tests. Check for the obvious pitfalls, such as lingering breakpoints, catchpoints, and single-step mode. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 17 +- tests/tcg/multiarch/follow-fork-mode.

[PATCH v3 10/11] gdbstub: Implement follow-fork-mode child

2024-02-16 Thread Ilya Leoshkevich
Currently it's not possible to use gdbstub for debugging linux-user code that runs in a forked child, which is normally done using the `set follow-fork-mode child` GDB command. Purely on the protocol level, the missing piece is the fork-events feature. However, a deeper problem is supporting $Hg s

Re: [PATCH 11/14] vfio: Extend vfio_set_migration_error() with Error* argument

2024-02-16 Thread Cédric Le Goater
Hello Avihai, On 2/12/24 10:35, Avihai Horon wrote: Hi Cedric, On 07/02/2024 15:33, Cédric Le Goater wrote: External email: Use caution opening links or attachments vfio_set_migration_error() sets the 'return' error on the migration stream if a migration is in progress. To improve error repo

Re: [PATCH 1/4] Add ivshmem-flat device

2024-02-16 Thread Philippe Mathieu-Daudé
On 27/11/23 06:20, Gustavo Romero wrote: Add a new device, ivshmem-flat, which is similar to the ivshmem PCI but does not require a PCI bus. It's meant to be used on machines like those with Cortex-M MCUs, which usually lack a PCI/PCIe bus, e.g. lm3s6965evb and mps2-an385. The device currently o

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

2024-02-16 Thread Charlie Jenkins
On Thu, Feb 15, 2024 at 09:34:15PM -0800, Guenter Roeck wrote: > Unaligned 64-bit accesses were found in Linux to clobber carry bits, > resulting in bad results if an arithmetic operation involving a > carry bit was executed after an unaligned 64-bit operation. > > hppa 2.0 defines additional carr

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

2024-02-16 Thread Peter Maydell
On Fri, 16 Feb 2024 at 11:29, Alex Bennée wrote: > > Peter Maydell writes: > > > When msys2 updated their libusb packages to libusb 1.0.27, they > > dropped support for building them for mingw32, leaving only mingw64 > > packages. This broke our CI job, as the 'pacman' package install now > > fa

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

2024-02-16 Thread Daniel Henrique Barboza
On 2/16/24 03:13, Alvin Chang wrote: From the RISC-V debug specification, it defines the following operations for CSR tcontrol when any trap into M-mode is taken: 1. tcontrol.MPTE is set to the value of tcontrol.MTE 2. tcontrol.MTE is set to 0 This commit implements the above operations into

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

2024-02-16 Thread Daniel Henrique Barboza
On 2/16/24 03:13, Alvin Chang wrote: When the trigger module resets, reset the value of CSR tcontrol as zero. Signed-off-by: Alvin Chang --- Reviewed-by: Daniel Henrique Barboza target/riscv/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/debug.c b/target/ris

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

2024-02-16 Thread Daniel Henrique Barboza
On 2/16/24 03:13, Alvin Chang wrote: The RISC-V debug specification defines the following operation for CSR tcontrol when "mret" is executed: - tcontrol.MTE is set to the value of tcontrol.MPTE This commit implements the above operation into helper_mret(). Note that from tech-debug mailing l

Re: [PATCH v5 0/9] Misc clean ups to target/ppc exception handling

2024-02-16 Thread BALATON Zoltan
On Tue, 30 Jan 2024, BALATON Zoltan wrote: On Thu, 18 Jan 2024, BALATON Zoltan wrote: These are some small clean ups for target/ppc/excp_helper.c trying to make this code a bit simpler. No functional change is intended. This series was submitted before but only partially merged due to freeze and

Re: [PATCH 1/6] target/ppc: Fix 440 tlbwe TLB invalidation gaps

2024-02-16 Thread BALATON Zoltan
On Thu, 18 Jan 2024, Nicholas Piggin wrote: The 440 software TLB write entry 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. -

[PULL 0/7] Ui patches

2024-02-16 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 3ff11e4dcabe2b5b4c26e49d741018ec326f127f: Merge tag 'pull-target-arm-20240215' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-02-15 17:36:30 +) are available in the Git repository at: https://gitlab.com

[PULL 6/7] meson: Explicitly specify dbus-display1.h dependency

2024-02-16 Thread marcandre . lureau
From: Akihiko Odaki Explicitly specify dbus-display1.h as a dependency so that files depending on it will not get compiled too early. Fixes: 1222070e7728 ("meson: ensure dbus-display generated code is built before other units") Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Messa

[PULL 1/7] ui: reject extended clipboard message if not activated

2024-02-16 Thread marcandre . lureau
From: Daniel P. Berrangé The extended clipboard message protocol requires that the client activate the extension by requesting a psuedo encoding. If this is not done, then any extended clipboard messages from the client should be considered invalid and the client dropped. Signed-off-by: Daniel P

[PULL 5/7] audio: Depend on dbus_display1_dep

2024-02-16 Thread marcandre . lureau
From: Akihiko Odaki dbusaudio needs dbus_display1_dep. Fixes: 739362d4205c ("audio: add "dbus" audio backend") Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20240214-dbus-v7-1-7eff29f04...@daynix.com> --- audio/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1

[PULL 7/7] tests/qtest: Depend on dbus_display1_dep

2024-02-16 Thread marcandre . lureau
From: Akihiko Odaki It ensures dbus-display1.c will not be recompiled. Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20240214-dbus-v7-3-7eff29f04...@daynix.com> --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qte

Re: [PULL 00/56] Misc HW patches for 2024-02-15

2024-02-16 Thread Peter Maydell
On Thu, 15 Feb 2024 at 17:58, Philippe Mathieu-Daudé wrote: > > The following changes since commit 5767815218efd3cbfd409505ed824d5f356044ae: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-02-14 > 15:45:52 +) > > are available in the Gi

[PULL 4/7] ui/console: Fix console resize with placeholder surface

2024-02-16 Thread marcandre . lureau
From: Tianlan Zhou In `qemu_console_resize()`, the old surface of the console is keeped if the new console size is the same as the old one. If the old surface is a placeholder, and the new size of console is the same as the placeholder surface (640*480), the surface won't be replace. In this situ

[PULL 2/7] ui/clipboard: mark type as not available when there is no data

2024-02-16 Thread marcandre . lureau
From: Fiona Ebner With VNC, a client can send a non-extended VNC_MSG_CLIENT_CUT_TEXT message with len=0. In qemu_clipboard_set_data(), the clipboard info will be updated setting data to NULL (because g_memdup(data, size) returns NULL when size is 0). If the client does not set the VNC_ENCODING_CL

[PULL 3/7] ui/clipboard: add asserts for update and request

2024-02-16 Thread marcandre . lureau
From: Fiona Ebner Should an issue like CVE-2023-6683 ever appear again in the future, it will be more obvious which assumption was violated. Suggested-by: Marc-André Lureau Signed-off-by: Fiona Ebner Reviewed-by: Marc-André Lureau Message-ID: <20240124105749.204610-2-f.eb...@proxmox.com> ---

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

2024-02-16 Thread 張哲嘉
Hi Daniel, > -Original Message- > From: Daniel Henrique Barboza > Sent: Friday, February 16, 2024 8:51 PM > To: Alvin Che-Chia Chang(張哲嘉) ; > qemu-ri...@nongnu.org; qemu-devel@nongnu.org > Cc: alistair.fran...@wdc.com; bin.m...@windriver.com; > liwei1...@gmail.com; zhiwei_...@linux.alibab

Re: QEMU 8.2.0 aarch64 sve ldff1b returning 1 byte when 16 are expected

2024-02-16 Thread Peter Maydell
On Fri, 16 Feb 2024 at 11:40, Alex Bennée wrote: > > Mark Charney OS writes: > > Talking to Alex Bennee, he pointed out: > > > >> I'm wondering if this is a result of the fix in 6d03226b422 > >> (plugins: force slow path when plugins instrument memory ops). This > >> will always force the slow pa

  1   2   3   >