Bug 845034

Summary: host kernel panic when booting win7 guest with VF and PF in rhel5.9 host
Product: Red Hat Enterprise Linux 5 Reporter: FuXiangChun <xfu>
Component: kernelAssignee: Alex Williamson <alex.williamson>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.9CC: alex.williamson, chayang, ddutile, flang, juzhang, michen, mkenneth, qzhang, rhod, sforsber, shu, sluo, tburke, virt-maint, wdai, xwei
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 04:40:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log file from crash none

Description FuXiangChun 2012-08-01 14:45:01 UTC
Description of problem:
boot a win7 guest and assign one VF and one PF, host kernel panic.
I attached a vmcore file.

Version-Release number of selected component (if applicable):
# uname -r
2.6.18-333.el5
#rpm -qa|grep kvm
kvm-83-258.el5

How reproducible:
always

Steps to Reproduce:
1.unbind one PF and one VF
echo "8086 10c9" >/sys/bus/pci/drivers/pci-stub/new_id 
echo 0000:23:00.0 >/sys/bus/pci/devices/0000\:23\:00.0/driver/unbind 
echo 0000:23:00.0 >/sys/bus/pci/drivers/pci-stub/bind 
echo "8086 10ca" >/sys/bus/pci/drivers/pci-stub/new_id 
echo 0000:23:10.1 >/sys/bus/pci/devices/0000\:23\:10.1/driver/unbind 
echo 0000:23:10.1 >/sys/bus/pci/drivers/pci-stub/bind 

2.cli
/usr/libexec/qemu-kvm -m 4G -smp 4,cores=2,threads=2,sockets=1 -M rhel5.6.0 -cpu qemu64,+sse2 -name sr-iov -drive file=win7-64-sp1.qcow2,format=qcow2,media=disk,if=virtio,cache=none,werror=stop,boot=on -net nic,vlan=1,model=virtio,macaddr=00:25:64:FD:22:1a -net tap,sndbuf=0,vlan=1,script=/etc/qemu-ifup,downscript=no -uuid cb7f4a37-7936-4e10-8f9e-5c7f8251723f -monitor unix:/tmp/win7,server,nowait -spice port=5911,disable-ticketing -qxl 1 -usbdevice tablet -soundhw ac97 -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -boot dc -balloon none -pcidevice host=23:00.0 -pcidevice host=23:10.1

3.lspci
# lspci|grep 82576
23:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
23:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
23:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.4 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.5 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.6 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:10.7 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:11.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:11.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:11.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:11.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:11.4 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
23:11.5 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)

  
Actual results:
host kernel panic

Expected results:
host and guest work well

Additional info:
vmcore file
ftp://10.66.82.225/pub/vmcore

Comment 2 RHEL Program Management 2012-08-02 02:08:25 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 3 FuXiangChun 2012-08-02 05:50:58 UTC
If I install rhel6.3 os in the same host and assgin vf and pf to guest,then guest and host work well.

cli for rhel6.3
/usr/libexec/qemu-kvm -M rhel6.3.0 -cpu host -enable-kvm -m 2048 -smp 2,sockets=1,cores=2,threads=1 -usb -device usb-tablet,id=input0 -name test -uuid `uuidgen` -drive file=win7-64-sp1-bak.qcow2,format=qcow2,if=none,id=drive-disk,cache=none,werror=ignore,rerror=ignore -device virtio-blk-pci,scsi=off,drive=drive-disk,id=image,bootindex=2 -device virtio-balloon-pci,id=ballooning -boot menu=on -spice port=9000,disable-ticketing -vga qxl -monitor stdio -device pci-assign,host=23:00.0 -device pci-assign,host=23:10.1

Comment 4 FuXiangChun 2012-08-03 01:25:13 UTC
Ignore this ftp address
 ftp://10.66.82.225/pub/vmcore

get vmcore file from the address below
ftp://10.66.65.99/pub/vmcore

Comment 6 Alex Williamson 2012-08-03 14:26:50 UTC
Created attachment 602142 [details]
log file from crash

Comment 12 FuXiangChun 2012-08-08 01:40:21 UTC
I tested this bug with build in comment 11,  Host and guest work well.

additional 
 Rhel5.8GA kernel also hit this issue, Is this a regression bug?

Comment 14 RHEL Program Management 2012-08-08 06:28:29 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 15 Dor Laor 2012-08-08 07:10:07 UTC
(In reply to comment #12)
> I tested this bug with build in comment 11,  Host and guest work well.
> 
> additional 
>  Rhel5.8GA kernel also hit this issue, Is this a regression bug?

No, it was only fixed in 5.8.z and 5.9.
According to Alex report it should be a dup of  814153

Comment 19 FuXiangChun 2012-08-20 10:09:43 UTC
verify this bug with kernel 2.6.18-336.el5 in AMD platform.

accroding to steps in Description.

testing result:
   assign a vf and pf to win7 guest successfully.  and host and guest work well.

so this bug is fixed in 2.6.18-336.el5. 

I will verify it in Intel platform later.

Comment 20 Chao Yang 2012-09-04 08:04:58 UTC
Moving to VERIFIED as per Comment #19

Comment 23 errata-xmlrpc 2013-01-08 04:40:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0006.html