From nobody Mon Feb 9 22:19:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1572945984; cv=none; d=zoho.com; s=zohoarc; b=I7XoH65bNd6IhA5AfsSb97iq/rqND+XV50w93WYNVJoI+DXoFmWKi357rdcn55WNmzruAS733XnQRT3waJMp2ef5NLwWBGB//7bvhwJTIGGpDDyZB5ZEFfQN7w2PLbM+5fs9kCdDEbV0++WBd6e9GpzhXMfCJ4gfPWBzuyPjoIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572945984; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QggT4Lqbfgtos4BbLAvhexjK4dWeaFSxUO6Fvy6V1Z0=; b=Xvi9Udu1S0DKK4CXhwn0H0Om4aEY06Sy6CIzZJ4kTDAGlhpUMv246gLHuOgS2m58feB3PX4bczFEXE52auvllNCGMcYVtUNoMr6A1n6k9PU11OETOql7ELvvS/NR0TtKPmrp09a2VCimSluHmO2bY3JVQNpoi8A6Wv53m7zi5KQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1572945984582939.4575062626116; Tue, 5 Nov 2019 01:26:24 -0800 (PST) Received: from localhost ([::1]:42052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRv6R-0006QM-4S for importer@patchew.org; Tue, 05 Nov 2019 04:26:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43243) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRut4-0005Di-4c for qemu-devel@nongnu.org; Tue, 05 Nov 2019 04:12:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRut3-0007vS-07 for qemu-devel@nongnu.org; Tue, 05 Nov 2019 04:12:30 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:46998 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iRusv-0007jH-EP; Tue, 05 Nov 2019 04:12:21 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5C10D599D2752F64CED6; Tue, 5 Nov 2019 17:12:18 +0800 (CST) Received: from linux-OtBuvb.huawei.com (10.175.104.212) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Tue, 5 Nov 2019 17:12:10 +0800 From: Heyi Guo To: , Subject: [RFC v2 12/14] arm/sdei: add stub to fix build failure when SDEI is not enabled Date: Tue, 5 Nov 2019 17:10:54 +0800 Message-ID: <20191105091056.9541-13-guoheyi@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20191105091056.9541-1-guoheyi@huawei.com> References: <20191105091056.9541-1-guoheyi@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.212] X-CFilter-Loop: Reflected Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Maydell , Marc Zyngier , James Morse , Heyi Guo , wanghaibin.wang@huawei.com, Dave Martin Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Heyi Guo Cc: Peter Maydell Cc: Dave Martin Cc: Marc Zyngier Cc: Mark Rutland Cc: James Morse --- target/arm/Makefile.objs | 2 ++ target/arm/sdei-stub.c | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 target/arm/sdei-stub.c diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs index 72e01d08dc..90235af8ec 100644 --- a/target/arm/Makefile.objs +++ b/target/arm/Makefile.objs @@ -12,6 +12,8 @@ obj-$(call land,$(CONFIG_KVM),$(TARGET_AARCH64)) +=3D kvm= 64.o obj-$(call lnot,$(CONFIG_KVM)) +=3D kvm-stub.o =20 obj-$(CONFIG_SDEI) +=3D sdei.o +obj-$(call lnot,$(CONFIG_SDEI)) +=3D sdei-stub.o + =20 DECODETREE =3D $(SRC_PATH)/scripts/decodetree.py =20 diff --git a/target/arm/sdei-stub.c b/target/arm/sdei-stub.c new file mode 100644 index 0000000000..4eaf365de7 --- /dev/null +++ b/target/arm/sdei-stub.c @@ -0,0 +1,49 @@ +/* + * QEMU ARM SDEI specific function stubs + * + * Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. + * + * Author: Heyi Guo + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu/osdep.h" +#include "sdei.h" + +bool sdei_enabled; + +void sdei_handle_request(CPUState *cs, struct kvm_run *run) +{ + run->hypercall.args[0] =3D SDEI_NOT_SUPPORTED; + return; +} + +/* + * Trigger an SDEI event bound to an interrupt. + * Return true if event has been triggered successfully. + * Return false if event has not been triggered for some reason. + */ +bool trigger_sdei_by_irq(int cpu, int irq) +{ + return false; +} + +/* + * Register a notify callback for a specific interrupt bind operation; the + * client will be both notified by bind and unbind operation. + */ +void qemu_register_sdei_bind_notifier(QemuSDEIBindNotify *func, + void *opaque, int irq) +{ +} + +/* + * Unregister a notify callback for a specific interrupt bind operation. + */ +void qemu_unregister_sdei_bind_notifier(QemuSDEIBindNotify *func, + void *opaque, int irq) +{ +} --=20 2.19.1