From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnBF7-0000Ll-6g for qemu-devel@nongnu.org; Thu, 22 Sep 2016 17:09:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnBF1-0000Sg-4u for qemu-devel@nongnu.org; Thu, 22 Sep 2016 17:09:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnBCz-0007MZ-7G for qemu-devel@nongnu.org; Thu, 22 Sep 2016 17:09:11 -0400 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Date: Thu, 22 Sep 2016 23:04:27 +0200 Message-Id: <20160922210432.18680-1-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 0/5] intel_iommu: fix EIM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Xu , Igor Mammedov , Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" intel_iommu exposed EIM (extended interrupt mode) feature, which in turn made the guest think that using x2APIC is a good idea. It was not: QEMU clamped all addresses to 8 bits (effectively allowing only APIC IDs below 8 in cluster mode) and 0xff was also interpreted as x2APIC broadcast even in physical mode. This series forbids EIM unless KVM is configured to use full 32 bit addresses and doesn't have the broadcast quirk. On top of this, it would be great if we had a mechanism that enabled EIM whenever it can be used -- it is disabled by default now. Peter Xu (1): intel_iommu: add "eim" property Radim Kr=C4=8Dm=C3=A1=C5=99 (4): apic: add global apic_get_class() apic: add send_msi() to APICCommonClass intel_iommu: pass whole remapped addresses to apic intel_iommu: do not allow EIM without KVM support hw/i386/intel_iommu.c | 41 +++++++++++++++++++++++++++++------= ------ hw/i386/kvm/apic.c | 19 +++++++++++++------ hw/i386/xen/xen_apic.c | 6 ++++++ hw/intc/apic.c | 6 ++++++ hw/intc/apic_common.c | 14 ++++++++++++++ include/hw/i386/apic_internal.h | 7 +++++++ include/hw/i386/intel_iommu.h | 1 + target-i386/kvm-stub.c | 5 +++++ target-i386/kvm.c | 13 +++++++++++++ target-i386/kvm_i386.h | 1 + 10 files changed, 95 insertions(+), 18 deletions(-) --=20 2.10.0