Bug 43328

Summary: VT-d/SR-IOV doesn't work in guest
Product: Virtualization Reporter: Jay Ren (yongjie.ren)
Component: kvmAssignee: virtualization_kvm
Status: CLOSED CODE_FIX    
Severity: high CC: avi, florian, muli
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.4.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: guest lspci log
host lspci log
guest dmesg log
host dmesg log

Description Jay Ren 2012-06-01 07:22:34 UTC
Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):Linux
kvm.git Commit:b48b2c3e50433ff6f7e46186daa7f986bd960215
qemu-kvm Commit:18a188f66237e7b38fc8133d3862e5904c0e7ffb
Host Kernel Version:3.4.0
Hardware:WSM-EP, Romley-EP


Bug detailed description:
--------------------------
Assign a VF or normal NIC to the guest, the guest cannot get IP address.
Note:1. assign the VF of  Intel 82576 NIC or 82599 NIC, the guest cannot get IP
     2. hot plug a VF to the guest, the guest cannot get IP
     3. assign a PF to the guest, the guest cannot get IP.


kvm(next) + qemu-kvm   =  result
b48b2c3e + 18a188f6   =  bad 
322728e5 + 18a188f6   =  good



Reproduce steps:
----------------
1. ./pcistub.sh -h 08:10.0   ( to hide a device)
2. qemu-system-x86_64 -m 512 -device pci-assign,host=08:10.0 -net none -hda
rhel6u1.qcow

Current result:
----------------
The guest cannot get IP

Expected result:
----------------
The guest can get IP

Basic root-causing log:
----------------------
[root@vt-snb9 ~]# qemu-system-x86_64 -m 512 -device pci-assign,host=08:10.0
-net none -hda rhel6u1.qcow 
VNC server running on `::1:5900'
assigned_dev_enable_msix: assign irq: Invalid argument
fail to set MSI-X entry number for MSIX! Invalid argument
assigned_dev_update_msix_mmio: Invalid argument
fail to set MSI-X entry number for MSIX! Invalid argument
assigned_dev_update_msix_mmio: Invalid argument
Comment 1 Jay Ren 2012-06-01 07:23:46 UTC
Created attachment 73483 [details]
guest lspci log
Comment 2 Jay Ren 2012-06-01 07:24:09 UTC
Created attachment 73484 [details]
host lspci log
Comment 3 Jay Ren 2012-06-01 07:25:22 UTC
Created attachment 73485 [details]
guest dmesg log
Comment 4 Jay Ren 2012-06-01 07:25:47 UTC
Created attachment 73486 [details]
host dmesg log
Comment 5 Florian Mickler 2012-07-25 19:36:03 UTC
A patch referencing this bug report has been merged in Linux v3.5-rc7:

commit a76beb14123a69ca080f5a5425e28b786d62318d
Author: Alex Williamson <alex.williamson@redhat.com>
Date:   Mon Jul 9 10:53:22 2012 -0600

    KVM: Fix device assignment threaded irq handler
Comment 6 Jay Ren 2012-08-10 06:55:12 UTC
I verified it based on Linux v3.5 tag. As comment #5 said, this bug has been fixed.
Marked it as "verified".
Comment 7 Jay Ren 2012-08-10 06:57:48 UTC
Verified, so let's close it.