[PATCH] RISC-V KVM: Add exit logic to main.c
Anup Patel
anup at brainfault.org
Sat Nov 26 22:11:17 PST 2022
On Fri, Nov 4, 2022 at 9:16 PM XiakaiPan <13212017962 at 163.com> wrote:
>
> 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)
Add __exit attribute to riscv_kvm_exit()
> +{
> + kvm_exit();
Use tab instead of space for indentation.
> +}
> +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
>
I have taken care of the above comments at the
time of applying this patch.
Queued this patch for Linux-6.2
Thanks,
Anup
More information about the kvm-riscv
mailing list