Received: from eggs.gnu.org ([2001:4830:134:3::10]:37837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwRox-0004lm-PV for qemu-devel@nongnu.org; Tue, 18 Oct 2016 06:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwRox-00087p-2P for qemu-devel@nongnu.org; Tue, 18 Oct 2016 06:40:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35798) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwRow-00087K-T9 for qemu-devel@nongnu.org; Tue, 18 Oct 2016 06:40:34 -0400 Date: Tue, 18 Oct 2016 08:40:32 -0200 From: Eduardo Habkost Message-ID: <20161018104032.GI3275@thinpad.lan.raisama.net> References: <1476352367-69400-1-git-send-email-imammedo@redhat.com> <1476352367-69400-10-git-send-email-imammedo@redhat.com> <20161017215112.GF3275@thinpad.lan.raisama.net> <20161018091748.3e1ba99d@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161018091748.3e1ba99d@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 09/13] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, kraxel@redhat.com, liuxiaojian6@huawei.com, mst@redhat.com, rkrcmar@redhat.com, peterx@redhat.com, kevin@koconnor.net, pbonzini@redhat.com, lersek@redhat.com, chao.gao@intel.com On Tue, Oct 18, 2016 at 09:17:48AM +0200, Igor Mammedov wrote: > On Mon, 17 Oct 2016 19:51:12 -0200 > Eduardo Habkost wrote: > > > On Thu, Oct 13, 2016 at 11:52:43AM +0200, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > > --- > > > v4: > > > - drop kvm_has_x2apic_api() and reuse kvm_enable_x2apic() instead > > > --- > > > hw/i386/kvm/apic.c | 12 ++++++++++-- > > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > > > diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c > > > index be55102..9a7dd03 100644 > > > --- a/hw/i386/kvm/apic.c > > > +++ b/hw/i386/kvm/apic.c > > > @@ -34,7 +34,11 @@ static void kvm_put_apic_state(APICCommonState *s, struct kvm_lapic_state *kapic > > > int i; > > > > > > memset(kapic, 0, sizeof(*kapic)); > > > - kvm_apic_set_reg(kapic, 0x2, s->id << 24); > > > + if (kvm_enable_x2apic() && s->apicbase & MSR_IA32_APICBASE_EXTD) { > > > > This is going to enable x2apic unconditionally (not just check if > > x2apic was enabled). Is this really what you want to do? > Fixed, > v4 is in reply to the same note from Radim Oops, didn't notice v4 was already there. Sorry for the noise. -- Eduardo