Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3967403pxk; Tue, 29 Sep 2020 10:33:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVFr0twOAUHHS/ioATYjSewlzD73SiBQMX3fycl4PaYvf1xhQW+zI6Miq69zGD0vuIM5Yz X-Received: by 2002:a50:8d57:: with SMTP id t23mr4534137edt.308.1601400782949; Tue, 29 Sep 2020 10:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601400782; cv=none; d=google.com; s=arc-20160816; b=ZLfFRTel61um5xjXxLr1ZMIiD64xU3t9eb5qi+yHKhjk+kTVuhD6Nz4e5UR3xVMLE/ SQ7X1dM7aVy4QTelLf4brIARuzySzq5sjcQ3jKfYxTJaKi6pGaY9LUtAL7FvquaM3grc Ynp8J839ZCcYbVUPMSCwQ6qRxGW/hxbaHi2d82twALuOV7rQ1nHy37X9XFLi4LefSy8l m29C/UtjmuU6HfN2CnlY4eWFBOqcB67/4RgGzNkx/TNMdV9H8u9L1QeUePdNINgR7x3u 0GJH1/OpTvmNcjg6sAbY34yUXjxEs8SYJhu1SogsMft8KP4fUc6nLLNJ+nPBCsQr+pla JAXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=FQziKAEmDzBJEH7vQhEjvDPQV8uyebS5cGmBtx9CD2s=; b=i4UKYh0Byor/3G54XoMfnK/NcTZARJpFdC26UYc8fT1tW35++JsTFPzn2p2ITpPWWv GFwDA6BsHJRRqFPdjHSUDo0E3efOkHcfVnUjjhI4t3qGPzA4BpzlNR1z38xiD5Lyoi23 w/F8FRxk0KkPZoCU8pxIAiSsALkJGuO9+O2jBjwuSC9Sfkj94xJgCyIce9V8c9LanxsD pVV6+Vv/00ZWGIQ2PsOBn/kk+aSz1ZSMQXsktSHSIQaqryucFKMczkL7B7vIM0swtea8 VM60I55i7vRbWWfoOlYIPQ9GN5nz5T60/VX8aKEasGz2vwq/SQzrA55sZj5GIeWYMUTA XXCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BqjJ64HL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt17si3120136ejb.56.2020.09.29.10.32.39; Tue, 29 Sep 2020 10:33:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BqjJ64HL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729173AbgI2RbA (ORCPT + 99 others); Tue, 29 Sep 2020 13:31:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:48662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbgI2RbA (ORCPT ); Tue, 29 Sep 2020 13:31:00 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 1AB3B2076B; Tue, 29 Sep 2020 17:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601400659; bh=ZXt7Xlne8O4MeeCwfkNnfkAu3Jkzhnlfgn/f/Lyi+XQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BqjJ64HL0rL6kTbXLKtkhMwe+607jWI3ODEOSusQB4LnnZOZoy1o0wUnALLXNfigf XdKaidx2BNKgnijeVFxsXwptbciO2gzQKNkhSPtD13DrtbfxLd3QEQNSMXI6bH+lOR 5o/Y7OEfIlhv/C8yQRQobAcD3UkCvAmF/QeJGU2w= Date: Tue, 29 Sep 2020 18:30:53 +0100 From: Will Deacon To: David Brazdil Cc: kvmarm@lists.cs.columbia.edu, Catalin Marinas , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Dennis Zhou , Tejun Heo , Christoph Lameter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Andrew Scull Subject: Re: [PATCH v4 04/10] kvm: arm64: Remove __hyp_this_cpu_read Message-ID: <20200929173053.GB14317@willie-the-truck> References: <20200922204910.7265-1-dbrazdil@google.com> <20200922204910.7265-5-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922204910.7265-5-dbrazdil@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 22, 2020 at 09:49:04PM +0100, David Brazdil wrote: > this_cpu_ptr is meant for use in kernel proper because it selects between > TPIDR_EL1/2 based on nVHE/VHE. __hyp_this_cpu_ptr was used in hyp to always > select TPIDR_EL2. Unify all users behind this_cpu_ptr and friends by > selecting _EL2 register under __KVM_NVHE_HYPERVISOR__. VHE continues > selecting the register using alternatives. > > Under CONFIG_DEBUG_PREEMPT, the kernel helpers perform a preemption check > which is omitted by the hyp helpers. Preserve the behavior for nVHE by > overriding the corresponding macros under __KVM_NVHE_HYPERVISOR__. Extend > the checks into VHE hyp code. > > Acked-by: Andrew Scull > Signed-off-by: David Brazdil > --- > arch/arm64/include/asm/kvm_asm.h | 20 ---------------- > arch/arm64/include/asm/percpu.h | 28 +++++++++++++++++++++-- > arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 4 ++-- > arch/arm64/kvm/hyp/include/hyp/switch.h | 8 +++---- > arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- > arch/arm64/kvm/hyp/vhe/switch.c | 2 +- > arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 4 ++-- > 7 files changed, 36 insertions(+), 32 deletions(-) Looks good, thanks for the respin! Acked-by: Will Deacon Will