[Bug 639712] Re: PCI Pass Through via libvirt cannot remap IRQ's

2011-01-31 Thread James Neave
Reboot did nothing, game over for now.

The driver 'pci-stub' is occupying your device

I thought pci-stub taking the device is what it was supposed to do?

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.
https://bugs.launchpad.net/bugs/639712

Title:
  PCI Pass Through via libvirt cannot remap IRQ's

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 639712] Re: PCI Pass Through via libvirt cannot remap IRQ's

2011-01-31 Thread James Neave
These commands:

echo "1106 3038" > /sys/bus/pci/drivers/pci-stub/new_id
echo :08:06.0 > /sys/bus/pci/devices/:08:06.0/driver/unbind
echo :08:06.0 > /sys/bus/pci/drivers/pci-stub/bind
 
>From here:

http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM

Did nothing.

However earlier I had the error about 4k pages (although that was before
I installed the latest qemu-kvm package)

Going to try after a reboot.

J.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.
https://bugs.launchpad.net/bugs/639712

Title:
  PCI Pass Through via libvirt cannot remap IRQ's

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 639712] Re: PCI Pass Through via libvirt cannot remap IRQ's

2011-01-31 Thread James Neave
Here is the test.log

** Attachment added: "test.log"
   
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/639712/+attachment/1820712/+files/test.log

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.
https://bugs.launchpad.net/bugs/639712

Title:
  PCI Pass Through via libvirt cannot remap IRQ's

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 639712] Re: PCI Pass Through via libvirt cannot remap IRQ's

2011-01-31 Thread James Neave
OK, I've tried the following:

1) Recompile kernel with all the same options except enabling DMAR.
2) Edit the apparmour profile to match suggested by flashydave
3) Installed latest qemu-kvm from kvm edgers ppa: 
https://launchpad.net/~ubuntu-server-edgers/+archive/server-edgers-qemu-kvm

Attached is the dmesg and log output.

** Attachment added: "dmesg"
   
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/639712/+attachment/1820711/+files/dmesg

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.
https://bugs.launchpad.net/bugs/639712

Title:
  PCI Pass Through via libvirt cannot remap IRQ's

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 639712] Re: PCI Pass Through via libvirt cannot remap IRQ's

2011-01-29 Thread James Neave
Hi,

Looks like this is also affecting me. :(

I'm trying to pass a PCI tuner through to a virtual machine, I have an AMD 
890FX based board with IOMMU and it's switched on in the BIOS.
Running Ubuntu server 10.10 x64.

Flashydave: It sounds like you've actually got this working, have you
written a guide on how to to it by any chance?

/var/log/libvirt/qemu/test.log:

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin 
QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 
3,sockets=3,cores=1,threads=1 -name test -uuid 
8bda983a-8f07-80ac-da02-2c7298637d96 -nodefaults -chardev 
socket,id=monitor,path=/var/lib/libvirt/qemu/test.monitor,server,nowait -mon 
chardev=monitor,mode=readline -rtc base=utc -boot c -drive 
file=/var/lib/libvirt/images/test.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
 -device 
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 
-drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device 
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device 
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:dd:10:7d,bus=pci.0,addr=0x3 -net 
tap,fd=56,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device 
isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device 
pci-assign,host=08:06.0,id=hostdev0,bus=pci.0,addr=0x6 -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 
char device redirected to /dev/pts/1
pci_add_option_rom: failed to find romfile "pxe-virtio.bin"
Failed to assign device "hostdev0" : Device or resource busy
Failed to deassign device "hostdev0" : Invalid argument
Error initializing device pci-assign

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in ubuntu.
https://bugs.launchpad.net/bugs/639712

Title:
  PCI Pass Through via libvirt cannot remap IRQ's

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 545795] Re: apparmor driver blocks access to hostdev and pcidev devices

