[PULL 12/16] vfio/migration: Reset bytes_transferred properly

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Currently, VFIO bytes_transferred is not reset properly: 1. bytes_transferred is not reset after a VM snapshot (so a migration following a snapshot will report incorrect value). 2. bytes_transferred is a single counter for all VFIO devices, however upon migration failure

Re: [PATCH 3/4] ppc/pnv: Add P10 quad ops

2023-06-29 Thread Cédric Le Goater
On 6/30/23 05:55, Joel Stanley wrote: Add a PnvQuad class for the P10 powernv machine. No xscoms are implemented yet, but this allows them to be added. Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_core.c | 53

[PULL 10/16] hw/vfio/pci-quirks: Support alternate offset for GPUDirect Cliques

2023-06-29 Thread Cédric Le Goater
From: Alex Williamson NVIDIA Turing and newer GPUs implement the MSI-X capability at the offset previously reserved for use by hypervisors to implement the GPUDirect Cliques capability. A revised specification provides an alternate location. Add a config space walk to the quirk to check for

Re: [PATCH 4/4] ppc/pnv: Return zero for core thread state xscom

2023-06-29 Thread Cédric Le Goater
On 6/30/23 05:55, Joel Stanley wrote: Firmware now warns if booting in LPAR per core mode (PPC bit 62). So this warning doesn't trigger report the core thread state is 0. Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/pnv_core.c | 10 ++ 1

[PULL 15/16] vfio/pci: Fix a segfault in vfio_realize

2023-06-29 Thread Cédric Le Goater
From: Zhenzhong Duan The kvm irqchip notifier is only registered if the device supports INTx, however it's unconditionally removed in vfio realize error path. If the assigned device does not support INTx, this will cause QEMU to crash when vfio realize fails. Change it to conditionally remove

Re: [PATCH 2/4] ppc/pnv: Subclass quad xscom callbacks

2023-06-29 Thread Cédric Le Goater
On 6/30/23 05:55, Joel Stanley wrote: Make the existing pnv_quad_xscom_read/write be P9 specific, in preparation for a different P10 callback. Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/ppc/pnv_core.h | 12 +++- hw/ppc/pnv.c

[PULL 16/16] vfio/pci: Free leaked timer in vfio_realize error path

2023-06-29 Thread Cédric Le Goater
From: Zhenzhong Duan When vfio_realize fails, the mmap_timer used for INTx optimization isn't freed. As this timer isn't activated yet, the potential impact is just a piece of leaked memory. Fixes: ea486926b07d ("vfio-pci: Update slow path INTx algorithm timer related") Signed-off-by: Zhenzhong

[PULL 13/16] vfio/migration: Make VFIO migration non-experimental

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon The major parts of VFIO migration are supported today in QEMU. This includes basic VFIO migration, device dirty page tracking and precopy support. Thus, at this point in time, it seems appropriate to make VFIO migration non-experimental: remove the x prefix from

[PULL 07/16] vfio/migration: Add VFIO migration pre-copy support

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon 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 in VFIO migration

[PULL 11/16] vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path

2023-06-29 Thread Cédric Le Goater
From: Shameer Kolothum When vfio_enable_vectors() returns with less than requested nr_vectors we retry with what kernel reported back. But the retry path doesn't call vfio_prepare_kvm_msi_virq_batch() and this results in, qemu-system-aarch64: vfio: Error: Failed to enable 4 MSI vectors, retry

[PULL 09/16] vfio: Implement a common device info helper

2023-06-29 Thread Cédric Le Goater
From: Alex Williamson A common helper implementing the realloc algorithm for handling capabilities. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Signed-off-by: Alex Williamson Reviewed-by: Robin Voetter Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h

[PULL 00/16] vfio queue

2023-06-29 Thread Cédric Le Goater
The following changes since commit 4d541f63e90c81112c298cbb35ed53e9c79deb00: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-06-29 13:16:06 +0200) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-vfio-20230630 for you to

[PULL 02/16] migration: Implement switchover ack logic

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Implement switchover ack logic. This prevents the source from stopping the VM and completing the migration until an ACK is received from the destination that it's OK to do so. To achieve this, a new SaveVMHandlers handler switchover_ack_needed() and a new return path message

[PULL 04/16] tests: Add migration switchover ack capability test

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Add migration switchover ack capability test. The test runs without devices that support this capability, but is still useful to make sure it didn't break anything. Signed-off-by: Avihai Horon Reviewed-by: Juan Quintela Reviewed-by: Peter Xu Tested-by: YangHang Liu

[PULL 08/16] vfio/migration: Add support for switchover ack capability

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Loading of a VFIO device's data can take a substantial amount of time as the device may need to allocate resources, prepare internal data structures, etc. This can increase migration downtime, especially for VFIO devices with a lot of resources. To solve this, VFIO migration

[PULL 05/16] vfio/migration: Refactor vfio_save_block() to return saved data size

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Refactor vfio_save_block() to return the size of saved data on success and -errno on error. This will be used in next patch to implement VFIO migration pre-copy support. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Reviewed-by: Juan Quintela Tested-by:

Re: [PATCH 1/4] ppc/pnv: quad xscom callbacks are P9 specific

2023-06-29 Thread Cédric Le Goater
On 6/30/23 05:55, Joel Stanley wrote: Rename the to include P9 in the name in preparation for adding P10 versions. Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/pnv_core.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff

[PULL 01/16] migration: Add switchover ack capability

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Migration downtime estimation is calculated based on bandwidth and remaining migration data. This assumes that loading of migration data in the destination takes a negligible amount of time and that downtime depends only on network speed. While this may be true for RAM, it's

[PULL 03/16] migration: Enable switchover ack capability

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon Now that switchover ack logic has been implemented, enable the capability. Signed-off-by: Avihai Horon Reviewed-by: Juan Quintela Reviewed-by: Peter Xu Tested-by: YangHang Liu Acked-by: Alex Williamson Signed-off-by: Cédric Le Goater --- migration/options.c | 4 1

[PULL 14/16] MAINTAINERS: Promote Cédric to VFIO co-maintainer

2023-06-29 Thread Cédric Le Goater
From: Alex Williamson Cédric has stepped up involvement in vfio, reviewing and managing patches, as well as pull requests. This work deserves gratitude and punishment with a promotion to co-maintainer ;) Signed-off-by: Alex Williamson Reviewed-by: Philippe Mathieu-Daudé Acked-by: Cédric Le

[PULL 06/16] vfio/migration: Store VFIO migration flags in VFIOMigration

2023-06-29 Thread Cédric Le Goater
From: Avihai Horon 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 precopy migration.

Re: [PATCH v3 0/6] eBPF RSS through QMP support.

2023-06-29 Thread Jason Wang
On Thu, Jun 15, 2023 at 6:29 AM Andrew Melnychenko wrote: > > This series of patches provides the ability to retrieve eBPF program > through qmp, so management application may load bpf blob with proper > capabilities. > Now, virtio-net devices can accept eBPF programs and maps through properties

Re: [PATCH v4 6/6] net: tap: Use qemu_close_range() to close fds

2023-06-29 Thread Jason Wang
On Wed, Jun 28, 2023 at 11:29 PM Bin Meng wrote: > > From: Zhangjin Wu > > Current codes using a brute-force traversal of all file descriptors > do not scale on a system where the maximum number of file descriptors > is set to a very large value (e.g.: in a Docker container of Manjaro >

[PATCH 2/4] ppc/pnv: Subclass quad xscom callbacks

2023-06-29 Thread Joel Stanley
Make the existing pnv_quad_xscom_read/write be P9 specific, in preparation for a different P10 callback. Signed-off-by: Joel Stanley --- include/hw/ppc/pnv_core.h | 12 +++- hw/ppc/pnv.c | 11 +++ hw/ppc/pnv_core.c | 36

[PATCH 0/4] ppc/pnv: Extend "quad" model for p10

2023-06-29 Thread Joel Stanley
The quad model implements the EC xscoms for the p9 machine, reusing the same model for p10 which isn't quite correct. This series adds a PnvQuad class and subclasses it for P9 and P10. Implement the core thread state xscom as an example. I expect more function to be implemented in future patches.

[PATCH 4/4] ppc/pnv: Return zero for core thread state xscom

2023-06-29 Thread Joel Stanley
Firmware now warns if booting in LPAR per core mode (PPC bit 62). So this warning doesn't trigger report the core thread state is 0. Signed-off-by: Joel Stanley --- hw/ppc/pnv_core.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index

[PATCH 1/4] ppc/pnv: quad xscom callbacks are P9 specific

2023-06-29 Thread Joel Stanley
Rename the to include P9 in the name in preparation for adding P10 versions. Signed-off-by: Joel Stanley --- hw/ppc/pnv_core.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index 0bc3ad41c81c..0b1c3cccfebc 100644 ---

[PATCH 3/4] ppc/pnv: Add P10 quad ops

2023-06-29 Thread Joel Stanley
Add a PnvQuad class for the P10 powernv machine. No xscoms are implemented yet, but this allows them to be added. Signed-off-by: Joel Stanley --- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_core.c | 53 +++ 2 files changed, 54 insertions(+), 1 deletion(-)

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Akihiko Odaki
On 2023/06/29 23:18, Ani Sinha wrote: On 29-Jun-2023, at 2:19 PM, Akihiko Odaki wrote: On 2023/06/29 17:05, Ani Sinha wrote: On Thu, 29 Jun, 2023, 12:17 pm Akihiko Odaki, mailto:akihiko.od...@daynix.com>> wrote: On 2023/06/29 13:07, Ani Sinha wrote: > PCI Express ports only have

RE: [PATCH v4 5/5] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-29 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Friday, June 30, 2023 12:40 AM >Subject: Re: [PATCH v4 5/5] vfio/migration: Refactor and fix print of >"Migration >disabled" > >Hello Zhenzhong, > >On 6/29/23 10:40, Zhenzhong Duan wrote: >> This patch refactors vfio_migration_realize()

RE: [PATCH v4 5/5] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-29 Thread Duan, Zhenzhong
>-Original Message- >From: Alex Williamson >Subject: Re: [PATCH v4 5/5] vfio/migration: Refactor and fix print of >"Migration >disabled" > >On Thu, 29 Jun 2023 16:42:23 +0100 >Joao Martins wrote: > >> On 29/06/2023 16:20, Avihai Horon wrote: >> > On 29/06/2023 15:44, Joao Martins wrote:

RE: [PATCH v4 4/5] vfio/pci: Free resources when vfio_migration_realize fails

2023-06-29 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 4/5] vfio/pci: Free resources when >vfio_migration_realize fails > >On 29/06/2023 09:40, Zhenzhong Duan wrote: >> When vfio_realize() succeeds, hot unplug will call vfio_exitfn() to >> free resources allocated in

