Bug 1027569

Summary: qemu-kvm quit when trying to disable SR-IOV of PF with its VFs used by qemu-kvm
Product: Red Hat Enterprise Linux 6 Reporter: Chao Yang <chayang>
Component: qemu-kvmAssignee: Bandan Das <bdas>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.6CC: alex.williamson, bsarathy, chayang, juzhang, michen, mkenneth, qzhang, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-31 16:24:15 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:

Description Chao Yang 2013-11-07 06:19:47 UTC
Description of problem:
Assigned VFs of BCM57810 to guest, then tried to disable SR-IOV by echo'ing 0 to corresponding sriov_numvfs file. As a result, qemu-kvm quit on:
assigned_dev_pci_read__config: pread failed, ret = -1 errno = 19

Version-Release number of selected component (if applicable):
2.6.32-428.el6.x86_64
qemu-kvm-0.12.1.2-2.415.el6.x86_64

How reproducible:
1/1

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
Either echo waits qemu-kvm to release VFs or returns without killing qemu-kvm 

Additional info:
A slice from dmesg:

------------[ cut here ]------------
WARNING: at arch/x86/mm/pat.c:865 track_pfn_vma_copy+0x94/0xa0() (Not tainted)
Hardware name: PowerEdge R715
Modules linked in: ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat xt_CHECKSUM iptable_mangle bridge stp llc autofs4 ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 vhost_net macvtap macvlan tun kvm_amd kvm power_meter microcode dcdbas serio_raw bnx2x libcrc32c mdio e1000e ptp pps_core k10temp amd64_edac_mod edac_core edac_mce_amd i2c_piix4 i2c_core sg bnx2 ext4 jbd2 mbcache usb_storage sr_mod cdrom sd_mod crc_t10dif ahci mpt2sas scsi_transport_sas raid_class dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mperf]
Pid: 38136, comm: qemu-kvm Not tainted 2.6.32-428.el6.x86_64 #1
Call Trace:
 [<ffffffff81072027>] ? warn_slowpath_common+0x87/0xc0
 [<ffffffff8107207a>] ? warn_slowpath_null+0x1a/0x20
 [<ffffffff8104e9d4>] ? track_pfn_vma_copy+0x94/0xa0
 [<ffffffff81148136>] ? copy_page_range+0x476/0x490
 [<ffffffff81288d7d>] ? rb_insert_color+0x9d/0x160
 [<ffffffff8106f7f3>] ? dup_mm+0x313/0x520
 [<ffffffff810708a1>] ? copy_process+0xd81/0x1450
 [<ffffffff81071011>] ? do_fork+0xa1/0x480
 [<ffffffff8119dee4>] ? do_vfs_ioctl+0x84/0x580
 [<ffffffff81009598>] ? sys_clone+0x28/0x30
 [<ffffffff8100b393>] ? stub_clone+0x13/0x20
 [<ffffffff8100b072>] ? system_call_fastpath+0x16/0x1b
---[ end trace 92d0877a72261997 ]---
qemu-kvm:38136 freeing invalid memtype e48ae000-e48b0000
switch: port 2(tap0) entering disabled state
device tap0 left promiscuous mode
switch: port 2(tap0) entering disabled state
qemu-kvm:38122 freeing invalid memtype e48ae000-e48b0000
qemu-kvm:38122 freeing invalid memtype e4858000-e4860000
qemu-kvm:38122 freeing invalid memtype e48ac000-e48ae000
qemu-kvm:38122 freeing invalid memtype e4850000-e4858000
pci 0000:23:01.6: transaction is not cleared; proceeding with reset anyway
Trying to free nonexistent resource <00000000e4850000-00000000e4857fff>
Trying to free nonexistent resource <00000000e48ac000-00000000e48adfff>
pci 0000:23:01.7: transaction is not cleared; proceeding with reset anyway
Trying to free nonexistent resource <00000000e4858000-00000000e485ffff>
Trying to free nonexistent resource <00000000e48ae000-00000000e48affff>

Comment 2 RHEL Program Management 2013-11-10 09:15:15 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Bandan Das 2015-03-24 04:15:32 UTC
I can't reproduce this anymore with a recent 6.7 kernel(545.el6). Please retest and confirm. Thanks.

Comment 7 Chao Yang 2015-03-26 05:49:45 UTC
(In reply to Bandan Das from comment #6)
> I can't reproduce this anymore with a recent 6.7 kernel(545.el6). Please
> retest and confirm. Thanks.

I need some time to find and retest with such card. Keeping needinfo on me.

Comment 8 Chao Yang 2015-03-31 07:00:06 UTC
(In reply to Bandan Das from comment #6)
> I can't reproduce this anymore with a recent 6.7 kernel(545.el6). Please
> retest and confirm. Thanks.

Me neither. Test was done with 2.6.32-548.el6.x86_64 and qemu-kvm-0.12.1.2-2.462.el6.x86_64

Comment 9 Bandan Das 2015-03-31 16:24:15 UTC
Closing this based on comment 6 and comment 8.