[mythtv-users] VMWare on the backend. Viable solution?

Jon Whitear jon at whitear.org
Wed Jan 20 11:22:08 UTC 2010


On 20/01/2010, at 9:22 AM, Jon Whitear wrote:

> 
> I shall try exporting a PCI device under KVM, and see how I go.
> 
> Cheers,
> 
> Jon
> 

Hit a bit of a snag trying to export my DVB-T card, as it uses a shared interrupt which KVM doesn't like. I guess I could try putting the card in another slot (or just using some other card in another PCI slot to prove that VT-d works.) Here's how far I got:-

jon at server ~ $ cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       
  0:         49          0          0          9   IO-APIC-edge      timer
  1:          0          0          0          2   IO-APIC-edge      i8042
  4:          0          0          0          2   IO-APIC-edge    
  8:          0          0          0         68   IO-APIC-edge      rtc0
  9:          0          0          0          0   IO-APIC-fasteoi   acpi
 16:          0          0         44          0   IO-APIC-fasteoi   ahci, uhci_hcd:usb3, uhci_hcd:usb9
 17:          0          0          0          0   IO-APIC-fasteoi   ahci, pata_jmicron
 18:          0          0          0     237669   IO-APIC-fasteoi   pata_jmicron, ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb8, cx88[0], cx88[0]
 19:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb7
 21:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb4
 22:          0          0        176          0   IO-APIC-fasteoi   HDA Intel
 23:          0          3          0          0   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb6
 24:    1389811          0          0          0  HPET_MSI-edge      hpet2
 25:          0    2736059          0          0  HPET_MSI-edge      hpet3
 26:          0          0    1194860          0  HPET_MSI-edge      hpet4
 27:          0          0          0    1428957  HPET_MSI-edge      hpet5
 34:          0          0          0      47066   PCI-MSI-edge      ahci
 35:     524980          0          0          0   PCI-MSI-edge      eth0
 36:      10274          0          0          0   PCI-MSI-edge      eth1
NMI:          0          0          0          0   Non-maskable interrupts
LOC:        111         83         54         26   Local timer interrupts
SPU:          0          0          0          0   Spurious interrupts
RES:      99760      95109      47427      42329   Rescheduling interrupts
CAL:        765       3004       5813       1609   Function call interrupts
TLB:      22407       8894       5696      13072   TLB shootdowns
TRM:          0          0          0          0   Thermal event interrupts

lspci -v
 
07:02.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio 
Decoder (rev 05)                                                                
        Subsystem: DViCO Corporation FusionHDTV DVB-T Plus                      
        Flags: bus master, medium devsel, latency 32, IRQ 18                    
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]                
        Capabilities: [44] Vital Product Data <?>                               
        Capabilities: [4c] Power Management version 2                           
        Kernel driver in use: cx8800                                            
        Kernel modules: cx8800                                                  
                                                                                
07:02.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decode
r [MPEG Port] (rev 05)                                                          
        Subsystem: DViCO Corporation Device db11                                
        Flags: bus master, medium devsel, latency 32, IRQ 18                    
        Memory at f5000000 (32-bit, non-prefetchable) [size=16M]                
        Capabilities: [4c] Power Management version 2                           
        Kernel driver in use: cx88-mpeg driver manager                          
        Kernel modules: cx8802

lspci -n | grep 07:02

07:02.0 0400: 14f1:8800 (rev 05)                                                
07:02.2 0480: 14f1:8802 (rev 05) 

<stop myth backend and unload dvb modules at this point>

server jon # echo "14f1 8800" > /sys/bus/pci/drivers/pci-stub/new_id
server jon # echo 0000:07:02.0 > /sys/bus/pci/devices/0000:07:02.0/driver/unbind
server jon # echo 0000:07:02.0 > /sys/bus/pci/drivers/pci-stub/bind

jon at server ~ $ cat ./start.media
sudo qemu \
 -name media,process=vmMedia \
 -drive file=/dev/vg01/vmMedia,if=virtio,boot=on  \
 -net nic,macaddr=52:54:00:12:36:70,model=virtio \
 -net tap,ifname=tap3,script=no,downscript=no \
 -k en-us \
 -m 512 \
 -smp 1 -cpu host \
 -pcidevice host=07:02.0

jon at server ~ $ sudo ./start.media <- script to start VM
Failed to assign irq for "07:02.0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to deassign device "07:02.0" : Invalid argument
Failed to initialize assigned device host=07:02.0





More information about the mythtv-users mailing list