2010-05-10 Thread James Neave
Found the apparmour errors in syslog, related to virt-aa helper.
I added /sys/devices/** r, to usr.lib.virt-aa-helper and got a bit further.
Still getting this:

May 10 23:14:25 hal kernel: [  179.037233] type=1503
audit(1273529665.107:22):  operation="open" pid=1601 parent=1 profile
="libvirt-28b82cfd-52c0-b743-475e-77dde3933f44" requested_mask="r::"
denied_mask="r::" fsuid=0 ouid=0
name="/sys/devices/pci:00/:00:14.4/:03:06.0/vendor"

in syslog, but now it's some kind of dynamic profile, but I don't know
where the template is to edit?

That's it for tonight, I'm going to bed -.- zz

Regards,

James.

-- 
apparmor driver blocks access to hostdev and pcidev devices
https://bugs.launchpad.net/bugs/545795
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 545795] Re: apparmor driver blocks access to hostdev and pcidev devices

2010-05-10 Thread James Neave
Hmm, it seems thats actually because usb2 is not supported in KVM?

I tried passing through the PCI card itself, but I'm back to permission
denied :(

device: 03:06.0: driver="pci-assign" host="03:06.0"
device: 03:06.1: driver="pci-assign" host="03:06.1"
device: 03:06.2: driver="pci-assign" host="03:06.2"
get_real_device: /sys/bus/pci/devices/:03:06.0/config: Permission denied
pci-assign: Error: Couldn't get real device (03:06.0)!
Error initializing device pci-assign

apparmour files contains:

  /sys/bus/usb/devices/ r,
  /sys/bus/usb/devices/** r,
  /sys/devices/**/usb[0-9]*/** r,
  /sys/bus/pci/devices/ r,
  /sys/bus/pci/devices/** r,
  /sys/devices/pci/** r,

  /dev/shm/ r,
  /dev/shm/pulse-shm* r,
  /dev/shm/pulse-shm* rwk,
  /dev/snd/* rw,
  /dev/bus/usb/** rw,
  /dev/** rwk,

Is there any way to get access to an apparmor trace file? See what it's
accessing?

Thanks,

James.

-- 
apparmor driver blocks access to hostdev and pcidev devices
https://bugs.launchpad.net/bugs/545795
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 545795] Re: apparmor driver blocks access to hostdev and pcidev devices

2010-05-10 Thread James Neave
Rebooting the PC fixed that problem so I guess something hadn't been reloaded.
I've also added /dev/** rwk, to the apparmour profile. Taking it away doesn't 
stop it from working again, although I've not tried rebooting the host yet.

It still doesn't quite work however, as now (on the guest) I see this in
lsusb:

ja...@myth:~$ lsusb
Bus 001 Device 002: ID 2040:9950 Hauppauge 
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

but in dmesg I see:

[5.806567] dib0700: loaded with support for 13 different device-types
[5.816285] dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in warm state.
[5.816612] dvb-usb: This USB2.0 device cannot be run on a USB1.1 port. (it 
lacks a hardware PID filter)
[5.816682] dvb-usb: Hauppauge Nova-T 500 Dual DVB-T error while loading 
driver (-19)
[5.816787] usbcore: registered new interface driver dvb_usb_dib0700

Different problem? 
Why is it on a USB 1 port? Is the virtual USB hub 1.1? Can I change that?

Regards,

James.

-- 
apparmor driver blocks access to hostdev and pcidev devices
https://bugs.launchpad.net/bugs/545795
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 545795] Re: apparmor driver blocks access to hostdev and pcidev devices

2010-05-10 Thread James Neave
Hi,

I think I may also be having this problem, I'm trying to pass through a PCI 
WinTV NOVA T 500.
It's actually a pair of USB DVB-T tuners on a PCI card so it needed the 'three 
stars' in the /sys path in the apparmour profile.

I appended the improved solution:

  /sys/bus/usb/devices/ r,
  /sys/bus/usb/devices/** r,
  /sys/devices/**/usb[0-9]*/** r,

But in the qemu log file I get:

husb: open device 10.2
husb: config #1 need -1
husb: 1 interfaces claimed for configuration 1
husb: grabbed usb device 10.2
usb_linux_update_endp_table: Cannot send after transport endpoint shutdown

Is this the same problem or have I found a new one? Googeling for that
last line finds nothing!

I also had to add this to get past the permission denied error:

 /dev/bus/usb/** rw,

Would the output of 'find /sys/devices' be of any use?

Regards,

James.

-- 
apparmor driver blocks access to hostdev and pcidev devices
https://bugs.launchpad.net/bugs/545795
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs