Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4142154pxb; Tue, 26 Jan 2021 13:33:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0wtwR9LPf3qMVVccOXHoVnpp8BsbU2/rYfxQt3pUFa5KAr9W3yB97dVUkCvhM/AYpAHr2 X-Received: by 2002:a17:906:a2da:: with SMTP id by26mr4732300ejb.531.1611696834579; Tue, 26 Jan 2021 13:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611696834; cv=none; d=google.com; s=arc-20160816; b=NEJn4VQN0RgqAt0EMkyb92fSNYkZMp8vP1V/GD2Zxzte0Th1wc1BobY8dTuo4QkVLL GDPrFQSfDjTJoNtz14N9YBXIL/TXinBRbF1C50kSRoWimvBdnUnytBNg+hfmPqzgJLIi dO2Os1RutY8Ua76wvhVbFRkkJeq95C8gaJXsHWqxCKD1Oip0O90edqoU/1FF79S/i5Vk oiBs0MRCQMXEOY8tXKZcWqGJ/CYNAs5ozGpVrKtjadeBYmy9L/708MsfOW5FT8PRdf5A Oy+p89FMUc64OROVfoLpJG8Ea2N99TJW0qx7gv3GOL5KsIhY+FWIfrXV9x3dtved1AqQ pd6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XQNE380mf8MyZPTbvq3CiyPi2sBRm44UXxzB0gfGkD8=; b=crNfjCsvh5qvA+L5OzZDmq/cpH+YQuHwOrkEt/x91z312k7spWF6RDrWwFv9qFutRB pfXv5KpwzyWQHixw7dKOGkTbrbUwBvgq7Ls6T3/lVkHt2zpdd6P+2dzJ9ifJ9590HcB9 ByilKIfunxHbQlgUCsZZ70vLv1mnCUZHVQkyIc0VPcsj/OLcokVMzynp6hBHlIOMDk7e XVNs2Aoyt+vPex/bcN46Rc8hchdxfdyCorwJSAF+FFLUpnx1CJf3m5NlmRgMRr8Prwkk 3HmLoj8974QLlwrbg+udXaUaHN5S9M0w7cPYPlISTHvR+CvDroosQBeE2ru5YiGBSub4 kSHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=PD6nPFC3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 25si7467875ejw.605.2021.01.26.13.33.29; Tue, 26 Jan 2021 13:33:54 -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; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=PD6nPFC3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388592AbhAZFv2 (ORCPT + 99 others); Tue, 26 Jan 2021 00:51:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727949AbhAYMVC (ORCPT ); Mon, 25 Jan 2021 07:21:02 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8FA5C0611BE; Mon, 25 Jan 2021 03:47:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XQNE380mf8MyZPTbvq3CiyPi2sBRm44UXxzB0gfGkD8=; b=PD6nPFC3TKsP3y4tBWF47SfUrg WemPXWK/Gk/CQp3LT7qeRWpKVbve3/xouiNU9MVX7yrGhwPO1GADoXiOX/WUPiHn2Qycd7cWDo2U6 mIkub09hhBk8n6BVJ7+buDgvZXZZ+nM9pvGDdAs6RozEPZYHrBMrFhQkwNeD6/somQuov6s8unJeW OmdwK5FP90gSvmP4xMPMqQlIdGKnAAIYWL8PZIhNubhFbtxB/zNC1ASbJWEgC3geIa/8JQdd3HN4n qQ8PcUwLsO1ez5AUricnaIeKq4nXgCxOP2HeMooUZ//Dm/KO9olK26kJ2v7R9iYYzR28Sf3BcJK7A +vWRvPKg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l40L8-0002jt-IO; Mon, 25 Jan 2021 11:47:26 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 728C0300DB4; Mon, 25 Jan 2021 12:47:24 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 04B902B0615EF; Mon, 25 Jan 2021 12:47:23 +0100 (CET) Date: Mon, 25 Jan 2021 12:47:23 +0100 From: Peter Zijlstra To: Like Xu 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, "Xu, Like" Subject: Re: [PATCH v3 04/17] perf: x86/ds: Handle guest PEBS overflow PMI and inject it to guest Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.