summary refs log tree commit diff stats
path: root/rust/qemu-api/src
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-05-02 07:22:38 -0700
committerCédric Le Goater <clg@redhat.com>2025-05-09 12:42:27 +0200
commit2cc3643df568c9d274781ef896368fd50514fb3e (patch)
treef55f3a08b965e9323073748205e8e8b5ef98ee30 /rust/qemu-api/src
parent4b1f5b73e060971c434e70694d571adfee553027 (diff)
downloadfocaccia-qemu-2cc3643df568c9d274781ef896368fd50514fb3e.tar.gz
focaccia-qemu-2cc3643df568c9d274781ef896368fd50514fb3e.zip
vfio/container: ram discard disable helper
Define a helper to set ram discard disable, generate error messages,
and cleanup on failure.  The second vfio_ram_block_discard_disable
call site now performs VFIO_GROUP_UNSET_CONTAINER immediately on failure,
instead of relying on the close of the container fd to do so in the kernel,
but this is equivalent.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cedric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/1746195760-101443-2-git-send-email-steven.sistare@oracle.com
[ clg: vfio_attach_discard_disable() -> vfio_container_attach_discard_disable() ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'rust/qemu-api/src')
0 files changed, 0 insertions, 0 deletions