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.9 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 E2D3DC433DB for ; Tue, 2 Feb 2021 10:01:44 +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 7AB1564DD5 for ; Tue, 2 Feb 2021 10:01:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AB1564DD5 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=iEuFS8oStjWTPpXaIZ0rcOwCTfvvnJEaexghoZNy+3w=; b=zcDlTBzvt9YZH69g5KyBqpo6+ eYxO5ALc3TPKgsiKOEzb+BzDLkyUxH6XHB4jagp7yYeY76OpdHvBpZzZe3+Vet3PoPRQuBH6z85bn E3J9ev+5kY3tJ+piIsXiO4Wr3pliHisWOB25v+9sMdYESVm++Wo9NwspRGsxKmmM+gJletTTQQrDn SKOavGGfKtbhk8DiLZhdw0JNVtceXAxJRbpxx5hDDit/aLfD3RF2Q5e/j5IDAIk8y1wxMJ7ELodi4 QUggNMbwN/LaYAF89hn9riXYyxP0OkX8Osp1rclKTcW5GFek/WPrfSk7kc13RiQE6NeRwJkjWB4Hk IVREEdaDA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6sUC-00056Q-8K; Tue, 02 Feb 2021 10:00:40 +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 1l6sU8-00055e-OO for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 10:00:38 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1CEC64F54; Tue, 2 Feb 2021 10:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612260035; bh=FlSTotWz42+gia9j+sJICekd1gyv1IJqZmvamYJck+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M4MRl2Fi14WHHw2ovlV9QboPmvGe7h/re/h1fHBgHg23WLpqgBYQFtcW46Lg7pQR6 zW+kMvwuwNpkTUHkcxwqP0SFlMTHYHbAycQutZysd/xkLniNG/WXGoldAz9joTLIAJ f4mjI4iBWkulQk6pS7MWkVcuWCwD9M8WOlw9ZGFdRe2RpAizneHX10b6wC3F5vdBjc IETUrFYSuZEX71YV32Xg/ETMZ8Ng4GRoiRkHoezSOXLCsm39Cv+xLrfr6wT92R7+6A whuwyH5VF2ojdn4ZmGr2RtG0U6vxc1JHMZWq7kKwIOd+JVys3lD/csIREXjKTvfI5h LM0nsp9CgoXpg== Date: Tue, 2 Feb 2021 10:00:29 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [RFC PATCH v2 11/26] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp Message-ID: <20210202100028.GA16657@willie-the-truck> References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-12-qperret@google.com> <20210201190620.GJ15632@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-20210202_050037_994465_6BDB812D X-CRM114-Status: GOOD ( 25.17 ) 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 02, 2021 at 09:57:36AM +0000, Quentin Perret wrote: > On Monday 01 Feb 2021 at 19:06:20 (+0000), Will Deacon wrote: > > On Fri, Jan 08, 2021 at 12:15:09PM +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 1fc0684a7678..33bd381d8f73 100644 > > > --- a/arch/arm64/kvm/hyp/nvhe/Makefile > > > +++ b/arch/arm64/kvm/hyp/nvhe/Makefile > > > @@ -10,7 +10,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 > > > > Can we get away with defining our own CHECK_DATA_CORRUPTION macro instead? > > Yes I think eventually it'd be nice to get there, but that has other > implications (e.g. how do you report something in dmesg from EL2?) so > perhaps we can keep that a separate series? We wouldn't necessarily have to report anything, but having the return value of these functions be based off the generic checks would be great if we can do it (i.e. we'd avoid corrupting the list). Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel