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=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 E4C18C433E0 for ; Mon, 4 Jan 2021 19:34:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7FE4220784 for ; Mon, 4 Jan 2021 19:34:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FE4220784 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p4ctq+U5TBAIA9ZTpBIjnzR5KiQaYggfRoPNN3KISXs=; b=xMvxUBcGU/6vBW+FkDH3JEji/ DRQ0x+mYWfJRSdK2MJ1Siii6MPKWH1ArckCK+Jcp/3kvva5RH3vrRfRNh0NonsqD8YJ10uDsMYkms JH//hNQJQtehoBKOQChK9Yb0MFeimBFWRfEnHNBahfrMVCn4Wj9I9GMt1XMsqloAvU3B8pBTHEiI5 IbM4Dwc7mp+gT9X295kyc8SgJpbumekbHf6mh6a2aPtqXFes9jL1uGx+d02c9grJcHIsYt7249JLZ w1Nt34cVtTUFeV8zp91qTxB6MIyAJBSPWOzb5uRHg5r/p+o30yl1tnGnUm6Xj9FmdB5Xe8jctHdLr 7+t8+5Skg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwVaw-0003Nj-Vh; Mon, 04 Jan 2021 19:32:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwVau-0003N7-Q5 for linux-arm-kernel@lists.infradead.org; Mon, 04 Jan 2021 19:32:45 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3AB9720784; Mon, 4 Jan 2021 19:32:43 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kwVar-005IJG-4e; Mon, 04 Jan 2021 19:32:41 +0000 MIME-Version: 1.0 Date: Mon, 04 Jan 2021 19:32:41 +0000 From: Marc Zyngier To: Qian Cai Subject: Re: [PATCH] KVM: arm64: Don't access PMCR_EL0 when no PMU is available In-Reply-To: <22cd2b3e8b8b278f110a3540755583efee7189fd.camel@redhat.com> References: <20201210083059.1277162-1-maz@kernel.org> <703e1b5f2db1631e8f9c55619909fe66eb069f25.camel@redhat.com> <579c839a0016107af66e704f147f9814@kernel.org> <22cd2b3e8b8b278f110a3540755583efee7189fd.camel@redhat.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <81607700b5de4860a6f281c68ee17669@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: qcai@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, sfr@canb.auug.org.au, linux-next@vger.kernel.org, alexandru.elisei@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210104_143244_961070_D3194ACD X-CRM114-Status: GOOD ( 14.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , Alexandru Elisei , Linux Next Mailing List , kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-01-04 18:42, Qian Cai wrote: > On Mon, 2021-01-04 at 18:26 +0000, Marc Zyngier wrote: >> What I'm suggesting is this [1], which is to get rid of KVM_ARM_PMU >> completely. At least, the kernel configuration will be consistent. >> > > Do you have a patch for CONFIG_KVM to select HW_PERF_EVENTS then? I > could cook > one if not. I don't think there should be such a patch. People do disable HW_PERF_EVENTS in production in some cases, and we should honor that. All I am trying to guarantee at the moment is that the KVM configuration is consistent, as I believe that's what broke in your particular case. What needs doing is to hide the PMU registers from userspace when no PMU is configured, or even available. I'll try and post something to that effect tomorrow (hey, I'm still officially on holiday...). M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel