From: Yiwen Jiang jiangyiwen@huawei.com
euleros inclusion category: bugfix bugzilla: 46842 CVE: NA
-------------------------------------------------
In the ARM64 architecture, zero physical address can be used for system ram, so virtual machine can allocate this segment of memory as vm's memory, but in vfio_unmap_unpin() if it found memory physical address is zero, it will call trace. By the way, x86 reserve 0~4k and avoid to happen this scenario.
So avoid to call trace in the ARM64 architecture.
Signed-off-by: Yiwen Jiang jiangyiwen@huawei.com Signed-off-by: Xiangyou Xie xiexiangyou@huawei.com Reviewed-by: Ying Fang fangying1@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/vfio/vfio_iommu_type1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 5a106963dd08..8c5c99aad00d 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -827,7 +827,9 @@ static long vfio_unmap_unpin(struct vfio_iommu *iommu, struct vfio_dma *dma, phys_addr_t phys, next;
phys = iommu_iova_to_phys(domain->domain, iova); - if (WARN_ON(!phys)) { + if (!phys) { + pr_warn("%s: phys is 0, it's normal if arch is arm\n", + __func__); iova += PAGE_SIZE; continue; }