From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 7/9] KVM: x86: use proper format of APIC ID register Date: Wed, 25 May 2016 18:30:19 +0200 Message-ID: <20160525163018.GG14795@potion> References: <1462568045-31085-1-git-send-email-rkrcmar@redhat.com> <1462568045-31085-8-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, "Lan, Tianyu" , Igor Mammedov , Jan Kiszka , Peter Xu To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55263 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754945AbcEYQaX (ORCPT ); Wed, 25 May 2016 12:30:23 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 2016-05-17 17:34+0200, Paolo Bonzini: > On 06/05/2016 22:54, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >> We currently always shift APIC ID as if APIC was in xAPIC mode. >> x2APIC mode wants to use more bits and storing a hardware-compabible >> value is the the sanest option. VMX can stop intercepting the APIC = ID >> register then. >>=20 >> KVM API to set the lapic expects that bottom 8 bits of APIC ID are i= n >> top 8 bits of APIC_ID register. Definite that x2APIC IDs are byte >> swapped to keep compatibility without new toggles. >=20 > That's a bit too clever... Can we make KVM_CAP_MSI_X2APIC an > enable-able capability (and then better rename it KVM_CAP_X2APIC_ID), > and then all ids become 32 bit? This fixes the APIC ID issue here, a= nd > avoids introducing a new routing type in patch 5. >=20 > The cost is a little extra complexity in QEMU, but I think it's beara= ble. Will do, thanks.