Re: [PATCH RFC v3 64/88] vfio: Add vfio_device_gmem_revoke helper for guest_memfd

From: Aneesh Kumar K . V

Date: Mon Nov 09 2026 - 00:05:00 EST


Ackerley Tng via B4 Relay <devnull+ackerleytng.google.com@xxxxxxxxxx>
writes:

> From: Ackerley Tng <ackerleytng@xxxxxxxxxx>
>
> When physical device regions backing guest_memfd memory must be revoked
> due to hardware reset, power state transitions, or memory decode state
> changes, the bus driver must revoke and reclaim the memory ranges from
> guest_memfd before modifying hardware state.
>

Should we prevent such operations while the VFIO fd is attached to
guest_memfd? Some of these operations can transition the device to the
TDISP error state, and we should avoid host operations that can result
in vfio_pci_zap_bars().

-aneesh