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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 DFADEC04FF3 for ; Mon, 24 May 2021 12:38:41 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 54E7A613B0 for ; Mon, 24 May 2021 12:38:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54E7A613B0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id EA5384B178; Mon, 24 May 2021 08:38:40 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NhdI1L4hkUej; Mon, 24 May 2021 08:38:39 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B60A34B164; Mon, 24 May 2021 08:38:39 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 62A444B162 for ; Mon, 24 May 2021 08:38:38 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YwJiZ2oic7PN for ; Mon, 24 May 2021 08:38:37 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 65D224B147 for ; Mon, 24 May 2021 08:38:37 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 6C3B361360; Mon, 24 May 2021 12:38:36 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ll9qs-003DBx-9b; Mon, 24 May 2021 13:38:34 +0100 Date: Mon, 24 May 2021 13:38:32 +0100 Message-ID: <87lf84wblj.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH v4 01/66] arm64: Add ARM64_HAS_NESTED_VIRT cpufeature In-Reply-To: References: <20210510165920.1913477-1-maz@kernel.org> <20210510165920.1913477-2-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, kernel-team@android.com, jintack.lim@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kernel-team@android.com, kvm@vger.kernel.org, Andre Przywara , kvmarm@lists.cs.columbia.edu, Jintack Lim , linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, 20 May 2021 14:32:17 +0100, Zenghui Yu wrote: > > On 2021/5/11 0:58, Marc Zyngier wrote: > > From: Jintack Lim > > > > Add a new ARM64_HAS_NESTED_VIRT feature to indicate that the > > CPU has the ARMv8.3 nested virtualization capability. > > > > This will be used to support nested virtualization in KVM. > > > > Signed-off-by: Jintack Lim > > Signed-off-by: Andre Przywara > > Signed-off-by: Christoffer Dall > > Signed-off-by: Marc Zyngier > > --- > > .../admin-guide/kernel-parameters.txt | 4 +++ > > arch/arm64/include/asm/cpucaps.h | 1 + > > arch/arm64/kernel/cpufeature.c | 25 +++++++++++++++++++ > > 3 files changed, 30 insertions(+) > > [...] > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > index efed2830d141..056de86d7f6f 100644 > > --- a/arch/arm64/kernel/cpufeature.c > > +++ b/arch/arm64/kernel/cpufeature.c > > @@ -1645,6 +1645,21 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) > > write_sysreg(read_sysreg(tpidr_el1), tpidr_el2); > > } > > +static bool nested_param; > > +static bool has_nested_virt_support(const struct arm64_cpu_capabilities *cap, > > + int scope) > > +{ > > + return has_cpuid_feature(cap, scope) && > > + nested_param; > > +} > > Nitpick: > > How about putting them into a single line (they still perfectly > fit within the 80-colume limit)? Fair enough. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 6ED31C2B9F7 for ; Mon, 24 May 2021 18:01:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 40E6160E0C for ; Mon, 24 May 2021 18:01:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40E6160E0C 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7eVpGUiaR1TE+dt7/MkJMm8cIR6q7ke4Jm+u567zhUM=; b=a/7x70U3XoZqvX dyf8IPDJpv+J6CE13iw/i1x7koJg5eNNsZzCDrUld9KTJrpX0zEvVuzI4rDhDW2wNFc30tqJkiWFF m5ggo2mos+L6yuAwl6oafCdWbbuDpL4/OPoQLeoW+SpMn9AnoivP6Hg+ku/x/BQzWQKufMppFFFYz +uby4u5IKYE3eL2enU7gO8LcQlAoIf6jqmGQTAoy3fSmy4LhO54WO3WCI/NjZk31ppcaNYieAg1QB g64F4hn17qQ2NGc6hB88exWIFbwjcEGjYMDcL4l4dTkX0L6vDLuIEB/03DmnTtez3xxr0akf0S4Fl pKkZtY3NeSW/6YdWQ6Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llErr-001NIz-Pb; Mon, 24 May 2021 17:59:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ll9qu-000uvD-QP for linux-arm-kernel@lists.infradead.org; Mon, 24 May 2021 12:38:38 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 6C3B361360; Mon, 24 May 2021 12:38:36 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ll9qs-003DBx-9b; Mon, 24 May 2021 13:38:34 +0100 Date: Mon, 24 May 2021 13:38:32 +0100 Message-ID: <87lf84wblj.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Cc: , , , Andre Przywara , "Christoffer\ Dall" , Jintack Lim , "Haibo Xu" , James Morse , Suzuki K Poulose , Alexandru Elisei , , Jintack Lim Subject: Re: [PATCH v4 01/66] arm64: Add ARM64_HAS_NESTED_VIRT cpufeature In-Reply-To: References: <20210510165920.1913477-1-maz@kernel.org> <20210510165920.1913477-2-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, kernel-team@android.com, jintack.lim@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210524_053836_895119_55A92735 X-CRM114-Status: GOOD ( 23.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Thu, 20 May 2021 14:32:17 +0100, Zenghui Yu wrote: > > On 2021/5/11 0:58, Marc Zyngier wrote: > > From: Jintack Lim > > > > Add a new ARM64_HAS_NESTED_VIRT feature to indicate that the > > CPU has the ARMv8.3 nested virtualization capability. > > > > This will be used to support nested virtualization in KVM. > > > > Signed-off-by: Jintack Lim > > Signed-off-by: Andre Przywara > > Signed-off-by: Christoffer Dall > > Signed-off-by: Marc Zyngier > > --- > > .../admin-guide/kernel-parameters.txt | 4 +++ > > arch/arm64/include/asm/cpucaps.h | 1 + > > arch/arm64/kernel/cpufeature.c | 25 +++++++++++++++++++ > > 3 files changed, 30 insertions(+) > > [...] > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > index efed2830d141..056de86d7f6f 100644 > > --- a/arch/arm64/kernel/cpufeature.c > > +++ b/arch/arm64/kernel/cpufeature.c > > @@ -1645,6 +1645,21 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) > > write_sysreg(read_sysreg(tpidr_el1), tpidr_el2); > > } > > +static bool nested_param; > > +static bool has_nested_virt_support(const struct arm64_cpu_capabilities *cap, > > + int scope) > > +{ > > + return has_cpuid_feature(cap, scope) && > > + nested_param; > > +} > > Nitpick: > > How about putting them into a single line (they still perfectly > fit within the 80-colume limit)? Fair enough. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel