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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5129BCDB474 for ; Tue, 17 Oct 2023 05:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UD30NADdNBh5iewe+OzmQdEZyKsPF2rY8XT2Izrvtdg=; b=rQVtzf0BnBCctP ffT9g4Z3h7VExGeEG8vqTLQB5o30edRg/L6WyAsljwbdm8gWEhSjSB6Tu+fisMtoe+rbDsf0tBDVy fd+HbwCjbUVCp3WA7qBUy/DkX+XyAfqKQ5gP1DgHNCIZlWJ62SsWLqTuD7RcheIhikV5iKlNFTX9p 8LO4lQ13cmrl1UuqKzSur1WVytuIC3nofZSKepCNgXtWj2uiegqfKd7eZOk5mVl/6vbP1CmR3dh/z qPg2xcLB3Vfwj7sY5V8eJ/aK7ySW2W/7Jeg4FTDX+lscHO1TmOzMng7FH87hCa9ZVVMcc2LG3uoh+ SV/jDH0BLYOZhpzf8G2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsd3C-00BKjj-07; Tue, 17 Oct 2023 05:55:30 +0000 Received: from out-200.mta1.migadu.com ([2001:41d0:203:375::c8]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsd39-00BKih-11 for linux-arm-kernel@lists.infradead.org; Tue, 17 Oct 2023 05:55:28 +0000 Date: Tue, 17 Oct 2023 05:55:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1697522119; 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=PDw0gF01ql4reoKKcsChe+eJJjJlQChkycqYZXo087I=; b=CpzQZCPjIgSyy+TVXsiZSJsljM+rypsTxolK50cQs8vm+k+ybPDlpClfb7BT2iAujvoHed MBbHByMOp1dlPjF7/HOTbHrGb7hqfxuFjnIXVqzTeRx/KERpa7yQxgFbtLfEEvIV6eu0ch 4fh5JVCsa8Eo9h1i/BNSxRDHPv+OTVg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Raghavendra Rao Ananta Cc: Sebastian Ott , Marc Zyngier , Alexandru Elisei , James Morse , Suzuki K Poulose , Paolo Bonzini , Zenghui Yu , Shaoqin Huang , Jing Zhang , Reiji Watanabe , Colton Lewis , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v7 07/12] KVM: arm64: PMU: Set PMCR_EL0.N for vCPU based on the associated PMU Message-ID: References: <20231009230858.3444834-1-rananta@google.com> <20231009230858.3444834-8-rananta@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231016_225527_505323_156A3E07 X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 17, 2023 at 05:52:24AM +0000, Oliver Upton wrote: > On Mon, Oct 16, 2023 at 02:35:52PM -0700, Raghavendra Rao Ananta wrote: > > [...] > > > > What's the point of doing this in the first place? The implementation of > > > kvm_vcpu_read_pmcr() is populating PMCR_EL0.N using the VM-scoped value. > > > > > I guess originally the change replaced read_sysreg(pmcr_el0) with > > kvm_vcpu_read_pmcr(vcpu) to maintain consistency with others. > > But if you and Sebastian feel that it's an overkill and directly > > getting the value via vcpu->kvm->arch.pmcr_n is more readable, I'm > > happy to make the change. > > No, I'd rather you delete the line where PMCR_EL0.N altogether. ... where we set up ... > reset_pmcr() tries to initialize the field, but your > kvm_vcpu_read_pmcr() winds up replacing it with pmcr_n. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel