<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 5, 2016 at 3:13 AM, Tran The Anh <span dir="ltr"><<a href="mailto:anh.tranthe@thegioididong.com" target="_blank">anh.tranthe@thegioididong.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    I would like to passthrough some intel i210 ports to KVM's VM, but
    has encountered the iommu group issue:<br>
    <br>
    <blockquote><small>/sys/kernel/iommu_groups/0/devices/0000:00:00.0<br>
        /sys/kernel/iommu_groups/1/devices/0000:00:14.0 <= usb<br>
        /sys/kernel/iommu_groups/1/devices/0000:00:14.2<br>
        /sys/kernel/iommu_groups/2/devices/0000:00:16.0<br>
        /sys/kernel/iommu_groups/2/devices/0000:00:16.1<br>
        /sys/kernel/iommu_groups/3/devices/0000:00:17.0 <= sata<br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:00:1c.0
          <= pch port</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:00:1c.1
          <= pch port</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:00:1c.2
          <= pch port</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:00:1c.3
          <= pch port</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:00:1c.6
          <= pch port</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:01:00.0
          <= i210</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:02:00.0
          <= i210</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:03:00.0
          <= i210</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:04:00.0
          <= i210</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:05:00.0</font><br>
        <font color="#3333ff">/sys/kernel/iommu_groups/4/devices/0000:06:00.0
          <= vga aspeed 2400</font><br>
        /sys/kernel/iommu_groups/5/devices/0000:00:1f.0<br>
        /sys/kernel/iommu_groups/5/devices/0000:00:1f.2<br>
        /sys/kernel/iommu_groups/5/devices/0000:00:1f.4<br>
      </small></blockquote>
    <br>
    My system is:<br>
    <blockquote><small>Intel Xeon e3-1220 v5</small><br>
      <small>Supermicro x11ssh-ln4f</small><br>
    </blockquote>
    <br>
    According to board's diagram:<br>
    <a href="http://www.supermicro.com/manuals/motherboard/C236/MNL-1778.pdf" target="_blank">http://www.supermicro.com/manuals/motherboard/C236/MNL-1778.pdf</a><br>
    Those i210s are connected to PCH.<br>
    <br>
    It seems that PCH ports have ACS capabilities:<br>
    <blockquote><small>lspci -vvvnk | egrep -i 'Access|Rev'</small><br>
      <small>00:17.0 0106: 8086:a102 (rev 31) (prog-if 01 [AHCI 1.0])</small><br>
      <small>00:1c.0 0604: 8086:a110 (rev f1) (prog-if 00 [Normal
        decode])</small><br>
      <small>        Capabilities: [140 v1] Access Control Services</small><br>
      <small>00:1c.1 0604: 8086:a111 (rev f1) (prog-if 00 [Normal
        decode])</small><br>
      <small>        Capabilities: [140 v1] Access Control Services</small><br>
      <small>00:1c.2 0604: 8086:a112 (rev f1) (prog-if 00 [Normal
        decode])</small><br>
      <small>        Capabilities: [140 v1] Access Control Services</small><br>
      <small>00:1c.3 0604: 8086:a113 (rev f1) (prog-if 00 [Normal
        decode])</small><br>
      <small>        Capabilities: [140 v1] Access Control Services</small><br>
      <small>00:1c.6 0604: 8086:a116 (rev f1) (prog-if 00 [Normal
        decode])</small><br>
      <small>        Capabilities: [140 v1] Access Control Services</small><br>
      <br>
    </blockquote>
    I have tried [proxmox ve 4.0, proxmox 4.1, centos 7, ubuntu 1404,
    ubuntu 1510] + add "pci_acs_override=downstream" to kernel
    parameters.<br>
    But the iommu group 4 is always the same.<br></div></blockquote><div><br></div><div>The ACS override patch is not upstream, you'd actually need to run a kernel with support for it for the kernel command line option to work.  You have a Sunrise Point PCH where Intel has a broken implementation of ACS.  I've posted quirks[1] for this, but they probably won't be available until a v4.7 kernel.  Your choices are to either patch your kernel with the ACS override patch or patch your kernel with the quirks (preferred) until support is merged into the kernel.  Thanks,</div><div><br></div><div>Alex</div><div><br></div><div>[1] <a href="https://lkml.org/lkml/2016/3/31/1112">https://lkml.org/lkml/2016/3/31/1112</a></div></div></div></div>