Re: [PATCH v4 7/9] vfio/migration: Add VFIO migration pre-copy support

2023-05-30 Thread Cédric Le Goater
On 5/28/23 16:06, Avihai Horon wrote: Pre-copy support allows the VFIO device data to be transferred while the VM is running. This helps to accommodate VFIO devices that have a large amount of data that needs to be transferred, and it can reduce migration downtime. Pre-copy support is optional

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

2023-05-30 Thread Markus Armbruster
Fei Wu writes: > This collects all the statistics for TBStatistics, not only for the > whole emulation but for each TB. > > Signed-off-by: Vanderson M. do Rosario > Signed-off-by: Alex Bennée > Signed-off-by: Fei Wu > --- > accel/tcg/monitor.c | 20 - > accel/tcg/tb-stats.c

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-30 Thread Mickaël Salaün
On 25/05/2023 20:34, Trilok Soni wrote: On 5/25/2023 6:25 AM, Mickaël Salaün wrote: On 24/05/2023 23:04, Trilok Soni wrote: On 5/5/2023 8:20 AM, Mickaël Salaün wrote: Hi, This patch series is a proof-of-concept that implements new KVM features (extended page tracking, MBEC support, CR

[PATCH v3] meson: Avoid implicit declaration of functions

2023-05-30 Thread Michal Privoznik
While detecting a presence of a function via 'cc.links()' gives desired result (i.e. detects whether function is present), it also produces a warning on systems where the function is not present (into meson-log.txt), e.g.: qemu.git/build/meson-private/tmph74x3p38/testfile.c:2:34: \ warning:

Re: stable-8.0: block/export: call blk_set_dev_ops and Fix null pointer dereference in error path

2023-05-30 Thread Michael Tokarev
30.05.2023 12:29, Kevin Wolf wrote:... Both look like valid options. But if you want a concrete recommendation from me... I would assume that you picked it up for a reason even if you don't remember it now (maybe it was a dependency of something else?). It also claims to be fixing two other

Re: [PATCH] hw/ppc/Kconfig: MAC_NEWWORLD should always select USB_OHCI_PCI

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 12:20, Thomas Huth wrote: The PowerMacs have an OHCI controller soldered on the motherboard, so this should always be enabled for the "mac99" machine. This fixes the problem that QEMU aborts when the user tries to run the "mac99" machine with a build that has been compiled with the

Re: [PATCH v2 0/5] gitlab: improvements to handling of stable staging branches

2023-05-30 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 10:36:36AM +0300, Michael Tokarev wrote: > 26.05.2023 13:19, Daniel P. Berrangé wrote: > > We just (re)discovered that our gitlab rules don't work nicely with > > pipelines running from stable staging branches. Every pipeline gets > > published with the 'latest' tag,

Re: stable-8.0: block/export: call blk_set_dev_ops and Fix null pointer dereference in error path

2023-05-30 Thread Stefan Hajnoczi
On Tue, 30 May 2023 at 06:33, Michael Tokarev wrote: > > 30.05.2023 12:29, Kevin Wolf wrote:... > > Both look like valid options. > > > > But if you want a concrete recommendation from me... I would assume that > > you picked it up for a reason even if you don't remember it now (maybe > > it was

Re: [PATCH 04/30] q800: move CPU object into Q800MachineState

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 10 +- include/hw/m68k/q800.h | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 976da06231..ee6175ceb4 100644

Re: [PATCH 08/30] q800: reimplement mac-io region aliasing using IO memory region

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : The current use of aliased memory regions causes us 2 problems: firstly the output of "info qom-tree" is absolutely huge and difficult to read, and secondly we have already reached the internal limit for memory regions as adding any new memory

Re: [PATCH 07/30] q800: introduce mac-io container memory region

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : Move all devices from the IO region to within the container in preparation for updating the IO aliasing mechanism. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 6 ++ include/hw/m68k/q800.h | 1 + 2 files changed, 7

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

2023-05-30 Thread Het Gala
On 30/05/23 1:02 pm, Het Gala wrote: On 30/05/23 12:28 pm, Markus Armbruster wrote: Het Gala writes: On 25/05/23 11:04 pm, Markus Armbruster wrote: Het Gala writes: This patch introduces well defined MigrateAddress struct and its related child objects. The existing argument of

[PULL 07/21] migration/RDMA: It is accounting for zero/normal pages in two places

2023-05-30 Thread Juan Quintela
Remove the one in control_save_page(). Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-12-quint...@redhat.com> --- migration/ram.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 88a6c82e63..40b8f9630d

[PULL 18/21] qemu-file: Remove QEMUFileHooks

2023-05-30 Thread Juan Quintela
The only user was rdma, and its use is gone. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-Id: <20230509120700.78359-8-quint...@redhat.com> --- migration/qemu-file.h | 4 migration/qemu-file.c | 6 -- migration/rdma.c | 9 - 3 files changed, 19 deletions(-)

[PULL 20/21] migration/rdma: Remove qemu_ prefix from exported functions

2023-05-30 Thread Juan Quintela
Functions are long enough even without this. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-Id: <20230509120700.78359-10-quint...@redhat.com> --- migration/rdma.h | 12 ++-- migration/ram.c| 14 +++--- migration/rdma.c | 40

[PULL 08/21] migration/rdma: Remove QEMUFile parameter when not used

2023-05-30 Thread Juan Quintela
Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-13-quint...@redhat.com> --- migration/rdma.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 074456f9df..416dec00a2

[PULL 06/21] migration: Don't abuse qemu_file transferred for RDMA

2023-05-30 Thread Juan Quintela
Just create a variable for it, the same way that multifd does. This way it is safe to use for other thread, etc, etc. Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-11-quint...@redhat.com> --- migration/migration-stats.h | 4

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

2023-05-30 Thread Juan Quintela
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-quint...@redhat.com> --- migration/qemu-file.h | 2 -- migration/rdma.h

[PULL 03/21] runstate: drop unused runstate_store()

2023-05-30 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy The function is unused since previous commit. Drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Message-Id: <20230517123752.21615-4-vsement...@yandex-team.ru> Signed-off-by: Juan Quintela --- include/sysemu/runstate.h | 1 -

[PULL 05/21] migration: restore vmstate on migration failure

2023-05-30 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy 1. Otherwise failed migration just drops guest-panicked state, which is not good for management software. 2. We do keep different paused states like guest-panicked during migration with help of global_state state. 3. We do restore running state on

[PULL 19/21] migration/rdma: Move rdma constants from qemu-file.h to rdma.h

2023-05-30 Thread Juan Quintela
Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-Id: <20230509120700.78359-9-quint...@redhat.com> --- migration/qemu-file.h | 17 - migration/rdma.h | 16 migration/ram.c | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff

Re: [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-05-30 Thread Thomas Huth
On 27/05/2023 11.28, Paolo Bonzini wrote: The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control

Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw

2023-05-30 Thread Thomas Huth
On 27/05/2023 11.28, Paolo Bonzini wrote: SLOF is required for building the s390-ccw firmware on s390x, since it is using the libnet code from SLOF for network booting. If SLOF is absent and submodules are not updated, pc-bios/s390-ccw cannot be built. Signed-off-by: Paolo Bonzini ---

Re: [PATCH] Prepare bcm properties for videocore 4

2023-05-30 Thread Peter Maydell
On Wed, 24 May 2023 at 20:15, Sergey Kambalin wrote: > > Hello! > Sorry for a quite a big patch, but most of the changes are the same type. > Most of the patch is about a definition of new constants/structs and replacing > magic numbers with those constants. > > > Signed-off-by: Sergey Kambalin

Re: [PATCH v3 1/2] target/arm: allow DC CVA[D]P in user mode emulation

2023-05-30 Thread Peter Maydell
On Fri, 19 May 2023 at 22:55, Zhuojia Shen wrote: > > DC CVAP and DC CVADP instructions can be executed in EL0 on Linux, > either directly when SCTLR_EL1.UCI == 1 or emulated by the kernel (see > user_cache_maint_handler() in arch/arm64/kernel/traps.c). > > This patch enables execution of the two

Re: [PATCH 04/10] hw/ppc/spapr: Use memory_devices_init()

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 13:38, David Hildenbrand wrote: Let's use our new helper and stop always allocating ms->device_memory. There is no difference in common memory-device code anymore between ms->device_memory being NULL or the size being 0. So we only have to teach spapr code that ms->device_memory isn't

Re: [PATCH 02/10] memory-device: Introduce memory_devices_init()

2023-05-30 Thread Philippe Mathieu-Daudé
Hi David, On 30/5/23 13:38, David Hildenbrand wrote: Let's intrduce a new helper that we will use to replace existing memory device setup code during machine initialization. We'll enforce that the size has to be > 0. Once all machines were converted, we'll only allocate ms->device_memory if

Re: [PATCH 01/10] memory-device: Unify enabled vs. supported error messages

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 13:38, David Hildenbrand wrote: Let's unify the error messages, such that we can simply stop allocating ms->device_memory if the size would be 0 (and there are no memory devices ever). The case of "not supported by the machine" should barely pop up either way: if the machine doesn't

Re: [PATCH 0/5] meson: replace submodules with wrap files

2023-05-30 Thread Daniel P . Berrangé
On Sat, May 27, 2023 at 11:28:46AM +0200, Paolo Bonzini wrote: > The remaining submodules consist of tests/lcitool/libvirt-ci and the > firmware in roms/. The former is only used in very specific cases, > while the latter is mostly used only as a pointer used to create the QEMU > tarball.

Re: [PATCH 05/10] hw/loongarch/virt: Use memory_devices_init()

2023-05-30 Thread Song Gao
在 2023/5/30 下午7:38, David Hildenbrand 写道: Let's use our new helper. Cc: Xiaojuan Yang Cc: Song Gao Signed-off-by: David Hildenbrand --- hw/loongarch/virt.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c

[PATCH 16/16] qemu-file: Make qemu_fflush() return errors

2023-05-30 Thread Juan Quintela
This let us simplify code of this shape. qemu_fflush(f); int ret = qemu_file_get_error(f); if (ret) { return ret; } into: int ret = qemu_fflush(f); if (ret) { return ret; } I updated all callers where there is any error check. Signed-off-by: Juan Quintela ---

Re: [PATCH 01/16] qemu-file: Rename qemu_file_transferred_ fast -> noflush

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 14:27, Juan Quintela wrote: Fast don't say much. Noflush indicates more clearly that it is like qemu_file_transferred but without the flush. Signed-off-by: Juan Quintela --- migration/qemu-file.h | 11 +-- migration/qemu-file.c | 2 +- migration/savevm.c| 4 ++--

Re: [PATCH v3 0/4] hw/arm/sbsa-ref: platform version 0.1

2023-05-30 Thread Peter Maydell
On Wed, 24 May 2023 at 12:33, Marcin Juszkiewicz wrote: > > About year ago support for setting platform version for sbsa-ref was > added with "0.0" value. > > This patchset bumps it to "0.1" as we export basic GIC information via > DeviceTree to the firmware. TF-A will then take it and provide to

Re: [PATCH v3 3/4] docs: sbsa: document platform version changes

2023-05-30 Thread Peter Maydell
On Wed, 24 May 2023 at 12:33, Marcin Juszkiewicz wrote: > > We plan to start adding more system information in DT so firmware does > not have to use hardcoded values. > > Signed-off-by: Marcin Juszkiewicz > --- > docs/system/arm/sbsa.rst | 31 +-- > 1 file changed,

Re: [PATCH v3 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-30 Thread Philippe Mathieu-Daudé
On 29/5/23 14:11, Joao Martins wrote: In preparation for including the number of dirty pages in the vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() similar to cpu_physical_memory_sync_dirty_bitmap(). To avoid counting twice when

Re: [PATCH v4 6/9] vfio/migration: Store VFIO migration flags in VFIOMigration

2023-05-30 Thread Cédric Le Goater
On 5/28/23 16:06, Avihai Horon wrote: VFIO migration flags are queried once in vfio_migration_init(). Store them in VFIOMigration so they can be used later to check the device's migration capabilities without re-querying them. This will be used in the next patch to check if the device supports

Re: [PATCH 3/4] Implement zero page checking using DSA.

2023-05-30 Thread Duan, Zhenzhong
Hi Hao, > +memset(, 0, sizeof(descriptor)); > + > +descriptor.opcode = DSA_OPCODE_COMPARE; What about using DSA_OPCODE_COMPVAL with zero? DSA_OPCODE_COMPARE consumes double bandwidth by reading from both src and dest address. Thanks Zhenzhong

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

2023-05-30 Thread Alex Bennée
"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: +/* + * The TCGProfile structure holds data for analysing the quality of + * the code generation. The data is split between stuff that

Re: [PATCH 01/30] q800: fix up minor spacing issues in hw_compat_q800 GlobalProperty array

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : Ensure there is a space before the final closing brace for all global properties. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/m68k/q800.c

Re: [PATCH 15/30] asc: generate silence if FIFO empty but engine still running

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : MacOS (un)helpfully leaves the FIFO engine running even when all the samples have been written to the hardware, and expects the FIFO status flags and IRQ to be updated continuously. Since not all audio backends guarantee an all-zero output when

[PATCH 08/10] hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE

2023-05-30 Thread David Hildenbrand
There are no remaining users in the tree, so let's remove it. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Signed-off-by: David Hildenbrand --- hw/i386/pc.c | 19 --- include/hw/i386/pc.h | 1 - 2 files

[PATCH 06/10] hw/i386/pc: Use memory_devices_init()

2023-05-30 Thread David Hildenbrand
Let's use our new helper and stop always allocating ms->device_memory. Once allcoated, we're sure that the size > 0 and that the base was initialized. Adjust the code in pc_memory_init() to check for machine->device_memory instead of pcmc->has_reserved_memory and machine->device_memory->base.

[PULL 04/21] migration: switch from .vm_was_running to .vm_old_state

2023-05-30 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy No logic change here, only refactoring. That's a preparation for next commit where we finally restore the stopped vm state on migration failure or cancellation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Message-Id:

[PULL 12/21] migration: Create migrate_rdma()

2023-05-30 Thread Juan Quintela
Helper to say if we are doing a migration over rdma. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-Id: <20230509120700.78359-2-quint...@redhat.com> --- migration/migration.h | 3 +++ migration/options.h | 1 + migration/migration.c | 1 + migration/options.c | 7 +++

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

2023-05-30 Thread Juan Quintela
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 --- migration/rdma.h | 2 ++ migration/qemu-file.c | 10 --

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

2023-05-30 Thread Juan Quintela
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-quint...@redhat.com> --- migration/qemu-file.h | 2 -- migration/rdma.h

[PULL 02/21] migration: never fail in global_state_store()

2023-05-30 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Actually global_state_store() can never fail. Let's get rid of extra error paths. To make things clear, use new runstate_get() and use same approach for global_state_store() and global_state_store_running(). Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 09/21] migration/rdma: Don't use imaginary transfers

2023-05-30 Thread Juan Quintela
RDMA protocol is completely asynchronous, so in qemu_rdma_save_page() they "invent" that a byte has been transferred. And then they call qemu_file_credit_transfer() and ram_transferred_add() with that byte. Just remove that calls as nothing has been sent. Reviewed-by: Leonardo Bras

[PULL 10/21] migration: Remove unused qemu_file_credit_transfer()

2023-05-30 Thread Juan Quintela
After this change, nothing abuses QEMUFile to account for data transferrefd during migration. Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-15-quint...@redhat.com> --- migration/qemu-file.h | 8 migration/qemu-file.c | 5 - 2 files

Re: [PATCH 1/5] configure: remove --with-git= option

2023-05-30 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 02:03:11PM +0200, Paolo Bonzini wrote: > On Tue, May 30, 2023 at 1:58 PM Thomas Huth wrote: > > The commit cc84d63a42e31c2a that introduce this switch gave a > > rationale: > > > > Some users can't run a bare 'git' command, due to need for a > > transparent > >

[PATCH] hw/smbios: fix thead count field in type 4 table

2023-05-30 Thread Tianrui Zhao
The thread_count value in smbios type_4 table should be (ms->smp.cores * ms->smp.threads). As according to smbios spec 7.5 Processor Information (Type 4), the field "Thread Count" means the "Number of threads per processor socket" rather than number of threads per core. When apply this patch, use

[PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files

2023-05-30 Thread Juan Quintela
This was the only caller for read only files. So change the test for an assert in qemu_fflush(). Signed-off-by: Juan Quintela --- migration/qemu-file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index

Re: [PATCH 16/16] qemu-file: Make qemu_fflush() return errors

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 14:28, Juan Quintela wrote: This let us simplify code of this shape. qemu_fflush(f); int ret = qemu_file_get_error(f); if (ret) { return ret; } into: int ret = qemu_fflush(f); if (ret) { return ret; } I updated all callers where there is

Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw

2023-05-30 Thread Paolo Bonzini
On Tue, May 30, 2023 at 2:04 PM Thomas Huth wrote: > On 27/05/2023 11.28, Paolo Bonzini wrote: > > SLOF is required for building the s390-ccw firmware on s390x, > > since it is using the libnet code from SLOF for network booting. > > > > If SLOF is absent and submodules are not updated,

Re: [PATCH 3/5] meson: subprojects: replace submodules with wrap files

2023-05-30 Thread Daniel P . Berrangé
On Tue, May 30, 2023 at 02:51:07PM +0200, Paolo Bonzini wrote: > On Tue, May 30, 2023 at 2:24 PM Daniel P. Berrangé > wrote: > > > +if test -e "$source_path/.git"; then > > > +echo "--disable-download specified but subprojects were not" > > > +echo "checked out. Please

Re: [PATCH 08/10] hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE

2023-05-30 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 01:38:36PM +0200, David Hildenbrand wrote: > There are no remaining users in the tree, so let's remove it. > > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: "Michael S. Tsirkin" > Cc: Marcel Apfelbaum > Signed-off-by: David Hildenbrand This

[PATCH v1] target/ppc: Fix msgclrp interrupt type

2023-05-30 Thread Nicholas Piggin
msgclrp matches msgsndp and should clear PPC_INTERRUPT_DOORBELL. Signed-off-by: Nicholas Piggin --- target/ppc/excp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index add2bc6bfe..c13f2afa04 100644 ---

Re: [PATCH v2] meson: Avoid implicit declaration of functions

2023-05-30 Thread Peter Maydell
On Mon, 29 May 2023 at 15:13, Michal Privoznik wrote: > > While detecting a presence of a function via 'cc.links()' > gives desired result (i.e. detects whether function is present), > it also produces a warning on systems where the function is not > present (into meson-log.txt), e.g.: > >

Re: [PATCH] tcg: Add tlb_index_and_entry() function

2023-05-30 Thread BALATON Zoltan
On Mon, 29 May 2023, Richard Henderson wrote: On 5/29/23 17:05, BALATON Zoltan wrote: The tlb index and entry are often retrieved together and tlb_entry() already calls tlb_index() so it could easily return it. Add a tlb_index_and_entry() function that does that to simplify callers and maybe

Re: [PATCH v4 7/9] vfio/migration: Add VFIO migration pre-copy support

2023-05-30 Thread Avihai Horon
On 30/05/2023 12:28, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/28/23 16:06, Avihai Horon wrote: Pre-copy support allows the VFIO device data to be transferred while the VM is running. This helps to accommodate VFIO devices that have a large amount

Re: [PATCH v3 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 10:48, Joao Martins wrote: On 30/05/2023 09:39, Avihai Horon wrote: On 29/05/2023 15:11, Joao Martins wrote: External email: Use caution opening links or attachments Just a nit, maybe subject should be "vfio/common: Add number of dirty pages to vfio_get_dirty_bitmap

Re: [PATCH v4 7/9] vfio/migration: Add VFIO migration pre-copy support

2023-05-30 Thread Cédric Le Goater
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 646e42fd27..548f9488a7 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -162,6 +162,8 @@ vfio_save_block(const char *name, int data_size) " (%s) data_size %d"   vfio_save_cleanup(const char *name) " (%s)"  

Re: [PATCH 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-05-30 Thread Philippe Mathieu-Daudé
Hi Jeuk, [+Alistair] On 26/5/23 07:05, Jeuk Kim wrote: Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be

Re: [PATCH v2 02/16] migration: Correct transferred bytes value

2023-05-30 Thread Juan Quintela
Leonardo Bras Soares Passos wrote: > On Fri, May 26, 2023 at 5:04 AM Juan Quintela wrote: >> > Maybe too much? >> >> I dropped this patch for two reasons: >> >> - reviewers gave me a bad time with it O:-) >> - it was there only so if anyone was meassuring that new counters are >> the same that

Re: [PATCH v4 7/9] vfio/migration: Add VFIO migration pre-copy support

2023-05-30 Thread Avihai Horon
On 30/05/2023 13:17, Cédric Le Goater wrote: External email: Use caution opening links or attachments diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 646e42fd27..548f9488a7 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -162,6 +162,8 @@ vfio_save_block(const

Re: [PATCH 13/30] q800: allow accesses to RAM area even if less memory is available

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : MacOS attempts a series of writes and reads over the entire RAM area in order to determine the amount of RAM within the machine. Allow accesses to the entire RAM area ignoring writes and always reading zero for areas where there is no physical

[PATCH 03/10] hw/arm/virt: Use memory_devices_init()

2023-05-30 Thread David Hildenbrand
Let's use our new helper. We'll add the subregion to system RAM now earlier. That shouldn't matter, because the system RAM memory region should already be alive at that point. Cc: Peter Maydell Signed-off-by: David Hildenbrand --- hw/arm/virt.c | 9 + 1 file changed, 1 insertion(+), 8

[PATCH 00/10] memory-device: Some cleanups

2023-05-30 Thread David Hildenbrand
Working on adding multi-memslot support for virtio-mem (teaching memory device code about memory devices that can consume multiple memslots), I have some preparatory cleanups in my queue that make sense independent of the actual memory-device/virtio-mem extensions. v1 -> v2: - Allocate

[PATCH 02/10] memory-device: Introduce memory_devices_init()

2023-05-30 Thread David Hildenbrand
Let's intrduce a new helper that we will use to replace existing memory device setup code during machine initialization. We'll enforce that the size has to be > 0. Once all machines were converted, we'll only allocate ms->device_memory if the size > 0. Signed-off-by: David Hildenbrand ---

[PATCH 10/10] memory-device: Track used region size in DeviceMemoryState

2023-05-30 Thread David Hildenbrand
Let's avoid iterating over all devices and simply track it in the DeviceMemoryState. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 22 +++--- include/hw/boards.h| 2 ++ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/hw/mem/memory-device.c

[PATCH 01/10] memory-device: Unify enabled vs. supported error messages

2023-05-30 Thread David Hildenbrand
Let's unify the error messages, such that we can simply stop allocating ms->device_memory if the size would be 0 (and there are no memory devices ever). The case of "not supported by the machine" should barely pop up either way: if the machine doesn't support memory devices, it usually doesn't

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

2023-05-30 Thread Daniel P . Berrangé
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: > > > > > On 25/05/23 11:04 pm, Markus Armbruster wrote: > > > > Het Gala writes: > > > > > > > > > This patch introduces well defined MigrateAddress struct and

Re: [PATCH 3/5] meson: subprojects: replace submodules with wrap files

2023-05-30 Thread Daniel P . Berrangé
On Sat, May 27, 2023 at 11:28:49AM +0200, Paolo Bonzini wrote: > Compared to submodules, .wrap files have several advantages: > > * option parsing and downloading is delegated to meson > > * the commit is stored in a text file instead of a magic entry in the > git tree object > > * we could

Re: [PATCH v1 1/2] hw/loongarch/virt: Add cpu arch_id support

2023-05-30 Thread Song Gao
在 2023/5/30 下午7:53, Tianrui Zhao 写道: 在 2023年05月18日 09:41, Song Gao 写道: With acpi madt table, there is cpu physical coreid, which may be different with logical id in qemu. This patch adds cpu arch_id support, and fill madt table with arch_id. For the present cpu arch_id is still equal to

Re: [PATCH 10/10] memory-device: Track used region size in DeviceMemoryState

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 13:38, David Hildenbrand wrote: Let's avoid iterating over all devices and simply track it in the DeviceMemoryState. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 22 +++--- include/hw/boards.h| 2 ++ 2 files changed, 5 insertions(+), 19

[PATCH 01/16] qemu-file: Rename qemu_file_transferred_ fast -> noflush

2023-05-30 Thread Juan Quintela
Fast don't say much. Noflush indicates more clearly that it is like qemu_file_transferred but without the flush. Signed-off-by: Juan Quintela --- migration/qemu-file.h | 11 +-- migration/qemu-file.c | 2 +- migration/savevm.c| 4 ++-- migration/vmstate.c | 4 ++-- 4 files

[PATCH 15/16] migration: Remove transferred atomic counter

2023-05-30 Thread Juan Quintela
After last commit, it is a write only variable. Signed-off-by: Juan Quintela --- migration/migration-stats.h | 4 migration/multifd.c | 3 --- migration/ram.c | 1 - 3 files changed, 8 deletions(-) diff --git a/migration/migration-stats.h b/migration/migration-stats.h

[PATCH 09/16] qemu_file: Remove unused qemu_file_transferred()

2023-05-30 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/qemu-file.h | 18 -- migration/qemu-file.c | 7 --- 2 files changed, 25 deletions(-) diff --git a/migration/qemu-file.h b/migration/qemu-file.h index 21c3f34b84..b4fb872018 100644 --- a/migration/qemu-file.h +++

Re: [PATCH v3 2/2] tests/tcg/aarch64: add DC CVA[D]P tests

2023-05-30 Thread Peter Maydell
On Fri, 19 May 2023 at 23:12, Zhuojia Shen wrote: > > Test execution of DC CVAP and DC CVADP instructions under user mode > emulation. > > Signed-off-by: Zhuojia Shen > --- > tests/tcg/aarch64/Makefile.target | 11 ++ > tests/tcg/aarch64/dcpodp.c| 58 +++

[PATCH 07/16] qemu_file: total_transferred is not used anymore

2023-05-30 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/qemu-file.c | 4 1 file changed, 4 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index ac7a303142..a8420dd734 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -41,9 +41,6 @@ struct QEMUFile {

Re: [RFC PATCH v2 3/4] pcie: Add a PCIe capability version helper

2023-05-30 Thread Cédric Le Goater
On 5/27/23 01:15, Alex Williamson wrote: Report the PCIe capability version for a device Signed-off-by: Alex Williamson Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci/pcie.c | 7 +++ include/hw/pci/pcie.h | 1 + 2 files changed, 8 insertions(+) diff --git

Re: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-30 Thread Akihiko Odaki
On 2023/05/30 17:30, Sriram Yagnaraman wrote: -Original Message- From: Akihiko Odaki Sent: Tuesday, 30 May 2023 04:02 To: Cédric Le Goater ; Sriram Yagnaraman ; qemu-devel@nongnu.org Cc: Jason Wang Subject: Re: [PATCH] igb: Add Function Level Reset to PF and VF On 2023/05/30 0:07,

Re: [PATCH 06/10] hw/i386/pc: Use memory_devices_init()

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 13:38, David Hildenbrand wrote: Let's use our new helper and stop always allocating ms->device_memory. Once allcoated, we're sure that the size > 0 and that the base was initialized. Adjust the code in pc_memory_init() to check for machine->device_memory instead of

[PATCH 02/16] migration: Change qemu_file_transferred to noflush

2023-05-30 Thread Juan Quintela
We do a qemu_fclose() just after that, that also does a qemu_fflush(), so remove one qemu_fflush(). Signed-off-by: Juan Quintela --- migration/savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c index f26b455764..b2199d1039 100644

Re: [PATCH 11/16] migration: migration_transferred_bytes() don't need the QEMUFile

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 14:28, Juan Quintela wrote: Signed-off-by: Juan Quintela --- migration/migration-stats.h | 4 +--- migration/migration-stats.c | 6 +++--- migration/migration.c | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 12/16] migration: migration_rate_limit_reset() don't need the QEMUFile

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 14:28, Juan Quintela wrote: Signed-off-by: Juan Quintela --- migration/migration-stats.h | 4 +--- migration/migration-stats.c | 2 +- migration/migration.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 02/16] migration: Change qemu_file_transferred to noflush

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 14:27, Juan Quintela wrote: We do a qemu_fclose() just after that, that also does a qemu_fflush(), so remove one qemu_fflush(). Signed-off-by: Juan Quintela --- migration/savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 00/16] Next round of migration atomic counters

2023-05-30 Thread Juan Quintela
> > - Remove old trasferred stat64 (now we use the real thing) > > - Simplify qemu_file_get_error(): see where next cleanups are coming > > - As an example, qemu_fflush() now return errors. > > Please review. > > Later, Juan. > > Based-on: Message-Id: <2023

Re: [PATCH 0/5] meson: replace submodules with wrap files

2023-05-30 Thread Paolo Bonzini
On Tue, May 30, 2023 at 2:31 PM Daniel P. Berrangé wrote: > > * adding support for firmware with a meson build system to > > configure; turn SLOF into a wrap and roms/SLOF into a symlink > > for ../pc-bios/s390-ccw/subprojects/SLOF. I'm mentioning this for > > completeness but this is not

Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw

2023-05-30 Thread Thomas Huth
On 30/05/2023 14.53, Paolo Bonzini wrote: On Tue, May 30, 2023 at 2:04 PM Thomas Huth wrote: On 27/05/2023 11.28, Paolo Bonzini wrote: SLOF is required for building the s390-ccw firmware on s390x, since it is using the libnet code from SLOF for network booting. If SLOF is absent and

Re: [PATCH] Prepare bcm properties for videocore 4

2023-05-30 Thread Kambalin, Sergey
Got it! Thanks! I'll split this one to three patches: 1) replace magic numbers with named constants (refactoring) 2) add new properties for VC 4 3) Add some unit tests to check the newly added properties via mailbox Is it OK? (Sorry for wasting your time by inappropriate patches - this is

Re: [PATCH 10/16] qemu-file: Remove _noflush from qemu_file_transferred_noflush()

2023-05-30 Thread Fabiano Rosas
Juan Quintela writes: > qemu_file_transferred() don't exist anymore, so we can reuse the name. > > Signed-off-by: Juan Quintela > --- > migration/qemu-file.h | 4 ++-- > migration/block.c | 4 ++-- > migration/qemu-file.c | 2 +- > migration/savevm.c| 6 +++--- > migration/vmstate.c

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

2023-05-30 Thread Markus Armbruster
Het Gala writes: > On 30/05/23 12:28 pm, Markus Armbruster wrote: >> Het Gala writes: >> >>> On 25/05/23 11:04 pm, Markus Armbruster wrote: [...] Aside: a more powerful type system would let us extend SocketAddress with additional variants instead of wrapping it in a union. >>> >>>

stable-8.0.1 re-tagging?

2023-05-30 Thread Michael Tokarev
Hi! Yesterday I pushed v8.0.1 tag for 8.0.1 stable qemu release, but in the process of publishing it, Michael Roth discovered a regression in iotest which we all overlooked when initial patch has been applied to master. The commit in question is this one: commit

Re: stable-8.0.1 re-tagging?

2023-05-30 Thread Olaf Hering
Tue, 30 May 2023 11:15:31 +0300 Michael Tokarev : > I'm for creating new v8.0.1 tag for the new commit. But I'd like to > hear opinions of others on this matter, since this is an important > process which definitely should be public. The man page of git-tag is very clear on this topic IMO. Go

RE: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-30 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Tuesday, 30 May 2023 04:02 > To: Cédric Le Goater ; Sriram Yagnaraman > ; qemu-devel@nongnu.org > Cc: Jason Wang > Subject: Re: [PATCH] igb: Add Function Level Reset to PF and VF > > On 2023/05/30 0:07, Cédric Le Goater wrote: > > On

Re: [PATCH v3 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-05-30 Thread Avihai Horon
On 29/05/2023 15:11, Joao Martins wrote: External email: Use caution opening links or attachments Just a nit, maybe subject should be "vfio/common: Add number of dirty pages to vfio_get_dirty_bitmap tracepoint". Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint.

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

2023-05-30 Thread Het Gala
On 30/05/23 1:26 pm, Markus Armbruster wrote: Het Gala writes: On 30/05/23 12:28 pm, Markus Armbruster wrote: Het Gala writes: On 25/05/23 11:04 pm, Markus Armbruster wrote: [...] Aside: a more powerful type system would let us extend SocketAddress with additional variants instead of

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

2023-05-30 Thread Daniel P . Berrangé
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: > > > > > On 25/05/23 11:04 pm, Markus Armbruster wrote: > > > > Het Gala writes: > > > > > > > > > This patch introduces well defined MigrateAddress struct and

Re: [PATCH v4 8/9] vfio/migration: Add x-allow-pre-copy VFIO device property

2023-05-30 Thread Cédric Le Goater
On 5/28/23 16:06, Avihai Horon wrote: Add a new VFIO device property x-allow-pre-copy to keep migration compatibility to/from older QEMU versions that don't have VFIO pre-copy support. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. ---

  1   2   3   4   5   6   7   >