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=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 B5C3BC433DB for ; Tue, 9 Feb 2021 12:24:19 +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 3C39064EB9 for ; Tue, 9 Feb 2021 12:24:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C39064EB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:References:Message-ID: Subject: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=YLT6qAbQk3PR6y5T0KhmzYtPD/cXsBBMCJvBvaj16Cc=; b=yULtEVb3+wpkSOZy5id7zRBVH IJoSk9c2gHcJPaQgabssovBGCPLTw51kr4fGor1f1r1NQoNna831GzbqfZ5ll5q8WQE8EGXf1p1B2 vcdoa0d/i3ArqC7/38/tdqD4Y/OGHiu6IP5Am/tZ5nmKAbhNtoUiHnAVfzTuEYdADo2pP9uYr8lmk 24DCwPqoqCcFhzGLQmjFtkC2KJS6196R6ZSEsNVzM0GVXQ4xZyvgkAz4ppnVlhQFOP72ZbK+/mssC nFlvbgRPf9J/Lyci7Rpv6258E3sOJNC+Te4F3biTDZ0lEPrhB3aoOqg14MZ2O8lSYske1YHEr6+yM X5WBVekcQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9S2z-0007Px-HK; Tue, 09 Feb 2021 12:23:13 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9S2x-0007PV-S2 for linux-arm-kernel@lists.infradead.org; Tue, 09 Feb 2021 12:23:12 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id CFB4664EB4; Tue, 9 Feb 2021 12:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612873390; bh=L+CvYP2l7yxFcu390LciJ5wzeQ4zlYr5y+5yTYVenYA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LDSUx5Wy/6WXXiafzKEK/f2JAMCSwNDd8U9cvhpFPM6vk0Mg9SCYWzpf41Fw00BNT NuiGBA6Fxs4ZBiRYT7xF28QYktSPLVTV0Qu9MxT9SFh35axTZGqekyQrTtRkIhOFPC 2N8+Re1ScL4ZFotJE4gNLw/5KZo5FqGXIG6S8nyCGVQFwe46xsZbi275T6tRngYX5o 635JJP4Nh2sRTaUfygmLKAzzXF3EPHnWdUjwgzQL/tGfUYXzpHENg6mtfhmzfYCnCz aElTv+gkpGxAPFlb6u8nxWqDH9daBoPGppZZbCziF4YVldt+9Eev+4UKyrY9o5VhAo jPRrXPoki0DnQ== Date: Tue, 9 Feb 2021 12:23:04 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [RFC PATCH v2 16/26] KVM: arm64: Prepare Hyp memory protection Message-ID: <20210209122303.GA27058@willie-the-truck> References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-17-qperret@google.com> <20210203143709.GA18907@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_072312_071768_C3232EAB X-CRM114-Status: GOOD ( 13.98 ) 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 , devicetree@vger.kernel.org, kernel-team@android.com, Suzuki K Poulose , android-kvm@google.com, Catalin Marinas , Fuad Tabba , linux-kernel@vger.kernel.org, Rob Herring , James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , David Brazdil , Frank Rowand , kvmarm@lists.cs.columbia.edu, 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 On Tue, Feb 09, 2021 at 10:00:29AM +0000, Quentin Perret wrote: > On Thursday 04 Feb 2021 at 10:47:08 (+0000), Quentin Perret wrote: > > On Wednesday 03 Feb 2021 at 14:37:10 (+0000), Will Deacon wrote: > > > > +static void handle___pkvm_init(struct kvm_cpu_context *host_ctxt) > > > > +{ > > > > + DECLARE_REG(phys_addr_t, phys, host_ctxt, 1); > > > > + DECLARE_REG(unsigned long, size, host_ctxt, 2); > > > > + DECLARE_REG(unsigned long, nr_cpus, host_ctxt, 3); > > > > + DECLARE_REG(unsigned long *, per_cpu_base, host_ctxt, 4); > > > > + > > > > + cpu_reg(host_ctxt, 1) = __pkvm_init(phys, size, nr_cpus, per_cpu_base); > > > > > > __pkvm_init() doesn't return, so I think this assignment back into host_ctxt > > > is confusing. > > > > Very good point, I'll get rid of this. > > Actually not, I think I'll leave it like that. __pkvm_init can return an > error, which is why I did this in the first place And it is useful for > debugging to have it propagated back to the host. Good point, but please add a comment! Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel