Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2331573pxu; Mon, 7 Dec 2020 04:01:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxjlF7cPu1SKVAL56/uB+/DDFEf/bClYNUdNviOKxqKVj+mY5fiJwu6JLbdSp3YFwfsUpf X-Received: by 2002:a17:906:17d1:: with SMTP id u17mr19074633eje.229.1607342515513; Mon, 07 Dec 2020 04:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607342515; cv=none; d=google.com; s=arc-20160816; b=0CCHg+8byrC8tlg5EWveySeSpZI6fwybBlWb9B+JTWZpR0KBM2IhcRdKL3gOhHT+7t 6TmNe4ESeAwP0yhEd2S1cRO5wCDWofrxgHT1tWGNwJGWYQDWfjGl+kRuSNsSRm2Elx7A IxOGu8zkw/tmEW4GEB0g9z2iZbNRnVv5zmcGoV/NuRSfIcVJSh8GpMlCBU/dqhlt50Un HbrQVWy8iyfCD2FWrMNDeVnCJkTK79BhfYGDJHQwCFGDxWuHGb+6C2s2ervSq1eM3xBj Ce5MuHfhiSZYv1Xl4z3YgCrmqWw11A6BLVm64PHiHKwYIiz1g6LvNasiJ2Hcd7yVbQdI p+aw== 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:date:dkim-signature; bh=QXhe9B9BJ7USSO3oeUBj7EmOBzDk/2v+2B7jxK6gtbg=; b=gsDeugbPs7G6cEu+UZH1x8JxsavU38ZfcMAEG2shdDrpPSnnluE8wrKgYzW6FHBqgO hRuS+igpJKZXrP8UQwMI4fElSwBigHk1Ix4kjTj89FATEOqzwPuAuNiODM6TJtJPN4QB BhQ3Ej16hu6qVQFXiLZdvIXPWgPtWXhwaQQ0xsJVjuC2GO4+vJazS9LkfeKOa/jtJRnv fEpjjZgt9/3s2JYL3WyR+em+UXpu92GLWcnkDW4ejK9aoSRQn86ABKgtBc4qnCzYT0tn b8++/yhtDcua7fT69TOPwBnpQxCml48xICqr5s22Y9vJi/3+IYugSfyxXbjqjb3r62HN BtWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=iG24RCKl; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si8012245edq.202.2020.12.07.04.01.31; Mon, 07 Dec 2020 04:01:55 -0800 (PST) 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=@google.com header.s=20161025 header.b=iG24RCKl; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbgLGL7D (ORCPT + 99 others); Mon, 7 Dec 2020 06:59:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727096AbgLGL7D (ORCPT ); Mon, 7 Dec 2020 06:59:03 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7592C0613D0 for ; Mon, 7 Dec 2020 03:58:16 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id w206so9408082wma.0 for ; Mon, 07 Dec 2020 03:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=QXhe9B9BJ7USSO3oeUBj7EmOBzDk/2v+2B7jxK6gtbg=; b=iG24RCKl+ygINMY1nAhD2uNc0qaaBKZsFX4Z6upKoDJg/x3GJI96vsDzaMEFbfuZf0 RaTxdFpfJr4kAP+kSAXP6Hg0yTMoOYnEHeQi5akZjbVsdYl9ibGfpOcHF6hyfP6xE8jH CJFt7ZcPKyrT7z/9Ex7CR5+ExOVXAHf3DjZLIHCDWefWBzFiCrJ2Zfn5TzK1e3SroR9i M7R1jgzQvggjuPkSRMjMrwr8NXriK+ITjyd11nJMWqGln9M4L9U5Q3pTJ1f+6Pk+4gad s1xZ6Mej5NQI2e6fN1kNAmVQrYMIn4gvKSxbeFIrznGNlGAaVeDl+dEWZT44ZzqVD985 EUyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QXhe9B9BJ7USSO3oeUBj7EmOBzDk/2v+2B7jxK6gtbg=; b=sq1j6QiyCXv20ONaD2yVdPv9eDmKbl+Ak0EJ/B/XZg15ImqAM3B8fPL1EaoTJXIJ/x 7wy11OI0yLKY6445OD5HXv5qjJGvJtnXJBbGD9Uos4a70FO31y+PsLbm3Ibl50ZkKde0 i4J/HbsJ7Jnb1P5fveWnsfl1XfVUb3V2l5/T3DinCKThCdTvNN/z2qt71l7Vf19cVaDR neGw6VmK4NL+/4DSrlXn/ELcX55PwCwak+NhkXJLNtKxYk1cJJhl1ptUFy1vU/G/QW2J +pwU6qH+EHWEGwJuzpkFr4ybUpOcSxBY2pT+iUAogHyaFVlGHV0qRjYE6TX2RZtR4p4u Bm3A== X-Gm-Message-State: AOAM533MnUezh47zNup/tZuV07TxR5EhcKKOY8hukXGJ+XwKfninfTBB iObzcEiTLl430IYeVx9Eci9/kA== X-Received: by 2002:a1c:49c2:: with SMTP id w185mr10925592wma.184.1607342295377; Mon, 07 Dec 2020 03:58:15 -0800 (PST) Received: from google.com ([2a00:79e0:d:210:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id m21sm13730406wml.13.2020.12.07.03.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 03:58:14 -0800 (PST) Date: Mon, 7 Dec 2020 11:58:11 +0000 From: Quentin Perret To: Fuad Tabba Cc: Catalin Marinas , Will Deacon , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Rob Herring , Frank Rowand , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , open list , "open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , kernel-team@android.com, Android KVM Subject: Re: [RFC PATCH 16/27] KVM: arm64: Prepare Hyp memory protection Message-ID: References: <20201117181607.1761516-1-qperret@google.com> <20201117181607.1761516-17-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 07 Dec 2020 at 11:16:05 (+0000), Fuad Tabba wrote: > On Fri, Dec 4, 2020 at 6:01 PM Quentin Perret wrote: > > > > On Thursday 03 Dec 2020 at 12:57:33 (+0000), Fuad Tabba wrote: > > > > > > +int hyp_create_idmap(void); > > > > +int hyp_map_vectors(void); > > > > +int hyp_back_vmemmap(phys_addr_t phys, unsigned long size, phys_addr_t back); > > > > +int hyp_cpu_set_vector(enum arm64_hyp_spectre_vector slot); > > > > +int hyp_create_mappings(void *from, void *to, enum kvm_pgtable_prot prot); > > > > +int __hyp_create_mappings(unsigned long start, unsigned long size, > > > > + unsigned long phys, unsigned long prot); > > > > +unsigned long __hyp_create_private_mapping(phys_addr_t phys, size_t size, > > > > + unsigned long prot); > > > > + > > > > > > nit: I also thought that the hyp_create_mappings function names are a > > > bit confusing, since there's the create_hyp_mappings functions which > > > use the aforementioned *hyp_pgtable. > > > > Sure, happy to re-name those (and hyp_pgtable above). Any suggestions? > > Perhaps something to indicate that these are temporary, tmp_ or > bootstrap_ maybe? Hmm, the thing is these are temporary only in protected mode, they're permanent otherwise :/ Perhaps I could prefix the protected pgtable (and associated functions) with 'pkvm_' or so? Marc, any preferences? Thanks, Quentin