summary refs log tree commit diff stats
path: root/rust/qemu-api-macros/src/lib.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-07-03vfio/iommufd: change processSteve Sistare1-0/+31
Finish CPR by change the owning process of the iommufd device in post load. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-19-git-send-email-steven.sistare@oracle.com [ clg: Fixed missing "qemu/error-report.h" include ] Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: reconstruct hwptSteve Sistare1-8/+22
Skip allocation of, and attachment to, hwpt_id. Recover it from CPR state. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-18-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: reconstruct deviceSteve Sistare1-2/+28
Reconstruct userland device state after CPR. During vfio_realize, skip all ioctls that configure the device, as it was already configured in old QEMU. Skip bind, and use the devid from CPR state. Skip allocation of, and attachment to, ioas_id. Recover ioas_id from CPR state, and use it to find a matching container, if any, before creating a new one. This reconstruction is not complete. hwpt_id is handled in a subsequent patch. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-17-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: preserve descriptorsSteve Sistare3-14/+40
Save the iommu and vfio device fd in CPR state when it is created. After CPR, the fd number is found in CPR state and reused. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-16-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: cpr stateSteve Sistare4-1/+105
VFIO iommufd devices will need access to ioas_id, devid, and hwpt_id in new QEMU at realize time, so add them to CPR state. Define CprVFIODevice as the object which holds the state and is serialized to the vmstate file. Define accessors to copy state between VFIODevice and CprVFIODevice. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-15-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03migration: vfio cpr state hookSteve Sistare6-9/+40
Define a list of vfio devices in CPR state, in a subsection so that older QEMU can be live updated to this version. However, new QEMU will not be live updateable to old QEMU. This is acceptable because CPR is not yet commonly used, and updates to older versions are unusual. The contents of each device object will be defined by the vfio subsystem in a subsequent patch. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-14-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: register container for cprSteve Sistare6-2/+114
Register a vfio iommufd container and device for CPR, replacing the generic CPR register call with a more specific iommufd register call. Add a blocker if the kernel does not support IOMMU_IOAS_CHANGE_PROCESS. This is mostly boiler plate. The fields to to saved and restored are added in subsequent patches. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-13-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: device name blockerSteve Sistare2-0/+12
If an invariant device name cannot be created, block CPR. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-12-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: add vfio_device_free_nameSteve Sistare6-6/+12
Define vfio_device_free_name to free the name created by vfio_device_get_name. A subsequent patch will do more there. No functional change. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-11-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: invariant device nameSteve Sistare1-5/+10
cpr-transfer will use the device name as a key to find the value of the device descriptor in new QEMU. However, if the descriptor number is specified by a command-line fd parameter, then vfio_device_get_name creates a name that includes the fd number. This causes a chicken-and-egg problem: new QEMU must know the fd number to construct a name to find the fd number. To fix, create an invariant name based on the id command-line parameter, if id is defined. The user will need to provide such an id to use CPR. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-10-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/iommufd: use IOMMU_IOAS_MAP_FILESteve Sistare3-0/+37
Use IOMMU_IOAS_MAP_FILE when the mapped region is backed by a file. Such a mapping can be preserved without modification during CPR, because it depends on the file's address space, which does not change, rather than on the process's address space, which does change. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-9-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03physmem: qemu_ram_get_fd_offsetSteve Sistare2-0/+6
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 <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-8-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03backends/iommufd: change process ioctlSteve Sistare3-0/+28
Define the change process ioctl Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-7-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03backends/iommufd: iommufd_backend_map_file_dmaSteve Sistare3-0/+38
Define iommufd_backend_map_file_dma to implement IOMMU_IOAS_MAP_FILE. This will be called as a substitute for iommufd_backend_map_dma, so the error conditions for BARs are copied as-is from that function. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-6-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03migration: cpr_get_fd_param helperSteve Sistare2-0/+39
Add the helper function cpr_get_fd_param, to use when preserving a file descriptor that is opened externally and passed to QEMU. cpr_get_fd_param returns a descriptor number either from a QEMU command-line parameter, from a getfd command, or from CPR state. When a descriptor is passed to new QEMU via SCM_RIGHTS, its number changes. Hence, during CPR, the command-line parameter is ignored in new QEMU, and over-ridden by the value found in CPR state. Similarly, if the descriptor was originally specified by a getfd command in old QEMU, the fd number is not known outside of QEMU, and it changes when sent to new QEMU via SCM_RIGHTS. Hence the user cannot send getfd to new QEMU, but when the user sends a hotplug command that references the fd, cpr_get_fd_param finds its value in CPR state. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-5-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03migration: close kvm after cprSteve Sistare7-0/+71
cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows: irq bypass consumer (token 00000000a03c32e5) registration fails: -16 which is EBUSY. This occurs because KVM descriptors are still open in the old QEMU process. Close them. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-4-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio-pci: preserve INTxSteve Sistare2-3/+79
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 calling pci_device_route_intx_to_irq(pin), whose implementation reads config space for a bridge device such as ich9. However, there is no guarantee that the bridge vmstate is read before vfio vmstate. Rather than fiddling with MigrationPriority for vmstate handlers, explicitly save route.irq in vfio vmstate. pending : save in vfio vmstate. mmap_timeout, mmap_timer : Re-initialize bool kvm_accel : Re-initialize In vfio_realize, defer calling vfio_intx_enable until the vmstate is available, in vfio_pci_post_load. Modify vfio_intx_enable and vfio_intx_kvm_enable to skip vfio initialization, but still perform kvm initialization. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-3-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio-pci: preserve MSISteve Sistare4-2/+157
Save the MSI message area as part of vfio-pci vmstate, and preserve the interrupt and notifier eventfd's. migrate_incoming loads the MSI data, then the vfio-pci post_load handler finds the eventfds in CPR state, rebuilds vector data structures, and attaches the interrupts to the new KVM instance. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-2-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03Makefile: prune quilt source files for cscopeCédric Le Goater1-0/+1
Both quilt, to apply patches, and cscope, to navigate in the code, are useful tools. Make sure source files that quilt saves when applying patches are not taken into account when building the cscope database. Link: https://lore.kernel.org/qemu-devel/20250630172048.519182-1-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03b4: Drop linktrailermaskCédric Le Goater1-1/+0
When grabbing a patch series, the link trailer is replaced with a Message-ID, which is not useful compared to an URL. Fix that by dropping the linktrailermask config. Cc: Philippe Mathieu-Daudé <philmd@linaro.org> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Fixes: 838cf72b5d2c ("Add a b4 configuration file") Link: https://lore.kernel.org/qemu-devel/20250630172301.519848-1-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03i386/tdx: Build TDX only for 64-bit targetXiaoyao Li1-1/+1
Build errors related to TDX were reported when QEMU built on 32-bit host[1][2]. Since TDX cannot work on 32-bit host and it's also not worth supporting TDX with 32-bit QEMU, limit TDX to 64-bit target only. [1] https://lore.kernel.org/qemu-devel/20250602173101.1052983-1-clg@redhat.com/ [2] https://lore.kernel.org/qemu-devel/b8171c39-6a92-4078-a59a-a63d7452e1e9@kaod.org/ Suggested-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250625073310.2796298-1-xiaoyao.li@intel.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio-user: do not register vfio-user container with cprMark Cave-Ayland1-10/+1
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series. Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Message-ID: <20250702120043.267634-1-mark.caveayland@nutanix.com> [ clg: Removed now useless "hw/vfio/vfio-cpr.h" include ] Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/container: Fix vfio_container_post_load()Zhenzhong Duan2-17/+13
When there are multiple VFIO containers, vioc->dma_map is restored multiple times, this made only first container work and remaining containers using vioc->dma_map restored by first container. Fix it by save and restore vioc->dma_map locally. saved_dma_map in VFIOContainerCPR becomes useless and is removed. Fixes: 7e9f21411302 ("vfio/container: restore DMA vaddr") Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/qemu-devel/20250627063332.5173-3-zhenzhong.duan@intel.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-03vfio/container: Fix potential SIGSEGV when recover from unmap-all-vaddr failureZhenzhong Duan1-2/+2
CPR overrides then restores dma_map in both outgoing and incoming QEMU, for different reasons. But it only sets saved_dma_map in the target. Fix it by always setting saved_dma_map. Fixes: eba1f657cbb1 ("vfio/container: recover from unmap-all-vaddr failure") Suggested-by: Steven Sistare <steven.sistare@oracle.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/qemu-devel/20250627063332.5173-2-zhenzhong.duan@intel.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-07-02tests/functional/test_aarch64_sbsaref_freebsd: Fix the URL of the ISO imageThomas Huth1-4/+4
The original image has been removed from the server, so the test currently fails if it has to fetch the asset, but we can still download the ISO from the archive server. While we're at it, prefer the XZ compressed image, it's much smaller and thus the download should be faster. Message-ID: <20250701105809.366180-1-thuth@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02target/s390x: A fix for the trouble with triblesThomas Huth1-1/+1
While Tribbles are cute, it should be "triple store" here, not "trible store". Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250701194241.434183-1-thuth@redhat.com>
2025-07-02target/s390x: set has_deprecated_props flagCollin Walling1-0/+3
Now that the deprecated_props is an optional field, the expansion method must now set the "has_deprecated_props" flag in order for the data to be output from the response. Fixes: 448553bb7c (qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic) Signed-off-by: Collin Walling <walling@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250630024404.940882-1-walling@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02MAINTAINERS: fix paths for relocated filesSean Wei1-9/+6
Several files were renamed in previous commits, causing their entries in MAINTAINERS to reference outdated paths. This prevents scripts/get_maintainer.pl from correctly matching these files to their maintainers. Update the filenames to reflect their current locations so that maintainer lookup works properly. Related commits --------------- c45460decbd (Oct 2023) hw/input/stellaris_input: Rename to stellaris_gamepad Rename include/hw/input/{gamepad.h => stellaris_gamepad.h} 4faf359accb (Nov 2020) docs: Move virtio-net-failover.rst into the system manual Rename docs/{ => system}/virtio-net-failover.rst 89857312f32 (Apr 2024) hw/usb: move stubs out of stubs/ Rename stubs/usb-dev-stub.c => hw/usb/bus-stub.c f2604d8508a (Apr 2024) hw/virtio: move stubs out of stubs/ Rename stubs/virtio-md-pci.c => hw/virtio/virtio-md-stubs.c 2c888febdfa (Apr 2024) memory-device: move stubs out of stubs/ Rename stubs/memory_device.c => hw/mem/memory-device-stubs.c d481cec7565 (Oct 2024) migration: Move cpu-throttle.c from system to migration Rename {system => migration}/cpu-throttle.c 864a3fa4392 (Jan 2023) monitor: Rename misc.c to hmp-target.c Rename monitor/{misc.c => hmp-target.c} Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <374597a7-94e4-45b2-9617-35183db3ea9d@sean.taipei> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02treewide: fix paths for relocated files in commentsSean Wei4-5/+5
After the docs directory restructuring, several comments refer to paths that no longer exist. Replace these references to the current file locations so readers can find the correct files. Related commits --------------- 189c099f75f (Jul 2021) docs: collect the disparate device emulation docs into one section Rename docs/system/{ => devices}/nvme.rst 5f4c96b779f (Feb 2023) docs/system/loongarch: update loongson3.rst and rename it to virt.rst Rename docs/system/loongarch/{loongson3.rst => virt.rst} fe0007f3c1d (Sep 2023) exec: Rename cpu.c -> cpu-target.c Rename cpus-common.c => cpu-common.c 42fa9665e59 (Apr 2025) exec: Restrict 'cpu_ldst.h' to accel/tcg/ Rename include/{exec/cpu_ldst.h => accel/tcg/cpu-ldst.h} Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <20250616.qemu.relocated.06@sean.taipei> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02treewide: update docs file extensions (.txt -> .rst) in commentsSean Wei8-10/+10
Several source comments still refer to docs with the old .txt extension that were previously converted to reStructuredText. Update these references to use the correct .rst extensions to maintain accurate in-tree documentation pointers. No functional changes. Related commits: 50f8174c5c1 (Jul 2021): docs/specs/acpi_nvdimm: Convert to rST f054eb1c920 (Jul 2021): docs/specs/acpi_pci_hotplug: Convert to rST 912fb3678b8 (Sep 2023): docs/specs/vmgenid: Convert to rST bb1cff6ee04 (Sep 2023): docs/specs/ivshmem-spec: Convert to rST 55ff468f781 (Jan 2022): docs: Rename ppc-spapr-hotplug.txt to .rst Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <20250616.qemu.relocated.05@sean.taipei> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02MAINTAINERS: fix VMware filename typo (vwm -> vmw)Sean Wei1-1/+1
The entry for the VMware PVSCSI spec uses "vwm" instead of "vmw", which does not match any file in the tree. Correct the path so scripts/get_maintainer.pl can match the file. Signed-off-by: Sean Wei <me@sean.taipei> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250616.qemu.relocated.04@sean.taipei> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02MAINTAINERS: fix vendor capitalization (Vmware -> VMware)Sean Wei1-1/+1
"VMware" is the vendor's official spelling. Adjust the spelling in MAINTAINERS for consistency. Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <20250616.qemu.relocated.03@sean.taipei> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02MAINTAINERS: update docs file extensions (.txt -> .rst)Sean Wei1-2/+2
The documentation tree has been converted to reStructuredText, but two entries in MAINTAINERS still point to the removed *.txt files. This prevents scripts/get_maintainer.pl from matching the documents. Update those entries to *.rst so the maintainer script works again. Related commits: 8472cc5dbe6 (Sep 2023): docs/specs/vmw_pvscsi-spec: Convert to rST 8e72ceee5cd (Jun 2022): Rename docs/specs/fw_cfg.txt to .rst Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <20250616.qemu.relocated.01@sean.taipei> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-07-02virtio-gpu: support context init multiple timelineYiwei Zhang1-0/+44
Venus and later native contexts have their own fence context along with multiple timelines within. Fences wtih VIRTIO_GPU_FLAG_INFO_RING_IDX in the flags must be dispatched to be created on the target context. Fence signaling also has to be handled on the specific timeline within that target context. Before this change, venus fencing is completely broken if the host driver doesn't support implicit fencing with external memory objects. Frames can go backwards along with random artifacts on screen if the host driver doesn't attach an implicit fence to the render target. The symptom could be hidden by certain guest wsi backend that waits on a venus native VkFence object for the actual payload with limited present modes or under special configs. e.g. x11 mailbox or xwayland. After this change, everything related to venus fencing starts making sense. Confirmed this via guest and host side perfetto tracing. Cc: qemu-stable@nongnu.org Fixes: 94d0ea1c1928 ("virtio-gpu: Support Venus context") Signed-off-by: Yiwei Zhang <zzyiwei@gmail.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Message-Id: <20250518152651.334115-1-zzyiwei@gmail.com> [AJB: remove version history from commit message] Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Message-ID: <20250627112512.1880708-16-alex.bennee@linaro.org>
2025-07-02MAINTAINERS: add Akihiko and Dmitry as reviewersAlex Bennée1-0/+2
Thanks for volunteering to help. Cc: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20250603110204.838117-9-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-15-alex.bennee@linaro.org>
2025-07-02MAINTAINERS: add myself to virtio-gpu for Odd FixesAlex Bennée1-1/+2
Seeing as I've taken a few patches to here now I might as well put myself forward to maintain virtio-gpu. I've marked it as Odd Fixes as it is not my core focus. If someone with more GPU experience comes forward we can always update again. Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250603110204.838117-8-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-14-alex.bennee@linaro.org>
2025-07-02plugins: Update plugin version and add notesRowan Hart1-1/+8
This patch updates the plugin version to gate new APIs and adds notes describing what has been added. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-9-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-13-alex.bennee@linaro.org>
2025-07-02plugins: Add patcher plugin and testRowan Hart6-2/+328
This patch adds a plugin that exercises the virtual and hardware memory read-write API functions added in a previous patch. The plugin takes a target and patch byte sequence, and will overwrite any instruction matching the target byte sequence with the patch. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-8-rowanbhart@gmail.com> [AJB: tweak Makefile, use uintptr_t for pointer stuffing] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-12-alex.bennee@linaro.org>
2025-07-02tests/tcg: Remove copy-pasted notes and from i386 and add x86_64 system ↵Rowan Hart1-7/+5
tests to tests The x86_64-softmmu Makefile seems to have been copy-pasted from the i386 Makefile at some point in the past. Cleaning up a vestigial unused variable and removing some outdated comments. Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-7-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-11-alex.bennee@linaro.org>
2025-07-02plugins: Add memory hardware address read/write APIRowan Hart2-0/+190
This patch adds functions to the plugins API to allow plugins to read and write memory via hardware addresses. The functions use the current address space of the current CPU in order to avoid exposing address space information to users. A later patch may want to add a function to permit a specified address space, for example to facilitate architecture-specific plugins that want to operate on them, for example reading ARM secure memory. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-6-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-10-alex.bennee@linaro.org>
2025-07-02plugins: Add memory virtual address write APIRowan Hart2-0/+39
This patch adds functions to the plugins API to allow reading and writing memory via virtual addresses. These functions only permit doing so on the current CPU, because there is no way to ensure consistency if plugins are allowed to read or write to other CPUs that aren't currently in the context of the plugin. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-5-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-9-alex.bennee@linaro.org>
2025-07-02plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacksRowan Hart6-6/+96
This patch adds functionality to enforce the requested QEMU_PLUGIN_CB_ flags level passed when registering a callback function using the plugins API. Each time a callback is about to be invoked, a thread-local variable will be updated with the level that callback requested. Then, called API functions (in particular, the register read and write API) will call qemu_plugin_get_cb_flags() to check the level is at least the level they require. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-4-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-8-alex.bennee@linaro.org>
2025-07-02plugins: Add register write APIRowan Hart2-24/+56
This patch adds a function to the plugins API to allow plugins to write register contents. It also moves the qemu_plugin_read_register function so all the register-related functions are grouped together in the file. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-3-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-7-alex.bennee@linaro.org>
2025-07-02gdbstub: Expose gdb_write_register function to consumers of gdbstubRowan Hart2-1/+15
This patch exposes the gdb_write_register function from gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in plugins to write register contents. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Julian Ganz <neither@nut.email> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-2-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-6-alex.bennee@linaro.org>
2025-07-02semihosting/uaccess: Compile oncePhilippe Mathieu-Daudé1-4/+1
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250526095213.14113-3-philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-5-alex.bennee@linaro.org>
2025-07-02semihosting/uaccess: Remove uses of target_ulong typePhilippe Mathieu-Daudé2-11/+11
Replace target_ulong by vaddr or size_t types to match cpu_memory_rw_debug() prototype in "exec/cpu-common.h": > int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, > void *ptr, size_t len, > bool is_write); Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250526095213.14113-2-philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-4-alex.bennee@linaro.org>
2025-07-02tests/functional: Add PCI hotplug test for aarch64Gustavo Romero3-0/+79
Add a functional test, aarch64_hotplug_pci, to exercise PCI hotplug and hot-unplug on arm64. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250528203137.1654964-1-gustavo.romero@linaro.org> [AJB: trimmed boilerplate for checkpatch, simplified invocations] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-3-alex.bennee@linaro.org>
2025-07-02gitlab: mark s390x-system to allow failuresAlex Bennée1-0/+2
The system tests (usually qos-test or migration-test) prove to be very susceptible on the s390x runners. Although we have boosted memory and virtual CPUs on the runners problems persist. For now mark test as allow_failure so the its clear on the CI UI when checking test results. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-2-alex.bennee@linaro.org>
2025-07-01tests/functional: test device passthrough on aarch64Pierrick Bouvier2-0/+144
This test allows to document and exercise device passthrough, using a nested virtual machine setup. Two disks are generated and passed to the VM, and their content is compared to original images. Guest and nested guests commands are executed through two scripts, and init used in both system is configured to trigger a kernel panic in case any command fails. This is more reliable and readable than executing all commands through prompt injection and trying to guess what failed. Initially, this test was supposed to test smmuv3 nested emulation (combining both stages of translation), but I could not find any setup (kernel + vmm) able to do the passthrough correctly, despite several tries. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-id: 20250627200222.5172-1-pierrick.bouvier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-07-01tests/functional: Expand Aarch64 SMMU tests to run on HVF acceleratorPhilippe Mathieu-Daudé1-3/+9
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20250623121845.7214-27-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>