From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLYlL-0000Pp-Qa for qemu-devel@nongnu.org; Fri, 08 Jul 2016 12:36:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLYlI-0000JS-EZ for qemu-devel@nongnu.org; Fri, 08 Jul 2016 12:36:23 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLYlI-0000JC-7c for qemu-devel@nongnu.org; Fri, 08 Jul 2016 12:36:20 -0400 Received: by mail-wm0-x242.google.com with SMTP id w75so9043234wmd.1 for ; Fri, 08 Jul 2016 09:36:20 -0700 (PDT) Sender: Paolo Bonzini References: <1467706769-12505-1-git-send-email-peterx@redhat.com> <20160708160129.GA10792@potion> From: Paolo Bonzini Message-ID: <0fb824f1-b5c8-6dd9-f49b-981e3c9b6a22@redhat.com> Date: Fri, 8 Jul 2016 18:36:16 +0200 MIME-Version: 1.0 In-Reply-To: <20160708160129.GA10792@potion> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v11 00/28] IOMMU: Enable interrupt remapping for Intel IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Peter Xu Cc: ehabkost@redhat.com, mst@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org, alex.williamson@redhat.com, jan.kiszka@web.de, wexu@redhat.com, imammedo@redhat.com, marcel@redhat.com, davidkiarie4@gmail.com, rth@twiddle.net On 08/07/2016 18:01, Radim Krčmář wrote: > 2016-07-05 16:19+0800, Peter Xu: >> This is v11 of Intel IR work. It is rebased to mst's branch >> "tags/for_upstream", commit: >> >> "278a2a2 vmw_pvscsi: remove unnecessary internal msi state flag" >> >> This series mainly fixed several issues in v10 review comments, fixed >> one bug with RHEL guests, added acked-by for Paolo, and a fresh new >> rebase as mentioned above. >> >> To make it fast, I only did quick tests for this versiont. But at >> least it should cover basic functions like: IOAPIC, MSI, multiple >> vcpus, different guests (4.7 upstream and rhel 7.2), vhost, split/off >> irqchips. More tests to be done. >> >> Meanwhile, there are several pending issues to be solved, which is >> queued in my todo list and I'll continue the work after this series is >> merged. >> >> Online branch: >> >> https://github.com/xzpeter/qemu vtd-intr-v11 >> >> Please review, thanks. > > Testing found only one bug: > > The patchset doesn't work with if you have 16 APICs with IDs 0-15 and > then some more, because KVM has hacked x2APIC support that translates > logical interrupt with destination 0xff (first cluster of 16 VCPUs) into > a broadcast (also works with lowest-priority) and then picks VCPU > 16 > as the destination, leading to messages like > > do_IRQ: 17.209 No irq handler for vector > > The fun part is that this is how KVM wanted to behave, when it allowed > x2apic with unremapped ioapic. :( > KVM could either finally remove x2apic without IR or add a way in which > userspace could say whether an interrupt is x2APIC or not. > > QEMU cannot do anything to work around the bug, so I think it would be > best to disable EIM for now. What's the state of QEMU support for KVM_CAP_X2APIC_API? If it can make it for hard freeze, it's not a showstopper for Peter's patch. Thanks, Paolo