Bug 1025958 - Provide a way for libvirt to find available qdevs via QMP
Provide a way for libvirt to find available qdevs via QMP
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.0
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Markus Armbruster
jingzhao
: FutureFeature
Depends On: 1001216
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-02 09:25 EDT by Markus Armbruster
Modified: 2017-11-01 20:06 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Markus Armbruster 2013-11-02 09:25:38 EDT
Description of problem:
Libvirt uses QOM command qom-list-types to find available devices.  It
doesn't obey no_user.  As far as I can tell, QOM doesn't let you
figure out whether a device is no_user.

How reproducible:
Always

Steps to Reproduce:
1. Run: qemu-kvm -nodefaults -S -display none -qmp stdio
2. Type:
{ "execute": "qmp_capabilities" }
{ "execute": "qom-list-types", "arguments": { "implements": "device" } }

Actual results:
qom-list-types returns a list of devices that includes no-user devices such as "apic".

Expected results:
Either the result for the qom-list-types command in the reproducer should include information on whether the device is no-user, or there should be another way to get that information.
Comment 1 Markus Armbruster 2013-11-02 09:27:20 EDT
Eric, please confirm or deny that libvirt actually needs this piece of information.
Comment 3 Eric Blake 2013-11-07 10:57:36 EST
(In reply to Markus Armbruster from comment #1)
> Eric, please confirm or deny that libvirt actually needs this piece of
> information.

Right now, I don't know of any device that is marked no-user but where libvirt tries to use it anyways.  As long as that situation remains, then this patch is not urgent.  But you are correct that libvirt would LIKE to know which devices are no-user, particularly if downstream is going to add patches to mark devices as no-user due to an unwillingness to support those devices in comparison to upstream.
Comment 4 Markus Armbruster 2013-11-14 03:57:53 EST
The following device models are no-user in RHEL-7, but not in upstream
master:

    SUNW,fdtwo
    ccid-card-emulated
    exynos4210-ehci-usb
    icc-bridge
    isa-cirrus-vga
    mch
    pci-serial-2x
    pci-serial-4x
    q35-pcihost
    sysbus-ahci
    sysbus-fdc
    xlnx,ps7-usb

The following device models are expected to become no-user upstream:

    SUNW,fdtwo                  [1]
    cfi.pflash01                [2]
    esp                         [2]
    exynos4210-ehci-usb         [1]
    fusbh200-ehci-usb		[3]
    icc-bridge                  [1]
    mch				[1]
    q35-pcihost			[1]
    sysbus-ahci			[1]
    sysbus-fdc			[1]
    sysbus-ohci			[2]
    tegra2-ehci-usb		[3]
    virtio-mmio			[3]
    xlnx,ps7-usb		[1]

    [1] same as RHEL-7
    [2] device compiled out in RHEL-7
    [3] device not in RHEL-7 code

The following device models are expected to lose no-user upstream (but
not in RHEL-7):

    i8042
    isa-fdc
    piix3-ide
    piix3-ide-xen
    piix4-ide

Potential troublemakers (devices no-user in RHEL-7 only):

    ccid-card-emulated
    i8042
    isa-cirrus-vga
    isa-fdc
    pci-serial-2x
    pci-serial-4x
    piix3-ide
    piix3-ide-xen
    piix4-ide

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