Re: [PATCH v8 4/4] vfio: convey kvm that the vfio-pci device is wc safe

From: Ankit Agrawal
Date: Tue Feb 20 2024 - 07:11:42 EST


>> diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
>> index 1cbc990d42e0..c93bea18fc4b 100644
>> --- a/drivers/vfio/pci/vfio_pci_core.c
>> +++ b/drivers/vfio/pci/vfio_pci_core.c
>> @@ -1862,8 +1862,24 @@ int vfio_pci_core_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma
>>       /*
>>        * See remap_pfn_range(), called from vfio_pci_fault() but we can't
>>        * change vm_flags within the fault handler.  Set them now.
>> +      *
>> +      * VM_ALLOW_ANY_UNCACHED: The VMA flag is implemented for ARM64,
>> +      * allowing KVM stage 2 device mapping attributes to use Normal-NC
>> +      * rather than DEVICE_nGnRE, which allows guest mappings
>> +      * supporting combining attributes (WC). ARM does not
>
> Nitpick: "supporting write-combining" (if you plan to respin).

Ack.