Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp191401pxk; Thu, 24 Sep 2020 03:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgwT1NK6GSpFAb6tZrKJSbkoQ2EzJy373XhT7AEgWptwhpj+OvMu538y+ASP1EzR7YIN96 X-Received: by 2002:aa7:d815:: with SMTP id v21mr255738edq.56.1600942496910; Thu, 24 Sep 2020 03:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600942496; cv=none; d=google.com; s=arc-20160816; b=TCtGr3WChcf3p650Ys6CuYfok62Too1FbZqa87RO1vA97wGG7JB7dEJ97ocnoTnpRE quXFGiESXdpUYkwdOdbFdxPV8iFtfJ8mJNuCnRynZhPxFuLdHZcCLkgQmOwp32Ygiatj UpFV0XGHAlUjR/LrLVxyUvqzMKOgHzwI8GZkFnhBZquX+AIZTL+82kxXFcaPJJ6WWwj6 pSTcA87ymp6q4TQoLOzL5CkVrnftryXHp+1OekW6H5hlFYr83EHlEVD1xIJuSKHZhqNI OM1OJY+2LJfG/1POdIGfYZi7ZXnDtRXdZ0QcYVz/waYWdNPcjLjJJWRv5CTbTKFJY8cO YsEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=P6yGSz2KuMOBkwJ5j9rMMORiR2tQY+XqaCXzoonlJQQ=; b=jlUtPXRIYXLOeggLwuicn11kNkYWenqwiXbUru6kiQ0MagUAfB5VcB7Hqq4WvwnOHo 15EpVoGDD3ShEPlvIN/h/On22Rz2z6ZYFOAKsOP/gUoSdioEUnvbETzJ8PN7yPkLKbk3 5CiFCi2T/mVKAVpLpwL09h34MO6d5mjiNGhuSjf41CJRsjy4UTGTBozLdcgbJyT24FzN 46Zfjz+KuLn3KBdsuneLv4Fofc99J8EPTVWNaO28qr8M0Fl9brPuIQpmAYPF0zVAw45j yH2m0f0Qig/XCzXNiGgFttDSg5aluQSmhkhDpv3cvqD6ZQ+peVN+19SdXA7dhJvT4wiy D4gw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc14si2146970ejb.379.2020.09.24.03.14.33; Thu, 24 Sep 2020 03:14:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727276AbgIXKKy (ORCPT + 99 others); Thu, 24 Sep 2020 06:10:54 -0400 Received: from gentwo.org ([3.19.106.255]:48690 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgIXKKx (ORCPT ); Thu, 24 Sep 2020 06:10:53 -0400 Received: by gentwo.org (Postfix, from userid 1002) id D7A6C3F1AE; Thu, 24 Sep 2020 10:10:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id D4FD23F1AA; Thu, 24 Sep 2020 10:10:52 +0000 (UTC) Date: Thu, 24 Sep 2020 10:10:52 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: David Brazdil cc: kvmarm@lists.cs.columbia.edu, Catalin Marinas , Will Deacon , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Dennis Zhou , Tejun Heo , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v4 00/10] Independent per-CPU data section for nVHE In-Reply-To: <20200922204910.7265-1-dbrazdil@google.com> Message-ID: References: <20200922204910.7265-1-dbrazdil@google.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Sep 2020, David Brazdil wrote: > Introduce '.hyp.data..percpu' as part of ongoing effort to make nVHE > hyp code self-contained and independent of the rest of the kernel. The percpu subsystems point is to enable the use of special hardware instructions that can perform address calculation and a memory operation in one interruptible instruction. This is in particular useful to avoid higher overhead for memory management related counters because preempt disable/enable etc can be avoided. ARM cannot do that and thus has a LC/SC loop. This is a patchset for ARM64 so its not clear to me what kind of advantage there would be against a simple implementation that does a regular fetch from a base address with an offset. > Main benefits: > * independent nVHE per-CPU data section that can be unmapped from host, > * more robust linking of nVHE hyp code, > * no need for hyp-specific macros to access per-CPU variables. Maybe simply don't use percpu variables for your arm code? Those pointers to data will be much more indepedent of the rest of the kernel and allow a much higher degree of being self-contained.