Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp66875pxb; Mon, 1 Feb 2021 22:34:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwd7oMMPtMg6HZkJC+t8pbneOPgHvTpUH4pd/+QoCxJfZ08NS4XVIzjophkjVs7P+js1k+7 X-Received: by 2002:a05:6402:3510:: with SMTP id b16mr21930403edd.242.1612247657124; Mon, 01 Feb 2021 22:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612247657; cv=none; d=google.com; s=arc-20160816; b=xMamRJGnU+2+DsnIJxDfY5Dy//t1Ch0rOVwHpSYyyNnxme9LU6a3RpEOtTdezVo7qN GZOWUNYcXrT+1nYxDTu2yi0e0HGT6M/oeAw9zdB3JDj9khRAFLIroL9GpZC5gWreKSdr eMtFKjBDDuqtdDJv+lUgnkLtGp67PwZOpGm3BOCJntVWXN3swTMXz6T7kTzC/F09KcKM JsW+9+FlwKmptIB9CwCRvO3hpWdPzwGMbiBdq9NLJ82s1/X5QpTaPBYni9oiYWbq2HMf Yo/VCTpQz09YW1NaP/jWEFQJzw896UwO+pMYaFW2QtDO68m74MNN7lFUZ4jlE5+lYaQD AomQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=jnfY2AJON3PJ/CozmGyas+xllP+DMXWHR+8jBJfXNQU=; b=O3zsx/hsqtpeH5H0S1nsK36NHimJhCgbGQuVlw70AmYXGRz2i2twq5M+El78o3NWwG CwuWk5uk1HY69J3ENbxzStdyC5MgYh8V0JD9hpP6+ZK0rJe6C14rf3qHuMOkeSLIalBp fOLULczYh42XD7+oRcwfK5vx7cgLK0P6+HZbKnrno1ZeSdMTlFa4/xeHsfHYnAVWXkbQ lD0ZUYXTq9onUZScRYioiP7T47YDsEzESkLMG5kvrYI9UHYhAGIsfUcpLOhSCCp7E5zh ja6F2M8exn1OBMQSisqQeIywO8z3PAMvMOgyCcTsqdMVOnFxBOhSmZmnu+SfRCXvN5M+ Kc8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id j12si11241626ejt.34.2021.02.01.22.33.51; Mon, 01 Feb 2021 22:34:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232142AbhBBGcH (ORCPT + 99 others); Tue, 2 Feb 2021 01:32:07 -0500 Received: from mga03.intel.com ([134.134.136.65]:13447 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbhBBGcF (ORCPT ); Tue, 2 Feb 2021 01:32:05 -0500 IronPort-SDR: CCs6/JuOJrw1cDAfJV0nTTLqAzF1beYT+iWVG0TDzFw5MJOCCf1xrznMxu2WVaqcdVZ41hqpxO hXsGh3j06daQ== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="180881759" X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="180881759" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 22:31:22 -0800 IronPort-SDR: 8FniOqrO9Ivctu1xSYW+UdZ43i4NKweCiSiHG/IBLoH1S/pWXtf0qgBaD4enTrobJ/TDM5JFrh CLfR5ltdoGtA== X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="370379554" Received: from likexu-mobl1.ccr.corp.intel.com (HELO [10.238.4.93]) ([10.238.4.93]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 22:31:18 -0800 Subject: Re: [PATCH v3 04/17] perf: x86/ds: Handle guest PEBS overflow PMI and inject it to guest To: Peter Zijlstra Cc: Kan Liang , Paolo Bonzini , eranian@google.com, kvm@vger.kernel.org, Ingo Molnar , Sean Christopherson , Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Andi Kleen , wei.w.wang@intel.com, luwei.kang@intel.com, linux-kernel@vger.kernel.org, Like Xu References: <20210104131542.495413-1-like.xu@linux.intel.com> <20210104131542.495413-5-like.xu@linux.intel.com> <9c343e40-bbdf-8af0-3307-5274070ee3d2@intel.com> <2c197d5a-09a8-968c-a942-c95d18983c9d@intel.com> From: "Xu, Like" Message-ID: <22b30bc7-84d2-b251-e558-1d8095c76187@intel.com> Date: Tue, 2 Feb 2021 14:31:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/1/25 19:47, Peter Zijlstra wrote: > On Mon, Jan 25, 2021 at 04:26:22PM +0800, Like Xu wrote: > >> In the host and guest PEBS both enabled case, >> we'll get a crazy dmesg *bombing* about spurious PMI warning >> if we pass the host PEBS PMI "harmlessly" to the guest: >> >> [11261.502536] Uhhuh. NMI received for unknown reason 2c on CPU 36. >> [11261.502539] Do you have a strange power saving mode enabled? >> [11261.502541] Dazed and confused, but trying to continue > How? AFAICT handle_pmi_common() will increment handled when > GLOBAL_STATUS_BUFFER_OVF_BIT is set, irrespective of DS containing > data. Thanks for this comment, and it's enlightening. For the case that both host and guest PEBS are enabled, the host PEBS PMI will be injected into the guest only when GLOBAL_STATUS_BUFFER_OVF_BIT is not set in the guest global_status. >