Bug 1370015

Summary: Disable x2apic by default when IR enabled with kernel_irqchip=split
Product: Red Hat Enterprise Linux 7 Reporter: Peter Xu <peterx>
Component: qemu-kvm-rhevAssignee: Peter Xu <peterx>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: chayang, hhuang, juzhang, knoel, pezhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-09 07:08:27 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:

Description Peter Xu 2016-08-25 04:17:43 UTC
Description of problem:

Now when IR enabled with kernel_irqchip=split, x2apic is enabled by default. This is not going to work in many cases since full x2apic support is still not there. So to make it clean, let's turn x2apic off by default.

Version-Release number of selected component (if applicable):

latest

How reproducible:

100%

Steps to Reproduce:

Boot qemu with: 

bin=x86_64-softmmu/qemu-system-x86_64
$bin -machine q35,kernel-irqchip=split \
     -smp 32 \
     -global ioapic.version=0x20 \
     -device intel-iommu,intremap=on \
     -enable-kvm -m 1024 -monitor stdio \
     /var/lib/libvirt/images/vm1.qcow2

Actual results:

Guest fails to boot, with errors in console like:

  do_IRQ: 17.145 No irq handler for vector

Expected results:

Guest boot successfully. Inside guest, we should see:

# journalctl -k | grep remap

  ... IRQ remapping in xapic mode

Comment 4 Peter Xu 2017-02-09 07:08:27 UTC
According to comment 3, the discussion result is that we don't need that for 7.3. While for 7.4, we'll rebase to 2.9, and QEMU will protect itself from booting when host KVM does not support x2apic, with commit:

commit fb506e701e9bafa3e0685747c1c98962c52d1962
Author: Radim Krčmář <rkrcmar>
Date:   Mon Oct 10 17:28:47 2016 +0200

    intel_iommu: reject broken EIM

So we are probably safe.

As a summary, I'll close this bug as NOTABUG now.