[PATCH] RISC-V KVM: Add exit logic to main.c
XiakaiPan
13212017962 at 163.com
Fri Nov 4 08:46:18 PDT 2022
Several lines of code are inserted to remove KVM module normally using rmmod command just like others.
Signed-off-by: XiakaiPan <13212017962 at 163.com>
---
arch/riscv/kvm/main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c
index 1549205fe..81f1a761d 100644
--- a/arch/riscv/kvm/main.c
+++ b/arch/riscv/kvm/main.c
@@ -122,6 +122,12 @@ void kvm_arch_exit(void)
{
}
+static void riscv_kvm_exit(void)
+{
+ kvm_exit();
+}
+module_exit(riscv_kvm_exit);
+
static int riscv_kvm_init(void)
{
return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
--
2.25.1
More information about the kvm-riscv
mailing list