On 4/29/25 3:45 AM, Christian Borntraeger wrote:
> Am 29.04.25 um 09:37 schrieb David Hildenbrand:
> [...]
>> The only problem I see is with vfio devices is the new "memory pinned" mode. 
>> [1]
>>
>> There, we'd have to check if any such device is around (discarding of ram is 
>> disabled?), and fallback to actual zeroing of memory.
> 
> CC Matt to double check.

When triggering the "relaxed translation" mode via iommu.passthrough in the 
guest, we now take the default (for other platforms) memory_region_is_ram() 
path in vfio_listener_region_add/del() which handles the pin/unpin from vfio 
common code.  As for ram discarding, we then also use the vfio common path and 
only uncoordinated discards are disabled via:

vfio_ram_block_discard_disable() -> ram_block_uncoordinated_discard_disable()


> 
>>
>> [1] https://lkml.kernel.org/r/20250226210013.238349-1-mjros...@linux.ibm.com
> 


Reply via email to