Bug 592374

Summary: fail to create a HVM by using virsh or VMM when ixgbe vf is assigned to the HVM
Product: Red Hat Enterprise Linux 5 Reporter: sibai.li
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 5.5CC: berrange, dallan, sibai.li, virt-maint, xen-maint, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-16 22:49:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    
Attachments:
Description Flags
dmesg info
none
lspci -xxx
none
lspci none

Description sibai.li 2010-05-14 17:08:14 UTC
Description of problem:
In KVM, it always fails to create a HVM by using virsh (with a xml file) or VMM if an ixgbe vf needs be assigned to the HVM. 

Not sure if this bug is also related to the bug 
https://bugzilla.redhat.com/show_bug.cgi?id=581655

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a xml file, name kvm.xml
<domain type='kvm' id='1'>
  <name>RHEL-5.5-KVM_vm1</name>
  <uuid>da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/images/RHEL-5.5_vm1.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:65:24:5a'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
    <source>
    <address bus='0x04' slot='0x10' function='0x00'/>
    </source>
    </hostdev> 
  </devices>
</domain>
2. run virsh create kvm.xml 
3. Failed to create domain from kvm.xml
error: internal error unable to start guest: char device redirected to /dev/pts/6
4. Check the log file
Last login: Thu May 13 16:15:02 2010
[root@localhost ~]# cat /var/log/libvirt/qemu/kvm_linux_vm1.log
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S -M pc -m 512 -smp 2 -name kvm_linux_vm1 -uuid da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//kvm_linux_vm1.pid -boot c -drive file=/images/kernel_vm2,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:65:24:5a,vlan=0 -net tap,fd=19,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us -pcidevice host=01:10.0 -pcidevice host=01:10.2
char device redirected to /dev/pts/5
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S -M pc -m 512 -smp 2 -name kvm_linux_vm1 -uuid da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//kvm_linux_vm1.pid -boot c -drive file=/images/kernel_vm2,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:65:24:5a,vlan=0 -net tap,fd=19,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us -pcidevice host=01:10.0 -pcidevice host=01:10.2
char device redirected to /dev/pts/5
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S -M pc -m 512 -smp 2 -name kvm_linux_vm1 -uuid da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//kvm_linux_vm1.pid -boot c -drive file=/images/kernel_vm2,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:65:24:5a,vlan=0 -net tap,fd=19,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us -pcidevice host=04:10.0 -pcidevice host=04:10.2
char device redirected to /dev/pts/5
Failed to assign irq for "04:10.0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to initialize assigned device host=04:10.0
[root@localhost ~]#

  
Actual results:


Expected results:


Additional info:

Comment 1 Don Dutile (Red Hat) 2010-05-21 21:37:32 UTC
Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
can you provide the host dmesg log, and the host's lspci, and lspci -xxx output?
Bug 581655 is xen-related, so not a kvm bug.

It's possible the system bios didnt' make enough window space for
vf's downstream of pci-pci bridge; the above logs should help to decipher if that's the case.

Comment 2 Don Dutile (Red Hat) 2010-05-21 21:45:16 UTC
also, what was your version of kvm on this system ?

Comment 3 sibai.li 2010-05-21 21:55:55 UTC
Created attachment 415788 [details]
dmesg info

Comment 4 sibai.li 2010-05-21 21:58:47 UTC
Created attachment 415792 [details]
lspci -xxx

Comment 5 sibai.li 2010-05-21 21:59:51 UTC
Created attachment 415793 [details]
lspci

Comment 6 sibai.li 2010-05-21 22:02:36 UTC
(In reply to comment #1)
> Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
> can you provide the host dmesg log, and the host's lspci, and lspci -xxx
> output?
  Please see the attachments. The PF driver is loaded correctly, since the VF can be assigned to a VM by using qemu-kvm, and the VF works just fine.
> Bug 581655 is xen-related, so not a kvm bug.
> It's possible the system bios didnt' make enough window space for
> vf's downstream of pci-pci bridge; the above logs should help to decipher if
> that's the case.    
  I don't think so, beacuse the VF works fine when qemu-kvm command is used.

Comment 7 sibai.li 2010-05-21 22:05:10 UTC
(In reply to comment #2)
> also, what was your version of kvm on this system ?    
Is this the right way to check the version

[root@localhost ~]# cat /sys/module/kvm/version
kvm-83-164.el5
[root@localhost ~]#

Comment 8 Don Dutile (Red Hat) 2010-05-21 22:15:34 UTC
(In reply to comment #6)
> (In reply to comment #1)
> > Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
> > can you provide the host dmesg log, and the host's lspci, and lspci -xxx
> > output?
>   Please see the attachments. The PF driver is loaded correctly, since the VF
> can be assigned to a VM by using qemu-kvm, and the VF works just fine.
> > Bug 581655 is xen-related, so not a kvm bug.
> > It's possible the system bios didnt' make enough window space for
> > vf's downstream of pci-pci bridge; the above logs should help to decipher if
> > that's the case.    
>   I don't think so, beacuse the VF works fine when qemu-kvm command is used.    

You hadn't stated anywhere that it works with qemu-kvm command directly.

That makes this a libvirt problem (which virsh uses to generate qemu-kvm command).

Comment 9 sibai.li 2010-05-21 22:30:07 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > (In reply to comment #1)
> > > Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
> > > can you provide the host dmesg log, and the host's lspci, and lspci -xxx
> > > output?
> >   Please see the attachments. The PF driver is loaded correctly, since the VF
> > can be assigned to a VM by using qemu-kvm, and the VF works just fine.
> > > Bug 581655 is xen-related, so not a kvm bug.
> > > It's possible the system bios didnt' make enough window space for
> > > vf's downstream of pci-pci bridge; the above logs should help to decipher if
> > > that's the case.    
> >   I don't think so, beacuse the VF works fine when qemu-kvm command is used.    
> You hadn't stated anywhere that it works with qemu-kvm command directly.
> That makes this a libvirt problem (which virsh uses to generate qemu-kvm
> command).    

I thought I wrote something about qemu-kvm command, but I didn't. Do you have a QA to test the product or reproduct the bug?

Comment 10 Daniel Berrangé 2010-07-06 14:37:18 UTC
Was SELinux enabled & enforcing on the machine when attempting this ?

Comment 12 Daniel Veillard 2010-09-15 15:43:46 UTC
Could you recheck with the rebased libvirt-0.8.2-4.el5 it may fix the problem

Daniel

Comment 13 Dave Allan 2010-11-16 22:49:20 UTC
Since this BZ has been in needinfo since early July, I am going to close as insufficient data.  Please feel free to reopen if additional data becomes available.