From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnA7y-0008EP-HU for qemu-devel@nongnu.org; Thu, 22 Sep 2016 15:57:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnA7t-00034F-Hv for qemu-devel@nongnu.org; Thu, 22 Sep 2016 15:57:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnA7t-00033K-Am for qemu-devel@nongnu.org; Thu, 22 Sep 2016 15:57:45 -0400 Date: Thu, 22 Sep 2016 21:57:39 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20160922195739.GA25077@potion> References: <1474548655-157373-1-git-send-email-imammedo@redhat.com> <1474548655-157373-11-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Paolo Bonzini Cc: Igor Mammedov , 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 2016-09-22 16:36+0200, Paolo Bonzini: > On 22/09/2016 14:50, Igor Mammedov wrote: >> +#ifdef KVM_CAP_X2APIC_API >> + if (kvm_check_extension(s, KVM_CAP_X2APIC_API)) { >> + has_x2apic_ids = !kvm_vm_enable_cap(s, KVM_CAP_X2APIC_API, 0, >> + KVM_X2APIC_API_USE_32BIT_IDS); >> + } >> +#endif >> + > > Radim, whose patches are going to set > KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK? 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.) We'd better forbid APIC IDs above 255 without "intel_iommu,eim=on", so reusing kvm_enable_x2apic() and enabling both in Igor's patches would be just a bit nicer. 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 ...