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 18:04:43 +0200 Message-ID: <20141001160442.GD12085@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pbonzini@redhat.com, kvm@vger.kernel.org, nadav.amit@gmail.com To: Nadav Amit Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbaJAQEu (ORCPT ); Wed, 1 Oct 2014 12:04:50 -0400 Content-Disposition: inline In-Reply-To: <1412099359-5316-5-git-send-email-namit@cs.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: 2014-09-30 20:49+0300, Nadav Amit: > Determining flat mode according to cid_mask is wrong, since currently KVM > supports zero clusters in x2apic mode. Use ldr_bits instead. No, it is in else branch of 'if (apic_x2apic_mode(apic))', so it works as intended now, and ldr_bits == 8 is always true. > Since we recalculate the apic map whenever the DFR is changed, the bug appears > to have no effect, and perhaps the entire check can be removed. It could, for the check is just an optimization. (This whole code deserves a rewrite though ...)