|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/2] vtd: Drop dead check for permissions in lookup_page
`val` comes from `addr_to_dma_page_maddr()` which is a pagetable
paddr and doesn't leak the PTE flags in it.
Rather than returning entries without any permissions, assume they
are always r/w.
Fixes: dd93d54fef0b2 ("vtd: add lookup_page method to iommu_ops")
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
This doesn't really matter since the lookup ops are not used currently
(and not implemented on the AMD side), hence it's not a problem in practice.
Perhaps we want to drop the function for the time being, and reintroduce it
when it gets useful ?
xen/drivers/passthrough/vtd/iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/vtd/iommu.c
b/xen/drivers/passthrough/vtd/iommu.c
index 3d6f787b3c..cf97469957 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -2293,8 +2293,8 @@ static int cf_check intel_iommu_lookup_page(
return -ENOENT;
*mfn = maddr_to_mfn(val);
- *flags = val & DMA_PTE_READ ? IOMMUF_readable : 0;
- *flags |= val & DMA_PTE_WRITE ? IOMMUF_writable : 0;
+ /* TODO: Populate flags from pte */
+ *flags = IOMMUF_readable | IOMMUF_writable;
return 0;
}
--
2.52.0
--
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |