summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
| * tcg: Fix constant propagation in tcg_reg_alloc_dupRichard Henderson2025-06-301-1/+1
| | | | | | | | | | | | | | | | | | The scalar constant must be replicated for dup. Cc: qemu-stable@nongnu.org Fixes: bab1671f0fa ("tcg: Manually expand INDEX_op_dup_vec") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3002 Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/riscv: Fix typo in tgen_extractRichard Henderson2025-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix the direction of the shift, introduced when converting the codebase to TCGOutOp* and small tgen_* helpers. Fixes: 5a4d034f3cb ("tcg: Convert extract to TCGOutOpExtract") Reported-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Andrea Bolognani <abologna@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
| * tcg/optimize: Simplify fold_eqv constant checksRichard Henderson2025-06-301-3/+1
| | | | | | | | | | | | | | Both cases are handled by fold_xor after conversion. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Simplify fold_orc constant checksRichard Henderson2025-06-301-5/+5
| | | | | | | | | | | | | | | | | | | | If operand 2 is constant, then the computation of z_mask and a_mask will produce the same results as the explicit check via fold_xi_to_i. Shift the calls of fold_xx_to_i and fold_ix_to_not down below the i2->is_const check. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Simplify fold_andc constant checksRichard Henderson2025-06-301-4/+5
| | | | | | | | | | | | | | | | | | | | If operand 2 is constant, then the computation of z_mask and a_mask will produce the same results as the explicit check via fold_xi_to_i. Shift the calls of fold_xx_to_i and fold_ix_to_not down below the i2->is_const check. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Simplify fold_and constant checksRichard Henderson2025-06-301-4/+3
| | | | | | | | | | | | | | | | | | | | If operand 2 is constant, then the computation of z_mask and a_mask will produce the same results as the explicit checks via fold_xi_to_i and fold_xi_to_x. Shift the call of fold_xx_to_x down below the ti_is_const(t2) check. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Fold and to extract during optimizeRichard Henderson2025-06-301-3/+30
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Use fold_and in do_constant_folding_cond[12]Richard Henderson2025-06-301-0/+5
| | | | | | | | | | | | | | | | When lowering tst comparisons, completely fold the and opcode that we generate. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_shiftRichard Henderson2025-06-301-2/+4
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_sextractRichard Henderson2025-06-301-24/+6
| | | | | | | | | | | | | | | | This was the last use of fold_affected_mask, now fully replaced by fold_masks_zosa. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_movcondRichard Henderson2025-06-301-2/+3
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_extuRichard Henderson2025-06-301-3/+9
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_extsRichard Henderson2025-06-301-2/+4
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use z_bits and o_bits in fold_extract2Richard Henderson2025-06-301-13/+25
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_extractRichard Henderson2025-06-301-7/+5
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_depositRichard Henderson2025-06-301-2/+4
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_bswapRichard Henderson2025-06-301-25/+24
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_xorRichard Henderson2025-06-301-3/+6
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use zero, one and affected bits in fold_orcRichard Henderson2025-06-301-2/+9
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use one and affected bits in fold_orRichard Henderson2025-06-301-2/+8
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use z_bits and o_bits in fold_notRichard Henderson2025-06-301-1/+5
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use z_bits and o_bits in fold_norRichard Henderson2025-06-301-4/+10
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use z_bits and o_bits in fold_nandRichard Henderson2025-06-301-4/+10
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use z_bits and o_bits in fold_eqvRichard Henderson2025-06-301-2/+12
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_andcRichard Henderson2025-06-301-15/+8
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Build and use o_bits in fold_andRichard Henderson2025-06-301-13/+7
| | | | | | | | | | Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Introduce fold_masks_zosaRichard Henderson2025-06-301-5/+11
| | | | | | | | | | | | | | | | | | Add a new function with an affected mask. This will allow folding to a constant to happen before folding to a copy, without having to mind the ordering in all users. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Add one's mask to TempOptInfoRichard Henderson2025-06-301-16/+35
| | | | | | | | | | | | | | | | Add o_mask mirroring z_mask, but for 1's instead of 0's. Drop is_const and val fields, which now logically overlap. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tcg/optimize: Introduce arg_const_valRichard Henderson2025-06-301-37/+41
|/ | | | | | | | Use arg_const_val instead of direct access to the TempOptInfo val member. Rename both val and is_const to catch all direct accesses. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Merge tag 'pull-vfio-20250626' of https://github.com/legoater/qemu into stagingStefan Hajnoczi2025-06-2631-15/+4717
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vfio queue: * Added several small fixes and cleanups * Added support for vfio-user client device # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmhc+mwACgkQUaNDx8/7 # 7KHQShAAwGTjc6yzBaFr9DTKaL6Vszwby5tYdV3vWTsnFj2zBks+5BswohxbnYdk # Smy5E/F+yCiHI6X4ohI4FRjJgBJplDxZ6bbEgTwZa6ADs7xWAwFWv349KQY9uLpJ # XV/ACot2b6FZUskv3w1SxQrpzho4ICm3DuLOdAFAvBPRtxyC2aQMLsXTlT+7+5cC # X8zJB/9mtjWIomYWKRXnYUP/uM1g7QLtyU7d01szvqCfSVUilVlg6Ys7RxnqLG0k # A1/kxYOrEPHHxMO+YwFuapIfE8Gqihes2K1GfM871JaBT14dMIAZkajmVasbKD16 # Iljz89nEV3UehDP9HADhx3QuXO7fhJ3cxcHvTH0xhUeoks3EgTlUq0VNRRYzu6rQ # 3P1E3cVaPTmwfoSrhecNIFcln4v/bENdwzYcjh96r9fcFwE+ro4oUTGNKCPYv2t0 # yOoc6PqgiZN7DM89/N2hcesgOun7oOVpMnKhiqHjVe53HoM8bfLojWECKNq9Cz1u # m0YEHn2gEuEB5l03IguRnAywZq76Jivd6WFmAeXGrHRZ9sfxQCwvImbqMa7QxYpI # rt+j7RAyP57WVoBPoW8hlaIQmLuIvIgdWwWkwQd2BTIprLpdHJd4SWkL6eqGozpE # rsaHw+WQZqFoddrl7EUSVY/Z2CfIRr1g/Zo5z4RU9YLtxVxjSPw= # =sX2P # -----END PGP SIGNATURE----- # gpg: Signature made Thu 26 Jun 2025 03:44:44 EDT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full] # gpg: aka "Cédric Le Goater <clg@kaod.org>" [full] # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-vfio-20250626' of https://github.com/legoater/qemu: (25 commits) vfio-user: introduce vfio-user protocol specification docs: add vfio-user documentation vfio-user: add coalesced posted writes vfio-user: support posted writes vfio-user: add 'x-msg-timeout' option vfio-user: implement VFIO_USER_DMA_READ/WRITE vfio-user: implement VFIO_USER_DMA_MAP/UNMAP vfio-user: implement VFIO_USER_DEVICE_RESET vfio-user: set up container access to the proxy vfio-user: forward MSI-X PBA BAR accesses to server vfio-user: implement VFIO_USER_DEVICE_GET/SET_IRQ* vfio-user: set up PCI in vfio_user_pci_realize() vfio-user: implement VFIO_USER_REGION_READ/WRITE vfio-user: implement VFIO_USER_DEVICE_GET_REGION_INFO vfio-user: implement VFIO_USER_DEVICE_GET_INFO vfio-user: implement message send infrastructure vfio-user: implement message receive infrastructure vfio-user: connect vfio proxy to remote server vfio-user: add vfio-user class and container vfio/container: fails mdev hotplug if add migration blocker failed ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * vfio-user: introduce vfio-user protocol specificationThanos Makatos2025-06-263-1/+1523
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 discussed as an RFC in: "RFC: use VFIO over a UNIX domain socket to implement device offloading" Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-20-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * docs: add vfio-user documentationJohn Levon2025-06-262-0/+27
| | | | | | | | | | | | | | | | | | Add some basic documentation on vfio-user usage. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-19-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: add coalesced posted writesJohn Levon2025-06-265-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new message to send multiple writes to server in a single message. Prevents the outgoing queue from overflowing when a long latency operation is followed by a series of posted writes. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-18-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: support posted writesJohn Levon2025-06-264-6/+63
| | | | | | | | | | | | | | | | | | | | | | Support an asynchronous send of a vfio-user socket message (no wait for a reply) when the write is posted. This is only safe when no regions are mappable by the VM. Add an option to explicitly disable this as well. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-17-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: add 'x-msg-timeout' optionJohn Levon2025-06-263-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | By default, the vfio-user subsystem will wait 5 seconds for a message reply from the server. Add an option to allow this to be configurable. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-16-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_DMA_READ/WRITEJohn Levon2025-06-264-1/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike most other messages, this is a server->client message, for when a server wants to do "DMA"; this is slow, so normally the server has memory directly mapped instead. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-15-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_DMA_MAP/UNMAPJohn Levon2025-06-265-4/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the vfio-user container gets mapping updates, share them with the vfio-user by sending a message; this can include the region fd, allowing the server to directly mmap() the region as needed. For performance, we only wait for the message responses when we're doing with a series of updates via the listener_commit() callback. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-14-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_DEVICE_RESETJohn Levon2025-06-263-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Hook this call up to the legacy reset handler for vfio-user-pci. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-13-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: set up container access to the proxyJohn Levon2025-06-262-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | The user container will shortly need access to the underlying vfio-user proxy; set this up. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-12-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: forward MSI-X PBA BAR accesses to serverJohn Levon2025-06-262-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For vfio-user, the server holds the pending IRQ state; set up an I/O region for the MSI-X PBA so we can ask the server for this state on a PBA read. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-11-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_DEVICE_GET/SET_IRQ*John Levon2025-06-263-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IRQ setup uses the same semantics as the traditional vfio path, but we need to share the corresponding file descriptors with the server as necessary. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-10-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: set up PCI in vfio_user_pci_realize()John Levon2025-06-261-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Re-use PCI setup functions from hw/vfio/pci.c to realize the vfio-user PCI device. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-9-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_REGION_READ/WRITEJohn Levon2025-06-263-0/+92
| | | | | | | | | | | | | | | | | | | | Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-8-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_DEVICE_GET_REGION_INFOJohn Levon2025-06-266-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for getting region info for vfio-user. As vfio-user has one fd per region, enable ->use_region_fds. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-7-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement VFIO_USER_DEVICE_GET_INFOJohn Levon2025-06-268-7/+107
| | | | | | | | | | | | | | | | | | | | | | | | Add support for getting basic device information. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-6-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement message send infrastructureJohn Levon2025-06-265-2/+606
| | | | | | | | | | | | | | | | | | | | | | | | | | Add plumbing for sending vfio-user messages on the control socket. Add initial version negotation on connection. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-5-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: implement message receive infrastructureJohn Levon2025-06-267-0/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the basic implementation for receiving vfio-user messages from the control socket. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-4-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: connect vfio proxy to remote serverJohn Levon2025-06-265-0/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the vfio-user "proxy": this is the client code responsible for sending and receiving vfio-user messages across the control socket. The new files hw/vfio-user/proxy.[ch] contain some basic plumbing for managing the proxy; initialize the proxy during realization of the VFIOUserPCIDevice instance. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-3-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio-user: add vfio-user class and containerJohn Levon2025-06-269-0/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce basic plumbing for vfio-user with CONFIG_VFIO_USER. We introduce VFIOUserContainer in hw/vfio-user/container.c, which is a container type for the "IOMMU" type "vfio-iommu-user", and share some common container code from hw/vfio/container.c. Add hw/vfio-user/pci.c for instantiating VFIOUserPCIDevice objects, sharing some common code from hw/vfio/pci.c. Originally-by: John Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-2-john.levon@nutanix.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| * vfio/container: fails mdev hotplug if add migration blocker failedZhenzhong Duan2025-06-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | It's aggressive to abort a running QEMU process when hotplug a mdev and it fails migration blocker adding. Fix by just failing mdev hotplug itself. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250623102235.94877-3-zhenzhong.duan@intel.com [ clg: Changed test on value returned by migrate_add_blocker_modes() ] Signed-off-by: Cédric Le Goater <clg@redhat.com>