Bug 1492173 - [RFE] support in qemu-kvm for the "hidden state" feature in libvirt to prevent VMs from seeing that they're VMs
Summary: [RFE] support in qemu-kvm for the "hidden state" feature in libvirt to preven...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2017-09-15 16:10 UTC by Allie DeVolder
Modified: 2020-12-14 10:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-09-22 15:06:48 UTC
Target Upstream Version:

Attachments (Terms of Use)
Patch provided by customer (3.01 KB, patch)
2017-09-15 16:10 UTC, Allie DeVolder
no flags Details | Diff

Description Allie DeVolder 2017-09-15 16:10:52 UTC
Created attachment 1326556 [details]
Patch provided by customer

Add support in qemu-kvm for the "hidden state" feature in libvirt to prevent VMs from seeing that they're VMs

Virtual Linux guests using PCI-passthrough of an NVidia graphics card fail with a driver error.  The error from the NVidia driver indicates it is not compatible with the passed-through graphics card (P400), but this is not correct.

The NVidia driver is apparently detecting that it is running in a KVM virtual environment, and fails to load.  If the KVM signature is "hidden" from the guest CPU features, then the NVidia driver loads and runs normally.  The libvirt XML schema provides the means to hide the KVM signature with the "<hidden state='on'/>" tag in the <kvm> features section.  This causes the "kvm=off" parameter to be added to the "-cpu" section of the qemu-kvm command line invocation.

However, the version of qemu-kvm shipped with RHEL7.4 does not honor this flag, and instead exits with an error.  I'm marking this as a bug, since the shipping libvirtd *does* support this capability, as does the upstream version of qemu, however Red Hat has chosen not to implement the capability in their shipping version.

I've attached a patch that adds this capability to the qemu-kvm binary, based on qemu-kvm-1.5.3-141.el7_4.1.src.rpm.

Comment 4 Alex Williamson 2017-09-21 02:26:15 UTC
Please see the RHEL7 Virtualization and Administration Guide, section 17.6:


"Red Hat Enterprise Linux 7 supports PCI device assignment of NVIDIA K-Series Quadro (model 2000 series or higher), GRID, and Tesla as non-VGA graphics devices. Currently up to two GPUs may be attached to the virtual machine in addition to one of the standard, emulated VGA interfaces. The emulated VGA is used for pre-boot and installation and the NVIDIA GPU takes over when the NVIDIA graphics drivers are loaded. Note that the NVIDIA Quadro 2000 is not supported, nor is the Quadro K420 card."

For RHEL-7.4 this is being updated to include M-series and P-series Quadro devices, but the model 2000 or higher requirement still stands.  Quadro P400 is not supported for GPU assignment on RHEL.  Red Hat only supports assignment of NVIDIA GPUs which are also supported by NVIDIA for this purpose.  The NVIDIA driver failing when detecting the KVM hypervisor is an indication that NVIDIA does not support this configuration and therefore neither does Red Hat.

As an NVIDIA partner, I don't think we can in good faith backport this feature specifically for enabling assignment of unsupported devices, nor could we support customers making use of this feature if we did backport it.  Upstream, community enable-ment of such features does not imply Red Hat support of such configurations.  Recommendation is for customer to upgrade GPU to match supported hardware requirements.

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