<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 4:28 PM, Paul Barrette <span dir="ltr"><<a href="mailto:paul.barrette@windriver.com" target="_blank">paul.barrette@windriver.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 text="#000000" bgcolor="#FFFFFF"><div><div class="h5">
    <br>
    <div>On 08/12/2013 04:19 PM, jinho hwang
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi All,<br>
        <br>
        I am using iommu to receive packets both from hypervisor and
        from VM. KVM is used for the virtualization. However, after I
        deliver the kernel options (iommu and pci realloc), I can not
        receive packets in hypervisor, but VF works fine in VM. When I
        tried to receive packets in hypervisor, dmesg shows the
        following:<br>
        <br>
        ixgbe 0000:03:00.1: complete                                    <br>
        ixgbe 0000:03:00.1: PCI INT A disabled                          <br>
        igb_uio 0000:03:00.1: PCI INT A -> GSI 38 (level, low) ->
        IRQ 38<br>
        igb_uio 0000:03:00.1: setting latency timer to 64              
        <br>
        igb_uio 0000:03:00.1: irq 87 for MSI/MSI-X                      <br>
        uio device registered with irq 57                              
        <br>
        DRHD: handling fault status reg 2                              
        <br>
        DMAR:[DMA Read] Request device [03:00.1] fault addr <b>b9d0f000</b>
                                                                       
                                                                       
                              <br>
        DMAR:[fault reason 02] Present bit in context entry is clear<br>
        <br>
        03:00.1 Ethernet controller: Intel Corporation 82599EB 10
        Gigabit Dual Port Backplane Connection (rev 01)<br>
                Subsystem: Intel Corporation Ethernet X520 10GbE Dual
        Port KX4-KR Mezz<br>
                Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
        VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+<br>
                Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
        >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-<br>
                Latency: 0, Cache Line Size: 64 bytes                  <br>
                Interrupt: pin A routed to IRQ 38                      <br>
                Region 0: Memory at <b>d9400000</b> (64-bit,
        prefetchable) [size=4M]<br>
                Region 2: I/O ports at ece0 [size=32]                  <br>
                Region 4: Memory at d9bfc000 (64-bit, prefetchable)
        [size=16K]<br>
                Expansion ROM at <ignored> [disabled]            
             <br>
                Capabilities: <access denied>                    
             <br>
                Kernel driver in use: igb_uio                          <br>
                Kernel modules: ixgbe                                  <br>
        <br>
        <div>We can see those addresses are not matched. So the kernel
          got fault. I am wondering why this happens?</div>
      </div>
    </blockquote></div></div>
    I have seen this happen when VT-d is enabled in the bios.  If you
    are using dpdk 1.4, add "iommu=pt" to your boot line.  Without it,
    no packets are received.<span class=""><font color="#888888"><br>
    <br>
    Pb</font></span><div class="im"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>One suspicion for this is BIOS. I am currently using BIOS
          version 3.0, but the latest is 6.3.0. Does this affect the
          matter? </div>
        <div><br>
        </div>
        <div>Any help appreciated!</div>
        <div><br>
        </div>
        <div>Jinho                                             <br>
          <div>                                                         
                 <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div>

</blockquote></div><br>Paul, </div><div class="gmail_extra"><br></div><div class="gmail_extra" style>thanks. I tried your suggestion, but it works like no iommu command in boot line. I passed intel_iommu=pt, and receive packets from hypervisor. However, when I started VM with "-device pci-assign,host=01:00.0", it shows the following message:</div>

<div class="gmail_extra" style><br></div><div class="gmail_extra" style><div class="gmail_extra">qemu-system-x86_64: -device pci-assign,host=03:10.0: No IOMMU found.  Unable to assign device "(null)"</div><div class="gmail_extra">

qemu-system-x86_64: -device pci-assign,host=03:10.0: Device initialization failed.</div><div class="gmail_extra">qemu-system-x86_64: -device pci-assign,host=03:10.0: Device 'kvm-pci-assign' could not be initialized</div>

<div class="gmail_extra"><br></div><div class="gmail_extra" style>The device is detached from kernel, and move to pci-stub. dmesg does not show any DMAR fault message anymore. </div><div class="gmail_extra" style><br></div>

<div class="gmail_extra" style>Any idea? </div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>Jinho</div></div></div>