From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 4/6] KVM: x86: Fix determining flat mode in recalculate_apic_map Date: Wed, 1 Oct 2014 22:58:01 +0200 Message-ID: <20141001205801.GF12085@potion.brq.redhat.com> References: <1412099359-5316-1-git-send-email-namit@cs.technion.ac.il> <1412099359-5316-5-git-send-email-namit@cs.technion.ac.il> <20141001160442.GD12085@potion.brq.redhat.com> <20141001182715.GD12083@potion.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Nadav Amit , pbonzini@redhat.com, kvm@vger.kernel.org To: Nadav Amit Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60277 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751208AbaJAU6J (ORCPT ); Wed, 1 Oct 2014 16:58:09 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 2014-10-01 22:16+0300, Nadav Amit: > On Oct 1, 2014, at 9:27 PM, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > > Our assumption that all have the same mode is horrible. > > (Do they all have be the same?) > Yes: "All processors that have their APIC software enabled (using the= spurious vector enable/disable bit) must have their DFRs (Destination = =46ormat Registers) programmed identically." Thanks. > > The only thing we allow out of your scenario that I can see is soft= ware > > disabled x2apic after enabled clustered xapic processors and that > > doesn't need two loops, just a sw check at x2apic. > > Practically, it is a harmless bug :) > So does xsa-108... ;-) > Now seriously: First, the bug may affect certain cases of cpu hot-plu= g, etc. > Second, there are additional implications. Consider a situation in wh= ich the first VCPUs have lapic disabled, and they do not have the same = DFR/x2apic mode as the rest of the VCPUs. (I coudn't find anything that would affect the host.) > This is ok according to the SDM, but in such case, the logical map th= ey would have would not match the spic-mode. Therefore, they may not re= ceive NMIs, INIT, etc. - which they should regardless to the fact their= LAPIC is disabled. The guest wouldn't work, more suprising is that it usually does ;) I'll rewrite it later if you are pressed for other stuff.