Re: [PATCH v4 16/26] KVM: kvm_arch.c: Remove a global variable, hardware_enable_failed

From: Isaku Yamahata
Date: Sat Sep 10 2022 - 23:01:06 EST


On Fri, Sep 09, 2022 at 02:54:05PM +0800,
Chao Gao <chao.gao@xxxxxxxxx> wrote:

> >diff --git a/virt/kvm/kvm_arch.c b/virt/kvm/kvm_arch.c
> >index 4fe16e8ef2e5..ad23537ebe3b 100644
> >--- a/virt/kvm/kvm_arch.c
> >+++ b/virt/kvm/kvm_arch.c
> >@@ -13,14 +13,13 @@
> > #include <linux/kvm_host.h>
> >
> > static cpumask_t cpus_hardware_enabled = CPU_MASK_NONE;
> >-static atomic_t hardware_enable_failed;
> >
> > __weak int kvm_arch_post_init_vm(struct kvm *kvm)
> > {
> > return 0;
> > }
> >
> >-static void hardware_enable(void *caller_name)
> >+static int __hardware_enable(void *caller_name)
>
> nit: caller_name can be dropped and use __builtin_return_address(0) instead.

Do you want to update your patch
"KVM: Provide more information in kernel log if hardware enabling fails"?
--
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>