aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/x86.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-09-04 14:43:19 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-07 13:32:37 +0200
commitef1cf6890f38073181edbc334b49192a6434d396 (patch)
tree48f82baaaae0838e6b4ffddbf7e26bf646d7d30e /hw/i386/x86.c
parent9926cf34de5fa15da1d58e809692b5c7ccf72ec5 (diff)
target/i386: Allow elision of kvm_hv_vpindex_settable()
Call kvm_enabled() before kvm_hv_vpindex_settable() to let the compiler elide its call. kvm-stub.c is now empty, remove it. Suggested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230904124325.79040-9-philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/x86.c')
-rw-r--r--hw/i386/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 3e86cf3060..f034df8bf6 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -421,7 +421,7 @@ void x86_cpu_pre_plug(HotplugHandler *hotplug_dev,
cpu->thread_id = topo_ids.smt_id;
if (hyperv_feat_enabled(cpu, HYPERV_FEAT_VPINDEX) &&
- !kvm_hv_vpindex_settable()) {
+ kvm_enabled() && !kvm_hv_vpindex_settable()) {
error_setg(errp, "kernel doesn't allow setting HyperV VP_INDEX");
return;
}