Re: [PATCH v14 05/10] debug: add -d tb_stats to control TBStatistics collection:

2023-06-01 Thread Wu, Fei
On 6/1/2023 9:18 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> From: "Vanderson M. do Rosario" >> >>   -d tb_stats[[,level=(+all+jit+exec+time)][,dump_limit=]] >> >> "dump_limit" is used to limit the number of dumped TBStats in >> linux-user mode. > > Why is user-mode special?

Re: [RFC PATCH 4/5] target/ppc: Add msgsnd/p and DPDES SMT support

2023-06-01 Thread Cédric Le Goater
On 5/31/23 03:23, Nicholas Piggin wrote: Doorbells in SMT need to coordinate msgsnd/msgclr and DPDES access from multiple threads that affect the same state. Signed-off-by: Nicholas Piggin --- hw/ppc/ppc.c | 6 ++ include/hw/ppc/ppc.h

Re: [PATCH v2 0/2] net: Update MemReentrancyGuard for NIC

2023-06-01 Thread Philippe Mathieu-Daudé
On 1/6/23 05:18, Akihiko Odaki wrote: Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation follows what bottom half does, but it does not add a tr

Re: [RFC PATCH 5/5] spapr: Allow up to 8 threads SMT configuration

2023-06-01 Thread Cédric Le Goater
On 5/31/23 03:23, Nicholas Piggin wrote: TCG now supports multi-threaded configuration at least enough for pseries to be functional enough to boot Linux. This requires PIR and TIR be set, because that's how sibling thread matching is done. Signed-off-by: Nicholas Piggin --- hw/ppc/spapr.c

Re: [PATCH v14 06/10] monitor: adding tb_stats hmp command

2023-06-01 Thread Wu, Fei
On 6/1/2023 9:23 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> From: "Vanderson M. do Rosario" >> >> Adding tb_stats [start|pause|stop|filter] command to hmp. >> This allows controlling the collection of statistics. >> It is also possible to set the level of collection: >> all,

Re: [PATCH v14 07/10] tb-stats: reset the tracked TBs on a tb_flush

