Hi All.<br><br>I was wondering if anyone has gotten this setup to work, if so PLEASE HELP!. Im getting errrors when trying to feed the HVR-4000 PCI card to the mythtv guest system.<br><br>Here are my logs:<br><br>dmesg | grep IOMMU:<br>
<div style="margin-left: 40px;">[    0.000000] Intel-IOMMU: disable GFX device mapping<br>[    0.028479] IOMMU fed90000: ver 1:0 cap c9008020e30272 ecap 1000<br>[    0.028486] IOMMU fed91000: ver 1:0 cap c0000020630272 ecap 1000<br>
[    0.028492] IOMMU fed92000: ver 1:0 cap c0000020630272 ecap 1000<br>[    0.028497] IOMMU fed93000: ver 1:0 cap c9008020630272 ecap 1000<br>[    0.342618] IOMMU 0xfed92000: using Register based invalidation<br>[    0.342620] IOMMU 0xfed90000: using Register based invalidation<br>
[    0.342621] IOMMU 0xfed93000: using Register based invalidation<br>[    0.342625] IOMMU: Setting RMRR:<br>[    0.342635] IOMMU: Setting identity map for device 0000:00:1d.0 [0xcdbf0000 - 0xcdc00000]<br>[    0.342660] IOMMU: Setting identity map for device 0000:00:1d.1 [0xcdbf0000 - 0xcdc00000]<br>
[    0.342683] IOMMU: Setting identity map for device 0000:00:1d.2 [0xcdbf0000 - 0xcdc00000]<br>[    0.342702] IOMMU: Setting identity map for device 0000:00:1d.7 [0xcdbf0000 - 0xcdc00000]<br>[    0.342721] IOMMU: Setting identity map for device 0000:00:1a.0 [0xcdbf0000 - 0xcdc00000]<br>
[    0.342741] IOMMU: Setting identity map for device 0000:00:1a.1 [0xcdbf0000 - 0xcdc00000]<br>[    0.342762] IOMMU: Setting identity map for device 0000:00:1a.2 [0xcdbf0000 - 0xcdc00000]<br>[    0.342782] IOMMU: Setting identity map for device 0000:00:1a.7 [0xcdbf0000 - 0xcdc00000]<br>
[    0.342796] IOMMU: Prepare 0-16MiB unity mapping for LPC<br>[    0.342804] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0x1000000]<br></div><br>dmesg | grep DMAR<br><div style="margin-left: 40px;">[    0.000000] ACPI: DMAR 00000000cdbe9b00 00120 (v01 IntelR AWRDACPI 322E3030 DRWA 00000002)<br>
[    0.028472] DMAR: Host address width 36<br>[    0.028474] DMAR: DRHD base: 0x000000fed90000 flags: 0x0<br>[    0.028481] DMAR: DRHD base: 0x000000fed91000 flags: 0x0<br>[    0.028488] DMAR: DRHD base: 0x000000fed92000 flags: 0x0<br>
[    0.028494] DMAR: DRHD base: 0x000000fed93000 flags: 0x1<br>[    0.028499] DMAR: RMRR base: 0x000000cdbf0000 end: 0x000000cdbfffff<br>[    0.028501] DMAR: RMRR base: 0x000000cdd00000 end: 0x000000cfffffff<br></div><br>
This should be fine I think. The system should be ready for PCI Passthrough.<br><br>This is my /proc/interrupts:<br><div style="margin-left: 40px;">          CPU0       CPU1       <br>  0:         26          1   IO-APIC-edge      timer<br>
  1:          2          0   IO-APIC-edge      i8042<br>  6:          1          2   IO-APIC-edge      floppy<br>  8:          1          0   IO-APIC-edge      rtc0<br>  9:          0          0   IO-APIC-fasteoi   acpi<br>
 16:         31         30   IO-APIC-fasteoi   uhci_hcd:usb3, pata_jmicron<br> 18:          1          1   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb8<br> 19:       1258       3001   IO-APIC-fasteoi   ata_piix, ata_piix, uhci_hcd:usb7, eth1<br>
 21:        113        103   IO-APIC-fasteoi   uhci_hcd:usb4<br> 22:         73         73   IO-APIC-fasteoi   HDA Intel<br> 23:          0          0   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb6<br> 24:       8935          0  HPET_MSI-edge      hpet2<br>
 25:          0       6991  HPET_MSI-edge      hpet3<br> 28:          0          0  DMAR_MSI-edge      dmar2<br> 29:          0          0  DMAR_MSI-edge      dmar0<br> 30:          0          0  DMAR_MSI-edge      dmar3<br>
 32:       6244         17   PCI-MSI-edge      i915<br>NMI:          0          0   Non-maskable interrupts<br>LOC:         21          4   Local timer interrupts<br>SPU:          0          0   Spurious interrupts<br>PMI:          0          0   Performance monitoring interrupts<br>
PND:          0          0   Performance pending work<br>RES:      62816      62240   Rescheduling interrupts<br>CAL:         22         64   Function call interrupts<br>TLB:       6506       6429   TLB shootdowns<br>TRM:          0          0   Thermal event interrupts<br>
THR:          0          0   Threshold APIC interrupts<br>MCE:          0          0   Machine check exceptions<br>MCP:          3          3   Machine check polls<br>ERR:          1<br>MIS:          0<br></div><br>As you can see, nothing on IRQ 12. It is not shown because none of the tuner modules are loaded. It uses IRQ 12, see below:<br>
<br><div style="margin-left: 40px;">02:00.0 Multimedia video controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)<br>    Subsystem: Hauppauge computer works Inc. Device 6902<br>    Flags: bus master, medium devsel, latency 32, IRQ 12<br>
    Memory at f1000000 (32-bit, non-prefetchable) [size=16M]<br>    Capabilities: &lt;access denied&gt;<br>    Kernel modules: cx8800<br><br>02:00.1 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05)<br>
    Subsystem: Hauppauge computer works Inc. Device 6902<br>    Flags: bus master, medium devsel, latency 32, IRQ 12<br>    Memory at f2000000 (32-bit, non-prefetchable) [size=16M]<br>    Capabilities: &lt;access denied&gt;<br>
    Kernel modules: cx88-alsa<br><br>02:00.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)<br>    Subsystem: Hauppauge computer works Inc. Device 6902<br>    Flags: bus master, medium devsel, latency 32, IRQ 12<br>
    Memory at f3000000 (32-bit, non-prefetchable) [size=16M]<br>    Capabilities: &lt;access denied&gt;<br>    Kernel modules: cx8802<br><br>02:00.4 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [IR Port] (rev 05)<br>
    Subsystem: Hauppauge computer works Inc. Device 6902<br>    Flags: bus master, medium devsel, latency 32, IRQ 12<br>    Memory at f4000000 (32-bit, non-prefetchable) [size=16M]<br>    Capabilities: &lt;access denied&gt;<br>
<br></div>When the modules were loaded for the card, the card was given IRQ 20, and this was what it showed:<br><div style="margin-left: 40px;">PCI INT A -&gt; GSI 20 (level, low) -&gt; IRQ 20<br></div><br>This makes me wonder, if its the PCI INT A, that cant be shared? When I run a dmesg | grep &quot;INT A&quot; now i get:<br>
<div style="margin-left: 40px;">[    0.337870] pci 0000:00:1c.0: PCI INT A -&gt; GSI 16 (level, low) -&gt; IRQ 16<br>[    0.358063] pata_acpi 0000:01:00.0: PCI INT A -&gt; GSI 16 (level, low) -&gt; IRQ 16<br>[    0.358086] pata_acpi 0000:01:00.0: PCI INT A disabled<br>
[    0.380221] ehci_hcd 0000:00:1d.7: PCI INT A -&gt; GSI 23 (level, low) -&gt; IRQ 23<br>[    0.400228] uhci_hcd 0000:00:1a.0: PCI INT A -&gt; GSI 16 (level, low) -&gt; IRQ 16<br>[    0.400742] uhci_hcd 0000:00:1d.0: PCI INT A -&gt; GSI 23 (level, low) -&gt; IRQ 23<br>
[    7.898290] r8169 0000:02:01.0: PCI INT A -&gt; GSI 19 (level, low) -&gt; IRQ 19<br>[    7.951792] pata_jmicron 0000:01:00.0: PCI INT A -&gt; GSI 16 (level, low) -&gt; IRQ 16<br>[    7.975156] i915 0000:00:02.0: PCI INT A -&gt; GSI 16 (level, low) -&gt; IRQ 16<br>
[    8.252234] HDA Intel 0000:00:1b.0: PCI INT A -&gt; GSI 22 (level, low) -&gt; IRQ 22<br></div><br>There is a lot of PCI INT A&#39;s, and if its them that cant be shared im lost!<br>The GSI 12 or GSI 20 is not used, so this is not a issue.<br>
<br>The last thing to show is the lspci -t:<br>-[0000:00]-+-00.0<br>           +-02.0<br>           +-02.1<br>           +-03.0<br>           +-03.2<br>           +-03.3<br>           +-1a.0<br>           +-1a.1<br>           +-1a.2<br>
           +-1a.7<br>           +-1b.0<br>           +-1c.0-[0000:01]----00.0<br>           +-1d.0<br>           +-1d.1<br>           +-1d.2<br>           +-1d.7<br>           +-1e.0-[0000:02]--+-00.0<br>           |                 +-00.1<br>
           |                 +-00.2<br>           |                 +-00.4<br>           |                 \-01.0<br>           +-1f.0<br>           +-1f.2<br>           +-1f.3<br>           \-1f.5<br>I dont know how to read this log?<br>
<br>However when I then do the kvm stuff:<br><br>lspci -n<br><div style="margin-left: 40px;">02:00.0 0400: 14f1:8800 (rev 05)<br>02:00.1 0480: 14f1:8811 (rev 05)<br>02:00.2 0480: 14f1:8802 (rev 05)<br>02:00.4 0480: 14f1:8804 (rev 05)<br>
</div><br><div style="margin-left: 40px;">echo &quot;14f1 8800&quot; &gt; /sys/bus/pci/drivers/pci-stub/new_id<br>echo 0000:02:00.0 &gt; /sys/bus/pci/devices/0000:02:00.0/driver/unbind<br>echo 0000:02:00.0 &gt; /sys/bus/pci/drivers/pci-stub/bind<br>
<br>echo &quot;14f1 8811&quot; &gt; /sys/bus/pci/drivers/pci-stub/new_id<br>echo 0000:02:00.1 &gt; /sys/bus/pci/devices/0000:02:00.1/driver/unbind<br>echo 0000:02:00.1 &gt; /sys/bus/pci/drivers/pci-stub/bind <br><br>echo &quot;14f1 8802&quot; &gt; /sys/bus/pci/drivers/pci-stub/new_id<br>
echo 0000:02:00.2 &gt; /sys/bus/pci/devices/0000:02:00.2/driver/unbind<br>echo 0000:02:00.2 &gt; /sys/bus/pci/drivers/pci-stub/bind<br><br>echo &quot;14f1 8804&quot; &gt; /sys/bus/pci/drivers/pci-stub/new_id<br>echo 0000:02:00.4 &gt; /sys/bus/pci/devices/0000:02:00.4/driver/unbind<br>
echo 0000:02:00.4 &gt; /sys/bus/pci/drivers/pci-stub/bind<br></div><br>, this is the dmesg right after:<br><div style="margin-left: 40px;">[ 1113.446450] pci-stub 0000:02:00.0: claimed by stub<br>[ 1113.446652] pci-stub 0000:02:00.0: claimed by stub<br>
[ 1113.446740] pci-stub 0000:02:00.1: claimed by stub<br>[ 1113.446912] pci-stub 0000:02:00.1: claimed by stub<br>[ 1113.446997] pci-stub 0000:02:00.2: claimed by stub<br>[ 1113.447168] pci-stub 0000:02:00.2: claimed by stub<br>
[ 1113.447254] pci-stub 0000:02:00.4: claimed by stub<br>[ 1113.447429] pci-stub 0000:02:00.4: claimed by stub<br></div><br>Every thing seems fine I think.<br><br>However, now only thing left is to start the virtual mythbuntu with the pci card attached:<br>
<div style="margin-left: 40px;">sudo qemu-system-x86_64 -m 512 -boot c -net none -hda /home/administrator/VirtualMachines/mythbuntu.img -pcidevice host=02:00.0 -pcidevice host=02:00.1 -pcidevice host=02:00.2 -pcidevice host=02:00.4<br>
</div><br>This starts the  up the machine, but in the terminal this error appears a lot of times:<br><div style="margin-left: 40px;">Failed to assign irq for &quot;02:00.2&quot;: Input/output error<br>Perhaps you are assigning a device that shares an IRQ with another device?<br>
Failed to assign irq for &quot;02:00.1&quot;: Input/output error<br>Perhaps you are assigning a device that shares an IRQ with another device?<br>Failed to assign irq for &quot;02:00.0&quot;: Input/output error<br>Perhaps you are assigning a device that shares an IRQ with another device?<br>
<br></div>What I dont understand is why is this error happening, because I dont think the IRQ is shared, but I honestly dont know...<br><br>Can someone see any problems from what I posted????<br><br>Regards <br>Ole<br>