[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v2 12/14] arm/sdei: add stub to fix build failure when SDEI is not
From: |
Heyi Guo |
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 |
Signed-off-by: Heyi Guo <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Dave Martin <address@hidden>
Cc: Marc Zyngier <address@hidden>
Cc: Mark Rutland <address@hidden>
Cc: James Morse <address@hidden>
---
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)) += kvm64.o
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
obj-$(CONFIG_SDEI) += sdei.o
+obj-$(call lnot,$(CONFIG_SDEI)) += sdei-stub.o
+
DECODETREE = $(SRC_PATH)/scripts/decodetree.py
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 <address@hidden>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * 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] = 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)
+{
+}
--
2.19.1
- Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall, (continued)
- Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall, Guoheyi, 2019/11/06
- Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall, Michael S. Tsirkin, 2019/11/07
- Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall, Guoheyi, 2019/11/07
- Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall, Cornelia Huck, 2019/11/07
- Re: [RFC v2 11/14] linux-headers/kvm.h: add capability to forward hypercall, Guoheyi, 2019/11/07
[RFC v2 14/14] virt/acpi: add SDEI table if SDEI is enabled, Heyi Guo, 2019/11/05
[RFC v2 13/14] arm/kvm: handle guest exit of hypercall, Heyi Guo, 2019/11/05
[RFC v2 03/14] arm/sdei: add virtual device framework, Heyi Guo, 2019/11/05
[RFC v2 12/14] arm/sdei: add stub to fix build failure when SDEI is not enabled,
Heyi Guo <=
[RFC v2 05/14] arm/sdei: add support to handle SDEI requests from guest, Heyi Guo, 2019/11/05
Re: [RFC v2 00/14] Add SDEI support for arm64, Guoheyi, 2019/11/05
Re: [RFC v2 00/14] Add SDEI support for arm64, no-reply, 2019/11/05
Re: [RFC v2 00/14] Add SDEI support for arm64, no-reply, 2019/11/05
Re: [RFC v2 00/14] Add SDEI support for arm64, Guoheyi, 2019/11/18