* [PATCH v1 1/1] iommu/amd: fix enabling exclusion range for an exact device
@ 2014-05-07 5:54 Su, Friendy
[not found] ` <053191AD6E9023439BF3970DE87005185086D31DA3-vLFws2UBKuUBqgaMIWwxlo3UfPj+9hkl@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Su, Friendy @ 2014-05-07 5:54 UTC (permalink / raw)
To: joro@8bytes.org
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
From: Su Friendy <friendy.su@sony.com.cn>
set_device_exclusion_range(u16 devid, struct ivmd_header *m) enables
exclusion range for ONE device. IOMMU does not translate the access
to the exclusion range from the device.
The device is specified by input argument 'devid'. But 'devid' is not
passed to the actual set function set_dev_entry_bit(), instead
'm->devid' is passed. 'm->devid' does not specify the exact device
which needs enable the exclusion range. 'm->devid' represents DeviceID
field of IVMD, which has different meaning depends on IVMD type.
The caller init_exclusion_range() sets 'devid' for ONE device. When
m->type is equal to ACPI_IVMD_TYPE_ALL or ACPI_IVMD_TYPE_RANGE,
'm->devid' is not equal to 'devid'.
This patch fixes 'm->devid' to 'devid'.
Signed-off-by: Su Friendy <friendy.su@sony.com.cn>
Signed-off-by: Tamori Masahiro <Masahiro.Tamori@jp.sony.com>
---
drivers/iommu/amd_iommu_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index b76c58d..0e08545 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -788,7 +788,7 @@ static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m)
* per device. But we can enable the exclusion range per
* device. This is done here
*/
- set_dev_entry_bit(m->devid, DEV_ENTRY_EX);
+ set_dev_entry_bit(devid, DEV_ENTRY_EX);
iommu->exclusion_start = m->range_start;
iommu->exclusion_length = m->range_length;
}
--
1.8.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] iommu/amd: fix enabling exclusion range for an exact device
[not found] ` <053191AD6E9023439BF3970DE87005185086D31DA3-vLFws2UBKuUBqgaMIWwxlo3UfPj+9hkl@public.gmane.org>
@ 2014-05-13 10:35 ` joro-zLv9SwRftAIdnm+yROfE0A
0 siblings, 0 replies; 2+ messages in thread
From: joro-zLv9SwRftAIdnm+yROfE0A @ 2014-05-13 10:35 UTC (permalink / raw)
To: Su, Friendy
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Wed, May 07, 2014 at 01:54:52PM +0800, Su, Friendy wrote:
>
> From: Su Friendy <friendy.su-7U/KSKJipcvM1kAEIRd3EQ@public.gmane.org>
>
> set_device_exclusion_range(u16 devid, struct ivmd_header *m) enables
> exclusion range for ONE device. IOMMU does not translate the access
> to the exclusion range from the device.
>
> The device is specified by input argument 'devid'. But 'devid' is not
> passed to the actual set function set_dev_entry_bit(), instead
> 'm->devid' is passed. 'm->devid' does not specify the exact device
> which needs enable the exclusion range. 'm->devid' represents DeviceID
> field of IVMD, which has different meaning depends on IVMD type.
>
> The caller init_exclusion_range() sets 'devid' for ONE device. When
> m->type is equal to ACPI_IVMD_TYPE_ALL or ACPI_IVMD_TYPE_RANGE,
> 'm->devid' is not equal to 'devid'.
>
> This patch fixes 'm->devid' to 'devid'.
>
> Signed-off-by: Su Friendy <friendy.su-7U/KSKJipcvM1kAEIRd3EQ@public.gmane.org>
> Signed-off-by: Tamori Masahiro <Masahiro.Tamori-7rVYBvDxQfZBDgjK7y7TUQ@public.gmane.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-13 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 5:54 [PATCH v1 1/1] iommu/amd: fix enabling exclusion range for an exact device Su, Friendy
[not found] ` <053191AD6E9023439BF3970DE87005185086D31DA3-vLFws2UBKuUBqgaMIWwxlo3UfPj+9hkl@public.gmane.org>
2014-05-13 10:35 ` joro-zLv9SwRftAIdnm+yROfE0A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).