[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgMMlaMnjQRqwW6w@google.com>
Date: Wed, 9 Feb 2022 00:36:37 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Chao Gao <chao.gao@...el.com>
Cc: kvm@...r.kernel.org, pbonzini@...hat.com, kevin.tian@...el.com,
tglx@...utronix.de, Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] KVM: Do compatibility checks on hotplugged CPUs
On Tue, Jan 18, 2022, Chao Gao wrote:
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 528741601122..83f87fb1fa0a 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -4858,7 +4858,13 @@ static void hardware_enable_nolock(void *junk)
>
> static int kvm_online_cpu(unsigned int cpu)
> {
> - int ret = 0;
> + int ret;
> +
> + ret = kvm_arch_check_processor_compat();
> + if (ret) {
> + pr_warn("kvm: CPU%d is incompatible with online CPUs", cpu);
Hmm, I'd say omit the pr_warn() here too and instead add a pr_err() for the
setup_vmcs_config() path in vmx_check_processor_compat().
> + return ret;
> + }
Powered by blists - more mailing lists