Gentoo Archives: gentoo-user

From: Corbin Bird <corbinbird@×××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Issues with AMD_IOMMU
Date: Fri, 19 May 2017 20:10:10
Message-Id: 591F5113.7050004@charter.net
In Reply to: Re: [gentoo-user] Re: Issues with AMD_IOMMU by Adam Carter
1 On 05/19/2017 01:39 AM, Adam Carter wrote:
2 > On Wed, May 17, 2017 at 12:25 AM, Corbin Bird <corbinbird@×××××××.net
3 > <mailto:corbinbird@×××××××.net>> wrote:
4 >
5 > On 05/16/2017 01:34 AM, Adam Carter wrote:
6 > > Answer #1 :
7 > >
8 > >
9 > > Asrock, Extreme6, 990FX, UEFI, AMD FX-9590
10 > > Gigabyte, GA-MA790FX-UD5P, 790FX, BIOS, AMD PhenomII x4 980
11 > >
12 > >
13 > > Hi Corbin,
14 > >
15 > > I noticed i didnt have x2apic enabled on my 990FX / FX-8350 system, so
16 > > i've rebuilt/rebooted etc, but;
17 > >
18 > > # zgrep X2APIC /proc/config.gz
19 > > CONFIG_X86_X2APIC=y
20 > > # dmesg | grep -i x2apic
21 > > #
22 > >
23 > > On my skylake box
24 > > # dmesg | grep -i x2apic
25 > > [ 0.044148] DMAR-IR: Queued invalidation will be enabled to support
26 > > x2apic and Intr-remapping.
27 > > [ 0.045802] DMAR-IR: Enabled IRQ remapping in x2apic mode
28 > > [ 0.045908] x2apic enabled
29 > > [ 0.046011] Switched APIC routing to cluster x2apic.
30 > >
31 > > What x2apic messages do you get on your 990FX / FX-9590 system?
32 >
33 >
34 > Interesting kernel parameter for you to try :
35 > ( from '/usr/src/linux/Documentation/kernel-parameters.txt' )
36 >
37 > x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of
38 > default x2apic cluster mode on platforms
39 > supporting x2apic.
40 >
41 > With that switch I have not been getting any output in 'dmesg' about
42 > this at all.
43 >
44 >
45 > I tried adding x2apic_phys, but dmesg output did not change.
46 >
47 > From wikip;
48 > "In 2012, AMD announced their /Advanced Virtual Interrupt Controller/
49 > (/AVIC/) targeting interrupt overhead reduction in virtualization
50 > environments.^[33]
51 > <https://en.wikipedia.org/wiki/X86_virtualization#cite_note-33> This
52 > technology has materialize in hardware and (as announced) does not
53 > support x2APIC <https://en.wikipedia.org/wiki/X2APIC>.^[34]
54 > <https://en.wikipedia.org/wiki/X86_virtualization#cite_note-34> In 2016,
55 > AVIC is available on the AMD family 15h models 6Xh (Carrizo) processors
56 > and newer.^[35]"
57 > <https://en.wikipedia.org/wiki/X86_virtualization#cite_note-35>
58 >
59 > So;
60 > FX-8350 processors (bulldozer gen2) dont have AVIC
61 > Carrizo processors (bulldozer gen4), have AVIC, but AVIC doesnt support
62 > x2apic
63 > seems reasonable to conclude that there's no x2apic on bulldozer gen2,
64 > and that's why there's nothing in dmesg about it.
65 >
66 >
67 > Question :
68 > Do you have this enabled in your kernel ...
69 > > [ ] Support for Intel IOMMU using DMA Remapping Devices
70 >
71 >
72 > On the Skylake box, yes, FX box, no.
73
74 Thanks for the info. Will kill the kernel parameter on my box.
75
76 ---
77
78 Tried an experiment, recompiled the kernel, no GART IOMMU support.
79 This was not enabled either.
80 < > AMD IOMMU Version 2 driver
81
82 CPU FX-9590, 990FX Chipset
83
84 Now getting this instead :
85
86 > [ 0.988027] PCI: CLS 64 bytes, default 64
87 > [ 0.988362] iommu: Adding device 0000:00:00.0 to group 0
88 > [ 0.988530] iommu: Adding device 0000:00:02.0 to group 1
89 > [ 0.988689] iommu: Adding device 0000:00:0a.0 to group 2
90 > [ 0.988872] iommu: Adding device 0000:00:0d.0 to group 3
91 > [ 0.989029] iommu: Adding device 0000:00:11.0 to group 4
92 > [ 0.989194] iommu: Adding device 0000:00:12.0 to group 5
93 > [ 0.989318] iommu: Adding device 0000:00:12.2 to group 5
94 > [ 0.989484] iommu: Adding device 0000:00:13.0 to group 6
95 > [ 0.989615] iommu: Adding device 0000:00:13.2 to group 6
96 > [ 0.989780] iommu: Adding device 0000:00:14.0 to group 7
97 > [ 0.989943] iommu: Adding device 0000:00:14.1 to group 8
98 > [ 0.990128] iommu: Adding device 0000:00:14.3 to group 9
99 > [ 0.990292] iommu: Adding device 0000:00:14.4 to group 10
100 > [ 0.990458] iommu: Adding device 0000:00:14.5 to group 11
101 > [ 0.990637] iommu: Adding device 0000:00:15.0 to group 12
102 > [ 0.990763] iommu: Adding device 0000:00:15.1 to group 12
103 > [ 0.990935] iommu: Adding device 0000:00:16.0 to group 13
104 > [ 0.991058] iommu: Adding device 0000:00:16.2 to group 13
105 > [ 0.991252] iommu: Adding device 0000:01:00.0 to group 14
106 > [ 0.991387] iommu: Adding device 0000:01:00.1 to group 14
107 > [ 0.991560] iommu: Adding device 0000:02:00.0 to group 15
108 > [ 0.991742] iommu: Adding device 0000:03:00.0 to group 16
109 > [ 0.991863] iommu: Adding device 0000:06:00.0 to group 12
110 > [ 0.991982] iommu: Adding device 0000:07:04.0 to group 12
111 > [ 1.063849] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
112 > [ 1.063962] AMD-Vi: Interrupt remapping enabled
113 > [ 1.064145] AMD-Vi: Lazy IO/TLB flushing enabled
114 > [ 1.065331] perf: AMD NB counters detected
115 > [ 1.065622] LVT offset 0 assigned for vector 0x400
116 > [ 1.065836] perf: AMD IBS detected (0x000000ff)
117
118 And the Linux AGP Driver ( in-kernel ) is working now.
119
120 Now this is showing properly with lspci :
121 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD/ATI] RD890S/RD990 I/O
122 Memory Management Unit (IOMMU)
123
124 And the GART IOMMU is no longer showing as an SMbus entry.
125
126 Corbin

Replies

Subject Author
Re: [gentoo-user] Re: Issues with AMD_IOMMU Adam Carter <adamcarter3@×××××.com>