Re: [PATCH v20 00/11] hw/pci: SR-IOV related fixes and improvements

2025-02-14 Thread Akihiko Odaki
Hi Michael, It has been a while since this series was reviewed by maintainers of relevant architectures. Can you check if this series is ready to pull? Regards, Akihiko Odaki On 2025/01/16 18:00, Akihiko Odaki wrote: Supersedes: <20240714-rombar-v2-0-af1504ef5...@daynix.com> ("[PATCH v2 0/4]

[PATCH 2/5] target/rx: Set exception vector base to 0xffffff80

2025-02-14 Thread Keith Packard via
The documentation says the vector is at 0xff80, instead of the previous value of 0xffc0. That value must have been a bug because the standard vector values (20, 21, 23, 25, 30) were all past the end of the array. Signed-off-by: Keith Packard --- target/rx/helper.c | 2 +- 1 file changed,

[PATCH 4/5] target/rx: Load reset vector from memory after first run

2025-02-14 Thread Keith Packard via
The ROM images all get deleted as they've been loaded to memory, so we can't go fetch the reset vector from there. Instead, fetch it from memory. To make that work, we need to execute the delayed mmu setup function tcg_commit_cpu as that wires up memory dispatching. Signed-off-by: Keith Packard -

[PATCH 1/5] hw/rx: Allow execution without either bios or kernel

2025-02-14 Thread Keith Packard via
Users can use -device loader to get an ELF file loaded to memory, so we don't need to require one of these options. Signed-off-by: Keith Packard --- hw/rx/rx-gdbsim.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c index 88c8f12c10..4afd77efd5 100644 -

[PATCH 0/5] Renesas RX target fixes

2025-02-14 Thread Keith Packard via
I'm getting a Renesas toolchain working and found a couple of bugs and a few fixes in the qemu target code for this device. The two critical bugs which are fixed: 1. Exception vector base address is incorrect. The right value is 0xff80. 2. A bunch of opcode helper functions are incorre

[PATCH 5/5] target/rx: Remove TCG_CALL_NO_WG from helpers which write env

2025-02-14 Thread Keith Packard via
Functions which modify virtual machine state (such as virtual registers stored in memory) must not be marked TCG_CALL_NO_WG as that tells the optimizer that virtual registers values already loaded in machine registers are still valid, hence discards any changes which these helpers may have made. S

[PATCH 3/5] target/rx: Reset the CPU at qemu reset time

2025-02-14 Thread Keith Packard via
This ensure that the CPU gets reset every time QEMU resets. Signed-off-by: Keith Packard --- target/rx/cpu.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 37a6fdd569..04dd34b310 100644 --- a/target/rx/cpu.c +++ b/target/rx

[PATCH] tcg: refactor pool data for simplicity and comprehension

2025-02-14 Thread Michael Clark
the intent of this patch is more conventional nomenclature but the constant pool data code is also simplified a little. - merge new_pool_{alloc,insert} -> new_pool_data. - rename TCGLabelPoolData -> TCGData. - rename pool_labels -> pool_data. - rename macro TCG_TARGET_NEED_POOL_DATA. - move TCGDat

[PULL 07/22] migration/multifd: Add a compat property for TLS termination

2025-02-14 Thread Fabiano Rosas
We're currently changing the way the source multifd migration handles the shutdown of the multifd channels when TLS is in use to perform a clean termination by calling gnutls_bye(). Older src QEMUs will always close the channel without terminating the TLS session. New dst QEMUs treat an unclean te

Re: [PATCH V2] migration: ram block cpr blockers

2025-02-14 Thread David Hildenbrand
On 14.02.25 21:12, Steve Sistare wrote: Unlike cpr-reboot mode, cpr-transfer mode cannot save volatile ram blocks in the migration stream file and recreate them later, because the physical memory for the blocks is pinned and registered for vfio. Add a blocker for volatile ram blocks. Also add a

[PULL 12/22] migration: Fix hang after error in destination setup phase

2025-02-14 Thread Fabiano Rosas
If the destination side fails at migration_ioc_process_incoming() before starting the coroutine, it will report the error but QEMU will not exit. Set the migration state to FAILED and exit the process if exit-on-error allows. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2633 Reported-b

[PULL 17/22] migration: Update migrate_cancel documentation

2025-02-14 Thread Fabiano Rosas
Update the migrate_cancel command documentation with a few words about postcopy and the expected state of the machine after migration. Acked-by: Markus Armbruster Reviewed-by: Peter Xu Message-ID: <20250213175927.19642-10-faro...@suse.de> Signed-off-by: Fabiano Rosas --- qapi/migration.json |

[PULL 22/22] guestperf: Add test result data into report

2025-02-14 Thread Fabiano Rosas
From: Hyman Huang The migration result data is not included in the guestperf report information; include the result as a report entry so the developer can check whether the migration was successful after running guestperf. Signed-off-by: Hyman Huang Message-ID: <6303400c2983ffe5647f07caa6406f0

[PULL 20/22] guestperf: Nitpick the inconsistent parameters

2025-02-14 Thread Fabiano Rosas
From: Hyman Huang Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé Message-ID: Signed-off-by: Fabiano Rosas --- tests/migration-stress/guestperf/comparison.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/migration-stress/gue

[PULL 21/22] guestperf: Introduce multifd compression option

2025-02-14 Thread Fabiano Rosas
From: Hyman Huang Guestperf tool does not cover the multifd compression option currently, it is worth supporting so that developers can analysis the migration performance with different compression algorithms. Multifd support 4 compression algorithms currently: zlib, zstd, qpl, uadk To request

[PULL 02/22] io: tls: Add qio_channel_tls_bye

2025-02-14 Thread Fabiano Rosas
Add a task dispatcher for gnutls_bye similar to the qio_channel_tls_handshake_task(). The gnutls_bye() call might be interrupted and so it needs to be rescheduled. The migration code will make use of this to help the migration destination identify a premature EOF. Once the session termination is i

Re: [PATCH V2 28/45] vfio: return mr from vfio_get_xlat_addr

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 03:40:57PM -0500, Steven Sistare wrote: > > > diff --git a/system/memory.c b/system/memory.c > > > index 4c82979..755eafe 100644 > > > --- a/system/memory.c > > > +++ b/system/memory.c > > > @@ -2183,9 +2183,8 @@ void > > > ram_discard_manager_unregister_listener(RamDiscard

[PULL 04/22] io: Add flags argument to qio_channel_readv_full_all_eof

2025-02-14 Thread Fabiano Rosas
We want to pass flags into qio_channel_tls_readv() but qio_channel_readv_full_all_eof() doesn't take a flags argument. No functional change. Reviewed-by: Daniel P. Berrangé Acked-by: Daniel P. Berrangé Signed-off-by: Fabiano Rosas --- hw/remote/mpqemu-link.c | 2 +- include/io/channel.h|

Re: [PATCH v4 26/33] vfio/migration: Multifd device state transfer support - receive init/cleanup

2025-02-14 Thread Maciej S. Szmigiero
On 12.02.2025 11:55, Cédric Le Goater wrote: On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add support for VFIOMultifd data structure that will contain most of the receive-side data together with its init/cleanup methods. Signed-off-by: Maciej S. Szmigiero ---   hw

Re: [PATCH v4 32/33] vfio/migration: Add x-migration-multifd-transfer VFIO property

2025-02-14 Thread Maciej S. Szmigiero
On 12.02.2025 18:10, Cédric Le Goater wrote: On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This property allows configuring at runtime whether to transfer the particular device state via multifd channels when live migrating that device. It defaults to AUTO, which me

Re: [PATCH V2 28/45] vfio: return mr from vfio_get_xlat_addr

2025-02-14 Thread Steven Sistare
On 2/14/2025 11:48 AM, Peter Xu wrote: On Fri, Feb 14, 2025 at 06:14:10AM -0800, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in. This will be needed by CPR in a subsequent patch to map blocks using IOMM

Re: [PATCH v4 27/33] vfio/migration: Multifd device state transfer support - received buffers queuing

2025-02-14 Thread Maciej S. Szmigiero
On 12.02.2025 14:47, Cédric Le Goater wrote: On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" The multifd received data needs to be reassembled since device state packets sent via different multifd channels can arrive out-of-order. Therefore, each VFIO device state pac

[PULL 14/22] migration: Don't set FAILED state when cancelling

2025-02-14 Thread Fabiano Rosas
The expected outcome from qmp_migrate_cancel() is that the source migration goes to the terminal state MIGRATION_STATUS_CANCELLED. Anything different from this is a bug when cancelling. Make sure there is never a state transition from an unspecified state into FAILED. Code that sets FAILED, should

[PULL 18/22] migration: use parameters.mode in cpr_state_save

2025-02-14 Thread Fabiano Rosas
From: Steve Sistare qmp_migrate guarantees that cpr_channel is not null for MIG_MODE_CPR_TRANSFER when cpr_state_save is called: qmp_migrate() if (s->parameters.mode == MIG_MODE_CPR_TRANSFER && !cpr_channel) { return; } cpr_state_save(cpr_channel) but cpr

Re: [PATCH V2] migration: ram block cpr blockers

2025-02-14 Thread Steven Sistare
On 2/14/2025 4:21 PM, David Hildenbrand wrote: On 14.02.25 21:12, Steve Sistare wrote: Unlike cpr-reboot mode, cpr-transfer mode cannot save volatile ram blocks in the migration stream file and recreate them later, because the physical memory for the blocks is pinned and registered for vfio.  Ad

[PULL 10/22] migration: Unify migration_cancel and migrate_fd_cancel

2025-02-14 Thread Fabiano Rosas
There's no need for two separate functions and this _fd_ is a historic artifact that makes little sense nowadays. Reviewed-by: Peter Xu Message-ID: <20250213175927.19642-3-faro...@suse.de> Signed-off-by: Fabiano Rosas --- migration/migration.c | 18 +++--- migration/trace-events |

Re: [PATCH v3 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field

2025-02-14 Thread Kim Phillips
On 2/13/25 6:55 PM, Sean Christopherson wrote: On Thu, Feb 13, 2025, Kim Phillips wrote: On 2/11/25 3:46 PM, Sean Christopherson wrote: On Mon, Feb 10, 2025, Tom Lendacky wrote: On 2/7/25 17:34, Kim Phillips wrote: diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index a2a794c3

[PULL 19/22] guestperf: Support deferred migration for multifd

2025-02-14 Thread Fabiano Rosas
From: Hyman Huang The way to enable multifd migration has been changed by commit, 82137e6c8c (migration: enforce multifd and postcopy preempt to be set before incoming), and guestperf has not made the necessary changes. If multifd migration had been enabled in the previous manner, the following e

[PATCH v4 11/11] docs: add notes on Golang code generator

2025-02-14 Thread Victor Toso
The goal of this patch is converge discussions into a documentation, to make it easy and explicit design decisions, known issues and what else might help a person interested in how the Go module is generated. Signed-off-by: Victor Toso --- docs/devel/index-build.rst | 1 + docs/devel/

Re: [PATCH V2 02/45] migration: cpr helpers

2025-02-14 Thread Steven Sistare
On 2/14/2025 11:37 AM, Peter Xu wrote: On Fri, Feb 14, 2025 at 06:13:44AM -0800, Steve Sistare wrote: Add cpr_needed_for_reuse, cpr_resave_fd helpers, cpr_is_incoming, and cpr_open_fd, for use when adding cpr support for vfio and iommufd. Signed-off-by: Steve Sistare --- include/migration/cp

[PULL 05/22] io: Add a read flag for relaxed EOF

2025-02-14 Thread Fabiano Rosas
Add a read flag that can inform a channel that it's ok to receive an EOF at any moment. Channels that have some form of strict EOF tracking, such as TLS session termination, may choose to ignore EOF errors with the use of this flag. This is being added for compatibility with older migration stream

[PULL 11/22] migration: Change migrate_fd_ to migration_

2025-02-14 Thread Fabiano Rosas
Remove all instances of _fd_ from the migration generic code. These functions have grown over time and the _fd_ part is now just confusing. migration_fd_error() -> migration_error() makes it a little vague. Since it's only used for migration_connect() failures, change it to migration_connect_set_e

[PATCH v4 08/11] qapi: golang: Generate Event interface

2025-02-14 Thread Victor Toso
The Event interface is an abstraction that can be used by client and server to the manager the Event types albeit with a different implementation for sending and receiving. The implementation of client/server is not part of this series. Signed-off-by: Victor Toso --- scripts/qapi/golang/golang.

[PULL 08/22] migration: Check migration error after loadvm

2025-02-14 Thread Fabiano Rosas
We're currently only checking the QEMUFile error after qemu_loadvm_state(). This was causing a TLS termination error from multifd recv threads to be ignored. Start checking the migration error as well to avoid missing further errors. Regarding compatibility concerning the TLS termination error th

[PATCH v4 06/11] qapi: golang: Generate union type

2025-02-14 Thread Victor Toso
This patch handles QAPI union types and generates the equivalent data structures and methods in Go to handle it. The QAPI union type has two types of fields: The @base and the @Variants members. The @base fields can be considered common members for the union while only one field maximum is set for

[PULL 00/22] Migration patches for 2025-02-14

2025-02-14 Thread Fabiano Rosas
The following changes since commit 495de0fd82d8bb2d7035f82d9869cfeb48de2f9e: Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2025-02-14 08:19:05 -0500) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migration-202

[PULL 13/22] migration: Reject qmp_migrate_cancel after postcopy

2025-02-14 Thread Fabiano Rosas
After postcopy has started, it's not possible to recover the source machine in case a migration error occurs because the destination has already been changing the state of the machine. For that same reason, it doesn't make sense to try to cancel the migration after postcopy has started. Reject the

[PULL 06/22] migration/multifd: Terminate the TLS connection

2025-02-14 Thread Fabiano Rosas
The multifd recv side has been getting a TLS error of GNUTLS_E_PREMATURE_TERMINATION at the end of migration when the send side closes the sockets without ending the TLS session. This has been masked by the code not checking the migration error after loadvm. Start ending the TLS session at multifd

[PULL 01/22] crypto: Allow gracefully ending the TLS session

2025-02-14 Thread Fabiano Rosas
QEMU's TLS session code provides no way to call gnutls_bye() to terminate a TLS session. Callers of qcrypto_tls_session_read() can choose to ignore a GNUTLS_E_PREMATURE_TERMINATION error by setting the gracefulTermination argument. The QIOChannelTLS ignores the premature termination error whenever

[PULL 15/22] tests/qtest/migration: Introduce migration_test_add_suffix

2025-02-14 Thread Fabiano Rosas
Introduce a new migration_test_add_suffix to allow programmatic creation of tests based on a suffix. Pass the test name into the test so it can know which variant to run. Reviewed-by: Peter Xu Message-ID: <20250213175927.19642-8-faro...@suse.de> Signed-off-by: Fabiano Rosas --- tests/qtest/migr

[PATCH v4 04/11] qapi: golang: Generate struct types

2025-02-14 Thread Victor Toso
This patch handles QAPI struct types and generates the equivalent types in Go. The following patch adds extra logic when a member of the struct has a Type that can take JSON Null value (e.g: StrOrNull in QEMU) The highlights of this implementation are: 1. Generating a Go struct that requires a @b

[PULL 03/22] crypto: Remove qcrypto_tls_session_get_handshake_status

2025-02-14 Thread Fabiano Rosas
The correct way of calling qcrypto_tls_session_handshake() requires calling qcrypto_tls_session_get_handshake_status() right after it so there's no reason to have a separate method. Refactor qcrypto_tls_session_handshake() to inform the status in its own return value and alter the callers accordin

[PULL 09/22] migration: Set migration error outside of migrate_cancel

2025-02-14 Thread Fabiano Rosas
There's no point passing the error into migration cancel only for it to call migrate_set_error(). Reviewed-by: Peter Xu Message-ID: <20250213175927.19642-2-faro...@suse.de> Signed-off-by: Fabiano Rosas --- migration/migration.c | 7 ++- migration/migration.h | 2 +- migration/ram.c |

[PULL 16/22] tests/qtest/migration: Add a cancel test

2025-02-14 Thread Fabiano Rosas
The qmp_migrate_cancel() command is poorly tested and code inspection reveals that there might be concurrency issues with its usage. Add a test that runs a migration and calls qmp_migrate_cancel() at specific moments. In order to make the test more deterministic, instead of calling qmp_migrate_can

[PATCH v4 09/11] qapi: golang: Generate command type

2025-02-14 Thread Victor Toso
This patch handles QAPI command types and generates data structures in Go that handles it. Note that command's id is part of the first layer of unmarshal, so it is a member of protocol.go's Message type. qapi: | ## | # @add-fd: | # | # Add a file descriptor, that was passed via SCM rights, to

[PATCH v4 05/11] qapi: golang: structs: Address nullable members

2025-02-14 Thread Victor Toso
Explaining why this is needed needs some context, so taking the example of StrOrNull alternate type and considering a simplified struct that has two fields: qapi: | { 'struct': 'MigrationExample', | 'data': { '*label': 'StrOrNull', | 'target': 'StrOrNull' } } We have an optional

[PATCH v4 10/11] qapi: golang: Generate Command sync/async interfaces

2025-02-14 Thread Victor Toso
The Command interface is an abstraction that can be used by client and server to the manager the Command types albeit with a different implementation for sending and receiving. The proposal for Sync is defined as Command while the Async is named CommandAsync. The implementation of client/server i

[PATCH v4 07/11] qapi: golang: Generate event type

2025-02-14 Thread Victor Toso
This patch handles QAPI event types and generates data structures in Go that handles it. Note that the timestamp is part of the first layer of unmarshal, so it s a member of protocol.go's Message type. Example: qapi: | ## | # @MEMORY_DEVICE_SIZE_CHANGE: | # | # Emitted when the size of a memo

[PATCH v4 03/11] qapi: golang: Generate alternate types

2025-02-14 Thread Victor Toso
This patch handles QAPI alternate types and generates data structures in Go that handles it. Alternate types are similar to Union but without a discriminator that can be used to identify the underlying value on the wire. 1. Over the wire, we need to infer underlying value by its type 2. Pointer

[PATCH v4 02/11] qapi: golang: Generate enum type

2025-02-14 Thread Victor Toso
This patch handles QAPI enum types and generates its equivalent in Go. We sort the output based on enum's type name. Enums are being handled as strings in Golang. 1. For each QAPI enum, we will define a string type in Go to be the assigned type of this specific enum. 2. Naming: CamelCase will

[PATCH v4 00/11]

2025-02-14 Thread Victor Toso
Hi again, This patch series intent is to introduce a generator that produces a Go module for Go applications to interact over QMP with QEMU. Previous version (10 Jan 2025) https://lists.gnu.org/archive/html/qemu-devel/2025-01/msg01530.html The generated code was mostly tested using existing

[PATCH v4 01/11] qapi: golang: first level unmarshalling type

2025-02-14 Thread Victor Toso
This first patch introduces protocol.go. It introduces the Message Go struct type that can unmarshall any QMP message. It does not handle deeper than 1st layer of the JSON object, that is, with: 1. { "execute": "query-machines", "arguments": { "compat-props": true } } 2. {

Re: [PATCH V2 01/45] MAINTAINERS: Add reviewer for CPR

2025-02-14 Thread Steven Sistare
On 2/14/2025 9:53 AM, Peter Xu wrote: On Fri, Feb 14, 2025 at 06:13:43AM -0800, Steve Sistare wrote: CPR is integrated with live migration, and has the same maintainers. But, add a CPR section to add a reviewer. Signed-off-by: Steve Sistare --- MAINTAINERS | 11 +++ 1 file changed,

[PATCH V2] migration: ram block cpr blockers

2025-02-14 Thread Steve Sistare
Unlike cpr-reboot mode, cpr-transfer mode cannot save volatile ram blocks in the migration stream file and recreate them later, because the physical memory for the blocks is pinned and registered for vfio. Add a blocker for volatile ram blocks. Also add a blocker for RAM_GUEST_MEMFD. Preserving

Re: [PATCH] migration: ram block cpr blockers

2025-02-14 Thread Steven Sistare
On 1/30/2025 12:01 PM, Peter Xu wrote: On Wed, Jan 29, 2025 at 01:20:13PM -0500, Steven Sistare wrote: On 1/17/2025 6:57 PM, Peter Xu wrote: On Fri, Jan 17, 2025 at 02:10:14PM -0500, Steven Sistare wrote: On 1/17/2025 1:16 PM, Peter Xu wrote: On Fri, Jan 17, 2025 at 09:46:11AM -0800, Steve Si

Re: [PATCH v4 RESEND 0/4] Guestperf: miscellaneous refinement and enrichment

2025-02-14 Thread Fabiano Rosas
yong.hu...@smartx.com writes: > From: Hyman Huang > > v4: > 1. rebase v3 patchset on master > 2. build initrd-stress.img manually like before as suggested by Peter and > Fabiano > 3. drop the [PATCH v3 1/5], [PATCH v3 2/5] patches > 4. add an extra patch: [PATCH v4 4/4] guestperf: Add test resul

[PATCH v4 2/3] Skip NaN mode check for soft-float

2025-02-14 Thread Aleksandar Rakic
From: Aleksandar Rakic Skip NaN mode check for soft-float since NaN mode is irrelevant if an ELF binary's FPU mode is soft-float, i.e. it doesn't utilize a FPU. Cherry-picked 63492a56485f6b755fccf7ad623f7a189bfc79b6 from https://github.com/MIPS/gnutools-qemu Signed-off-by: Faraz Shahbazker Sig

[PATCH v4 1/3] Add support for emulation of CRC32 instructions

2025-02-14 Thread Aleksandar Rakic
From: Aleksandar Rakic Add emulation of MIPS' CRC32 (Cyclic Redundancy Check) instructions. Reuse zlib crc32() and Linux crc32c(). Cherry-picked 4cc974938aee1588f852590509004e340c072940 from https://github.com/MIPS/gnutools-qemu Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Si

Re: [PATCH v2] CXL CCI Get/Set Alert Configuration commands implmented as per CXL Specification 3.2 section 8.2.10.9.3

2025-02-14 Thread Jonathan Cameron via
On Fri, 14 Feb 2025 18:52:11 +0530 Sweta Kumari wrote: > 1)get alert configuration(Opcode 4201h) > 2)set alert configuration(Opcode 4202h) Move the change log to below the --- The key thing being git then doesn't pick it up whilst applying the patch. Whilst changed logs are very useful during th

[PATCH v4 0/3] Improve Mips target

2025-02-14 Thread Aleksandar Rakic
Hi, This patch series adds support for emulation of CRC32 instructions for the Mips target in QEMU, skips NaN mode check for soft-float, and adds a CLI flag for enabling an MSA feature. The CRC32 instructions are available in MD00087 Revision 6.06. Since the disassembly for crc32 is hidden in com

[PATCH v4 0/3] Improve Mips target

2025-02-14 Thread Aleksandar Rakic
From: Aleksandar Rakic Aleksandar Rakic (3): Add support for emulation of CRC32 instructions Skip NaN mode check for soft-float target/mips: Enable MSA ASE using a CLI flag linux-user/mips/cpu_loop.c| 6 +- target/mips/cpu.c | 16 ++ targ

[PATCH v4 3/3] target/mips: Enable MSA ASE using a CLI flag

2025-02-14 Thread Aleksandar Rakic
From: Aleksandar Rakic Enable MSA ASE using a CLI flag -cpu ,msa=on. Signed-off-by: Aleksandar Rakic --- target/mips/cpu.c | 16 target/mips/cpu.h | 1 + target/mips/internal.h | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c

[PATCH v2] ui/gtk-gl-area: Remove extra draw call in refresh

2025-02-14 Thread dongwon . kim
From: Dongwon Kim This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2 which causes some guest display corruption when gtk-gl-area is used for GTK rendering (e.g. Wayland Compositor) possibly due to simulataneous accesses on the guest frame buffer by host compositor and the gues

Re: [PATCH] vhost-user-snd: Use virtio_get_config_size()

2025-02-14 Thread Matias Ezequiel Vara Larsen
On Thu, Feb 13, 2025 at 04:07:47PM +0100, Philippe Mathieu-Daudé wrote: > On 13/2/25 14:25, Matias Ezequiel Vara Larsen wrote: > > Use virtio_get_config_size() rather than sizeof(struct > > virtio_snd_config) for the config_size in the vhost-user-snd frontend. > > The frontend shall rely on device

Re: [PATCH] vhost-user-snd: Use virtio_get_config_size()

2025-02-14 Thread Matias Ezequiel Vara Larsen
On Thu, Feb 13, 2025 at 04:31:41PM +0100, Stefano Garzarella wrote: > For the title, what about this? > > vhost-user-snd: fix incorrect config_size computation > > Or something like that, just to make clear that we are fixing a > real issue. > > On Thu, Feb 13, 2025 at 02:25:13PM +0100, Matias

Re: [PATCH] vhost-user-snd: Use virtio_get_config_size()

2025-02-14 Thread Matias Ezequiel Vara Larsen
On Thu, Feb 13, 2025 at 05:22:22PM +0100, Stefano Garzarella wrote: > On Thu, 13 Feb 2025 at 16:43, Stefano Garzarella wrote: > > > > Unrelated to this patch, but since we are talking about > > VIRTIO_SND_F_CTLS, I think it would be good to send a patch to Linux to > > make it clear that `controls

Re: [PATCH V2 28/45] vfio: return mr from vfio_get_xlat_addr

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 06:14:10AM -0800, Steve Sistare wrote: > Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory > region that the translated address is found in. This will be needed by > CPR in a subsequent patch to map blocks using IOMMU_IOAS_MAP_FILE. > > Also return th

Re: [PATCH V2 00/45] Live update: vfio and iommufd

2025-02-14 Thread Cédric Le Goater
On 2/14/25 17:20, Steven Sistare wrote: On 2/14/2025 11:06 AM, Peter Xu wrote: On Fri, Feb 14, 2025 at 10:56:02AM -0500, Steven Sistare wrote: Hi all, it would be nice to get this into qemu 10.0.  Without it, the basic support for cpr-transfer already in 10.0 is much less interesting. True..

Re: [PATCH V2 32/45] physmem: qemu_ram_get_fd_offset

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 06:14:14AM -0800, Steve Sistare wrote: > Define qemu_ram_get_fd_offset, so CPR can map a memory region using > IOMMU_IOAS_MAP_FILE in a subsequent patch. > > Signed-off-by: Steve Sistare Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh

2025-02-14 Thread Dmitry Osipenko
On 2/14/25 18:26, Dmitry Osipenko wrote: > On 2/14/25 17:06, Alex Bennée wrote: >> dongwon@intel.com writes: >> >>> From: Dongwon Kim >>> >>> This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2 >>> which causes some guest display corruption when gtk-gl-area >>> is used for G

Re: [PATCH V2 02/45] migration: cpr helpers

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 06:13:44AM -0800, Steve Sistare wrote: > Add cpr_needed_for_reuse, cpr_resave_fd helpers, cpr_is_incoming, and > cpr_open_fd, for use when adding cpr support for vfio and iommufd. > > Signed-off-by: Steve Sistare > --- > include/migration/cpr.h | 6 ++ > migration/cp

Re: Question: how to add CLI options for custom hw model

2025-02-14 Thread Paolo Bonzini
On 2/14/25 16:31, Mark Nesky wrote: Hello, I am new to the QEMU code base and I am working on a project involving a custom hardware model representing a customized ppc board.  What is the best way to add command line arguments applicable to my model? I see options in qemu-options.hx + vl.c,

Re: [PATCH v8 10/10] docs/system: virtio-gpu: Document host/guest requirements

2025-02-14 Thread Dmitry Osipenko
On 2/13/25 07:47, Akihiko Odaki wrote: > On 2025/02/10 1:56, Dmitry Osipenko wrote: >> From: Alex Bennée >> >> This attempts to tidy up the VirtIO GPU documentation to make the list >> of requirements clearer. There are still a lot of moving parts and the >> distros have some catching up to do bef

Re: [PATCH V2 00/45] Live update: vfio and iommufd

2025-02-14 Thread Steven Sistare
On 2/14/2025 11:06 AM, Peter Xu wrote: On Fri, Feb 14, 2025 at 10:56:02AM -0500, Steven Sistare wrote: Hi all, it would be nice to get this into qemu 10.0. Without it, the basic support for cpr-transfer already in 10.0 is much less interesting. True.. Soft feature freeze is 2024-03-12. Sa

[PATCH] vfio/ccw: Replace warn_once_pfch() with warn_report_once()

2025-02-14 Thread Cédric Le Goater
Use the common helper warn_report_once() instead of implementing its own. Cc: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index ea766ae26c744c05515e1cc80a486a3462d8

Re: [PATCH v3] vfio: Add property documentation

2025-02-14 Thread Cédric Le Goater
On 2/14/25 16:44, Alex Williamson wrote: On Fri, 14 Feb 2025 15:34:15 +0100 Cédric Le Goater wrote: Investigate the git history to uncover when and why the VFIO properties were introduced and update the models. This is mostly targeting vfio-pci device, since vfio-platform, vfio-ap and vfio-ccw

Re: [PATCH V2 00/45] Live update: vfio and iommufd

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 10:56:02AM -0500, Steven Sistare wrote: > Hi all, it would be nice to get this into qemu 10.0. Without it, the > basic support for cpr-transfer already in 10.0 is much less interesting. True.. > Soft feature freeze is 2024-03-12. Said that, targeting 10.0 for such a huge

Re: [PATCH v6 00/10] Support virtio-gpu DRM native context

2025-02-14 Thread Dmitry Osipenko
On 2/14/25 17:33, Alex Bennée wrote: > Dmitry Osipenko writes: > >> This patchset adds DRM native context support to VirtIO-GPU on Qemu. >> >> Contarary to Virgl and Venus contexts that mediates high level GFX APIs, >> DRM native context [1] mediates lower level kernel driver UAPI, which >> refle

Re: [PATCH V2 03/45] migration: lower handler priority

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 06:13:45AM -0800, Steve Sistare wrote: > Define a vmstate priority that is lower than the default, so its handlers > run after all default priority handlers. Since 0 is no longer the default > priority, translate an uninitialized priority of 0 to MIG_PRI_DEFAULT. > > CPR f

Question: how to add CLI options for custom hw model

2025-02-14 Thread Mark Nesky
Hello, I am new to the QEMU code base and I am working on a project involving a custom hardware model representing a customized ppc board. What is the best way to add command line arguments applicable to my model? I see options in qemu-options.hx + vl.c, but I am not sure if that is the right pl

Re: [PATCH V2 00/45] Live update: vfio and iommufd

2025-02-14 Thread Steven Sistare
Hi all, it would be nice to get this into qemu 10.0. Without it, the basic support for cpr-transfer already in 10.0 is much less interesting. Soft feature freeze is 2024-03-12. - Steve On 2/14/2025 9:13 AM, Steve Sistare wrote: Support vfio and iommufd devices with the cpr-transfer live migrat

Re: [PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-14 Thread Alexander Graf
On 14.02.25 16:35, Ani Sinha wrote: On Mon, Feb 3, 2025 at 3:50 AM Alexander Graf wrote: Hey Ani! On 28.01.25 22:31, Ani Sinha wrote: [...] diff --git a/hw/core/machine.c b/hw/core/machine.c index c23b399496..0eaf8aa3ba 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -34,6 +3

Re: [PATCH v2] target/sparc: Fix gdbstub incorrectly handling registers f32-f62

2025-02-14 Thread Richard Henderson
On 2/13/25 23:03, Mikael Szreder wrote: The gdbstub implementation for the Sparc architecture would incorrectly calculate the the floating point register offset. This resulted in, for example, registers f32 and f34 to point to the same value. The issue was caused by the confusion between even re

Re: [PATCH V2 26/45] migration: close kvm after cpr

2025-02-14 Thread Steven Sistare
cc kvm reviewers. The series is here: https://lore.kernel.org/qemu-devel/1739542467-226739-1-git-send-email-steven.sist...@oracle.com/ - Steve On 2/14/2025 9:14 AM, Steve Sistare wrote: cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows: ir

Re: [PATCH] qom: Use command line syntax for default values in help

2025-02-14 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v3] vfio: Add property documentation

2025-02-14 Thread Alex Williamson
On Fri, 14 Feb 2025 15:34:15 +0100 Cédric Le Goater wrote: > Investigate the git history to uncover when and why the VFIO > properties were introduced and update the models. This is mostly > targeting vfio-pci device, since vfio-platform, vfio-ap and vfio-ccw > devices are simpler. > > Sort the

[PATCH v2] CXL CCI Get/Set Alert Configuration commands implmented as per CXL Specification 3.2 section 8.2.10.9.3

2025-02-14 Thread Sweta Kumari
1)get alert configuration(Opcode 4201h) 2)set alert configuration(Opcode 4202h) This v2 patch addresses the feedback from the v1 patch and include some minor new changes. Changes in V2: - Removed cover letter as it's a single patch - Added latest spec reference - Fixed alignment issues - Updated

Re: [PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-14 Thread Ani Sinha
On Mon, Feb 3, 2025 at 3:50 AM Alexander Graf wrote: > > Hey Ani! > > On 28.01.25 22:31, Ani Sinha wrote: > > VM firmware update is a mechanism where the virtual machines can use their > > preferred and trusted firmware image in their execution environment without > > having to depend on a untrust

[PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-14 Thread Ani Sinha
VM firmware update is a mechanism where the virtual machines can use their preferred and trusted firmware image in their execution environment without having to depend on a untrusted party to provide the firmware bundle. This is particularly useful for confidential virtual machines that are deploye

Re: [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh

2025-02-14 Thread Dmitry Osipenko
On 2/14/25 17:06, Alex Bennée wrote: > dongwon@intel.com writes: > >> From: Dongwon Kim >> >> This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2 >> which causes some guest display corruption when gtk-gl-area >> is used for GTK rendering (e.g. Wayland Compositor) possibly d

Re: [PATCH] qom: Use command line syntax for default values in help

2025-02-14 Thread Markus Armbruster
Akihiko Odaki writes: > object_property_help() uses the conventional command line syntax instead > of the JSON syntax. In particular, > - Key-value pairs are written in the command line syntax. > - bool description passed to the function says on/off instead of > true/false. > > However, there i

Re: [PATCH v3 6/9] migration: Don't set FAILED state when cancelling

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 09:25:12AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, Feb 13, 2025 at 02:59:24PM -0300, Fabiano Rosas wrote: > >> The expected outcome from qmp_migrate_cancel() is that the source > >> migration goes to the terminal state > >> MIGRATION_STATUS_CANCELLED.

Re: [PATCH v2 1/3] docs/cpu-features: Consistently use vCPU instead of VCPU

2025-02-14 Thread Kashyap Chamarthy
On Thu, Feb 13, 2025 at 09:09:12PM +, Alex Bennée wrote: > Kashyap Chamarthy writes: > > > Signed-off-by: Kashyap Chamarthy > > Should we add vCPU to glossary.rst? Ah, I didn't notice this in the tree. I can add as a follow-up later. PS: I sent the patch while on a train, `git publish` w

Re: [PATCH V2 01/45] MAINTAINERS: Add reviewer for CPR

2025-02-14 Thread Peter Xu
On Fri, Feb 14, 2025 at 06:13:43AM -0800, Steve Sistare wrote: > CPR is integrated with live migration, and has the same maintainers. > But, add a CPR section to add a reviewer. > > Signed-off-by: Steve Sistare > --- > MAINTAINERS | 11 +++ > 1 file changed, 11 insertions(+) > > diff --

[PATCH V2 26/45] migration: close kvm after cpr

2025-02-14 Thread Steve Sistare
cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows: irq bypass consumer (token a03c32e5) registration fails: -16 which is EBUSY. This occurs because KVM descriptors are still open in the old QEMU process. Close them. Signed-off-by: Steve

Re: [PATCH] net: vhost-user: add QAPI events to report connection state

2025-02-14 Thread Stefano Brivio
On Fri, 14 Feb 2025 14:31:33 + Daniel P. Berrangé wrote: > On Fri, Feb 14, 2025 at 03:28:34PM +0100, Stefano Brivio wrote: > > On Fri, 14 Feb 2025 14:19:13 + > > Daniel P. Berrangé wrote: > > > > > On Fri, Feb 14, 2025 at 01:59:20PM +, Daniel P. Berrangé wrote: > > > > On Fri, F

Re: [PATCH V2 15/45] pci: export msix_is_pending

2025-02-14 Thread Steven Sistare
On 2/14/2025 9:45 AM, Steven Sistare wrote: Hi Michael, You previously acked "pci: export msix_is_pending" -- thank you! This patch also needs your attention. Off by one -- patch 16/45 "pci: skip reset during cpr" needs your attention. - Steve There are no other changes in the core pci are

Re: [PATCH V2 15/45] pci: export msix_is_pending

2025-02-14 Thread Steven Sistare
Hi Michael, You previously acked "pci: export msix_is_pending" -- thank you! This patch also needs your attention. There are no other changes in the core pci area. - Steve On 2/14/2025 9:13 AM, Steve Sistare wrote: Export msix_is_pending for use by cpr. No functional change. Signed-off-by:

[PATCH V2 25/45] vfio-pci: preserve INTx

2025-02-14 Thread Steve Sistare
Preserve vfio INTx state across cpr-transfer. Preserve VFIOINTx fields as follows: pin : Recover this from the vfio config in kernel space interrupt : Preserve its eventfd descriptor across exec. unmask : Ditto route.irq : This could perhaps be recovered in vfio_pci_post_load by callin

Re: [PATCH v2 3/3] hw/cxl/cxl-mailbox-utils: Add support for Media operations Sanitize and Write Zeros commands (8.2.9.9.5.3)

2025-02-14 Thread Jonathan Cameron via
On Thu, 13 Feb 2025 14:45:58 +0530 Vinayak Holikatti wrote: > CXL spec 3.1 section 8.2.9.9.5.3 describes media operations commands. As in previous - please update to the r3.2 spec. A few comments inline. Thanks, Jonathan > CXL devices supports media operations Sanitize and Write zero command.

  1   2   >