Bug 508673 - Host panic when assign a unbind HBA card to guest.
Host panic when assign a unbind HBA card to guest.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4
All Linux
high Severity high
: rc
: ---
Assigned To: Chris Wright
Lawrence Lim
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-29 09:04 EDT by lihuang
Modified: 2014-03-25 20:58 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-29 09:30:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description lihuang 2009-06-29 09:04:11 EDT
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 09:22:24 EDT
change   Component
kernel-2.6.18-155.el5
Comment 2 Lawrence Lim 2009-06-30 10:44:46 EDT
Can u rewrite the steps to reproduce? When did the reboot take place?
Comment 3 lihuang 2009-06-30 22:34:35 EDT
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 11:32:59 EDT
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.