diff options
author | XiakaiPan <13212017962@163.com> | 2022-12-07 04:46:02 +0100 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-12-07 04:46:02 +0100 |
commit | e78a11174de9e84e2f685618432754b83bd9f4ec (patch) | |
tree | 276340046cc7cc6bce9d39e4d94473eefdaa59f2 /arch | |
parent | Linux 6.1-rc8 (diff) | |
download | linux-e78a11174de9e84e2f685618432754b83bd9f4ec.tar.xz linux-e78a11174de9e84e2f685618432754b83bd9f4ec.zip |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/kvm/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c index df2d8716851f..58c5489d3031 100644 --- a/arch/riscv/kvm/main.c +++ b/arch/riscv/kvm/main.c @@ -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); |