Received: from eggs.gnu.org ([2001:4830:134:3::10]:39853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boSVl-00023R-0H for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:47:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boSVj-0000iA-2A for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:47:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boSVi-0000h8-Rm for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:47:42 -0400 Date: Mon, 26 Sep 2016 11:47:38 +0200 From: Igor Mammedov Message-ID: <20160926114738.6643c10e@nial.brq.redhat.com> In-Reply-To: <20160922195739.GA25077@potion> References: <1474548655-157373-1-git-send-email-imammedo@redhat.com> <1474548655-157373-11-git-send-email-imammedo@redhat.com> <20160922195739.GA25077@potion> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?UTF-8?B?S3LEjW3DocWZ?= Cc: Paolo Bonzini , qemu-devel@nongnu.org, ehabkost@redhat.com, mst@redhat.com, kevin@koconnor.net, lersek@redhat.com, chao.gao@intel.com, peterx@redhat.com, liuxiaojian6@huawei.com On Thu, 22 Sep 2016 21:57:39 +0200 Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > 2016-09-22 16:36+0200, Paolo Bonzini: > > On 22/09/2016 14:50, Igor Mammedov wrote: =20 > >> +#ifdef KVM_CAP_X2APIC_API > >> + if (kvm_check_extension(s, KVM_CAP_X2APIC_API)) { > >> + has_x2apic_ids =3D !kvm_vm_enable_cap(s, KVM_CAP_X2APIC_API, = 0, > >> + KVM_X2APIC_API_USE_32BIT_= IDS); > >> + } > >> +#endif > >> + =20 > >=20 > > Radim, whose patches are going to set > > KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK? =20 >=20 > I added kvm_enable_x2apic() helper for intel_iommu that enables both, > because we really want to make sure that both are enabled before > allowing EIM. (And then I didn't post those patches ... ameding that > after a rebase and a quick retest.) I can include those patches along with this series =20 > We'd better forbid APIC IDs above 255 without "intel_iommu,eim=3Don", so > reusing kvm_enable_x2apic() and enabling both in Igor's patches would be > just a bit nicer. Is it possible on real hw to start system with APIC IDs above 255 but with EIM or even whole IOMMU disabled? Btw: Are EIM patches merged, current master says: -device intel-iommu,intremap=3Don,eim=3Don: Property '.eim' not found we can do eim check at pc_machine_done() time and as well check for correct(supported) IOMMU type /split/. Maybe it should be part of EIM patches. > Having separate KVM_X2APIC_API_USE_32BIT_IDS and > KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK isn't as useful as I thought it > would be ...