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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 65949C433E0 for ; Tue, 2 Feb 2021 09:57:46 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 8A69464F50 for ; Tue, 2 Feb 2021 09:57:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A69464F50 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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 D829F4B0CA; Tue, 2 Feb 2021 04:57:44 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com 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 5VRatQ+dBsat; Tue, 2 Feb 2021 04:57:43 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D4E354B130; Tue, 2 Feb 2021 04:57:43 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0E9644B0CA for ; Tue, 2 Feb 2021 04:57:43 -0500 (EST) 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 ofmAmWRiIv8K for ; Tue, 2 Feb 2021 04:57:41 -0500 (EST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id E6AB14B0C3 for ; Tue, 2 Feb 2021 04:57:40 -0500 (EST) Received: by mail-wr1-f48.google.com with SMTP id c12so19727071wrc.7 for ; Tue, 02 Feb 2021 01:57:40 -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=gUWdfryl2mEIDffgox1qZc46SxaAuEEaX9wvFDWySJY=; b=MYX4UAGuAYG76uxw79nQw0VTiLAi14nGvrvL7reS74PX07uV59kkx9lJ22e1nHUwDJ URKRfdZqic8BS89CRZewCvictCOw4RtZ/dFHHTvgiJIaSCwWqbFp3wNH7Iha9+WhIvkq ygVPMdbx/NfE1NhpjpHjwODDJEfjmxZAKotDKFcBC0CpXaruSyt7+kl1bUpMbpbHXuc5 JtkW/ibDvryn+3Lu8RUMbzSetzUPyqjVs1oq17BUsA3yRhRbO/cegw9D6cguZheCi6tg xfDRuukrHmS3OjuOvl5TYSZCV+wXr2zalvRUxWhcEwAxLHAQzhjXGL7EgVCAcfvDRvB/ G41Q== 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=gUWdfryl2mEIDffgox1qZc46SxaAuEEaX9wvFDWySJY=; b=IMWUbw7qYn6V5U5sKnxjeSUnaz8YjstrdNvx70wvyiuqHYBeDNF0CjFCMs85b71ffQ SCew/I/U5GJOAiA1GeIEsQOIbEUEw1gVTJbAI/IjB2oJjEZX/KhxBkfAquhvObhqTTvh +ZaItmG5xTC22AJvthdZcwBJNsFUQsfOniapJAbB+6Z1jCF8JPvkrW5ljnKNdv/kkucl CUapwVXaFT/UcViayxbLfT07lVY0TYq2Voq/NmcYtJ0cIr6tDxG3BfHkqdrlYpvtHGE4 ItX9ERsY2WiWBNjB2peG25KCUijwdtpH5Qv89sre17oxj9sWrJ2IrMoi/PWdBYDo5+3n wuJg== X-Gm-Message-State: AOAM5311HdHBvODoxgO3nBB/+5X8Imfm/AzYQubwLU/79doXUlog4Z9D Yk5DDmJqB5Vxkjy/uPx3hv220g== X-Google-Smtp-Source: ABdhPJxE29ho4puVHuCIAx7AJHJgY3z3K/SPPM510lIEf5EY47+l9wT2D6bJXl5uysLvLX0dzdUNMA== X-Received: by 2002:a5d:4e4c:: with SMTP id r12mr22738411wrt.354.1612259859803; Tue, 02 Feb 2021 01:57:39 -0800 (PST) Received: from google.com (230.69.233.35.bc.googleusercontent.com. [35.233.69.230]) by smtp.gmail.com with ESMTPSA id s23sm2133774wmc.35.2021.02.02.01.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 01:57:39 -0800 (PST) Date: Tue, 2 Feb 2021 09:57:36 +0000 From: Quentin Perret To: Will Deacon Subject: Re: [RFC PATCH v2 11/26] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp Message-ID: 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: <20210201190620.GJ15632@willie-the-truck> Cc: devicetree@vger.kernel.org, kernel-team@android.com, android-kvm@google.com, Catalin Marinas , Fuad Tabba , linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Frank Rowand , kvmarm@lists.cs.columbia.edu 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 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? Cheers, Quentin _______________________________________________ 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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 E65ABC433E0 for ; Tue, 2 Feb 2021 09:58:47 +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 75F5364F54 for ; Tue, 2 Feb 2021 09:58:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75F5364F54 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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=OkOfVy3+2OX5OSl73iAdmli0LhNe8joEzP6aKTbpwcI=; b=2VF3+B+thdk1z5+VWPBvQf95Z nVUT0KGx5HQUV8HYTnMaHzAlzVFfUlVfQR0jqWItl50xt+1w+hi4C0P1OihhTC8ZO9H2r3nq81qQn TqrTky1rE7xHJP9BqsUrcvOTH0ld3DzewRvqWUIC0l4177USTfDup0M4m06UwpDE29i7opbAxLG8+ J2E/lD6T73tlQBPDArRyIhbJBglZL0xf2brbmk//boNcu6481U+Z3oXcWC5MHL6wnDWIrfmW+AYbW Uwp29BSJoKGZE800OIXFQi+Nn6SPbIdFkcnrcSoCLgBtUlS4s0gwXmZjIvtJg8cWVmCc1zG4PIfHX 390JQEX6Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6sRL-0004cT-2s; Tue, 02 Feb 2021 09:57:43 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6sRJ-0004bk-7s for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 09:57:42 +0000 Received: by mail-wr1-x431.google.com with SMTP id 6so19732860wri.3 for ; Tue, 02 Feb 2021 01:57:40 -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=gUWdfryl2mEIDffgox1qZc46SxaAuEEaX9wvFDWySJY=; b=MYX4UAGuAYG76uxw79nQw0VTiLAi14nGvrvL7reS74PX07uV59kkx9lJ22e1nHUwDJ URKRfdZqic8BS89CRZewCvictCOw4RtZ/dFHHTvgiJIaSCwWqbFp3wNH7Iha9+WhIvkq ygVPMdbx/NfE1NhpjpHjwODDJEfjmxZAKotDKFcBC0CpXaruSyt7+kl1bUpMbpbHXuc5 JtkW/ibDvryn+3Lu8RUMbzSetzUPyqjVs1oq17BUsA3yRhRbO/cegw9D6cguZheCi6tg xfDRuukrHmS3OjuOvl5TYSZCV+wXr2zalvRUxWhcEwAxLHAQzhjXGL7EgVCAcfvDRvB/ G41Q== 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=gUWdfryl2mEIDffgox1qZc46SxaAuEEaX9wvFDWySJY=; b=KOpM74RP0lE7in8447OAKZrfQnzCNIgaLIayP+zy0si0FEqunF+oz9P0HzELLEECSa Dp+l4w5DuJnblUxIKVSbAKq8qnEc4N16kvSUv0DxbGN/fNrcnmU3ZHCO0Tx+q9QTM6gs QP6rPWxu6Qo9LfPGeSoi157Q+LwgNli2VAWviQKnBNSWtL5GV59vx7/9aGwsKTc7NEzN mmuOH5rXSDP7Dw1vJ2mro71i4I7VB5kYjOavbrAyPGUpgK919qpmGmksXF+Vimo1CYGO e7meK/QOq2+kpf0kUAha5Q4TA4MTkOUZ06uh0y7R3HxLZ3u99QkTDXWz0NzDabW8qzd6 hodQ== X-Gm-Message-State: AOAM530HdScbG1XLuiZ5kFPnja3G3xHxGd1IU333/z+ezG0cwsFe61PJ 2uz4dzdh05EwxT+CQpgb6iAzzQ== X-Google-Smtp-Source: ABdhPJxE29ho4puVHuCIAx7AJHJgY3z3K/SPPM510lIEf5EY47+l9wT2D6bJXl5uysLvLX0dzdUNMA== X-Received: by 2002:a5d:4e4c:: with SMTP id r12mr22738411wrt.354.1612259859803; Tue, 02 Feb 2021 01:57:39 -0800 (PST) Received: from google.com (230.69.233.35.bc.googleusercontent.com. [35.233.69.230]) by smtp.gmail.com with ESMTPSA id s23sm2133774wmc.35.2021.02.02.01.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 01:57:39 -0800 (PST) Date: Tue, 2 Feb 2021 09:57:36 +0000 From: Quentin Perret To: Will Deacon Subject: Re: [RFC PATCH v2 11/26] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp Message-ID: 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: <20210201190620.GJ15632@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_045741_371622_12FC1A4A X-CRM114-Status: GOOD ( 24.36 ) 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 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? Cheers, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL 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 C819AC433E0 for ; Tue, 2 Feb 2021 09:58:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67D1764E27 for ; Tue, 2 Feb 2021 09:58:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231223AbhBBJ60 (ORCPT ); Tue, 2 Feb 2021 04:58:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231273AbhBBJ6V (ORCPT ); Tue, 2 Feb 2021 04:58:21 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E237C0613D6 for ; Tue, 2 Feb 2021 01:57:41 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id q7so19705448wre.13 for ; Tue, 02 Feb 2021 01:57:41 -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=gUWdfryl2mEIDffgox1qZc46SxaAuEEaX9wvFDWySJY=; b=MYX4UAGuAYG76uxw79nQw0VTiLAi14nGvrvL7reS74PX07uV59kkx9lJ22e1nHUwDJ URKRfdZqic8BS89CRZewCvictCOw4RtZ/dFHHTvgiJIaSCwWqbFp3wNH7Iha9+WhIvkq ygVPMdbx/NfE1NhpjpHjwODDJEfjmxZAKotDKFcBC0CpXaruSyt7+kl1bUpMbpbHXuc5 JtkW/ibDvryn+3Lu8RUMbzSetzUPyqjVs1oq17BUsA3yRhRbO/cegw9D6cguZheCi6tg xfDRuukrHmS3OjuOvl5TYSZCV+wXr2zalvRUxWhcEwAxLHAQzhjXGL7EgVCAcfvDRvB/ G41Q== 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=gUWdfryl2mEIDffgox1qZc46SxaAuEEaX9wvFDWySJY=; b=qgAY3savUK5r2dUHkPdVmOH+B6f0lup0rC5xsb0dNHheJvECzj89tb7ez1LpgHSCuh IBNwM5sM6ks4/k17JdzkK3AslDhkloJ60aYxiwI5HFNdFZbPzy0WTqkUxd9R/QgIqERN D6/noIOKWuY4LqKjYWgiRlDIPLRp3R8yV7m236einvTcylGjJaGHktcT9y9nz3dEEWrQ pZP87zVXGH/n3o5t87H3ve+I2WgtaaVO8lF9i+5t4TQSjgsmUE2+sESfKK+gzq8RFCVb 56gNsGcNpshvTFNKAHsH2b+835ymWqByZnjMq8Zq+QalbcKDUhrjZ4J1dT3TVcCSPccC celA== X-Gm-Message-State: AOAM533+ngDM0SbSxg9kpd0kSUQsHe45FvKZLrKBd53tjFO7exclnUpy 0vlDuzxhFsHNvWmks9wexKW4DA== X-Google-Smtp-Source: ABdhPJxE29ho4puVHuCIAx7AJHJgY3z3K/SPPM510lIEf5EY47+l9wT2D6bJXl5uysLvLX0dzdUNMA== X-Received: by 2002:a5d:4e4c:: with SMTP id r12mr22738411wrt.354.1612259859803; Tue, 02 Feb 2021 01:57:39 -0800 (PST) Received: from google.com (230.69.233.35.bc.googleusercontent.com. [35.233.69.230]) by smtp.gmail.com with ESMTPSA id s23sm2133774wmc.35.2021.02.02.01.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 01:57:39 -0800 (PST) Date: Tue, 2 Feb 2021 09:57:36 +0000 From: Quentin Perret To: Will Deacon Cc: Catalin Marinas , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Fuad Tabba , Mark Rutland , David Brazdil Subject: Re: [RFC PATCH v2 11/26] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp Message-ID: References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-12-qperret@google.com> <20210201190620.GJ15632@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210201190620.GJ15632@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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? Cheers, Quentin