Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1113115ybi; Thu, 30 May 2019 11:47:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDfnr6qJwpb2LVgNz6d7hALaLUiublQk/D/kPlYd5DXlm7bnZW+t2u/I6wBAMatC8UAUZW X-Received: by 2002:a63:e250:: with SMTP id y16mr4872123pgj.392.1559242051768; Thu, 30 May 2019 11:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559242051; cv=none; d=google.com; s=arc-20160816; b=wzlXZ+TqkYejWrO2A7rVD7W5x6J9vDMBFXOmg22joHndXy/7ZeVzZ2cbnhkns5AWkw VkdKaYmLUHStyrNAq8pO1K6PHKPYRrdkoucT+7m4mv81VzSw0cxT+lK5b8AenPvdgsqe X5p7Bq44+e/LZNnA8hkQzbBYKot69VZ6s22HXARbaDYbf/mtu+jMr8Zg0fh7VIcDVQQA vem1/Trpy691WTEGI1KTrBdy63Yh0N/AZXUDNgZOoLqJGrrxzl0rsbqv2mJMO6+Vip44 hNqFXTFvFtlhuR5Eq9WAF1+R7X4GOX+kqPpokpl/RZ8+bhi1WbWrIE+tOudlJSE6V22w bsHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9HMVYJXjl3GAbymt4poFCL0xthxaMt67Glq15rtTuJU=; b=Ocv65JzwIHRAb7BW4btHfkalSg+mMXlmtALM0G+GlpeSepNbOZqryNOCd0rY4jDKPj mBDWo0yM3jiMjLbtDIiGQraksOGf6BDjmHgG4shGe6wDLEn9pGAcy7fGamOZLER1/Pji xbebqUwsP29/+bAWeePoHbVjGQQEP+/L4mgc+4vnEZd+WlB97T0jlu7aWLYzSvxBSYri KQQOE3Pq0l6spxaXl4EsUMzpZxEFRP/p5bTvD01Pmj6Tcn+KwhA61LS1Ye4Py+CIrEk+ tPYUkRP3YgnNPKC4jyioDuKfk0YjNDQmoJRI2zDCIl7jMMIk7jsPMJGSAK/Uao+Y5LV9 vHOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z33si3657471pgk.516.2019.05.30.11.47.15; Thu, 30 May 2019 11:47:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbfE3SqD (ORCPT + 99 others); Thu, 30 May 2019 14:46:03 -0400 Received: from mga12.intel.com ([192.55.52.136]:20607 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbfE3SqD (ORCPT ); Thu, 30 May 2019 14:46:03 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2019 11:46:02 -0700 X-ExtLoop1: 1 Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.36]) by orsmga001.jf.intel.com with ESMTP; 30 May 2019 11:46:02 -0700 Date: Thu, 30 May 2019 11:46:02 -0700 From: Sean Christopherson To: Luwei Kang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org Subject: Re: [PATCH] KVM: LAPIC: Do not mask the local interrupts when LAPIC is sw disabled Message-ID: <20190530184602.GD23930@linux.intel.com> References: <1558435455-233679-1-git-send-email-luwei.kang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558435455-233679-1-git-send-email-luwei.kang@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 21, 2019 at 06:44:15PM +0800, Luwei Kang wrote: > The current code will mask all the local interrupts in the local > vector table when the LAPIC is disabled by SVR (Spurious-Interrupt > Vector Register) "APIC Software Enable/Disable" flag (bit8). > This may block local interrupt be delivered to target vCPU > even if LAPIC is enabled by set SVR (bit8 == 1) after. The current code aligns with the SDM, which states: Local APIC State After It Has Been Software Disabled When the APIC software enable/disable flag in the spurious interrupt vector register has been explicitly cleared (as opposed to being cleared during a power up or reset), the local APIC is temporarily disabled. The operation and response of a local APIC while in this software- disabled state is as follows: - The mask bits for all the LVT entries are set. Attempts to reset these bits will be ignored.