From patchwork Mon Mar 15 14:35:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 12139653 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=-16.6 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, 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 C7C95C43333 for ; Mon, 15 Mar 2021 14:39:36 +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 1CF0364F5C for ; Mon, 15 Mar 2021 14:39:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CF0364F5C 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=zuxKUbUk7Y4CgvNXV8n5fnlBi2uQp54ncAketyb0G3Y=; b=aeIzWZHjmUP8FU NuXeTsxYkoqZiMDZ96xXoD27hDVstjUMw0/pU6Tvi1kdURPluL0u+529+wH3dwO/d7AlnFulFKuxv oyq7F5XHd+9/QVEHo0N1zTCAFc/INQG7RjFKasVUXvZWSaFUatC+p2q5WcLF5E1p6eX7ltuLM/kGH ab9CSI/fJDKdXIDmMQs+tTeAPPmntSPKWRhYFyZKPcbADEGZpfYrkrXdnwFBSVHBPDYWKz13LedTN 0ggIWPrsg2PIZWy/N7JrTn0zMLZLEE9NEU4EW1phvalr7GW7iHF8TGNuVJuQoarnIQu4/qcHJXAjl pa65VJAJ/PuCPjJCGOPQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lLoMC-00G6cl-5n; Mon, 15 Mar 2021 14:38:08 +0000 Received: from mail-wr1-x449.google.com ([2a00:1450:4864:20::449]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lLoKC-00G5kp-IY for linux-arm-kernel@lists.infradead.org; Mon, 15 Mar 2021 14:36:06 +0000 Received: by mail-wr1-x449.google.com with SMTP id e13so15165620wrg.4 for ; Mon, 15 Mar 2021 07:36:03 -0700 (PDT) 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=42VsnebBx6wd/dLld12y5OO2eqBs86RA5vT5YbLHhII=; b=ZLkYfjm0TXm1ycQgXusiruwe/qzqQv7drq5zuviqWh0MJ49BBdJLzCMYL8k+RqizaO felSNSPfOwwR8i7fkvRvH4HC7raWlb92gVEnl++0y9cWRocbAQVOOOcRYjLLVi91qmVC JbDKCnnGwlgjwle1NZdASDpI7ow3L0jtIFQCToUWMGT0tWP48BRBGY9e5I9sYEFKWHIf fGYBQMoqCVkfNuqCp5fnUwLNrerEb8cQ1AqKhDY2eqO9ZxiIXd+AcZWjfNV/qNGi4Ph1 Z+hk5NHSQ9BlZDSAVEnwoKHYl6s3wlBucYOKhkj4D01+DSXsJBjQvwqmh/6NCzhiUvRj nDXg== 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=42VsnebBx6wd/dLld12y5OO2eqBs86RA5vT5YbLHhII=; b=Yl1RGnUGZY9fQrC3gCvUubVaRh92sLUKfaIlBnQ3qW9bcelRnAWInDjShX4l/fBozb UM/zFbZN82+0cnUxrEW3+zUmPOh9sFwd2Z6ffM9dC76U0A4nc98kczHCB3LEnXZrVrRP 0K2vQt686rj2cr+QWXWhm0DttBNo5wp1ZtfXOUmxE8+xnrV5H0rkUMNrVQ4+C8q+lyk2 61UDkK7I6E1EPT2NK7Kn0JFl6R3MufVQ34UkmX66GusOxgKXzrA2Djy7J9XV59Qww2UR yGdCbrjhyP7i5WO45xPC/lkfMWB12YFMPsQePg1nAOO9HHej31TruKMyVHVyhXpmOVuH H8Jg== X-Gm-Message-State: AOAM531RpqZ6rTvI25ILENbGb90lf5OHZUiuoa3EYt2k0Xt8V9jsxNdn krPNUkFybcUEh5//UDZafsIqZICJcUyM X-Google-Smtp-Source: ABdhPJwxOO9bMvt/n8Ii/ALjBQmkLixKjjgqfBbs1ZB0IOc7PGzPOYN5ZKmmLjqMm5uOvJj8JP0r4i91tWDl X-Received: from r2d2-qp.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:1652]) (user=qperret job=sendgmr) by 2002:a7b:c4c9:: with SMTP id g9mr31442wmk.82.1615818963391; Mon, 15 Mar 2021 07:36:03 -0700 (PDT) Date: Mon, 15 Mar 2021 14:35:11 +0000 In-Reply-To: <20210315143536.214621-1-qperret@google.com> Message-Id: <20210315143536.214621-12-qperret@google.com> Mime-Version: 1.0 References: <20210315143536.214621-1-qperret@google.com> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog Subject: [PATCH v5 11/36] 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, seanjc@google.com, mate.toth-pal@arm.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, tabba@google.com, ardb@kernel.org, mark.rutland@arm.com, dbrazdil@google.com, qperret@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210315_143604_818845_274869D1 X-CRM114-Status: GOOD ( 14.58 ) 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. Acked-by: Will Deacon 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