Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-06-24 Thread Gabriel Laupre
Yes, this is a standard driver that has been upstream in Linux, FreeBSD & Windows for some time with no adverse effects seen on the hardware. This issue has also been fixed in the latest iteration of hardware so it wont' be a problem in the future. We would definitely like qemu to work out of the

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-06-22 Thread Jakob Bohm
On 23-06-2015 03:20, Gabriel Laupre wrote: ... I noticed that the pba_offset was wrong and it is a problem in my NIC. NIC = Network Interface Card (not driver). ... Maybe it is better that qemu catches bad drivers before they harm real hardware. Of cause if a real NIC does something useful w

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-06-22 Thread Gabriel Laupre
Hello, I managed to isolate the error. Now I am wondering if I can ask for a change in the code or not, here the explanation: I downloaded the last version of qemu (2.3.0). To reproduce the bug, here what I was doing: - remove the driver of my NIC # rmmod cxgb4 - load the physical driver to ins

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-06-08 Thread Gabriel Laupre
>> I tried to assign the PF0 where my VF are attached to and I have the >> following errors: > Just try attaching the PF. Don't create any VFs on it. My NIC has 8 PFs. The PF4 manages the physical ports (I have two). I see that on the iommu_groups, all PFs are on the same group: /sys/kernel/iommu_

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-06-08 Thread Bandan Das
Gabriel Laupre writes: > Hello, > > I tried to use the "macvtap" solution instead of the direct pci > passthrough. It works. But I soon as I try to attach the pci device in > direct mode into the VM it doesn't work, > I am wondering if my versions are too old maybe: > [root@peryn5 ~]# virsh versi

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-06-05 Thread Gabriel Laupre
Hello, I tried to use the "macvtap" solution instead of the direct pci passthrough. It works. But I soon as I try to attach the pci device in direct mode into the VM it doesn't work, I am wondering if my versions are too old maybe: [root@peryn5 ~]# virsh version Compiled against library: libvirt 1

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-27 Thread Bandan Das
> On May 22, 2015, at 4:50 PM, Gabriel Laupre wrote: > > I have something new to investigate now :) > Sorry for not following up earlier. Did you investigate further ? Is the PF being used in the host ? Can you try assigning the PF instead ? Also, what processor are you trying this with ? Ba

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
I have something new to investigate now :) 2015-05-22 13:50 GMT-07:00 Gabriel Laupre : > > You may need to detach all VFs if they are in the same iommu group. > All my VFs are in different iommu group > > Also, check if dmesg has any relevant messages when this error occurs. > I rebooted my machi

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
> You may need to detach all VFs if they are in the same iommu group. All my VFs are in different iommu group > Also, check if dmesg has any relevant messages when this error occurs. I rebooted my machine and the "allow_unsafe_interrupts" was disable. Therefore I enabled it and I tried to launch ag

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Bandan Das
Gabriel Laupre writes: >> Just, try using a different slot number. > I changed the addr from 0x3 to 0x4 with the existing device under 04.01.4 > (it is a VF from a NIC)/ > I get: > [root@peryn5 devstack]# /usr/libexec/qemu-kvm -device > vfio-pci,host=04:01.4,id=hostdev0,bus=pci.0,addr=0x4 -monito

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
> Just, try using a different slot number. I changed the addr from 0x3 to 0x4 with the existing device under 04.01.4 (it is a VF from a NIC)/ I get: [root@peryn5 devstack]# /usr/libexec/qemu-kvm -device vfio-pci,host=04:01.4,id=hostdev0,bus=pci.0,addr=0x4 -monitor stdio QEMU 1.5.3 monitor - type 'h

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Bandan Das
Gabriel Laupre writes: > Actually, I get the same error if I enter a PCI address completely random > (for example 04.01.5, which doesn't exist in my system) No, that has nothing to do with the pci address of the host device you are trying to assign. It's telling you that that slot is already use

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
Actually, I get the same error if I enter a PCI address completely random (for example 04.01.5, which doesn't exist in my system) 2015-05-22 12:00 GMT-07:00 Bandan Das : > Gabriel Laupre writes: > > >>To rule out if it's a problem with your guest xml. Let me know if you are > > interested and I

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
> For each, assuming they are the same card, you have to bind them to the stub driver: [root@peryn5 devstack]# virsh nodedev-detach pci__04_01_4 Device pci__04_01_4 detached [root@peryn5 devstack]# /usr/libexec/qemu-kvm -device vfio-pci,host=04:01.4,id=hostdev0,bus=pci.0,addr=0x3 -monitor

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Bandan Das
Gabriel Laupre writes: >>To rule out if it's a problem with your guest xml. Let me know if you are > interested and I will write down the steps. > > I am way more than interested to try that :) Thanks a lot Ok, Based on your command line below, I am assuming that you have a multifunction card. Y

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
>To rule out if it's a problem with your guest xml. Let me know if you are interested and I will write down the steps. I am way more than interested to try that :) Thanks a lot 2015-05-22 10:46 GMT-07:00 Bandan Das : > Gabriel Laupre writes: > > >> Thanks for the update. Did you get a chance to

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Bandan Das
Gabriel Laupre writes: >> Thanks for the update. Did you get a chance to run qemu standalone > without libvirt? > How can I do that, what are the purpose to do so and why to try that? > (thank you ^^) To rule out if it's a problem with your guest xml. Let me know if you are interested and I will

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-22 Thread Gabriel Laupre
> Thanks for the update. Did you get a chance to run qemu standalone without libvirt? How can I do that, what are the purpose to do so and why to try that? (thank you ^^) 2015-05-21 13:32 GMT-07:00 Bandan Das : > Gabriel Laupre writes: > > >> AppArmor is Debian based, but that doesn't stop you f

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-21 Thread Bandan Das
Gabriel Laupre writes: >> AppArmor is Debian based, but that doesn't stop you from > running/installing it on other distros > >> $ dmesg | grep apparmor > > The service isn't started nor present in my machine. Thank you for the hint > though. > I am still stuck with this error and it is not depen

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-21 Thread Gabriel Laupre
> AppArmor is Debian based, but that doesn't stop you from running/installing it on other distros > $ dmesg | grep apparmor The service isn't started nor present in my machine. Thank you for the hint though. I am still stuck with this error and it is not dependent of my Intel NIC, I used another

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-21 Thread Karl Apsite
AppArmor is Debian based, but that doesn't stop you from running/installing it on other distros $ dmesg | grep apparmor On 05/20/2015 02:56 PM, Bandan Das wrote: > Gabriel Laupre writes: > >> Mmmhh, >> My SELinux is disabled. Is Apparmor not only on debian/ubuntu and suse, am >> I wrong? I hav

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-20 Thread Bandan Das
Gabriel Laupre writes: > Mmmhh, > My SELinux is disabled. Is Apparmor not only on debian/ubuntu and suse, am > I wrong? I have no idea on that :) Yeah, me neither :) I am just trying to rule out all possibilities. > 2015-05-20 11:23 GMT-07:00 Bandan Das : > >> Oh and one more thing! You alread

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-20 Thread Gabriel Laupre
Mmmhh, My SELinux is disabled. Is Apparmor not only on debian/ubuntu and suse, am I wrong? I have no idea on that :) 2015-05-20 11:23 GMT-07:00 Bandan Das : > Oh and one more thing! You already answered before but just wanted to > confirm > that you don't have apparmor running, right ? > > Banda

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-20 Thread Bandan Das
Oh and one more thing! You already answered before but just wanted to confirm that you don't have apparmor running, right ? Bandan Das writes: > Gabriel Laupre writes: > >>> Yes, indeed it is. What distro is this ? Do you have SELinux or any other >> security feature enabled ? Can you please ve

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-20 Thread Bandan Das
Gabriel Laupre writes: >> Yes, indeed it is. What distro is this ? Do you have SELinux or any other > security feature enabled ? Can you please verify that the file has a > appropriate label if SELinux is enabled ? (ls -lZ /dev/vfio/vfio) > My distrib: > [root@peryn5 ~]# cat /proc/version > Linux

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-19 Thread Gabriel Laupre
> Yes, indeed it is. What distro is this ? Do you have SELinux or any other security feature enabled ? Can you please verify that the file has a appropriate label if SELinux is enabled ? (ls -lZ /dev/vfio/vfio) My distrib: [root@peryn5 ~]# cat /proc/version Linux version 3.10.0-229.1.2.el7.x86_64 (

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-19 Thread Bandan Das
> On May 20, 2015, at 12:29 AM, Gabriel Laupre wrote: > > Thank Bandan, > > > > Assuming you are on an intel box, have you booted your kernel with > > intel_iommu=on ? > Yes, I have booted my kernel with the intel_iommu=on. (I don't remember how > to check that now though ^^) > > > Please p

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-19 Thread Gabriel Laupre
Thank Bandan, > Assuming you are on an intel box, have you booted your kernel with intel_iommu=on ? Yes, I have booted my kernel with the intel_iommu=on. (I don't remember how to check that now though ^^) > Please paste the output of dmesg | grep -e DMAR -e IOMMU ? [root@peryn5 ~]# dmesg | grep

Re: [Qemu-discuss] Error starting domain: vfio-pci

2015-05-19 Thread Bandan Das
Hello Gabriel, > On May 19, 2015, at 8:03 PM, Gabriel Laupre wrote: > > Hello everyone, > > I am using a Centos 7.1 machine with the kernel 3.10.229. I want to use my > host with SR-IOV to use a virtual function on my NIC as the vNIC in my new VM. > > I have an instance started with a old NI