On 12/14/2022 11:34 PM, Tian, Kevin wrote: >> From: Steve Sistare <steven.sistare@xxxxxxxxxx> >> Sent: Thursday, December 15, 2022 5:25 AM >> >> @@ -861,6 +861,12 @@ static int vfio_iommu_type1_pin_pages(void >> *iommu_data, >> >> mutex_lock(&iommu->lock); >> >> + if (WARN_ONCE(iommu->vaddr_invalid_count, >> + "mdev not allowed with VFIO_UPDATE_VADDR\n")) { > > let's be specific on the operation i.e. pin_pages not allowed... > > same for the latter dma_rw. Sure: "vfio_pin_pages not allowed with VFIO_UPDATE_VADDR" "vfio_dma_rw not allowed with VFIO_UPDATE_VADDR" >> + case VFIO_UPDATE_VADDR: >> + /* >> + * Disable this feature if mdevs are present. They cannot >> + * safely pin/unpin while vaddrs are being updated. > > only 'pin' is disallowed? Will edit: pin/unpin -> pin/unpin/rw > Except those nits: > > Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx> Thanks! - steve