Bug 696874

Summary: Hotplug 82599 NIC PF to WinXP-sp3 guest gets confusing error message
Product: Red Hat Enterprise Linux 6 Reporter: Vivian Bian <vbian>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: dallan, dyuan, eblake, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-19 10:36:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vivian Bian 2011-04-15 05:15:41 UTC
Description of problem:
Tried to hotplug the 82599 PF to XP guest, will get following prompt in host terminal , which tells the failure to hotplug . But in the guest , it already recognized there is the new hardware inserted . 

Version-Release number of selected component (if applicable):
libvirt-0.8.7-17.el6.x86_64
kernel-2.6.32-132.el6.x86_64
qemu-kvm-0.12.1.2-2.158.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.# virsh nodedev-list --tree
      |   +- pci_0000_28_00_1
  |   |   |
  |   |   +- net_eth0_00_1b_21_8e_b2_b9

  |   +- pci_0000_28_10_1
  |   |   |
  |   |   +- net_eth6_42_66_b1_01_fa_fd
  |   |     
  |   +- pci_0000_28_10_1
  |       |
  |       +- net_eth7_ba_b4_dd_5c_5b_dd

2.# virsh nodedev-dumpxml pci_0000_28_00_1
<device>
  <name>pci_0000_28_00_1</name>
  <parent>pci_0000_00_07_0</parent>
  <driver>
    <name>ixgbe</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>40</bus>
    <slot>0</slot>
    <function>1</function>
    <product id='0x10fb'>82599EB 10-Gigabit SFI/SFP+ Network Connection</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
    <capability type='virt_functions'>
      <address domain='0x0000' bus='0x28' slot='0x10' function='0x1'/>
      <address domain='0x0000' bus='0x28' slot='0x10' function='0x3'/>
    </capability>
  </capability>
</device>

3.# cat pf.xml 
<hostdev mode='subsystem' type='pci' managed='yes'>
    <source>
       <address bus='40' slot='0' function='1'/>
    </source>
</hostdev>

4. # virsh attach-device xp-sp3 pf.xml 
error: Failed to attach device from pf.xml
error: internal error Not detaching active device 0000:28:00.1

5.# virsh nodedev-list --tree
 |   +- pci_0000_28_00_1
 and no VF found under the tree for  pci_0000_28_00_1
  
Actual results:


Expected results:


Additional info:

Comment 1 Osier Yang 2011-04-19 09:54:27 UTC
Hi, vivian, I can't reproduce it, could you confirm if the PF is already in use by domain xp-sp3 and other domains? If it's in use, then it's the expected error.

Comment 2 Vivian Bian 2011-04-19 10:36:57 UTC
hm, failed to reproduce it now . But now as you told me , when the pf is occupied by other process I'll meet the same error as the bug shows . So it is the right thing . 

Close this bug as NOTABUG