Bug 818055 - Hot/cold-plug a PCI device to guest on Intel VT-d + non-IOMMU host error info different
Hot/cold-plug a PCI device to guest on Intel VT-d + non-IOMMU host error info...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: 6.3
Assigned To: Osier Yang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 01:50 EDT by EricLee
Modified: 2012-05-28 05:38 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-28 05:38:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description EricLee 2012-05-02 01:50:49 EDT
Description of Problem:
Hot/cold-plug a PCI device to guest on Intel VT-d + non-IOMMU host error info different

Version-Release number of selected component:
Host:
qemu-kvm-0.12.1.2-2.282.el6.x86_64
kernel-2.6.32-262.el6.x86_64
libvirt-0.9.10-14.el6.x86_64
Guest:
kernel-2.6.32-220.17.1.el6.x86_64

How reproducible:
40%

Step to Reproduce:
Setup:

Intel host supports VT-d

On kernel option of boot list, do not add "intel_iommu=on"

For platform just support vt-d1(host kernel) and host kernel larger than 171 kernel, need the following steps:

    modprobe -r kvm_intel
    modprobe -r kvm
    modprobe kvm allow_unsafe_assigned_interrupts=1
    modprobe kvm_intel

Actions:
1. # virsh nodedev-list --tree

2. # virsh nodedev-dumpxml pci_0000_00_19_0

3. Edit the following code as nodedev.xml

          <hostdev mode='subsystem' type='pci' managed='yes'>
            <source>
              <address bus='0' slot='25' function='0'/>
            </source>
          </hostdev>
       
4. # virsh define <guest>.xml

5. # virsh start <guest>

6. # virsh attach-device <guest> nodedev.xml
error: Failed to attach device from nodedev.xml
error: internal error unable to execute QEMU command 'device_add': Device 'pci-assign' could not be initialized

7. Destroy the guest and add the above xml into guest xml

8. Start the guest
# for i in {1..100}; do virsh start qcow2; done

Most of time will get the expected info:
error: Failed to start domain qcow2
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/3
No IOMMU found.  Unable to assign device "hostdev0"
qemu-kvm: -device pci-assign,host=00:19.0,id=hostdev0,configfd=33,bus=pci.0,addr=0x7: Device 'pci-assign' could not be initialized

But 40% will get different info like:
error: Failed to start domain qcow2
error: internal error process exited while reading console log output: char device redirected to /dev/pts/3
No IOMMU found.  Unable to assign device "hostdev0"
qemu-kvm: -device pci-assign,host=00:19.0,id=hostdev0,configfd=33,bus=pci.0,addr=0x7: Device 'pci-assign' could not be initialized

Actual results:
As above

Expected results:
After step 8:
100% get the info like:
error: Failed to start domain qcow2
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/3
No IOMMU found.  Unable to assign device "hostdev0"
qemu-kvm: -device pci-assign,host=00:19.0,id=hostdev0,configfd=33,bus=pci.0,addr=0x7: Device 'pci-assign' could not be initialized
Comment 2 Osier Yang 2012-05-28 05:38:16 EDT
The different errors really depend on the run-time qemu process, and both of them tells the root cause "No IOMMU found", don't see there is something to fix.
Close as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.