RISC-V: KVM: Add exit logic to main.c

Several lines of code are inserted to remove KVM module normally
using rmmod command just like others.

Signed-off-by: XiakaiPan <13212017962@163.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Tested-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
XiakaiPan 2022-12-07 09:16:02 +05:30 committed by Anup Patel
parent 76dcd734ec
commit e78a11174d
1 changed files with 6 additions and 0 deletions

View File

@ -127,3 +127,9 @@ static int __init riscv_kvm_init(void)
return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
}
module_init(riscv_kvm_init);
static void __exit riscv_kvm_exit(void)
{
kvm_exit();
}
module_exit(riscv_kvm_exit);