* intel iommu pasid question
@ 2020-01-18 4:18 周光迪
2020-01-18 4:20 ` 周光迪
2020-01-19 1:53 ` Lu Baolu
0 siblings, 2 replies; 4+ messages in thread
From: 周光迪 @ 2020-01-18 4:18 UTC (permalink / raw)
To: iommu
[-- Attachment #1.1: Type: text/plain, Size: 771 bytes --]
Hi all,
I am currently developing a pcie device driver on Linux kernel 4.4 or later. I want to use pasid to directly access user-mode memory. But I found that the iommu of my development machine does not support pasid.pasid_enabled(iommu) or pasid_supported(iommu) return false.
I want to know how to enable the pasid function of intel iommu,Is there a separate switch to enable the iommu pasid function or the iommu hardware implementation has decided whether to support PASID and the software cannot configure it?
How can I check which version of intel vt-d is implemented by iommu on my platform?Does the value of iommu's Version Register represent the vt-d version?
the iommu version register of my intel xeon gold 5118 platform server is 1.0
[-- Attachment #1.2: Type: text/html, Size: 1334 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 4+ messages in thread
* intel iommu pasid question
2020-01-18 4:18 intel iommu pasid question 周光迪
@ 2020-01-18 4:20 ` 周光迪
2020-01-19 3:18 ` Liu, Yi L
2020-01-19 1:53 ` Lu Baolu
1 sibling, 1 reply; 4+ messages in thread
From: 周光迪 @ 2020-01-18 4:20 UTC (permalink / raw)
To: iommu
Hi all,
I am currently developing a pcie device driver on Linux kernel 4.4 or later. I want to use pasid to directly access user-mode memory. But I found that the iommu of my development machine does not support pasid.pasid_enabled(iommu) or pasid_supported(iommu) return false.
I want to know how to enable the pasid function of intel iommu,Is there a separate switch to enable the iommu pasid function or the iommu hardware implementation has decided whether to support PASID and the software cannot configure it?
How can I check which version of intel vt-d is implemented by iommu on my platform?Does the value of iommu's Version Register represent the vt-d version?
the iommu version register of my intel xeon gold 5118 platform server is 1.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: intel iommu pasid question
2020-01-18 4:18 intel iommu pasid question 周光迪
2020-01-18 4:20 ` 周光迪
@ 2020-01-19 1:53 ` Lu Baolu
1 sibling, 0 replies; 4+ messages in thread
From: Lu Baolu @ 2020-01-19 1:53 UTC (permalink / raw)
To: 周光迪, iommu
Hi Guangdi,
On 1/18/20 12:18 PM, 周光迪 wrote:
> Hi all,
>
>
> I am currently developing a pcie device driver on Linux kernel 4.4 or
> later. I want to use pasid to directly access user-mode memory. But I
> found that the iommu of my development machine does not support
> pasid.pasid_enabled(iommu) or pasid_supported(iommu) return false.
Intel IOMMU driver currently supports SVA through APIs defined in
include/linux/intel-svm.h. We are switching to use the APIs defined
in driver/iommu/iommu.c, but it should last for some while.
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: intel iommu pasid question
2020-01-18 4:20 ` 周光迪
@ 2020-01-19 3:18 ` Liu, Yi L
0 siblings, 0 replies; 4+ messages in thread
From: Liu, Yi L @ 2020-01-19 3:18 UTC (permalink / raw)
To: zhouguangdi@cambricon.com, iommu@lists.linux-foundation.org
> From: iommu [mailto:iommu-bounces@lists.linux-foundation.org] On Behalf Of ???
> Sent: Saturday, January 18, 2020 12:21 PM
> To: iommu@lists.linux-foundation.org
> Subject: intel iommu pasid question
>
> Hi all,
>
>
> I am currently developing a pcie device driver on Linux kernel 4.4 or later. I want to
> use pasid to directly access user-mode memory. But I found that the iommu of my
> development machine does not support pasid.pasid_enabled(iommu) or
> pasid_supported(iommu) return false.
Echo Baolu's comment.
>
> I want to know how to enable the pasid function of intel iommu,Is there a separate
> switch to enable the iommu pasid function or the iommu hardware implementation
> has decided whether to support PASID and the software cannot configure it?
You can check if VT-d is enabled in Linux kernel by below command:
dmesg | grep “Intel(R) Virtualization Technology for Directed I/O”
>
> How can I check which version of intel vt-d is implemented by iommu on my
> platform?Does the value of iommu's Version Register represent the vt-d version?
> the iommu version register of my intel xeon gold 5118 platform server is 1.0
You can check VT-d PASID support by echo "dmesg | grep “dmar”"
You should get some info like below. Check PASID support by checking bit 40 of ecap register.
[ 0.078285] DMAR: dmar1: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0505e
[ 0.078289] DMAR: dmar2: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
Also, if your kernel supports iommu debugfs, you may dump the translation.
structures in /sys/kernel/debug/iommu/intel/dmar_translation_struct. There
is a bit is Context Entry which enables PASID. (bit 3 of Context entry).
Regards,
Yi Liu
>
> _______________________________________________
> iommu mailing list
> iommu@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-19 3:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-18 4:18 intel iommu pasid question 周光迪
2020-01-18 4:20 ` 周光迪
2020-01-19 3:18 ` Liu, Yi L
2020-01-19 1:53 ` Lu Baolu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox