mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
LoongArch: KVM: Register perf callbacks for guest
Add selection for GUEST_PERF_EVENTS if KVM is enabled, also add perf callback register when KVM module is loading. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
@@ -394,6 +394,7 @@ static int kvm_loongarch_env_init(void)
|
||||
}
|
||||
|
||||
kvm_init_gcsr_flag();
|
||||
kvm_register_perf_callbacks(NULL);
|
||||
|
||||
/* Register LoongArch IPI interrupt controller interface. */
|
||||
ret = kvm_loongarch_register_ipi_device();
|
||||
@@ -425,6 +426,8 @@ static void kvm_loongarch_env_exit(void)
|
||||
}
|
||||
kfree(kvm_loongarch_ops);
|
||||
}
|
||||
|
||||
kvm_unregister_perf_callbacks();
|
||||
}
|
||||
|
||||
static int kvm_loongarch_init(void)
|
||||
|
||||
Reference in New Issue
Block a user