RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1001216 - Fix no_user or provide another way make devices unavailable with -device / device_add
Summary: Fix no_user or provide another way make devices unavailable with -device / de...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1001222 (view as bug list)
Depends On:
Blocks: 720747 1001076 1001088 1001113 1001123 1001180 1001222 1025958
TreeView+ depends on / blocked
 
Reported: 2013-08-26 18:51 UTC by Markus Armbruster
Modified: 2014-06-18 03:35 UTC (History)
5 users (show)

Fixed In Version: qemu-kvm-1.5.3-15.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:54:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Markus Armbruster 2013-08-26 18:51:17 UTC
Description of problem:
We have a whole bunch of bugs calling for removing or disabling
unwanted devices.  Some of them are easy to remove, but others should
probably just be made unavailable with -device and device_add.  We
need a simple way to do that.

In RHEL-6's qemu-kvm, such a way exists: non-zero DeviceInfo member
no_user makes the device unavailable with -device and device_add.
Upstream silently broke this in commit 18b6dad.  Since then, all
no_user does is remove the device from -device help / device_add help.
Many devices still have no_user set, and many of them don't presently
work with -device.

In the (very) long run, all devices should be usable with -device, and
no_user should not exist.  But right now, they aren't, and no_user is
useful.  Let's fix it.

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.  This needs to be addressed as
well.

Comment 1 Markus Armbruster 2013-08-26 19:00:39 UTC
Possibly useful for fixing bug 1001076, bug 1001088, bug 1001113, bug 1001180.

Comment 3 Markus Armbruster 2013-08-26 19:21:16 UTC
And for fixing bug 1001222.

Comment 4 Markus Armbruster 2013-11-02 13:29:57 UTC
The "libvirt needs to be able to detect no-user" (last paragraph in comment#0) split off into bug 1025958.

Comment 5 Miroslav Rezanina 2013-11-07 08:22:28 UTC
Fix included in qemu-kvm-1.5.3-15.el7

Comment 7 Markus Armbruster 2013-11-14 08:08:09 UTC
*** Bug 1001222 has been marked as a duplicate of this bug. ***

Comment 8 Markus Armbruster 2013-11-18 15:13:41 UTC
Reproducer:

1. Run: qemu-kvm -nodefaults -S -display none -monitor stdio -device X
where X is a device marked "no-user" in output of monitor command "info qdm", e.g. PIIX3.

Actual results:

"-device X" is accepted.  For some but not all X, we then run into other trouble.  For instance, "-device PIIX3" reports "Can't create a second ISA bus".

Expected results:

"-device X" is rejected with message "Parameter 'driver' expects device type"

Additionally, please verify that all devices marked "no-user" in "info qdm" before the fix are still marked "no-user" afterwards.

Comment 9 huiqingding 2013-11-26 07:41:26 UTC
Reproduce this bug using qemu-kvm-1.5.3-14.el7.x86_64

qemu-kvm and kernel version of host:
qemu-kvm-1.5.3-14.el7.x86_64
kernel-3.10.0-55.el7.x86_64

Step1 get all devices marked "no-user"
# /usr/libexec/qemu-kvm -nodefaults -S -display none -monitor stdio
(qemu) info qdm

We can get 31 devices marked "no-user" as following:
"isa-pit", "PIIX3-xen", "piix3-ide-xen", "kvm-pit", "PIIX3", "isa-pcspk", "isa-i8259", "i440FX-pcihost", "i440FX", "kvm-i8259","PIIX4_PM", "kvm-apic", "kvm-ioapic", "mc146818rtc", "i8042", "vmport", "kvmclock", "piix4-ide", "kvmvapic", "x86_64-cpu", "fw_cfg", "vmmouse", "ioapic",
"piix3-ide", "pvpanic", "isabus-bridge", "isa-fdc", "ICH9 SMB","ICH9 LPC", "apic", "port92",

Step2 run "qemu-kvm -nodefaults -S -display none -monitor stdio -device X", X is each device of above 31 devices. The results are same as "Actual results:" in Comment 8:
1) some devices is accepted without any error info, e.g. isa-pcspk, isa-i8259, kvm-i8259.
2) some devices reports "Can't create a second ISA bus", e.g. PIIX3-xen, PIIX3.
3) some devices reports "Segmentation fault (core dumped)", e.g. x86_64-cpu, apic.
4) some devices reports "qemu-kvm: -device X: Device initialization failed.", e.g. ioapic, kvm-ioapic.

Comment 10 huiqingding 2013-11-26 07:50:27 UTC
Verify this bug using qemu-kvm-1.5.3-19.el7.x86_64.

qemu-kvm and kernel version of host:
qemu-kvm-1.5.3-19.el7.x86_64
kernel-3.10.0-55.el7.x86_64

Step1 get all devices marked "no-user"
# /usr/libexec/qemu-kvm -nodefaults -S -display none -monitor stdio
(qemu) info qdm

We can get 41 devices marked "no-user" as following:
"icc-bridge", "ICH9 LPC", "q35-pcihost", "exynos4210-ehci-usb", "xlnx,ps7-usb", "isa-fdc", "piix3-ide", "piix3-ide-xen", "piix4-ide", "SUNW,fdtwo", "sysbus-ahci", "sysbus-fdc", "ccid-card-emulated", "pci-serial-2x", "pci-serial-4x", "isa-cirrus-vga", "isa-pcspk", "apic", "fw_cfg", "i440FX", "i440FX-pcihost", "i8042", "ICH9 SMB","ioapic", "isa-i8259", "isa-pit", "isabus-bridge", "kvm-apic", "kvm-i8259", "kvm-ioapic", "kvm-pit", "kvmclock", "kvmvapic", "mc146818rtc", "PIIX3", "PIIX3-xen", "PIIX4_PM", "port92", "vmmouse", "vmport", "x86_64-cpu"

Step2 run "qemu-kvm -nodefaults -S -display none -monitor stdio -device X", X is each device of above 41 devices. The results are same as "Expected results:" in Comment 8:
"-device X" is rejected with message "Parameter 'driver' expects device type"

Based on the result of step2, I think this bug is fixed.

Comment 12 Ludek Smid 2014-06-13 10:54:24 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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