* [RESEND PATCH] iommu/intel: GAW only gets smaller by adding devices
@ 2014-07-08 15:41 Alex Williamson
0 siblings, 0 replies; only message in thread
From: Alex Williamson @ 2014-07-08 15:41 UTC (permalink / raw)
To: iommu; +Cc: linux-kernel, Alex Williamson, David Woodhouse
As analyzed in https://bugzilla.kernel.org/show_bug.cgi?id=76331
we can have multiple DRHDs in a system and each may support different
guest address widths. We can add a device behind a less capable DRHD
to a domain so long as the lesser DRHD can map the existing domain
page table. We should never increase the address width as a result
of adding a device to the domain. The current code simply updates
the width to the last added device. Change to keep it at the
minumum DRHD width.
Reported-by: mspeder@users.sourceforge.net
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: mspeder@users.sourceforge.net
Cc: David Woodhouse <dwmw2@infradead.org>
---
I can't find any evidence that this got picked, resending.
drivers/iommu/intel-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 6ad29ed..3458bc8 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4309,7 +4309,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
__func__, addr_width, dmar_domain->max_addr);
return -EFAULT;
}
- dmar_domain->gaw = addr_width;
+ dmar_domain->gaw = min(addr_width, dmar_domain->gaw);
/*
* Knock out extra levels of page tables if necessary
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-08 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 15:41 [RESEND PATCH] iommu/intel: GAW only gets smaller by adding devices Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®