From patchwork Wed Mar 10 17:57:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 12128903 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=-17.0 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,USER_AGENT_GIT 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 32F6EC433E0 for ; Wed, 10 Mar 2021 18:02:11 +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 92FE764FB3 for ; Wed, 10 Mar 2021 18:02:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92FE764FB3 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:From:Subject:References:Mime-Version: Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X+N3L6GMBiibzVm/VBzh+BCWH4pG8LggoO2vnZl52Go=; b=ARwCMnRQur+w/k ztpidLLFookJaeRHok0W9J1lRPjq28q9HKqoKHXg5JSdvCCkPx6trYuo79ZQ6ofjNDhhwaZKgG3cA b+TzIBm7b84GB9S+fHQxAUUWjVBnvwA9Dc+VuXFIKg+zf6cA8jLfnGBR98IfdJ1oEN1eyFK9fLFTe AmIQWoy3iTTWDJKC81bv8zlSmbwakSZqoSQ/iiodfa9oWN2xCtJQWy7VLOVe9w5tvluWWTor33Ta/ JCQFh0JzhvgHBpstkTY4aSCbIknbS6uZS2b+vYzhKJ2ZkEH7BZpPHR01Q6DewbRzTvJA3V/iyZN57 ttze7glJnHFf7H6a+EDA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lK38O-007PN1-LQ; Wed, 10 Mar 2021 18:00:36 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lK36B-007ODE-KY for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 17:58:21 +0000 Received: by mail-qk1-x74a.google.com with SMTP id k68so13395202qke.2 for ; Wed, 10 Mar 2021 09:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=twje/T88dKdujyu/Ipi7uGGbAfwKvVyGbqSSEkcY7iA=; b=LQ0ZVrzLKNdU5CFZ/uHgdFHY9JJtbPriswTjvCuNFFdqNAFUOVuVsL11DRafoQlXRs +qA6mOO/XIpZhsDrX4ERKUL831GIYfsbE+YhI/HZL9z2EJgXSh57xNEXRp06rvAklb4F MZgzc6XLsTevrg2CaMb1FFTglqx9ngsFCS7aGzbYfmG/3tMbDI7yw9Bz9V9sE4k9t6H9 9ISno341dtYOyZomYdAIDZVzCfzWji7BZQYuO9WuddDxANZaqnLlb6SP9sEdd+81N0E5 DEiVR5nkt8P07Yw9f/2m/XFboo6ihfT8aJqnIv+81HN+EqmqZGtbe1vRqIAWUTogBnRV 0mMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=twje/T88dKdujyu/Ipi7uGGbAfwKvVyGbqSSEkcY7iA=; b=i0xb9gNOB2gOoc6+9VvclOwMdzc3pxUAnvgfizX483O3uwoL4J4o10npAAw/odqXr8 0MIzylyYvVwTin/NntU/77Fq7V2tPgHO/U2lSDXUmyIkxsIDQSvF1qwG2utSM9QJtVOL rWYoJuKEkyyWlk9g6S1oTbxEPqBPfeYiUzIiBZ0yxP5PdHDxiNxUnAVUdLCMPTCX43N8 eHp3rMGhu9UbmuKiYyJV5Wt1a9lGG6J7ZBZPdlsFQHQLNcwANaeMXuN7ofweyKFUWtVA 0v/MKxMCi7N9ppYCdEi6F1/Btsj/Ta4/ARmhgNSfb2mtb2d9OHFPm+EpXUVrYFtSQEP8 Ehdw== X-Gm-Message-State: AOAM532aeJTFWihg0cDiI4cADGCYSRTMhONWUL3HrZgYACb2o8XqmWkJ k10ip9JhlWRZXYlYXJDj+v8ERv6aYSp2 X-Google-Smtp-Source: ABdhPJzpVCtmRY3IUgz5C3HD74m5dt+Xopm/y+FY/xkaDnXqHj0IY+JJ6z8YgmzfYvx8drfccRDDpQ7iF9lF X-Received: from r2d2-qp.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:1652]) (user=qperret job=sendgmr) by 2002:a05:6214:1484:: with SMTP id bn4mr4267365qvb.8.1615399097698; Wed, 10 Mar 2021 09:58:17 -0800 (PST) Date: Wed, 10 Mar 2021 17:57:28 +0000 In-Reply-To: <20210310175751.3320106-1-qperret@google.com> Message-Id: <20210310175751.3320106-12-qperret@google.com> Mime-Version: 1.0 References: <20210310175751.3320106-1-qperret@google.com> X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog Subject: [PATCH v4 11/34] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp From: Quentin Perret To: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com Cc: 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, qperret@google.com, robh+dt@kernel.org, ardb@kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210310_175819_739979_45FAA91C X-CRM114-Status: GOOD ( 14.83 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Will Deacon --- 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