Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2950229rdg; Mon, 16 Oct 2023 22:56:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGztmF8F9msdiBvdeGIati72BwgpE+wScPKty+ROVBbSSXF2MdbS4EMoC8doDYf1Ih4b953 X-Received: by 2002:a17:90b:374b:b0:279:1367:b9a3 with SMTP id ne11-20020a17090b374b00b002791367b9a3mr1229361pjb.4.1697522173416; Mon, 16 Oct 2023 22:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697522173; cv=none; d=google.com; s=arc-20160816; b=KewSpwIWzEHLHTi07VXu+qVI4vmc6ROW8KF4SC7nmQXCCDVpIq/l4oGioLANhEgfNp x8rdvMbsRmZz++mpVmkcXdJvUAo+X+jADkAwyGYfUYQ6JyVjLSptWl+OBhRu59VPlB8w DRgiFBoZrYhEsLE2ky8NK3G48AjDVrlcEjkhu/7SDoKIvNfjn30jRKosA7UQN99qvZQf S9HeamyrzqmlaRndY8WhWdDXx4ubwsd+3reFdTKApzi8mVWqRKiwNtJ1gENtBWj2uotz K00T4mGjgtbcylb/T72Cp/vDzIR3xHU5QTw+gVHCy6loTlTTesf0xWaCx8nS1Gisa2ev R9Ng== 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=PDw0gF01ql4reoKKcsChe+eJJjJlQChkycqYZXo087I=; fh=w0flhQl7mctFcbI2b5EuDMWx0RWmm/SggScYTmVZk3E=; b=o7NL2SbZ/HEw2mpNSRS0lIpVolSbKqTBnc4eaRPrrbwzVwfLh2srlUVhuxsdHPRqP+ jKzbfMPeosuosyM3f/Fv00OMVNTQbztmpKxaSO7P+QEZHeJdiDF+gWq7xEW9OA5vY1bE ReIogp4oPhRiF3tVrbw2gUAjdFRQLA7hJLWFCEWPytQsSaz3o2405wT922oINr5e9zaW +Z9L5hfNB0kLnUXu5geN97wuEi1P8rDvyj97dMdPcc2KEmdvQrj2JaUzZzCvbvXWqi7o /gnSuYoaW9Ry03vmT2hjDBNojLDTfwhJGFFRdfwA2yTUdJoEvY8zoO9d+nL1iDciNZIC f+Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CpzQZCPj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id t19-20020a17090ad51300b00252d84b7af0si930744pju.181.2023.10.16.22.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 22:56:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CpzQZCPj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EABCA8073871; Mon, 16 Oct 2023 22:55:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234473AbjJQFzZ (ORCPT + 99 others); Tue, 17 Oct 2023 01:55:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234391AbjJQFzX (ORCPT ); Tue, 17 Oct 2023 01:55:23 -0400 Received: from out-205.mta1.migadu.com (out-205.mta1.migadu.com [IPv6:2001:41d0:203:375::cd]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 781BB9E for ; Mon, 16 Oct 2023 22:55:21 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 16 Oct 2023 22:55:41 -0700 (PDT) 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