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=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 0AF4CC433DF for ; Tue, 7 Jul 2020 17:00:57 +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 CA59E20672 for ; Tue, 7 Jul 2020 17:00:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="P99gXr+x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA59E20672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LzLjGkt8kABpPYu7PCIvQWKmE4ad/lA8O/DQey2MppY=; b=P99gXr+xFokzWCAk85IFz3xH2 zCGHC7wLa6odeY2hvyTVjy4wE1n15dS7UAuCRwJP+VXjg+yyDnlDz9EIf7Q8ACWroLnB54douXZZN 6k4hWlvL7H19I6m0RcFQUs55V3E1A32n4Du5KNZSEwyae2neEMqP+84v5E6JssAQrC51l+WUFTuQ0 7q9jzhrfQl+BywFJwkmNK4jhAePEVFYVMERnUxufQlDvr6VoXQH2FYhuK9VJvdgsytcZPCP9KVqst zO0S/kApEVqahdE7fhTso1PPm9lLp7J3rM+35DAObgfSG1Zh/dmSA2lm6E8rq6gMUkjakSQdZXCuj C0DONyGxA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsqwX-00062G-MO; Tue, 07 Jul 2020 16:59:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsqwU-00061m-LD for linux-arm-kernel@lists.infradead.org; Tue, 07 Jul 2020 16:59:39 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5CC841FB; Tue, 7 Jul 2020 09:59:34 -0700 (PDT) Received: from [192.168.0.110] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 252CD3F68F; Tue, 7 Jul 2020 09:59:32 -0700 (PDT) Subject: Re: [PATCH v3 16/17] KVM: arm64: timers: Rename kvm_timer_sync_hwstate to kvm_timer_sync_user To: Marc Zyngier , Catalin Marinas , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org References: <20200706125425.1671020-1-maz@kernel.org> <20200706125425.1671020-17-maz@kernel.org> From: Alexandru Elisei Message-ID: <1f175416-5f2f-7e76-9a59-ce540d3823b9@arm.com> Date: Tue, 7 Jul 2020 18:00:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200706125425.1671020-17-maz@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200707_125938_788580_2FAB7420 X-CRM114-Status: GOOD ( 18.43 ) 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: Mark Rutland , kernel-team@android.com, Suzuki K Poulose , Andre Przywara , Christoffer Dall , Dave Martin , George Cherian , James Morse , Andrew Scull , "Zengtao \(B\)" , Will Deacon , Jintack Lim , Julien Thierry 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 Hi Marc, On 7/6/20 1:54 PM, Marc Zyngier wrote: > kvm_timer_sync_hwstate() has nothing to do with the timer HW state, > but more to do with the state of a userspace interrupt controller. > Change the suffix from _hwstate to_user, in keeping with the rest > of the code. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/arch_timer.c | 2 +- > arch/arm64/kvm/arm.c | 4 ++-- > include/kvm/arm_arch_timer.h | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c > index a1fe0ea3254e..33d85a504720 100644 > --- a/arch/arm64/kvm/arch_timer.c > +++ b/arch/arm64/kvm/arch_timer.c > @@ -615,7 +615,7 @@ static void unmask_vtimer_irq_user(struct kvm_vcpu *vcpu) > } > } > > -void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) > +void kvm_timer_sync_user(struct kvm_vcpu *vcpu) > { > struct arch_timer_cpu *timer = vcpu_timer(vcpu); > > diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c > index beb0e68cccaa..e52f2b2305b5 100644 > --- a/arch/arm64/kvm/arm.c > +++ b/arch/arm64/kvm/arm.c > @@ -723,7 +723,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) > isb(); /* Ensure work in x_flush_hwstate is committed */ > kvm_pmu_sync_hwstate(vcpu); > if (static_branch_unlikely(&userspace_irqchip_in_use)) > - kvm_timer_sync_hwstate(vcpu); > + kvm_timer_sync_user(vcpu); > kvm_vgic_sync_hwstate(vcpu); > local_irq_enable(); > preempt_enable(); > @@ -768,7 +768,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) > * timer virtual interrupt state. > */ > if (static_branch_unlikely(&userspace_irqchip_in_use)) > - kvm_timer_sync_hwstate(vcpu); > + kvm_timer_sync_user(vcpu); > > kvm_arch_vcpu_ctxsync_fp(vcpu); > > diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h > index d120e6c323e7..a821dd1df0cf 100644 > --- a/include/kvm/arm_arch_timer.h > +++ b/include/kvm/arm_arch_timer.h > @@ -71,7 +71,7 @@ int kvm_timer_hyp_init(bool); > int kvm_timer_enable(struct kvm_vcpu *vcpu); > int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu); > void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); > -void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); > +void kvm_timer_sync_user(struct kvm_vcpu *vcpu); > bool kvm_timer_should_notify_user(struct kvm_vcpu *vcpu); > void kvm_timer_update_run(struct kvm_vcpu *vcpu); > void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); This patch makes sense to me. All throughout arm64 KVM we use hwstate for hardware registers, for both the vgic and the pmu. On top of that, the function calls unmask_vtimer_irq_*user*() (emphasis added): Reviewed-by: Alexandru Elisei Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel