From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs Date: Mon, 10 Nov 2014 19:06:56 +0100 Message-ID: <20141110180656.GE20346@potion.brq.redhat.com> References: <1414922101-17626-1-git-send-email-namit@cs.technion.ac.il> <1414922101-17626-15-git-send-email-namit@cs.technion.ac.il> <545A1852.1000603@redhat.com> <5D182FD6-0365-4471-AD28-C587A624D151@gmail.com> <545B409E.1020500@redhat.com> <20141106164534.GA15407@potion.brq.redhat.com> <5460F74B.4040508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Nadav Amit , Nadav Amit , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54080 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbaKJSHI (ORCPT ); Mon, 10 Nov 2014 13:07:08 -0500 Content-Disposition: inline In-Reply-To: <5460F74B.4040508@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2014-11-10 18:35+0100, Paolo Bonzini: > On 06/11/2014 17:45, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > > - } else if (kvm_apic_hw_enabled(apic)) { > > + } else if (kvm_apic_get_reg(apic, APIC_LDR)) { > > if (kvm_apic_get_reg(apic, APIC_DFR) =3D=3D > > APIC_DFR_CLUSTER) { > > new->cid_shift =3D 4; >=20 > Why are you removing the kvm_apic_hw_enabled(apic)? We do not reset = the > APIC to the power-up values (the SDM says that "may" happen) when the > enabled bit is turned off in the APIC_BASE MSR. We checked for that before, in kvm_apic_present().