2023-06-01 Thread Wu, Fei
On 6/1/2023 9:30 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> diff --git a/accel/tcg/tb-stats.c b/accel/tcg/tb-stats.c >> index 805e1fc74d..139f049ffc 100644 >> --- a/accel/tcg/tb-stats.c >> +++ b/accel/tcg/tb-stats.c >> @@ -267,6 +267,25 @@ void do_hmp_tbstats_safe(CPUState *c

Re: [PATCH 2/3] tests/vm: Introduce get_qemu_packages_from_lcitool_vars() helper

2023-06-01 Thread Erik Skultety
On Wed, May 31, 2023 at 10:09:05PM +0200, Philippe Mathieu-Daudé wrote: > The 'lcitool variables $OS qemu' command produces a file containing > consistent environment variables helpful to build QEMU on $OS. > In particular the $PKGS variable contains the packages required to > build QEMU. > > Sinc

Re: [PATCH v2 0/2] net: Update MemReentrancyGuard for NIC

2023-06-01 Thread Akihiko Odaki
On 2023/06/01 16:16, Philippe Mathieu-Daudé wrote: On 1/6/23 05:18, Akihiko Odaki wrote: Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation fol

Re: [RFC PATCH 0/5] target/ppc: initial SMT support in TCG

2023-06-01 Thread Cédric Le Goater
Hello Nick, On 5/31/23 03:23, Nicholas Piggin wrote: Hi, I'm posting this now just to get some first thoughts. I wouldn't say it's ready but it does actually work with some basic tests including pseries booting a Linux distro. I have powernv booting too, it just requires some more SPRs converte

Re: [PATCH v2 05/23] q800: move CPU object into Q800MachineState

2023-06-01 Thread Mark Cave-Ayland
On 31/05/2023 16:00, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 31/5/23 14:53, Mark Cave-Ayland wrote: Also change the instantiation of the CPU to use object_initialize_child() followed by a separate realisation. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c

Re: [PATCH 0/3] tests/vm/freebsd: Get up-to-date package list from lcitool

2023-06-01 Thread Erik Skultety
On Wed, May 31, 2023 at 10:09:03PM +0200, Philippe Mathieu-Daudé wrote: > Inspired by this patch from Thomas: > https://lore.kernel.org/qemu-devel/20230531090415.40421-1-th...@redhat.com/ > > Instead of updating the package list manually, use lcitool vars file. > > Philippe Mathieu-Daudé (3): >

Re: Using json: in common.rc's TEST_IMG

2023-06-01 Thread Hanna Czenczek
On 31.05.23 21:09, Stefan Hajnoczi wrote: Another issue is that 145 uses $TEST_IMG as follows: SYSEMU_DRIVE_ARG=if=none,file="$TEST_IMG",driver=$IMGFMT That doesn't work when json: contains a comma, since commas need to be doubled up to escape them. This fails: $ qemu-system-x86_64 -driv

Re: [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support

2023-06-01 Thread Robin Voetter
On 6/1/23 00:24, Alex Williamson wrote: > On Wed, 31 May 2023 23:55:41 +0200 > Robin Voetter wrote: >> Something that I have been thinking about, are there any implications >> involved with enabling this feature automatically with no possibility of >> turning it off? I have no use case for that

Re: [PATCH v2] docs: build-system: rename "default-configs" to "configs"

2023-06-01 Thread Kashyap Chamarthy
On Wed, May 31, 2023 at 04:22:34PM +0200, Thomas Huth wrote: > On 23/05/2023 15.31, Kashyap Chamarthy wrote: > > Commit 812b31d3f9 (configs: rename default-configs to configs and > > reorganise, 2021-07-07) did the rename. > > > > Reflect that update also in the documentation. > > > > Signed-off-

Re: [PATCH 0/2] Added 32 bits property for ASPEED GPIO with updated qtests. This change gives ASPEED GPIO similar behavior as Nuvoton.

2023-06-01 Thread Cédric Le Goater
On 5/31/23 18:55, Jingbo Wu wrote: From: Felix Wu Hello Felix, Thanks for the extension. It could be useful in some situations but it seems also dangerous to set all lines controlled by a register at once. The same comment applies to Nuvoton [1]. C. [1] https://lore.kernel.org/qemu-devel/C

Re: [PULL 00/21] Migration 20230530 patches

2023-06-01 Thread Daniel P . Berrangé
On Wed, May 31, 2023 at 11:03:23PM +0200, Juan Quintela wrote: > Richard Henderson wrote: > > On 5/30/23 11:25, Juan Quintela wrote: > >> The following changes since commit > >> aa9bbd865502ed517624ab6fe7d4b5d89ca95e43: > >>Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu > >

[PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support

2023-06-01 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept Offloads commands through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that Offloads state in the destination. Changelog = v2: - make some function arguments const - reuse virtio_vdev_h

Re: Using json: in common.rc's TEST_IMG

2023-06-01 Thread Kevin Wolf
Am 31.05.2023 um 21:00 hat Stefan Hajnoczi geschrieben: > Hi Hanna, > I'm adding the io_uring block driver (block/blkio.c) to qemu-iotests > and hit a syntax issue with json:. > > In tests/qemu-iotests/common.rc where TEST_IMG_FILE and TEST_IMG are > defined for each IMGPROTO, I'm unable to come u

Re: [PATCH v3 0/6] block: add blk_io_plug_call() API

2023-06-01 Thread Kevin Wolf
Am 31.05.2023 um 21:50 hat Stefan Hajnoczi geschrieben: > Hi Kevin, > Do you want to review the thread-local blk_io_plug() patch series or > should I merge it? I haven't reviewed it in detail, but on the high level it looks good to me, and you already got reviews for the details. Acked-by: Kevin

Re: [PATCH 1/7] target/ppc: Remove single use function

2023-06-01 Thread Cédric Le Goater
On 5/30/23 15:28, BALATON Zoltan wrote: The get_physical_address() function is a trivial wrapper of get_physical_address_wtlb() that is only used once. Remove it and call get_physical_address_wtlb() directly instead. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 3/7] target/ppc: Move ppcemb_tlb_search() to mmu_common.c

2023-06-01 Thread Cédric Le Goater
On 5/30/23 15:28, BALATON Zoltan wrote: This function is the only reason why ppcemb_tlb_check() is not static to mmu_common.c but it also better fits in mmu_common.c so move it there. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/cpu.h|

Re: [PATCH 4/7] target/ppc: Remove some unneded line breaks

2023-06-01 Thread Cédric Le Goater
On 5/30/23 15:28, BALATON Zoltan wrote: Make lines shorter and fix indentation in some functions prototypes. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/cpu.h| 8 +++- target/ppc/mmu_common.c | 8 +++- 2 files changed, 6 inse

Re: [PATCH 2/7] target/ppc: Remove "ext" parameter of ppcemb_tlb_check()

2023-06-01 Thread Cédric Le Goater
On 5/30/23 15:28, BALATON Zoltan wrote: This is only used by one caller so simplify function by removing this parameter and move the operation to the single place where it's used. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/cpu.h| 3 +

Re: [PATCH 6/7] target/ppc: Change ppcemb_tlb_check() to return bool

2023-06-01 Thread Cédric Le Goater
On 5/30/23 15:28, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/mmu_common.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.

Re: [PATCH 5/7] target/ppc: Simplify ppcemb_tlb_search()

2023-06-01 Thread Cédric Le Goater
On 5/30/23 15:28, BALATON Zoltan wrote: No nead to store return value and break from loop when we can return directly. Signed-off-by: BALATON Zoltan Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/mmu_common.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-)

Re: [PATCH v3 12/14] nbd/client: Request extended headers during negotiation

2023-06-01 Thread Vladimir Sementsov-Ogievskiy
On 31.05.23 23:26, Eric Blake wrote: On Wed, May 31, 2023 at 09:33:20PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 31.05.23 20:54, Eric Blake wrote: On Wed, May 31, 2023 at 08:39:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 15.05.23 22:53, Eric Blake wrote: All the pieces are in plac

[PATCH v2 4/6] virtio-net: expose virtio_net_supported_guest_offloads()

2023-06-01 Thread Hawkins Jiawei
To support restoring offloads state in vdpa, need to expose the function virtio_net_supported_guest_offloads(), then vdpa uses this function to get the guest supported offloads. Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c| 2 +- include/hw/virtio/virtio-net.h | 1 + 2 files

[PATCH v2 1/6] include/hw/virtio: make some VirtIODevice const

2023-06-01 Thread Hawkins Jiawei
The VirtIODevice structure is not modified in virtio_vdev_has_feature(). Therefore, make it const to allow this function to accept const variables. Signed-off-by: Hawkins Jiawei --- include/hw/virtio/virtio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/v

[PATCH v2 3/6] hw/net/virtio-net: make some VirtIONet const

2023-06-01 Thread Hawkins Jiawei
The VirtIONet structure is not modified in virtio_net_supported_guest_offloads(). Therefore, make it const to allow this function to accept const variables. Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net

[PATCH v2 5/6] vdpa: Add vhost_vdpa_net_load_offloads()

2023-06-01 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_offloads() to restore offloads state at device's startup. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index e907a3c792.

[PATCH v2 6/6] vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ

2023-06-01 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature. Signed-off-by: Hawkins Jiawei Acked-by: Jason Wang --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 0e647886d1..4cc24a2997 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vd

[PATCH v2 2/6] vdpa: reuse virtio_vdev_has_feature()

2023-06-01 Thread Hawkins Jiawei
We can use virtio_vdev_has_feature() instead of manually accessing the features. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 37cdc84562..e907a3c792 100644 --- a/net/vhost-vd

Re: [PATCH v5 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-06-01 Thread Het Gala
On 30/05/23 5:40 pm, Daniel P. Berrangé wrote: On Tue, May 30, 2023 at 01:02:27PM +0530, Het Gala wrote: On 30/05/23 12:28 pm, Markus Armbruster wrote: Het Gala writes: [...] +## +{ 'enum': 'MigrateTransport', + 'data': ['socket', 'exec', 'rdma'] } + +## +# @MigrateExecCommand: Documen

Re: [PATCH v2 0/2] net: Update MemReentrancyGuard for NIC

2023-06-01 Thread Philippe Mathieu-Daudé
On 1/6/23 09:41, Akihiko Odaki wrote: On 2023/06/01 16:16, Philippe Mathieu-Daudé wrote: On 1/6/23 05:18, Akihiko Odaki wrote: Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packe

Re: [PULL 13/21] migration/rdma: Unfold ram_control_before_iterate()

2023-06-01 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 08:25:23PM +0200, Juan Quintela wrote: > Once there: > - Remove unused data parameter > - unfold it in its callers. > - change all callers to call qemu_rdma_registration_start() > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela > Message-Id: <20230509120700.78359-3

Re: [PATCH 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-06-01 Thread Philippe Mathieu-Daudé
On 1/6/23 07:59, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Audit the sysbus_init_irq() calls and manually convert to sysbus_init_irqs() when a loop is involved. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/loongarch_extioi.c | 3 +-- hw/intc/omap_intc.c| 3 +--

Re: [PULL 14/21] migration/rdma: Unfold ram_control_after_iterate()

2023-06-01 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 08:25:24PM +0200, Juan Quintela wrote: > Once there: > - Remove unused data parameter > - unfold it in its callers > - change all callers to call qemu_rdma_registration_stop() > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela > Message-Id: <20230509120700.78359-4-q

Re: [PATCH v2 05/23] q800: move CPU object into Q800MachineState

2023-06-01 Thread Markus Armbruster
Mark Cave-Ayland writes: > On 31/05/2023 16:00, Markus Armbruster wrote: > >> Philippe Mathieu-Daudé writes: >> >>> On 31/5/23 14:53, Mark Cave-Ayland wrote: Also change the instantiation of the CPU to use object_initialize_child() followed by a separate realisation. Signed-off-b

Re: [PULL 16/21] migration/rdma: Unfold hook_ram_load()

2023-06-01 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 08:25:26PM +0200, Juan Quintela wrote: > There is only one flag called with: RAM_CONTROL_BLOCK_REG. > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela > Message-Id: <20230509120700.78359-6-quint...@redhat.com> > --- > migration/qemu-file.h | 11 --- > migra

Re: [PATCH v2 4/6] virtio-net: expose virtio_net_supported_guest_offloads()

2023-06-01 Thread Hawkins Jiawei
On Thu, 1 Jun 2023 at 16:48, Hawkins Jiawei wrote: > > To support restoring offloads state in vdpa, need to expose > the function virtio_net_supported_guest_offloads(), then vdpa > uses this function to get the guest supported offloads. Here it should be changed to "then QEMU uses this function t

Re: [PULL 00/21] Migration 20230530 patches

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 09:27:09AM +0100, Daniel P. Berrangé wrote: > On Wed, May 31, 2023 at 11:03:23PM +0200, Juan Quintela wrote: > > Richard Henderson wrote: > > > On 5/30/23 11:25, Juan Quintela wrote: > > >> The following changes since commit > > >> aa9bbd865502ed517624ab6fe7d4b5d89ca95e43:

Re: [PULL 15/21] migration/rdma: Remove all uses of RAM_CONTROL_HOOK

2023-06-01 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 08:25:25PM +0200, Juan Quintela wrote: > Instead of going trhough ram_control_load_hook(), call > qemu_rdma_registration_handle() directly. > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela > Message-Id: <20230509120700.78359-5-quint...@redhat.com> > --- > migrati

RE: [PATCH v2 2/2] qtest/migration-tests.c: use "-incoming defer" for postcopy tests

2023-06-01 Thread Wang, Wei W
On Wednesday, May 31, 2023 8:58 PM, Peter Xu wrote: > > > Hmm.. so we used to do socket_start_incoming_migration_internal() > > > before setting the right num for the preempt test, then I'm curious > > > why it wasn't failing before this patch when trying to connect with the > preempt channel.. > >

Re: [PATCH v2] docs: build-system: rename "default-configs" to "configs"

2023-06-01 Thread Thomas Huth
On 01/06/2023 10.17, Kashyap Chamarthy wrote: On Wed, May 31, 2023 at 04:22:34PM +0200, Thomas Huth wrote: On 23/05/2023 15.31, Kashyap Chamarthy wrote: Commit 812b31d3f9 (configs: rename default-configs to configs and reorganise, 2021-07-07) did the rename. Reflect that update also in the doc

[PATCH v2 0/3] hw/smbios: Cleanup topology related variables

2023-06-01 Thread Zhao Liu
From: Zhao Liu Hi all, This is my v2 patch series based on c76e7652c786 ("Revert 'python/qmp/ protocol: add open_with_socket()'"). Compared with v1 [1], v2 uses the different ways to calculate threads_per_socket and cores_per_socket, and add the sanity check to ensure consistency of results bet

[PATCH v2 3/3] hw/smbios: Fix core count in type4

2023-06-01 Thread Zhao Liu
From: Zhao Liu >From SMBIOS 3.0 specification, core count field means: Core Count is the number of cores detected by the BIOS for this processor socket. [1] Before 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology"), MachineState.smp.cores means "the number of co

[PATCH v2 2/3] hw/smbios: Fix thread count in type4

2023-06-01 Thread Zhao Liu
From: Zhao Liu >From SMBIOS 3.0 specification, thread count field means: Thread Count is the total number of threads detected by the BIOS for this processor socket. It is a processor-wide count, not a thread-per-core count. [1] So here we should use threads per socket other than threads per cor

[PATCH v2 1/3] hw/smbios: Fix smbios_smp_sockets caculation

2023-06-01 Thread Zhao Liu
From: Zhao Liu Here're 2 mistakes: 1. 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology") changes the meaning of smp.cores but doesn't fix original smp.cores uses. And because of the introduction of cluster, now smp.cores means the number of cores in one c

Re: [PATCH v3 1/9] tests/qtest: add various qtest_qmp_assert_success() variants

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: Add several counterparts of qtest_qmp_assert_success() that can * Use va_list instead of ... * Accept a list of FDs to send * Return the response data Signed-off-by: Daniel P. Berrangé --- tests/qtest/libqtest.c | 99 +

Re: [PATCH v3 3/9] tests/qtest: get rid of 'qmp_command' helper in migration test

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: This function duplicates logic of qtest_qmp_assert_success_ref Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 22 -- tests/qtest/migration-helpers.h | 3 --- tests/qtest/migration-test.c| 29 +++

Re: [PATCH v3 4/9] tests/qtest: get rid of some 'qtest_qmp' usage in migration test

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: Some of the usage is just a verbose way of re-inventing the qtest_qmp_assert_success(_ref) methods. Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 8 ++--- tests/qtest/migration-test.c| 52 --

Re: [PATCH v3 5/9] tests/qtest: switch to using event callbacks for STOP event

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: Change the migration test to use the new qtest event callback to watch for the stop event. This ensures that we only watch for the STOP event on the source QEMU. The previous code would set the single 'got_stop' flag when either source or dest QEMU g

Re: [PATCH v3 3/9] tests/qtest: get rid of 'qmp_command' helper in migration test

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 11:26:46AM +0200, Thomas Huth wrote: > On 31/05/2023 15.23, Daniel P. Berrangé wrote: > > This function duplicates logic of qtest_qmp_assert_success_ref > > > > Signed-off-by: Daniel P. Berrangé > > --- > > tests/qtest/migration-helpers.c | 22 -- > >

[PATCH 1/2] scripts: Add qom-cast-macro-clean-cocci-gen.py

2023-06-01 Thread Philippe Mathieu-Daudé
Add a script to generate Coccinelle semantic patch removing all pointless QOM cast macro uses. Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + scripts/qom-cast-macro-clean-cocci-gen.py | 49 +++ 2 fi

[PATCH 0/2] bulk: Remove pointless QOM casts

2023-06-01 Thread Philippe Mathieu-Daudé
As per Markus suggestion in [*], use Coccinelle to remove pointless QOM cast macro uses. Since we have more than 1000 QOM types, add a script to generate the semantic patch. [*] https://lore.kernel.org/qemu-devel/87mt1jafjt@pond.sub.org/ Philippe Mathieu-Daudé (2): scripts: Add qom-cast-mac

[PATCH 2/2] bulk: Remove pointless QOM casts

2023-06-01 Thread Philippe Mathieu-Daudé
Mechanical change running Coccinelle spatch with content generated from the qom-cast-macro-clean-cocci-gen.py added in the previous commit. Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- block/nbd.c | 4 ++-- chardev/char-pty.c | 2 +- hw/ar

Re: [PATCH v3 6/9] tests/qtest: replace wait_command() with qtest_qmp_assert_success

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: Most usage of wait_command() is followed by qobject_unref(), which is just a verbose re-implementation of qtest_qmp_assert_success(). Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 53 +- tests/qtest/migration-h

Re: [PATCH v3 7/9] tests/qtest: capture RESUME events during migration

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: When running migration tests we monitor for a STOP event so we can skip redundant waits. This will be needed for the RESUME event too shortly. Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 12 tests/qtest/m

Re: Using json: in common.rc's TEST_IMG

2023-06-01 Thread Stefan Hajnoczi
Thanks, Hanna and Kevin! I didn't implement bdrv_parse_filename() because I didn't want to invent more legacy syntax. But maybe that legacy syntax does have a use and I just didn't realize it :). It's easy for io_uring, we can just take the filename and not worry about other parameters (they can

[PATCH v2 2/7] hw/usb/xlnx: Do not open-code sysbus_pass_irq()

2023-06-01 Thread Philippe Mathieu-Daudé
The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Here we simply open-coded sysbus_pass_irq(). Replace to use the proper API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/usb/xlnx-usb-subsystem.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 1/7] hw/arm/xlnx-versal: Do not open-code sysbus_connect_irq()

2023-06-01 Thread Philippe Mathieu-Daudé
The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Here we simply open-coded sysbus_connect_irq(). Replace to use the proper API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/xlnx-versal.c | 4 +--- 1 file changed, 1 insertion(+), 3 de

[PATCH v2 3/7] hw/sysbus: Introduce sysbus_init_irqs()

2023-06-01 Thread Philippe Mathieu-Daudé
The SysBus API currently only provides a method to initialize a single IRQ: sysbus_init_irq(). When we want to initialize multiple SysBus IRQs, we have to call this function multiple times. In order to allow further simplifications, introduce the sysbus_init_irqs() method. Signed-off-by: Philippe

[PATCH v2 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-06-01 Thread Philippe Mathieu-Daudé
Audit the sysbus_init_irq() calls and manually convert to sysbus_init_irqs() when a loop is involved. In omap2_intc_init(), the parent_intr[] array contains 2 elements: use ARRAY_SIZE() to iterate over. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/omap_intc.

[PATCH v2 0/7] hw/sysbus: Add sysbus_init_irqs and reduce SYSBUS_DEVICE_GPIO_IRQ scope

2023-06-01 Thread Philippe Mathieu-Daudé
Since v1: - Removed pointless QOM casts on a preliminary series [*] (Markus) - Added Richard R-b tags This series: - Remove uses (out of sysbus.c) to the SYSBUS_DEVICE_GPIO_IRQ definition, using proper SysBus API methods, - Reduce SYSBUS_DEVICE_GPIO_IRQ scope, making it SysBus API internal, -

[PATCH v2 6/7] hw: Simplify using sysbus_init_irqs() [automatic]

2023-06-01 Thread Philippe Mathieu-Daudé
Change created mechanically using the following coccinelle semantic patch: @@ expression array; identifier i; expression sbd, count; @@ -for (i = 0; i < count; i++) { -sysbus_init_irq(sbd, &array[i]); -} +sysbus_init_irqs(sbd, array, count);

[PATCH v2 5/7] hw/sysbus: Make SYSBUS_DEVICE_GPIO_IRQ API internal

2023-06-01 Thread Philippe Mathieu-Daudé
Since we don't have any use of the SYSBUS_DEVICE_GPIO_IRQ definition outside of sysbus.c, we can reduce its scope, making it internal to the API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/sysbus.h | 2 -- hw/core/sysbus.c| 2 ++ 2 files changed, 2 i

[PATCH v2 4/7] hw/usb/hcd-xhci: Use sysbus_init_irqs()

2023-06-01 Thread Philippe Mathieu-Daudé
The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Use the recently introduced sysbus_init_irqs() method to avoid using this internal definition. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/usb/hcd-xhci-sysbus.c | 5 ++--- 1 file changed,

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.23, Daniel P. Berrangé wrote: There are 27 pre-copy live migration scenarios being tested. In all of these we force non-convergance and run for one iteration, then let it converge and wait for completion during the second (or following) iterations. At 3 mbps bandwidth limit the f

Re: [PATCH 3/3] tests/vm/freebsd: Get up-to-date package list from lcitool vars file

2023-06-01 Thread Daniel P . Berrangé
On Wed, May 31, 2023 at 10:09:06PM +0200, Philippe Mathieu-Daudé wrote: > See previous commit for rationale on using lcitool vars file to > get an up-to-date package list. Since there is a such file generated > for FreeBSD 13 available in the repository, use it. That way we > don't need to manually

Re: [PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support

2023-06-01 Thread Lei Yang
I'm a QE responsible for vhost_vdpa parts. Could you please provide me with the test steps for this series? I can test it in my environment and update the test results. On Thu, Jun 1, 2023 at 4:29 PM Hawkins Jiawei wrote: > > This series enables shadowed CVQ to intercept Offloads commands > t

Re: [PATCH 2/3] tests/vm: Introduce get_qemu_packages_from_lcitool_vars() helper

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 09:36:27AM +0200, Erik Skultety wrote: > On Wed, May 31, 2023 at 10:09:05PM +0200, Philippe Mathieu-Daudé wrote: > > The 'lcitool variables $OS qemu' command produces a file containing > > consistent environment variables helpful to build QEMU on $OS. > > In particular the $

Re: [PATCH v3 13/14] nbd/server: Prepare for per-request filtering of BLOCK_STATUS

2023-06-01 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: The next commit will add support for the new addition of NBD_CMD_FLAG_PAYLOAD during NBD_CMD_BLOCK_STATUS, where the client can request that the server only return a subset of negotiated contexts, rather than all contexts. To make that task easier, this patch

Re: [PATCH 2/2] tests: lcitool: refresh: Bump container versions

2023-06-01 Thread Alex Bennée
Erik Skultety writes: > Alpine 3.16 -> 3.18 > Fedora 37 -> 38 > > Signed-off-by: Erik Skultety I've cherry picked this (minus alpine) into testing/next as I've got a slightly newer lcitool refresh patch in my tree already. Thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Thomas Huth
On 31/05/2023 15.24, Daniel P. Berrangé wrote: The migration test cases that actually exercise live migration want to ensure there is a minimum of two iterations of pre-copy, in order to exercise the dirty tracking code. Historically we've queried the migration status, looking for the 'dirty-syn

Re: [PATCH v2] pc: q35: Bump max_cpus to 1024

2023-06-01 Thread Joao Martins
On 31/05/2023 23:51, Suravee Suthikulpanit wrote: > Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in > arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number. > > In case KVM could not support the specified number of vcpus, QEMU would > return the following e

Re: [PATCH v2] pc: q35: Bump max_cpus to 1024

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 11:09:45AM +0100, Joao Martins wrote: > > > On 31/05/2023 23:51, Suravee Suthikulpanit wrote: > > Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in > > arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number. > > > > In case KVM could not

Re: [PATCH v2 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-06-01 Thread Peter Maydell
On Thu, 1 Jun 2023 at 10:48, Philippe Mathieu-Daudé wrote: > > Audit the sysbus_init_irq() calls and manually convert > to sysbus_init_irqs() when a loop is involved. > > In omap2_intc_init(), the parent_intr[] array contains > 2 elements: use ARRAY_SIZE() to iterate over. > > Reviewed-by: Richard

Re: [PATCH v2 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-06-01 Thread Philippe Mathieu-Daudé
On 1/6/23 12:19, Peter Maydell wrote: On Thu, 1 Jun 2023 at 10:48, Philippe Mathieu-Daudé wrote: Audit the sysbus_init_irq() calls and manually convert to sysbus_init_irqs() when a loop is involved. In omap2_intc_init(), the parent_intr[] array contains 2 elements: use ARRAY_SIZE() to iterate

Re: [PULL 00/27] tcg patch queue

2023-06-01 Thread Mark Cave-Ayland
On 31/05/2023 17:12, Thomas Huth wrote: On 31/05/2023 03.08, Richard Henderson wrote: On 5/30/23 11:59, Richard Henderson wrote: The following changes since commit 7fe6cb68117ac856e03c93d18aca09de015392b0:    Merge tag 'pull-target-arm-20230530-1' ofhttps://git.linaro.org/people/pmaydell/qem

Re: [PATCH v2] pc: q35: Bump max_cpus to 1024

2023-06-01 Thread Gerd Hoffmann
Hi, > > I suspect smbios 3.0 (64-bit entry point) is already supported. > > > > With current qemu and all the smbios fixes in the last cycle, perhaps this > > is > > mainly just setting smbios_entry_point_type to SMBIOS_ENTRY_POINT_TYPE_64 if > > MachineState::smp::max_cpus is bigger than 720

Re: [PATCH v2] pc: q35: Bump max_cpus to 1024

2023-06-01 Thread Michael S. Tsirkin
On Thu, Jun 01, 2023 at 11:17:30AM +0100, Daniel P. Berrangé wrote: > On Thu, Jun 01, 2023 at 11:09:45AM +0100, Joao Martins wrote: > > > > > > On 31/05/2023 23:51, Suravee Suthikulpanit wrote: > > > Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in > > > arch/x86/include/asm/k

Re: [PATCH v3 07/48] tcg: Add tlb_fast_offset to TCGContext

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:02, Richard Henderson wrote: Disconnect the layout of ArchCPU from TCG compilation. Pass the relative offset of 'env' and 'neg.tlb.f' as a parameter. Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 39 +- include/exec/tlb-common.h

Re: [PATCH v3 08/48] *: Add missing includes of qemu/error-report.h

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:02, Richard Henderson wrote: This had been pulled in from tcg/tcg.h, via exec/cpu_ldst.h, via exec/exec-all.h, but the include of tcg.h will be removed. Signed-off-by: Richard Henderson --- target/avr/helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/avr/helpe

Re: [PATCH v3 14/48] tcg: Move TCGv, dup_const_tl definitions to tcg-op.h

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:02, Richard Henderson wrote: These two items are the last uses of TARGET_LONG_BITS within tcg.h, and are more in common with the other "_tl" definitions within that file. Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h| 15 ++- include/tcg/tcg.h

Re: [PATCH v3 26/48] tcg: Add guest_mo to TCGContext

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: This replaces of TCG_GUEST_DEFAULT_MO in tcg-op-ldst.c. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + accel/tcg/translate-all.c | 5 + tcg/tcg-op-ldst.c | 4 +--- 3 files changed, 7 insertions(+), 3 deletions(-)

Re: [PATCH v3 09/48] *: Add missing includes of tcg/debug-assert.h

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:02, Richard Henderson wrote: This had been pulled in from tcg/tcg.h, via exec/cpu_ldst.h, via exec/exec-all.h, but the include of tcg.h will be removed. Signed-off-by: Richard Henderson --- target/avr/cpu.c | 1 + target/rx/cpu.c | 1 + target/rx/op_helper.c | 1 +

Re: [PATCH v3 0/3] Trivial cleanups

2023-06-01 Thread Bernhard Beschow
Am 25. Mai 2023 16:03:15 UTC schrieb Mark Cave-Ayland : >On 23/05/2023 20:56, Bernhard Beschow wrote: > >> This series: >> * Removes dead code from omap_uart and i82378 >> * Resolves redundant code in the i8254 timer devices >> >> v3: >> * Drop TYPE_ISA_PARALLEL since they became obsolete by >

Re: [PULL 00/21] Migration 20230530 patches

2023-06-01 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Thu, Jun 01, 2023 at 09:27:09AM +0100, Daniel P. Berrangé wrote: >> On Wed, May 31, 2023 at 11:03:23PM +0200, Juan Quintela wrote: >> > Richard Henderson wrote: >> > > On 5/30/23 11:25, Juan Quintela wrote: >> > >> The following changes since commit >> > >> aa9bbd8

[PATCH v2 2/3] block: do not check bdrv_file_open

2023-06-01 Thread Paolo Bonzini
The set of BlockDrivers that have .bdrv_file_open coincides with those that have .protocol_name and guess what---checking drv->bdrv_file_open is done to see if the driver is a protocol. So check drv->protocol_name instead. Signed-off-by: Paolo Bonzini --- block.c | 11 +-- 1 file change

[PATCH v2 1/3] block: make assertion more generic

2023-06-01 Thread Paolo Bonzini
.bdrv_needs_filename is only set for drivers that also set bdrv_file_open, i.e. protocol drivers. So we can make the assertion always, it will always pass for those drivers that use bdrv_open. Signed-off-by: Paolo Bonzini --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 02/12] qed: mark more functions as coroutine_fns and GRAPH_RDLOCK

2023-06-01 Thread Paolo Bonzini
Mark functions as coroutine_fn when they are only called by other coroutine_fns and they can suspend. Change calls to co_wrappers to use the non-wrapped functions, which in turn requires adding GRAPH_RDLOCK annotations. Signed-off-by: Paolo Bonzini --- block/qed-check.c | 5 +++-- block/qed.c

[PATCH 05/12] block: mark another function as coroutine_fns and GRAPH_UNLOCKED

2023-06-01 Thread Paolo Bonzini
Mark functions as coroutine_fn when they are only called by other coroutine_fns and they can suspend. Because this function operates on a BlockBackend, mark it GRAPH_UNLOCKED. Signed-off-by: Paolo Bonzini --- block.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH 04/12] bochs: mark more functions as coroutine_fns and GRAPH_RDLOCK

2023-06-01 Thread Paolo Bonzini
Mark functions as coroutine_fn when they are only called by other coroutine_fns and they can suspend. Change calls to co_wrappers to use the non-wrapped functions, which in turn requires adding GRAPH_RDLOCK annotations. Signed-off-by: Paolo Bonzini --- block/bochs.c | 7 --- 1 file changed,

[PATCH v2 0/3] block: remove separate bdrv_file_open callback

2023-06-01 Thread Paolo Bonzini
The value of the bdrv_file_open is sometimes checked to distinguish protocol and format drivers, but apart from that there is no difference between bdrv_file_open and bdrv_open. However, they can all be distinguished by the non-NULL .protocol_name member. Change the checks to use .protocol_name i

[PATCH v2 1/4] block: rename the bdrv_co_block_status static function

2023-06-01 Thread Paolo Bonzini
bdrv_block_status exists as a wrapper for bdrv_block_status_above, but the name of the (hypothetical) coroutine version, bdrv_co_block_status, is squatted by a random static function. Rename it to bdrv_do_block_status. Signed-off-by: Paolo Bonzini --- block/io.c | 19 +-- 1 file

[PATCH v2 0/4] block: clean up coroutine versions of bdrv_{is_allocated, block_status}*

2023-06-01 Thread Paolo Bonzini
Provide coroutine versions of bdrv_is_allocated* and bdrv_block_status*, since the underlying BlockDriver API is coroutine-based, and use automatically-generated wrappers for the "mixed" versions. Paolo v1->v2: rename the old bdrv_co_block_status to bdrv_co_do_block_status Paolo Bonzini (4):

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-06-01 Thread Alex Bennée
"Wu, Fei" writes: > On 5/30/2023 6:08 PM, Alex Bennée wrote: >> >> "Wu, Fei" writes: >> >>> On 5/30/2023 1:01 PM, Wu, Fei wrote: On 5/30/2023 12:07 PM, Richard Henderson wrote: > On 5/29/23 04:49, Fei Wu wrote: > > IN: > Priv: 1; Virt: 0 > > 0x800abe14: 86

[PATCH 10/12] qcow2: mark more functions as coroutine_fns and GRAPH_RDLOCK

2023-06-01 Thread Paolo Bonzini
Mark functions as coroutine_fn when they are only called by other coroutine_fns and they can suspend. Change calls to co_wrappers to use the non-wrapped functions, which in turn requires adding GRAPH_RDLOCK annotations. Signed-off-by: Paolo Bonzini --- block/qcow2-bitmap.c | 26 + bl

[PATCH 07/12] dmg: mark more functions as coroutine_fns and GRAPH_RDLOCK

2023-06-01 Thread Paolo Bonzini
Mark functions as coroutine_fn when they are only called by other coroutine_fns and they can suspend. Change calls to co_wrappers to use the non-wrapped functions, which in turn requires adding GRAPH_RDLOCK annotations. Signed-off-by: Paolo Bonzini --- block/dmg.c | 21 +++-- 1

[PATCH v2 4/4] block: convert more bdrv_is_allocated* and bdrv_block_status* calls to coroutine versions

2023-06-01 Thread Paolo Bonzini
Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/copy-before-write.c | 2 +- block/copy-on-read.c | 8 block/io.c| 6 +++--- block/mirror.c| 10 +- block/qcow2.c | 5 +++-- block/replication.c | 8 bl

  1   2   3   4   5   >