On Mon, Dec 26, 2022 at 12:12:42PM +0800, Jason Wang wrote: > > >@@ -682,6 +553,11 @@ static int vdpasim_dma_unmap(struct vdpa_device *vdpa, unsigned int asid, > > > if (asid >= vdpasim->dev_attr.nas) > > > return -EINVAL; > > > > > >+ if (vdpasim->iommu_pt[asid]) { > > > > We are in the vdpasim_dma_unmap, so if vdpasim->iommu_pt[asid] is true, > > should be better to return an error, since this case should not happen? > > So it's a question of how to behave when unmap is called without a > map. I think we can leave the code as is or if we wish, it needs a > separate patch. > > (We didn't error this previously anyhow). > > Thanks OK I picked as is. Do we want WARN_ON maybe? -- MST _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization