How to passthrough PCI in kvm


#1

Since I’m having problems getting sound from my guest VM (apparently virt-viewer doesn’t support sound), I decided to try and passthrough my onboard sound card directly to the guest. Only I’m not sure if I’m doing it right. I’ve read the instructions here: redhat.com/docs/en-US/Red_Ha … rough.html

All of the commands and features listed in the RHEL 6 docs exist in CentOS 5.5, at least they show up, so that’s what I decided to try. Only I bogged down on the very first step - removing the device drivers from CentOS to allow it to be assigned to the guest. When at a virsh prompt I type nodedev-dettach and the command simply hangs. No output, no errors onscreen or in any of the logs under System Log Viewer. And this is the case for any pci device I try to detach. So that leaves me wondering if virsh under CentOS actually supports this command or if it is a “ghost” command.

Has anyone actually passed through a PCI device on CentOS? How is it done? Should I be following the first instructions and just try to modify them to apply to CentOS? Is there another way to do this without using virsh?


#2

Hi

I started with the information for redhat 5.5 http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Virtualization_Guide/sect-Virtualization-PCding_a_PCI_device_to_a_host.html. But that doesn’t work. I get errors in /var/log/messages:

Jun 12 22:18:27 kvm kernel: tun: Universal TUN/TAP device driver, 1.6
Jun 12 22:18:27 kvm kernel: tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Jun 12 22:18:27 kvm kernel: device vnet0 entered promiscuous mode
Jun 12 22:18:27 kvm kernel: br0: port 2(vnet0) entering learning state
Jun 12 22:18:27 kvm kernel: ACPI: PCI Interrupt 0000:09:00.0[A] -> GSI 16 (level, low) -> IRQ 185
Jun 12 22:18:27 kvm kernel: IRQ handler type mismatch for IRQ 185
Jun 12 22:18:27 kvm kernel:
Jun 12 22:18:27 kvm kernel: Call Trace:
Jun 12 22:18:27 kvm kernel:  <ffffffff800bb4c7>] setup_irq+0x1b7/0x1cf
Jun 12 22:18:27 kvm kernel:  <ffffffff883eb87c>] :kvm:kvm_irq_thunk+0x0/0xe
Jun 12 22:18:27 kvm kernel:  <ffffffff800bb58f>] request_irq+0xb0/0xd6
Jun 12 22:18:27 kvm kernel:  <ffffffff883d37c9>] :kvm:kvm_assigned_dev_intr+0x0/0xa5
Jun 12 22:18:27 kvm kernel:  <ffffffff883eb928>] :kvm:kvm_request_irq+0x5e/0x8a
Jun 12 22:18:27 kvm kernel:  <ffffffff883d5204>] :kvm:kvm_vm_ioctl+0x5f5/0xad8
Jun 12 22:18:27 kvm kernel:  <ffffffff80017b41>] cache_grow+0x35a/0x3c1
Jun 12 22:18:27 kvm kernel:  <ffffffff802239bd>] pci_conf1_read+0xcc/0xd7
Jun 12 22:18:27 kvm kernel:  <ffffffff801586c5>] pci_user_read_config_byte+0x7c/0x90
Jun 12 22:18:27 kvm kernel:  <ffffffff80042141>] do_ioctl+0x21/0x6b
Jun 12 22:18:27 kvm kernel:  <ffffffff8003018e>] vfs_ioctl+0x457/0x4b9
Jun 12 22:18:27 kvm kernel:  <ffffffff800b76a6>] audit_syscall_entry+0x180/0x1b3
Jun 12 22:18:27 kvm kernel:  <ffffffff8004c870>] sys_ioctl+0x59/0x78
Jun 12 22:18:27 kvm kernel:  <ffffffff8005d28d>] tracesys+0xd5/0xe0
Jun 12 22:18:27 kvm libvirtd: 22:18:27.805: error : internal error unable to start guest: char device redirected to /dev/pts/1 char device redirected to /dev/pts/2
Jun 12 22:18:27 kvm kernel:
Jun 12 22:18:27 kvm kernel: ACPI: PCI interrupt for device 0000:09:00.0 disabled
Jun 12 22:18:27 kvm kernel: br0: port 2(vnet0) entering disabled state
Jun 12 22:18:27 kvm kernel: device vnet0 left promiscuous mode
Jun 12 22:18:27 kvm kernel: br0: port 2(vnet0) entering disabled state

It looks like there is a problem with shared IQR. Can anybody help?

Thanks
Roland


#3

hi
I am trying to do something equivalent with Proxmox on Debian
I have an external tape drive on my host that is plugged via an scsci pci card, I want it to be accessible in a VM.
I tried to configure the qemu with " scsi0: /dev/nst0 " but it doesn’t work ( the VM refuse to boot, nothing special in syslog ) so I tried the method like in linux-kvm.org/page/How_to_as … T-d_in_KVM

Now i am able to see the scsi card on the VM with lspci but I still don’t see the tape drive. Does anybody tried do do this ? Is there other methods to make the tape drive directly accessible by the VM ?

Thanks

Hugo


#4

The link you have shared in your post. It isn’t opening for me :S

You already know that you could try to create buy backlinks to uncover enhanced despite the fact that making use of burn the fat feed the muscle guideline. For instance just like the truth about six pack abs fitness routine? tinnitus miracle created for your following. Has always been the diet solution excellent around losing a few pounds? They’re legal . realize it’s as nice as often the eat stop eat schedule add together the time?