* Re: [PATCH] iommu/intel: GAW only gets smaller by adding devices
@ 2014-06-21 13:51 Matthieu
0 siblings, 0 replies; 3+ messages in thread
From: Matthieu @ 2014-06-21 13:51 UTC (permalink / raw)
To: Alex Williamson, David Woodhouse
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 1731 bytes --]
Tested-by: mspeder-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Problem described in bug 76331 is fully solved by Alex's patch.
Could it be included in next 3.15 release ?
Thanks !
Matthieu
On Thu, May 29, 2014 at 10:23 PM, Alex Williamson <
alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> 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-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Signed-off-by: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> ---
> 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 e68f44b..cd41d8d 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4276,7 +4276,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
>
>
[-- Attachment #1.2: Type: text/html, Size: 2893 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] iommu/intel: GAW only gets smaller by adding devices
@ 2014-05-29 20:23 ` Alex Williamson
0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2014-05-29 20:23 UTC (permalink / raw)
To: iommu; +Cc: David Woodhouse, linux-kernel, mspeder
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>
Cc: David Woodhouse <dwmw2@infradead.org>
---
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 e68f44b..cd41d8d 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4276,7 +4276,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 related [flat|nested] 3+ messages in thread
* [PATCH] iommu/intel: GAW only gets smaller by adding devices
@ 2014-05-29 20:23 ` Alex Williamson
0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2014-05-29 20:23 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Cc: David Woodhouse, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
mspeder-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f
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-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Signed-off-by: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
---
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 e68f44b..cd41d8d 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4276,7 +4276,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 related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-21 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 13:51 [PATCH] iommu/intel: GAW only gets smaller by adding devices Matthieu
-- strict thread matches above, loose matches on Subject: below --
2014-05-29 20:23 Alex Williamson
2014-05-29 20:23 ` Alex Williamson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.