From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBE1FC433E0 for ; Fri, 15 Jan 2021 14:46:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABAB023359 for ; Fri, 15 Jan 2021 14:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732023AbhAOOpr (ORCPT ); Fri, 15 Jan 2021 09:45:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729056AbhAOOpq (ORCPT ); Fri, 15 Jan 2021 09:45:46 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E11DC0613C1; Fri, 15 Jan 2021 06:45:06 -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=HAt7yi8Bk1IOhi77FGzsXARD2yxrPISnLfMrCWR3Idw=; b=MpDbTwohxLvh/kyNgOG1M+x/LJ Ef3ZQ+n5b+cpH09Z41tFCdpjWg4bjR8kXmQWV1hv7rMImabhl6xDSl2guNqm7s8K83DU+z+laeLWP J6ubnIiaXhDGc4cishgMyEsrNBmuuOfwcnlwkyJq4CbASShypUHGiPnqznEylW1jZKbpefskw0hqt rjCapFt2v1fbhsDpMH8WVAGTgFIeFxCctuuXFK8/o9mwsABzjh1kmuXq50QEWgUEuSll6D1mGOSZs 8AziIHvCvPqs/E+wyI6g0kAltcjUwMqgGqP9CvOutfoeo0UL11Rf7nN0ZlEiwozJ8BTbfs8XhjXEQ 0xlUG3dw==; 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 1l0QLE-000884-JS; Fri, 15 Jan 2021 14:44:44 +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 62FFD301324; Fri, 15 Jan 2021 15:44:40 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4F59E20B5D691; Fri, 15 Jan 2021 15:44:40 +0100 (CET) Date: Fri, 15 Jan 2021 15:44:40 +0100 From: Peter Zijlstra To: "Xu, Like" Cc: Like Xu , 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 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: <2c197d5a-09a8-968c-a942-c95d18983c9d@intel.com> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Jan 15, 2021 at 10:30:13PM +0800, Xu, Like wrote: > > Are you sure? Spurious NMI/PMIs are known to happen anyway. We have far > > too much code to deal with them. > > https://lore.kernel.org/lkml/20170628130748.GI5981@leverpostej/T/ > > In the rr workload, the commit change "the PMI interrupts in skid region > should be dropped" > is reverted since some users complain that: > > > It seems to me that it might be reasonable to ignore the interrupt if > > the purpose of the interrupt is to trigger sampling of the CPUs > > register state. But if the interrupt will trigger some other > > operation, such as a signal on an fd, then there's no reason to drop > > it. > > I assume that if the PMI drop is unacceptable, either will spurious PMI > injection. > > I'm pretty open if you insist that we really need to do this for guest PEBS > enabling. That was an entirely different issue. We were dropping events on the floor because they'd passed priv boundaries. So there was an actual event, and we made it go away. What we're talking about here is raising an PMI with BUFFER_OVF set, even if the DS is empty. That should really be harmless. We'll take the PMI, find there's nothing there, and do nothing.