Bug 508673 - Host panic when assign a unbind HBA card to guest.
Summary: Host panic when assign a unbind HBA card to guest.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Chris Wright
QA Contact: Lawrence Lim
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-29 13:04 UTC by lihuang
Modified: 2014-03-26 00:58 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-29 13:30:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
dmeg (34.90 KB, text/plain)
2009-06-29 13:04 UTC, lihuang
no flags Details

Description lihuang 2009-06-29 13:04:11 UTC
Created attachment 349780 [details]
dmeg

Description of problem:
After rebooting. I forgot to unbind the HBA card from host. 
then host panic when I trying to assign the HBA card to Guest.

Please refer to the attachment






Version-Release number of selected component (if applicable):
5.4-2.0.99 (8.2) 
kvm-83-81.el5


How reproducible:
100% . 

Steps to Reproduce:
1./usr/libexec/qemu-kvm -no-hpet  -usbdevice  tablet -rtc-td-hack -drive  file=/data/images/images/RHEL-5.4-32-virtio.qcow2,media=disk,if=ide,cache=off,index=0  -m 2048 -smp 2 -monitor stdio -vnc :12  -pcidevice host=08:00.0  -pcidevice host=08:00.1
2.
3.
  
Actual results:
Host panic 

Expected results:


Additional info:
08:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
08:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)

Comment 1 lihuang 2009-06-29 13:22:24 UTC
change   Component
kernel-2.6.18-155.el5

Comment 2 Lawrence Lim 2009-06-30 14:44:46 UTC
Can u rewrite the steps to reproduce? When did the reboot take place?

Comment 3 lihuang 2009-07-01 02:34:35 UTC
the host panic scenario is : 
0. the HBA cards are installed.
1. find the pci ID 
 # lspci  | grep HBA
 08:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to
 
 PCI Express HBA (rev 03)
 08:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to
 
 PCI Express HBA (rev 03)
2. run guest
 #/usr/libexec/qemu-kvm -no-hpet  -usbdevice  tablet -rtc-td-hack -drive 
file=/data/images/images/RHEL-5.4-32-virtio.qcow2,media=disk,if=ide,cache=off,index=0
 -m 2048 -smp 2 -monitor stdio -vnc :12  -pcidevice host=08:00.0  -pcidevice
host=08:00.1

==>  guest is not start.
==>  wait for a while, then host panic



no host panic scenario is :

0. the HBA cards are installed. and remove kvm/kvm_intel modules
1.  find the pci ID and vendor & device ID
 # lspci  | grep HBA
 08:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to
 
 PCI Express HBA (rev 03)
 08:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to
 
 PCI Express HBA (rev 03)
 # lspci -n | grep -E "08:00.0|08:00.1"
 08:00.0 0c04: 1077:2432 (rev 03)
 08:00.1 0c04: 1077:2432 (rev 03)
2. unbind
 #echo "1077:2432"  > /sys/bus/pci/drivers/pci-stub/new_id
 #echo 0000:08:00.0 > /sys/bus/pci/devices/0000\:08\:00.0/driver/unbind
 #echo 0000:08:00.1 > /sys/bus/pci/devices/0000\:08\:00.1/driver/unbind
 #echo 0000:08:00.0 > /sys/bus/pci/drivers/pci-stub/bind
 #echo 0000:08:00.1 > /sys/bus/pci/drivers/pci-stub/bind
3. add kvm/kvm_intel modules
 #modprobe kvm
 #modprobe kvm_intel
4. run guest
 #/usr/libexec/qemu-kvm -no-hpet  -usbdevice  tablet -rtc-td-hack -drive 
file=/data/images/images/RHEL-5.4-32-virtio.qcow2,media=disk,if=ide,cache=off,index=0
 -m 2048 -smp 2 -monitor stdio -vnc :12  -pcidevice host=08:00.0  -pcidevice
host=08:00.1

==> guest boot with a qemu monitor error :  (qemu) BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1), 
==> can find the HBA cards in guest.

Comment 6 Dor Laor 2009-07-06 15:32:59 UTC
Chris, afaik hba assignment is either un supported or totally tech preview, right?
Maybe it's also a matter of pinning all the guest memory when using device assignment?


Note You need to log in before you can comment on or make changes to this bug.