aboutsummaryrefslogtreecommitdiff
path: root/target/riscv/kvm-stub.c
diff options
context:
space:
mode:
authorYifei Jiang <jiangyifei@huawei.com>2022-01-12 16:13:22 +0800
committerAlistair Francis <alistair.francis@wdc.com>2022-01-21 15:52:56 +1000
commitad40be27084536408b47a9209181f776ec2c54a5 (patch)
treec6107ad96cf9f20242e17b6668f99d1a7707f9f6 /target/riscv/kvm-stub.c
parent9997cc1e19d1f909551783c280cfe441a0838943 (diff)
downloadqemu-ad40be27084536408b47a9209181f776ec2c54a5.zip
qemu-ad40be27084536408b47a9209181f776ec2c54a5.tar.gz
qemu-ad40be27084536408b47a9209181f776ec2c54a5.tar.bz2
target/riscv: Support start kernel directly by KVM
Get kernel and fdt start address in virt.c, and pass them to KVM when cpu reset. Add kvm_riscv.h to place riscv specific interface. In addition, PLIC is created without M-mode PLIC contexts when KVM is enabled. Signed-off-by: Yifei Jiang <jiangyifei@huawei.com> Signed-off-by: Mingwang Li <limingwang@huawei.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Message-id: 20220112081329.1835-7-jiangyifei@huawei.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/kvm-stub.c')
-rw-r--r--target/riscv/kvm-stub.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/riscv/kvm-stub.c b/target/riscv/kvm-stub.c
new file mode 100644
index 0000000..39b96fe
--- /dev/null
+++ b/target/riscv/kvm-stub.c
@@ -0,0 +1,25 @@
+/*
+ * QEMU KVM RISC-V specific function stubs
+ *
+ * Copyright (c) 2020 Huawei Technologies Co., Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2 or later, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "kvm_riscv.h"
+
+void kvm_riscv_reset_vcpu(RISCVCPU *cpu)
+{
+ abort();
+}