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=-15.7 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,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 75DBDC433DB for ; Thu, 11 Mar 2021 16:13:06 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 EC48F64FA3 for ; Thu, 11 Mar 2021 16:13:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC48F64FA3 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc: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=RTLeQFEQ06SyWUaDec33HSj/lELHB8OFZDSUCgCwaWk=; b=frSiO6TmvpXVioyb/Qkge/ysa 250VUaQczDkm85PwBEUmLJoVumbNMjgnhNWmDeJHV7kdfGqdQP3rEtmhW188NenrSA9h2wIFOa9wZ G8pr7y3nu+qlb0o2NBjqx9zyp3vYL9EO4W94NFCc2HbWJCZw6GOORoJP6Yji3WASHO7zd9wij1pN4 nuRH6cKKJkYkNLzw/rsaVpH+CPfAAwBqE0YIbcxVPy5WtYzzIHtgREHI5rygPGzZoRZt9vdS07mtp Fgax/W5N8ybFJb5KaqRpyzZAgzof9Z5jt8qRA+ng6g3k/HVYK7vFgeX3lJFsiMiJzKl9NJSDZEe53 fbSqha/9A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKNuY-009XMi-MB; Thu, 11 Mar 2021 16:11:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKNuS-009XLz-Hb for linux-arm-kernel@lists.infradead.org; Thu, 11 Mar 2021 16:11:39 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id C9B2464FA3; Thu, 11 Mar 2021 16:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615479095; bh=E87K7pnoXEeIDrTmeoC6YBHh9dve+IPi3cHQxxCc+48=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r4nQkqHdL2JuiHy0v2ICafmTOqoiN8+zS4zbPAFePc4r1RMXoTJGboIAYvQZfEPBF GASa0lX9rDFbjdV/u9cqZYMIfoNOCbLZtk5qU9ZXXBK88F9pjPW5AaudDHtLSMCwAK UaCYzk52WXL9ew+/ibFLCtNCEoxbKtXA8hLTLaHKBz0VYcIBOLhKVG/yDso31B+O3a kg08E5Shw0uyYbCKengLJSNL8r9DwTPM+BhQI9l/Avm9I16E4tw+u/FbILg0EGqcOZ ZhHS/8FgummcqWjQ+ZKJoYyJ9/JRTfmt/XT0iRGrGFYfvcz9ARI3R119VVk1wpNUE2 /M+7wLuvdDMlQ== Date: Thu, 11 Mar 2021 16:11:28 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, robh+dt@kernel.org, ardb@kernel.org Subject: Re: [PATCH v4 11/34] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp Message-ID: <20210311161127.GB31206@willie-the-truck> References: <20210310175751.3320106-1-qperret@google.com> <20210310175751.3320106-12-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210310175751.3320106-12-qperret@google.com> 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-20210311_161137_552567_15F78E76 X-CRM114-Status: GOOD ( 18.23 ) 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 Wed, Mar 10, 2021 at 05:57:28PM +0000, Quentin Perret wrote: > In order to use the kernel list library at EL2, introduce stubs for the > CONFIG_DEBUG_LIST out-of-lines calls. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- > arch/arm64/kvm/hyp/nvhe/stub.c | 22 ++++++++++++++++++++++ > 2 files changed, 23 insertions(+), 1 deletion(-) > create mode 100644 arch/arm64/kvm/hyp/nvhe/stub.c > > diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile > index 24ff99e2eac5..144da72ad510 100644 > --- a/arch/arm64/kvm/hyp/nvhe/Makefile > +++ b/arch/arm64/kvm/hyp/nvhe/Makefile > @@ -13,7 +13,7 @@ lib-objs := clear_page.o copy_page.o memcpy.o memset.o > lib-objs := $(addprefix ../../../lib/, $(lib-objs)) > > obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \ > - hyp-main.o hyp-smp.o psci-relay.o early_alloc.o > + hyp-main.o hyp-smp.o psci-relay.o early_alloc.o stub.o > obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \ > ../fpsimd.o ../hyp-entry.o ../exception.o > obj-y += $(lib-objs) > diff --git a/arch/arm64/kvm/hyp/nvhe/stub.c b/arch/arm64/kvm/hyp/nvhe/stub.c > new file mode 100644 > index 000000000000..c0aa6bbfd79d > --- /dev/null > +++ b/arch/arm64/kvm/hyp/nvhe/stub.c > @@ -0,0 +1,22 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Stubs for out-of-line function calls caused by re-using kernel > + * infrastructure at EL2. > + * > + * Copyright (C) 2020 - Google LLC > + */ > + > +#include > + > +#ifdef CONFIG_DEBUG_LIST > +bool __list_add_valid(struct list_head *new, struct list_head *prev, > + struct list_head *next) > +{ > + return true; > +} > + > +bool __list_del_entry_valid(struct list_head *entry) > +{ > + return true; > +} > +#endif This isn't any worse than disabling DEBUG_LIST for the EL2 object, so as an initial implementation: Acked-by: Will Deacon but we really should have the debug list checks on (probably unconditionally) for the EL2 code in my opinion. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel