Description of problem: KVM guests can be given control of PCI devices via the device assignment support in qemu-kvm, KVM & VT-d in the kernel. VT-d provides security by isolating device DMA to only be directed to guest memory, while the guest owns the device. But prior to the guest gaining control of the device, and after the guest is shutdown and the device is assumed to be owned by the host, the PCI(e) device may still be DMA-ing to memory under a couple of conditions: (a) driver error, crashing the guest, but leaving the device DMA-ing to memory. (b) guest is 'destroyed' by controlling host, but a clean (driver) shutdown of the device is not implemented. Once the memory associated with the guest is given back to the host, the still (badly) running DMA engine could corrupt host memory, and cause a host crash. PCI FLR provides a standard method for hosts to reset a PCI device ensuring it is in a quiesced state. This ensures errors and/or sudden guest shutdowns with PCI devices assigned to the guests don't cause an ensuing host crash. Version-Release number of selected component (if applicable): How reproducible: Only in device error cases, or sudden guest shutdowns that don't invoke assigned device driver shutdowns (that are 100% complete), or badly written/behaving guest drivers (that don't shutdown their device DMA and/or interrupts). Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Repeatable, secure addition and removal of PCI devices to KVM guests. Additional info: Another patch to KVM is needed to invoke the pci_reset_function() during device assignment and de-assignment. The support is provided via 5 patches that are in upstream linux: 8dd7f8036c123296fc4214f9d8810eb485570422 PCI: add support for function level reset 1df8fb3d5f078f9cab901b6106ef2c9b74eef7df PCI: Fix disable IRQ 0 in pci_reset_function() d91cdc745524a1b1ff537712a62803b8413c12d6 PCI: refactor pci_reset_function() f7b7baae6b30ff04124259ff8d7c0c0d281320e6 PCI: add PCI Advanced Feature Capability defines 1ca887970a3971a22e4875b7c6ad5ae3ce49f61a PCI: Extend pci_reset_function() to support PCI Advanced Features
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
in kernel-2.6.18-159.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1243.html