RE: [PATCH v4 3/5] vfio/pci: Disable INTx in vfio_realize error path

2023-06-29 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 3/5] vfio/pci: Disable INTx in vfio_realize error path > > > >On 29/06/2023 16:13, Cédric Le Goater wrote: >> On 6/29/23 13:24, Joao Martins wrote: >>> On 29/06/2023 09:40, Zhenzhong Duan wrote: When vfio realize fails,

Memory region endianness

2023-06-29 Thread BALATON Zoltan
Hello, Some devices have bits that allow the guest to change endianness of memory mapped resources, e.g. ati-vga should allow switching the regs BAR into big endian on writing a bit. What's the best way to emulate this? The naive way could be to just test for the bit in the memory ops call

Re: [RESEND][PATCH v1 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-06-29 Thread Stefano Stabellini
On Thu, 29 Jun 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to initialize RAM for the > xen-mapcache (which is responsible for mapping guest memory using foreign > mapping) to work. Calculate and add hi/low memory regions based on >

Re: [RESEND][PATCH v1 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-06-29 Thread Stefano Stabellini
On Thu, 29 Jun 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to allocate virtio-mmio > parameters (irq and base) and register corresponding buses. > > Use the constants defined in public header arch-arm.h to be > aligned with the toolstack.

Re: [PATCH v4 5/5] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-29 Thread Alex Williamson
On Thu, 29 Jun 2023 16:42:23 +0100 Joao Martins wrote: > On 29/06/2023 16:20, Avihai Horon wrote: > > On 29/06/2023 15:44, Joao Martins wrote: > >> On 29/06/2023 09:40, Zhenzhong Duan wrote: > >>> This patch refactors vfio_migration_realize() and its dependend code > >>> as follows: > >>> >

Re: [PATCH v6 11/20] target/riscv/cpu: add misa_ext_info_arr[]

2023-06-29 Thread Daniel Henrique Barboza
Drew, On 6/29/23 05:59, Andrew Jones wrote: On Wed, Jun 28, 2023 at 06:30:24PM -0300, Daniel Henrique Barboza wrote: Next patch will add KVM specific user properties for both MISA and multi-letter extensions. For MISA extensions we want to make use of what is already available in

Re: [PATCH 1/1] linux-user: add support for big endian variants of riscv

2023-06-29 Thread Palmer Dabbelt
On Fri, 30 Jun 2023 04:14:09 PDT (-0700), rory.opensou...@gmail.com wrote: RISCV architecture supports an optional big endian mode of operation. In this mode, data accesses are treated as big endian, while code is always in little endian format. This is similar to how the ARM architecture treats

Re: [PATCH V3 2/2] migration: file URI offset

2023-06-29 Thread Peter Xu
On Thu, Jun 22, 2023 at 01:37:31PM -0700, Steve Sistare wrote: > +static int file_parse_offset(char *filespec, uint64_t *offsetp, Error **errp) > +{ > +char *option = strstr(filespec, OFFSET_OPTION); > +int ret; > + > +if (option) { > +*option = 0; > +option +=

Re: [PATCH 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-06-29 Thread Peter Xu
On Wed, Jun 28, 2023 at 01:55:42PM -0300, Fabiano Rosas wrote: > Add basic tests for file-based migration. > > Signed-off-by: Fabiano Rosas > --- > tests/qtest/migration-test.c | 104 +++ > 1 file changed, 104 insertions(+) > > diff --git

Re: [PATCH] linux-user: Avoid mmap of the last byte of the reserved_va

2023-06-29 Thread Michael Tokarev
29.06.2023 11:08, Richard Henderson wrote: There is an overflow problem in mmap_find_vma_reserved: when reserved_va == UINT32_MAX, end may overflow to 0. Rather than a larger rewrite at this time, simply avoid the final byte of the VA, which avoids searching the final page, which avoids the

[PATCH 1/1] linux-user: add support for big endian variants of riscv

2023-06-29 Thread Rory Bolt
RISCV architecture supports an optional big endian mode of operation. In this mode, data accesses are treated as big endian, while code is always in little endian format. This is similar to how the ARM architecture treats it's optional bi-endian support. This patch adds support for big endian

[PATCH 0/1] linux-user: add support for big endian variants of riscv

2023-06-29 Thread Rory Bolt
Rory Bolt (1): linux-user: add support for big endian variants of riscv configs/targets/riscv64be-linux-user.mak| 7 +++ configure | 1 + linux-user/elfload.c| 10 ++ linux-user/include/host/riscv/host-signal.h | 3

Re: [PATCH 3/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-06-29 Thread Peter Xu
On Wed, Jun 28, 2023 at 01:55:39PM -0300, Fabiano Rosas wrote: > file-based migration requires the target to initiate its migration after > the source has finished writing out the data in the file. Currently > there's no easy way to initiate 'migrate-incoming', allow this by > introducing

Re: [PATCH] hw: Simplify calls to pci_nic_init_nofail()

2023-06-29 Thread Philippe Mathieu-Daudé
On 29/6/23 16:58, Thomas Huth wrote: On 29/06/2023 15.47, Philippe Mathieu-Daudé wrote: Hi Thomas, On 29/6/23 14:54, Thomas Huth wrote: pci_nic_init_nofail() calls qemu_find_nic_model(), and this function sets nd->model = g_strdup(default_model) if it has not been initialized yet. So we don't

Re: [PATCH 1/2] target/riscv: Check for CF_PARALLEL instead of qemu_tcg_mttcg_enabled

2023-06-29 Thread Philippe Mathieu-Daudé
On 29/6/23 18:26, Alex Bennée wrote: Philippe Mathieu-Daudé writes: A CPU knows whether MTTCG is enabled or not because it is reflected in its TCG flags via the CF_PARALLEL bit. Suggested-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu.c | 2 +- 1 file

Re: [PATCH 1/1] pcie: Add hotplug detect state register to w1cmask

2023-06-29 Thread Peter Xu
On Thu, Jun 29, 2023 at 04:06:53PM -0400, Michael S. Tsirkin wrote: > On Thu, Jun 29, 2023 at 04:01:41PM -0400, Peter Xu wrote: > > On Thu, Jun 29, 2023 at 03:33:06PM -0400, Michael S. Tsirkin wrote: > > > On Thu, Jun 29, 2023 at 01:01:53PM -0400, Peter Xu wrote: > > > > Hi, Leo, > > > > > > > >

Re: [PATCH 1/1] pcie: Add hotplug detect state register to w1cmask

2023-06-29 Thread Michael S. Tsirkin
On Thu, Jun 29, 2023 at 04:01:41PM -0400, Peter Xu wrote: > On Thu, Jun 29, 2023 at 03:33:06PM -0400, Michael S. Tsirkin wrote: > > On Thu, Jun 29, 2023 at 01:01:53PM -0400, Peter Xu wrote: > > > Hi, Leo, > > > > > > Thanks for figuring this out. Let me copy a few more potential reviewers > > >

Re: [PATCH 1/1] pcie: Add hotplug detect state register to w1cmask

2023-06-29 Thread Peter Xu
On Thu, Jun 29, 2023 at 03:33:06PM -0400, Michael S. Tsirkin wrote: > On Thu, Jun 29, 2023 at 01:01:53PM -0400, Peter Xu wrote: > > Hi, Leo, > > > > Thanks for figuring this out. Let me copy a few more potential reviewers > > from commit 17858a1695 ("hw/acpi/ich9: Set ACPI PCI hot-plug as

Re: [PATCH 5/7] migration: Display error in query-migrate irrelevant of status

2023-06-29 Thread Peter Xu
On Wed, Jun 28, 2023 at 08:01:22PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > Display it as long as being set, irrelevant of FAILED status. E.g., it may > > also be applicable to PAUSED stage of postcopy, to provide hint on what has > > gone wrong. > > This might have made the

Re: [PATCH 1/1] pcie: Add hotplug detect state register to w1cmask

2023-06-29 Thread Michael S. Tsirkin
On Thu, Jun 29, 2023 at 01:01:53PM -0400, Peter Xu wrote: > Hi, Leo, > > Thanks for figuring this out. Let me copy a few more potential reviewers > from commit 17858a1695 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on > Q35"). > > On Thu, Jun 29, 2023 at 06:05:00AM -0300, Leonardo Bras

Re: [PATCH 1/6] migration: Set migration status early in incoming side

2023-06-29 Thread Peter Xu
On Wed, Jun 28, 2023 at 01:55:37PM -0300, Fabiano Rosas wrote: > We are sending a migration event of MIGRATION_STATUS_SETUP at > qemu_start_incoming_migration but never actually setting the state. > > This creates a window between qmp_migrate_incoming and > process_incoming_migration_co where the

[PULL 0/8] s390-ccw bios updates

2023-06-29 Thread Thomas Huth
Hi Richard! The following changes since commit 0eb8f90edebc11022a42abb211b026fac2e276f5: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2023-06-28 17:29:53 +0200) are available in the Git repository at: https://gitlab.com/thuth/qemu.git

[PULL 2/8] pc-bios/s390-ccw: Get rid of the the __u* types

2023-06-29 Thread Thomas Huth
The types starting with double underscores have likely been introduced into the s390-ccw bios to be able to re-use structs from the Linux kernel in the past, but the corresponding structs in cio.h have been changed there a long time ago already to not use the variants with the double underscores

[PULL 3/8] pc-bios/s390-ccw/Makefile: Use -z noexecstack to silence linker warning

2023-06-29 Thread Thomas Huth
Recent versions of ld complain when linking the s390-ccw bios: /usr/bin/ld: warning: start.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker We can

[PULL 4/8] pc-bios/s390-ccw: Fix indentation in start.S

2023-06-29 Thread Thomas Huth
start.S is currently indented with a mixture of spaces and tabs, which is quite ugly. QEMU coding style says indentation should be 4 spaces, and this is also what we are using in the assembler files in the tests/tcg/s390x/ folder already, so let's adjust start.S accordingly. Reviewed-by: Cédric

[PULL 5/8] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-29 Thread Thomas Huth
Providing the space of a stack frame is the duty of the caller, so we should reserve 160 bytes before jumping into the main function. Otherwise the main() function might write past the stack array. While we're at it, add a proper STACK_SIZE macro for the stack size instead of using magic numbers

[PULL 8/8] pc-bios: Update the s390 bios images with the recent changes

2023-06-29 Thread Thomas Huth
The startup code of the bios has slightly been changed, apart from that, there should not be any functional changes this time. Signed-off-by: Thomas Huth --- pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes pc-bios/s390-netboot.img | Bin 67232 -> 67232 bytes 2 files changed, 0

[PULL 1/8] s390-ccw: Getting rid of ulong

2023-06-29 Thread Thomas Huth
From: Juan Quintela Any good reason why this still exist? I can understand u* and __u* to be linux kernel like, but ulong? Reviewed-by: Thomas Huth Signed-off-by: Juan Quintela Message-Id: <20230629104821.194859-2-th...@redhat.com> Reviewed-by: Claudio Imbrenda Reviewed-by: Philippe

[PULL 7/8] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-29 Thread Thomas Huth
start.S currently cannot be compiled with Clang 16 and binutils 2.40: ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for relocation R_390_PC32DBL According to the built-in linker script of ld, the symbol __bss_start can actually point *before* the .bss section and does

[PULL 6/8] pc-bios/s390-ccw: Move the stack array into start.S

2023-06-29 Thread Thomas Huth
The stack array is only referenced from the start-up code (which is shared between the s390-ccw.img and the s390-netboot.img), but it is currently declared twice, once in main.c and once in netmain.c. It makes more sense to declare this in start.S instead - which will also be helpful in the next

Re: [PATCH 1/2] vfio: Don't be a iterable and legacy device at the same time

2023-06-29 Thread Peter Xu
On Thu, Jun 22, 2023 at 01:22:26PM +0200, Lukas Straub wrote: > Legacy savevm devices only implement save_state() and load_state(). > Iterable devices shouldn't implement save_state() or else they are > handled both as an iterable and legacy device in the savevm code. > > Signed-off-by: Lukas

Re: [PULL 17/33] ui/dbus: win32 support

2023-06-29 Thread Bernhard Beschow
Am 27. Juni 2023 13:02:14 UTC schrieb marcandre.lur...@redhat.com: >From: Marc-André Lureau > >D-Bus doesn't support fd-passing on Windows (AF_UNIX doesn't have >SCM_RIGHTS yet, but there are other means to share objects. I have >proposed various solutions upstream, but none seem fitting

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Ani Sinha
> On 29-Jun-2023, at 9:27 PM, Ani Sinha wrote: > > > >> On 29-Jun-2023, at 9:02 PM, Michael S. Tsirkin wrote: >> >> On Thu, Jun 29, 2023 at 08:07:57PM +0530, Ani Sinha wrote: >>> >>> On 29-Jun-2023, at 7:54 PM, Michael S. Tsirkin wrote: On Thu, Jun 29, 2023 at

[RESEND][PATCH v1 0/2] Add Virtio support to Xenpvh machine for arm

2023-06-29 Thread Vikram Garhwal
Hi, We added virtio-mmio support in xenpvh machine. Now, it can support upto 10 virtio mmio. I think none of previous patches were delivered to mailing list so Resending this series. Regards, Vikram Oleksandr Tyshchenko (2): xen_arm: Create virtio-mmio devices during initialization

[RESEND][PATCH v1 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-06-29 Thread Vikram Garhwal
From: Oleksandr Tyshchenko In order to use virtio backends we need to initialize RAM for the xen-mapcache (which is responsible for mapping guest memory using foreign mapping) to work. Calculate and add hi/low memory regions based on machine->ram_size. Use the constants defined in public header

[RESEND][PATCH v1 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-06-29 Thread Vikram Garhwal
From: Oleksandr Tyshchenko In order to use virtio backends we need to allocate virtio-mmio parameters (irq and base) and register corresponding buses. Use the constants defined in public header arch-arm.h to be aligned with the toolstack. So the number of current supported virtio-mmio devices

Re: [PATCH v4 5/5] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-29 Thread Cédric Le Goater
Hello Zhenzhong, On 6/29/23 10:40, Zhenzhong Duan wrote: This patch refactors vfio_migration_realize() and its dependend code as follows: 1. It's redundant in vfio_migration_realize() to registers multiple blockers, e.g: vIOMMU blocker can be refactored as per device blocker. 2. Change

Re: [PATCH v2 14/16] hw/pci-host/i440fx: Resolve i440fx_init()

2023-06-29 Thread Bernhard Beschow
Am 29. Juni 2023 07:50:10 UTC schrieb "Philippe Mathieu-Daudé" : >Hi Bernhard, Hi Phil, > >On 28/6/23 21:52, Bernhard Beschow wrote: >> i440fx_init() is a legacy init function. The previous patches worked towards >> TYPE_I440FX_PCI_HOST_BRIDGE to be instantiated the QOM way. Do this now by

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-29 Thread Kim, Dongwon
On 6/21/2023 4:14 AM, Robert Beckett wrote: On 21/06/2023 09:39, Gerd Hoffmann wrote: On Tue, Jun 20, 2023 at 01:26:15PM +0100, Robert Beckett wrote: On 20/06/2023 10:41, Gerd Hoffmann wrote:     Hi, The guest driver should be able to restore resources after resume. Thank you for your

Re: [PATCH 1/1] pcie: Add hotplug detect state register to w1cmask

2023-06-29 Thread Peter Xu
Hi, Leo, Thanks for figuring this out. Let me copy a few more potential reviewers from commit 17858a1695 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35"). On Thu, Jun 29, 2023 at 06:05:00AM -0300, Leonardo Bras wrote: > When trying to migrate a machine type pc-q35-6.0 or lower, with

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-29 Thread Kim, Dongwon
This method - letting QEMU not remove resources would work on S3 case but with S4, the QEMU would lose all the resources anyway as the process will be terminated. So objects restoring was only option for us as in [RFC PATCH 2/2] drm/virtio: restore virtio_gpu_objects upon suspend and resume

Re: [PATCH 1/2] target/riscv: Check for CF_PARALLEL instead of qemu_tcg_mttcg_enabled

2023-06-29 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > A CPU knows whether MTTCG is enabled or not because it is > reflected in its TCG flags via the CF_PARALLEL bit. > > Suggested-by: Alex Bennée > Signed-off-by: Philippe Mathieu-Daudé > --- > target/riscv/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v6 09/15] target/riscv: Add Zvkned ISA extension support

2023-06-29 Thread Richard Henderson
On 6/29/23 17:10, Max Chou wrote: On 2023/6/28 5:07 PM, Richard Henderson wrote: You can eliminate the vstart % EGS test, and the vstart < vl test, when VSTART_EQ_ZERO. You can eliminate the vl % EGS test when VL_EQ_VLMAX. You could move all of these tests out of line, into a helper_foo_chk()

Re: [PATCH v2 04/12] hw/ssi: Add an "addr" property to SSIPeripheral

2023-06-29 Thread Cédric Le Goater
On 6/29/23 12:56, Philippe Mathieu-Daudé wrote: On 7/6/23 16:15, Cédric Le Goater wrote: On 6/7/23 10:28, Philippe Mathieu-Daudé wrote: On 7/6/23 10:06, Joel Stanley wrote: On Wed, 7 Jun 2023 at 04:40, Cédric Le Goater wrote: Boards will use this new property to identify the device CS line

Re: [PATCH v2 05/12] hw/ssi: Introduce a ssi_get_cs() helper

2023-06-29 Thread Cédric Le Goater
On 6/29/23 13:09, Philippe Mathieu-Daudé wrote: On 7/6/23 06:39, Cédric Le Goater wrote: Simple routine to retrieve a DeviceState object on a SPI bus using its address/cs. It will be useful for the board to wire the CS lines. Cc: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 05/37] crypto: Add aesenc_SB_SR_AK

2023-06-29 Thread Richard Henderson
On 6/29/23 17:45, Max Chou wrote: On 2023/6/20 7:07 PM, Richard Henderson wrote: diff --git a/include/crypto/aes-round.h b/include/crypto/aes-round.h new file mode 100644 index 00..d675d2468f --- /dev/null +++ b/include/crypto/aes-round.h @@ -0,0 +1,44 @@ +/* + * AES round fragments,

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Ani Sinha
> On 29-Jun-2023, at 9:02 PM, Michael S. Tsirkin wrote: > > On Thu, Jun 29, 2023 at 08:07:57PM +0530, Ani Sinha wrote: >> >> >>> On 29-Jun-2023, at 7:54 PM, Michael S. Tsirkin wrote: >>> >>> On Thu, Jun 29, 2023 at 09:37:07AM +0530, Ani Sinha wrote: PCI Express ports only have one

Re: [PATCH v3 05/37] crypto: Add aesenc_SB_SR_AK

2023-06-29 Thread Max Chou
On 2023/6/20 7:07 PM, Richard Henderson wrote: diff --git a/include/crypto/aes-round.h b/include/crypto/aes-round.h new file mode 100644 index 00..d675d2468f --- /dev/null +++ b/include/crypto/aes-round.h @@ -0,0 +1,44 @@ +/* + * AES round fragments, generic version + *

Re: [PATCH v4 5/5] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-29 Thread Joao Martins
On 29/06/2023 16:20, Avihai Horon wrote: > On 29/06/2023 15:44, Joao Martins wrote: >> On 29/06/2023 09:40, Zhenzhong Duan wrote: >>> This patch refactors vfio_migration_realize() and its dependend code >>> as follows: >>> >>> 1. It's redundant in vfio_migration_realize() to registers multiple

[PATCH v3 1/1] vfio-user: introduce vfio-user protocol specification

2023-06-29 Thread Jagannathan Raman
From: Thanos Makatos This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. It has been earlier

[PATCH v3 0/1] introduce vfio-user protocol specification

2023-06-29 Thread Jagannathan Raman
Hi, This patch is a continuation of the following patch that John Johnson sent out for review already: [PATCH v2 01/23] vfio-user: introduce vfio-user protocol specification Message-Id: We have separated this patch from the original vfio-user client series. We will send the other patches in

Re: [PATCH v4 3/5] vfio/pci: Disable INTx in vfio_realize error path

2023-06-29 Thread Joao Martins
On 29/06/2023 16:13, Cédric Le Goater wrote: > On 6/29/23 13:24, Joao Martins wrote: >> On 29/06/2023 09:40, Zhenzhong Duan wrote: >>> When vfio realize fails, INTx isn't disabled if it has been enabled. >>> This may confuse host side with unhandled interrupt report. >>> >>> Add a new label to

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Michael S. Tsirkin
On Thu, Jun 29, 2023 at 08:07:57PM +0530, Ani Sinha wrote: > > > > On 29-Jun-2023, at 7:54 PM, Michael S. Tsirkin wrote: > > > > On Thu, Jun 29, 2023 at 09:37:07AM +0530, Ani Sinha wrote: > >> PCI Express ports only have one slot, so PCI Express devices can only be > >> plugged into slot 0 on

[PATCH RFC v2 4/4] vdpa: Allow VIRTIO_NET_F_CTRL_RX in SVQ

2023-06-29 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_RX feature. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 9d5d88756c..0410a52043 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@

[PATCH RFC v2 3/4] vdpa: Restore packet receive filtering state relative with _F_CTRL_RX feature

2023-06-29 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_rx_mode() and vhost_vdpa_net_load_rx() to restore the packet receive filtering state in relation to VIRTIO_NET_F_CTRL_RX feature at device's startup. Signed-off-by: Hawkins Jiawei --- v2: - avoid sending CVQ command in default state suggested by

[PATCH RFC v2 2/4] vdpa: Restore MAC address filtering state

2023-06-29 Thread Hawkins Jiawei
This patch refactors vhost_vdpa_net_load_mac() to restore the MAC address filtering state at device's startup. Signed-off-by: Hawkins Jiawei --- v2: - use iovec suggested by Eugenio - avoid sending CVQ command in default state v1:

[PATCH RFC v2 1/4] vdpa: Use iovec for vhost_vdpa_net_load_cmd()

2023-06-29 Thread Hawkins Jiawei
According to VirtIO standard, "The driver MUST follow the VIRTIO_NET_CTRL_MAC_TABLE_SET command by a le32 number, followed by that number of non-multicast MAC addresses, followed by another le32 number, followed by that number of multicast addresses." Considering that these data is not stored in

[PATCH RFC v2 0/4] Vhost-vdpa Shadow Virtqueue _F_CTRL_RX commands support

2023-06-29 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept rx commands related to VIRTIO_NET_F_CTRL_RX feature through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that rx state in the destination. Note that this patch should be based on [1], which have

Re: [PATCH v4 5/5] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-29 Thread Avihai Horon
On 29/06/2023 15:44, Joao Martins wrote: External email: Use caution opening links or attachments On 29/06/2023 09:40, Zhenzhong Duan wrote: This patch refactors vfio_migration_realize() and its dependend code as follows: 1. It's redundant in vfio_migration_realize() to registers multiple

Re: [PATCH v4 4/5] vfio/pci: Free resources when vfio_migration_realize fails

2023-06-29 Thread Cédric Le Goater
On 6/29/23 13:45, Joao Martins wrote: On 29/06/2023 09:40, Zhenzhong Duan wrote: When vfio_realize() succeeds, hot unplug will call vfio_exitfn() to free resources allocated in vfio_realize(); when vfio_realize() fails, vfio_exitfn() is never called and we need to free resources in

Re: [PATCH v4 3/5] vfio/pci: Disable INTx in vfio_realize error path

2023-06-29 Thread Cédric Le Goater
On 6/29/23 13:24, Joao Martins wrote: On 29/06/2023 09:40, Zhenzhong Duan wrote: When vfio realize fails, INTx isn't disabled if it has been enabled. This may confuse host side with unhandled interrupt report. Add a new label to be used for vfio_intx_enable() failed case. Fixes: a9994687cb9b

Re: [PATCH v6 09/15] target/riscv: Add Zvkned ISA extension support

2023-06-29 Thread Max Chou
On 2023/6/28 5:07 PM, Richard Henderson wrote: On 6/27/23 19:45, Max Chou wrote: +#define GEN_V_UNMASKED_TRANS(NAME, CHECK, EGS)    \ +    static bool trans_##NAME(DisasContext *s, arg_##NAME *a)  \ + { \ +    if (CHECK(s, a)) {

Re: [PATCH] gitlab: Disable plugins for cross-i386-tci

2023-06-29 Thread Thomas Huth
On 29/06/2023 15.08, Richard Henderson wrote: There are timeouts in the cross-i386-tci job that are related to plugins. Restrict this job to basic TCI testing. Signed-off-by: Richard Henderson --- E.g. most recent failure(s), https://gitlab.com/qemu-project/qemu/-/jobs/4565517825 4488:

Re: [PATCH] hw: Simplify calls to pci_nic_init_nofail()

2023-06-29 Thread Thomas Huth
On 29/06/2023 15.47, Philippe Mathieu-Daudé wrote: Hi Thomas, On 29/6/23 14:54, Thomas Huth wrote: pci_nic_init_nofail() calls qemu_find_nic_model(), and this function sets nd->model = g_strdup(default_model) if it has not been initialized yet. So we don't have to set nd->model to the

Re: [PATCH v2 06/12] aspeed/smc: Wire CS lines at reset

2023-06-29 Thread Cédric Le Goater
On 6/7/23 06:39, Cédric Le Goater wrote: Currently, a set of default flash devices is created at machine init and drives defined on the QEMU command line are associated to the FMC and SPI controllers in sequence : -drive file,format=raw,if=mtd -drive file,format=raw,if=mtd The CS lines

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Ani Sinha
> On 29-Jun-2023, at 7:54 PM, Michael S. Tsirkin wrote: > > On Thu, Jun 29, 2023 at 09:37:07AM +0530, Ani Sinha wrote: >> PCI Express ports only have one slot, so PCI Express devices can only be >> plugged into slot 0 on a PCIE port. Enforce it. >> >> The change has been tested to not break

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Michael S. Tsirkin
On Thu, Jun 29, 2023 at 09:37:07AM +0530, Ani Sinha wrote: > PCI Express ports only have one slot, so PCI Express devices can only be > plugged into slot 0 on a PCIE port. Enforce it. > > The change has been tested to not break ARI by instantiating seven vfs on an > emulated igb device (the

Re: [PATCH v6 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-29 Thread Ani Sinha
> On 29-Jun-2023, at 2:19 PM, Akihiko Odaki wrote: > > On 2023/06/29 17:05, Ani Sinha wrote: >> On Thu, 29 Jun, 2023, 12:17 pm Akihiko Odaki, > > wrote: >>On 2023/06/29 13:07, Ani Sinha wrote: >> > PCI Express ports only have one slot, so PCI Express

  1   2   3   >