[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d873eb4-67d2-446d-8208-a43a4a8aba14@intel.com>
Date: Thu, 23 May 2024 10:33:17 +1200
From: "Huang, Kai" <kai.huang@...el.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Chao Gao
<chao.gao@...el.com>
Subject: Re: [PATCH v2 4/6] KVM: Add arch hooks for enabling/disabling
virtualization
On 22/05/2024 2:28 pm, Sean Christopherson wrote:
> Add arch hooks that are invoked when KVM enables/disable virtualization.
> x86 will use the hooks to register an "emergency disable" callback, which
> is essentially an x86-specific shutdown notifier that is used when the
> kernel is doing an emergency reboot/shutdown/kexec.
>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
Reviewed-by: Kai Huang <kai.huang@...el.com>
[...]
> +
> static int __kvm_enable_virtualization(void)
> {
> if (__this_cpu_read(hardware_enabled))
> @@ -5604,6 +5614,8 @@ static int kvm_enable_virtualization(void)
> if (kvm_usage_count++)
> return 0;
>
> + kvm_arch_enable_virtualization();
> +
> r = cpuhp_setup_state(CPUHP_AP_KVM_ONLINE, "kvm/cpu:online",
> kvm_online_cpu, kvm_offline_cpu);
Nit: is kvm_arch_pre_enable_virtualization() a better name?
Powered by blists - more mailing lists