Hide Forgot
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.
Possibly useful for fixing bug 1001076, bug 1001088, bug 1001113, bug 1001180.
And for fixing bug 1001222.
The "libvirt needs to be able to detect no-user" (last paragraph in comment#0) split off into bug 1025958.
Fix included in qemu-kvm-1.5.3-15.el7
*** Bug 1001222 has been marked as a duplicate of this bug. ***
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.
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.
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.
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.