]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: KVM: Use cpumask_available() to check for NULL cpumask when kicking vCPUs
authorSean Christopherson <seanjc@google.com>
Fri, 27 Aug 2021 09:25:10 +0000 (11:25 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:33:15 +0000 (10:33 -0400)
commit253d38bcf0ef8ca39c054153c4503b3f35bef97f
treef28f7a59b2f13d18d3c9038dd82b6ad50b66e761
parentba1cbf46807a598f4ccbb800bc1e6bc5b2cf9897
KVM: KVM: Use cpumask_available() to check for NULL cpumask when kicking vCPUs

Check for a NULL cpumask_var_t when kicking multiple vCPUs via
cpumask_available(), which performs a !NULL check if and only if cpumasks
are configured to be allocated off-stack.  This is a meaningless
optimization, e.g. avoids a TEST+Jcc and TEST+CMOV on x86, but more
importantly helps document that the NULL check is necessary even though
all callers pass in a local variable.

No functional change intended.

Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210827092516.1027264-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c