Bug 980782

Summary: kernel_irqchip defaults to off instead of on without -machine
Product: Red Hat Enterprise Linux 7 Reporter: Markus Armbruster <armbru>
Component: qemu-kvmAssignee: Markus Armbruster <armbru>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, huding, juzhang, knoel, lersek, michen, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:53:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Markus Armbruster 2013-07-03 08:41:36 UTC
Description of problem:
Logic error in kvm_irqchip_create(): it defaults machine option
kernel_irqchip to off when no machine options exist, but to on when
any machine options exist.

How reproducible:
Always

Steps to Reproduce:
1. Run qemu-kvm -nodefaults -display none -monitor stdio
2. Monitor command info qtree
3. Run qemu-kvm -nodefaults -display none -monitor stdio -machine ""
4. Monitor command info qtree
5. Run qemu-kvm -nodefaults -display none -monitor stdio -machine "kernel_irqchip=off"
6. Monitor command info qtree


Actual results:
Step 2+6 show 'dev: apic, id ""'.
Step 4 shows 'dev: kvm-apic, id ""'.

Expected results:
Step 6 show 'dev: apic, id ""'.
Step 2+4 show 'dev: kvm-apic, id ""'.

Additional info:
In step 3., any other way to create a machine option without disabling
KVM or setting its kernel_irqchip works, including -usb, -kernel, ...

Bug exists upstream, but can't bite there, because KVM is disabled by
default, and you can't enable it without creating machine options.

Comment 2 Markus Armbruster 2013-07-11 06:36:54 UTC
Fixed upstream in 96bc97e^..c1b71b0.

Comment 3 Markus Armbruster 2013-08-06 13:14:02 UTC
RHEL-6 code is different, and doesn't have the logic error described above.  It does have the crash bugs fixed upstream 96bc97e and 6d4cd40.  Not sure they're worth fixing, as the only known reproducers are rather silly command lines.

Comment 4 Miroslav Rezanina 2013-08-29 11:16:23 UTC
Fix included in qemu-kvm-1.5.3-2.el7

Comment 6 huiqingding 2014-01-22 05:23:54 UTC
Reproduce this issue using the following version:
qemu-kvm-1.5.2-4.el7.x86_64
kernel-3.10.0-67.el7.x86_64

Steps to Reproduce:
1. Run qemu-kvm -nodefaults -display none -monitor stdio
2. Monitor command info qtree
3. Run qemu-kvm -nodefaults -display none -monitor stdio -machine ""
4. Monitor command info qtree
5. Run qemu-kvm -nodefaults -display none -monitor stdio -machine "kernel_irqchip=off"
6. Monitor command info qtree


Actual results:
Step2 and step6 show 'dev: apic, id ""'.
Step4 shows 'dev: kvm-apic, id ""'.

Verify this issue using the following version:
qemu-kvm-1.5.3-38.el7.x86_64
kernel-3.10.0-67.el7.x86_64

Steps to Verification:
1. Run qemu-kvm -nodefaults -display none -monitor stdio
2. Monitor command info qtree
3. Run qemu-kvm -nodefaults -display none -monitor stdio -machine ""
4. Monitor command info qtree
5. Run qemu-kvm -nodefaults -display none -monitor stdio -machine "kernel_irqchip=off"
6. Monitor command info qtree

Actual results:
Step 6 show 'dev: apic, id ""'.
Step 2 and Step 4 show 'dev: kvm-apic, id ""'.

Based on the above results, I think this bug has been fixed.

Comment 8 Ludek Smid 2014-06-13 10:53:40 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.