Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5387586rwb; Wed, 9 Aug 2023 03:30:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHo2wbX4NdUqA86WgWQjk3oKki2H/Aupxxnl3kESjp5MnpHH/YNM7UleBgrSIpqB1gXiFq X-Received: by 2002:a17:906:3f5b:b0:993:f90b:e549 with SMTP id f27-20020a1709063f5b00b00993f90be549mr1970384ejj.37.1691577017055; Wed, 09 Aug 2023 03:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691577017; cv=none; d=google.com; s=arc-20160816; b=PEU54dJxL6DH0Fm3tvPwyvaD6HXsSsZUOznYXD+kM855LoYd4JweTHLLPSKWCUbp1Q 2kFFKO/5Cwc2AFneOoJpeFuRbuAwD03AtJuxKiCnk/poFFEgC8KggsORLb4BMSKuyc6K MHMeHQlzxFx69r79vV5NiWgKJ15tKwyuohOEqa6uqgW+rDxmiZyC9NIZZMJbxzWTXpzm Ix223j8Ibnigpwk6NT/xGOvWU3XZpe/g8dVTdQxQdgwjU9bRsu05Pj6Cgayt7Sd7yXMP jibmTjOk/4fC6pWMXsIjAQvpo59OYGTKnQdusFroqlqFE3Fm9rNq+Z6qezNwM2Zh75sf lyoQ== 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:dkim-signature:date; bh=mvmzvKOGcM7VTd90ZNc4xMJrUWrhIk71OKZHdX1ecXM=; fh=GPiAbd3EIX3QQveYl6Y7EHA0cjXLSzud4Lbm7eifyYI=; b=e4B9TJUSYHkBQhd40nhLomutYqyReDn7aRp5xTzJvsBl65f1emog9r4+DC5VrzypWC vC7x5F+Bl8tzeinsjRiHtjaqX9EwFdnBH+B1DdcyOyNcDth7aFX5JJQX7mbykoHXu++g MqV7HA0JC8XqSSjNWlXjiJC66+HerS1+WBXmGQU5zUVbqGVOx2NlegHSx+6IhCOTE1YB JV5ovrakOrQhwsSY/JqwGtXKZwmuBz3+mQ0VbXLyXvZEDNPGnTDdxcfe6gaC+zOrwpaz oQA3BgjqScnGF+oQUbwMfyg+dkjOLcjBhnpDT2dgqvypvYuz7R5iXQsdCHCntPs/FOns BXcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=qrezTWI5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mj25-20020a170906af9900b0098889bf7f86si9043790ejb.315.2023.08.09.03.29.52; Wed, 09 Aug 2023 03:30:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=qrezTWI5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231869AbjHIJKn (ORCPT + 99 others); Wed, 9 Aug 2023 05:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbjHIJKm (ORCPT ); Wed, 9 Aug 2023 05:10:42 -0400 Received: from out-111.mta0.migadu.com (out-111.mta0.migadu.com [IPv6:2001:41d0:1004:224b::6f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF231FCD for ; Wed, 9 Aug 2023 02:10:41 -0700 (PDT) Date: Wed, 9 Aug 2023 09:10:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691572240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mvmzvKOGcM7VTd90ZNc4xMJrUWrhIk71OKZHdX1ecXM=; b=qrezTWI5AElJZqV9qQGcT9+Kg1Sv+qGaGp0ABG0ROC2hAq8H45AlVEdjXZmLHcWdvrAN3v UzgLZj9d3z52lNjfEviNP8FCivMcqGZikDTWDs5h5Ill5r0bZfDRxCFUdB+utjW4CZS/M9 zYb9t9t6JFETPi3apcQaXR40eklcy1Y= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: Huang Shijie , james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, pbonzini@redhat.com, peterz@infradead.org, ingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-perf-users@vger.kernel.org, patches@amperecomputing.com, zwang@amperecomputing.com Subject: Re: [PATCH] perf/core: fix the bug in the event multiplexing Message-ID: References: <20230809013953.7692-1-shijie@os.amperecomputing.com> <864jl8ha8y.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <864jl8ha8y.wl-maz@kernel.org> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 09, 2023 at 09:48:29AM +0100, Marc Zyngier wrote: [...] > Another question is how the same thing is handled on x86? Maybe they > don't suffer from this problem thanks to specific architectural > features, but it'd be good to find out, as this may guide the > implementation in a different way. I'm pretty sure the bug here is arm64 specific. x86 (at least on intel) fetches the guest PMU context from the perf driver w/ irqs disabled immediately before entering the guest (see atomic_switch_perf_msrs()). -- Thanks, Oliver