On Sat, 2011-07-30 at 17:19 +0300, Shahar Havivi wrote: > On 30.07.11 07:20, Alex Williamson wrote: > > On Sat, 2011-07-30 at 12:12 +0300, Shahar Havivi wrote: > > > Alex, > > > > > > Regarding vdsm changing a device owner, > > > Last time I asked in #virt for using usb device in vdsm hook in > > > /dev/bus/usb/<addr> I was told that vdsm should change the owner to > > > qemu:kvm. > > > So for the sr-iov device /sys/bus/pci/devices/<addr>/resource*, rom, and > > > reset > > > libvirt should change the owner and not vdsm? > > > > I'm not in any position to say who should do what between vdsm and > > libvirt. However, the end result for device assignment to work with an > > unprivileged guest is that someone needs to change file ownership on > > those pci sysfs files before qemu is launched or before devices are hot > > added to a guest. libvirt does this for a purely libvirt managed guest. > > In the example we saw yesterday, nobody was doing it. Thanks, > > > > Alex > Ok, > as far as I know vdsm need to change its devices. > in our sr-iov example you change the reset and the resource* owner, did you > change any other file?
No, and I don't think the "resource" file is necessary, the default read access should be sufficient. We need resource[0-5], rom, and reset (any given device will likely only implement a subset of these). We also access config, but that happens via the pre-opened file descriptor. Thanks, Akex -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list