Re: ath9k and AMD IOMMU alias breakage on 3.16?

2014-09-12 Thread Joerg Roedel
Hi Jason,

On Fri, Sep 05, 2014 at 10:28:01PM -0700, Jason Newton wrote:
 [0.021820] AMD-Vi: device: 00:00.2 cap: 0040 seg: 0 flags: b8 info 
 [0.021827] AMD-Vi:mmio-addr: feb8
 [0.021844] AMD-Vi:   DEV_SELECT_RANGE_STARTdevid: 00:01.0 flags: 
 00
 [0.021848] AMD-Vi:   DEV_RANGE_END devid: ff:1f.6
 [0.022730] AMD-Vi:   DEV_ALIAS_RANGE   devid: 02:00.0 flags: 
 00 devid_to: 00:14.4
 [0.022735] AMD-Vi:   DEV_RANGE_END devid: 02:1f.7
 [0.022745] AMD-Vi:   DEV_SPECIAL(HPET[0]) devid: 00:14.0
 [0.022749] AMD-Vi:   DEV_SPECIAL(IOAPIC[5])   devid: 00:14.0
 [0.022753] AMD-Vi:   DEV_SPECIAL(IOAPIC[6])   devid: 00:00.0

It is just a test, as I don't know how the hardware is actually wired in
your system, but can you try to boot with 'ivrs_ioapic[6]=00:00.1' on
the kernel command line and report if it makes any difference?

Thanks,

Joerg

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: ath9k and AMD IOMMU alias breakage on 3.16?

2014-09-09 Thread Jason Newton
Hi Alex,

I've attached what you've requested after I reenabled iommu.

On Fri, Sep 5, 2014 at 9:01 PM, Alex Williamson
alex.william...@redhat.com wrote:
 On Fri, 2014-09-05 at 20:00 -0700, Jason Newton wrote:
 Hi,

 I have an AR9462 connected over minipcie, it came with the ASRock
 FM2A88x-itx motherboard and I'm using an AMD A10-7850K cpu with it.  When I
 have IOMMU enabled, and this is desirable for opencl related things, the
 AR9462 malfunctions with these two errors occurring:

 AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:00.1
 address=0x00fdf8080020 flags=0x0a00]

 Followed by this  looping error, which reoccurs shortly after associating
 and obtaining an IP.  I've attached a large snippet from dmesg, due to it's
 length.

 I'm not sure where the error is coming from but I did see that Alex
 Williamson posted a patch that dealt with aliased devices (like pci
 bridges) and AMD's IOMMU issues, see
 e028a9e6b8a637af09ac4114083280df4a7045f1 for reference.

 I then disable IOMMU in the bios, and immediately the ath9k/AR9462 pair is
 working without flaw or retries.  Bios is up to date btw, updated it after
 building the machine last friday.

 So anyone have a clue what's going on here?

 Please boot with amd_iommu_dump on the kernel boot line and send the
 full dmesg log and 'sudo lspci -vvv' output.  Thanks,

 Alex

[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 3.16.1-8.g2ab6585-desktop (geeko@buildhost) (gcc 
version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux) ) #1 SMP 
PREEMPT Wed Sep 3 14:16:22 UTC 2014 (2ab6585)
[0.00] Command line: BOOT_IMAGE=/vmlinuz-3.16.1-8.g2ab6585-desktop 
root=UUID=d424eb7b-0019-4413-b552-d0d929e1b6c6 amd_iommu_dump
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x00098bff] usable
[0.00] BIOS-e820: [mem 0x00098c00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000e-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x7bdc9fff] usable
[0.00] BIOS-e820: [mem 0x7bdca000-0x7bdf9fff] reserved
[0.00] BIOS-e820: [mem 0x7bdfa000-0x7c0b8fff] usable
[0.00] BIOS-e820: [mem 0x7c0b9000-0x7c174fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x7c175000-0x7e12dfff] reserved
[0.00] BIOS-e820: [mem 0x7e12e000-0x7e12efff] usable
[0.00] BIOS-e820: [mem 0x7e12f000-0x7e334fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x7e335000-0x7e48afff] usable
[0.00] BIOS-e820: [mem 0x7e48b000-0x7f02efff] reserved
[0.00] BIOS-e820: [mem 0x7f02f000-0x7f071fff] usable
[0.00] BIOS-e820: [mem 0x7f072000-0x7f7f0fff] reserved
[0.00] BIOS-e820: [mem 0x7f7f1000-0x7f7f] usable
[0.00] BIOS-e820: [mem 0xfec0-0xfec01fff] reserved
[0.00] BIOS-e820: [mem 0xfec1-0xfec10fff] reserved
[0.00] BIOS-e820: [mem 0xfed0-0xfed00fff] reserved
[0.00] BIOS-e820: [mem 0xfed4-0xfed44fff] reserved
[0.00] BIOS-e820: [mem 0xfed8-0xfed8] reserved
[0.00] BIOS-e820: [mem 0xff80-0x] reserved
[0.00] BIOS-e820: [mem 0x0001-0x00043eff] usable
[0.00] NX (Execute Disable) protection: active
[0.00] SMBIOS 2.7 present.
[0.00] DMI: To Be Filled By O.E.M. To Be Filled By O.E.M./FM2A88X-ITX+, 
BIOS P2.40 08/01/2014
[0.00] e820: update [mem 0x-0x0fff] usable == reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] AGP: No AGP bridge found
[0.00] e820: last_pfn = 0x43f000 max_arch_pfn = 0x4
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-B write-through
[0.00]   C-D3FFF write-protect
[0.00]   D4000-E7FFF uncachable
[0.00]   E8000-F write-protect
[0.00] MTRR variable ranges enabled:
[0.00]   0 base  mask 8000 write-back
[0.00]   1 base 7F80 mask FF80 uncachable
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] TOM2: 00043f00 aka 17392M
[0.00] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[0.00] e820: update [mem 0x7f80-0x] usable == reserved
[0.00] e820: last_pfn = 0x7f800 max_arch_pfn = 0x4
[0.00] found SMP 

Re: ath9k and AMD IOMMU alias breakage on 3.16?

2014-09-08 Thread Joerg Roedel
On Fri, Sep 05, 2014 at 10:01:44PM -0600, Alex Williamson wrote:
 On Fri, 2014-09-05 at 20:00 -0700, Jason Newton wrote:
  Hi,
  
  I have an AR9462 connected over minipcie, it came with the ASRock
  FM2A88x-itx motherboard and I'm using an AMD A10-7850K cpu with it.  When I
  have IOMMU enabled, and this is desirable for opencl related things, the
  AR9462 malfunctions with these two errors occurring:
  
  AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:00.1
  address=0x00fdf8080020 flags=0x0a00]

This means that the device 00:00.1 is sending to the interrupt/EOI
address-range while interrupt remapping is enabled. You can boot with
intremap=off on the kernel command line to work around this problem.

This looks either like another PCI aliasing issue or a 00:00.1 hidden
device is sending interrupt requests (which it is not allowed to do).


Joerg

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: ath9k and AMD IOMMU alias breakage on 3.16?

2014-09-05 Thread Alex Williamson
On Fri, 2014-09-05 at 20:00 -0700, Jason Newton wrote:
 Hi,
 
 I have an AR9462 connected over minipcie, it came with the ASRock
 FM2A88x-itx motherboard and I'm using an AMD A10-7850K cpu with it.  When I
 have IOMMU enabled, and this is desirable for opencl related things, the
 AR9462 malfunctions with these two errors occurring:
 
 AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:00.1
 address=0x00fdf8080020 flags=0x0a00]
 
 Followed by this  looping error, which reoccurs shortly after associating
 and obtaining an IP.  I've attached a large snippet from dmesg, due to it's
 length.
 
 I'm not sure where the error is coming from but I did see that Alex
 Williamson posted a patch that dealt with aliased devices (like pci
 bridges) and AMD's IOMMU issues, see
 e028a9e6b8a637af09ac4114083280df4a7045f1 for reference.
 
 I then disable IOMMU in the bios, and immediately the ath9k/AR9462 pair is
 working without flaw or retries.  Bios is up to date btw, updated it after
 building the machine last friday.
 
 So anyone have a clue what's going on here?

Please boot with amd_iommu_dump on the kernel boot line and send the
full dmesg log and 'sudo lspci -vvv' output.  Thanks,

Alex

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu