Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and bonzini committed Sep 7, 2023
1 parent 9926cf3 commit ef1cf68
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion hw/i386/x86.c
Expand Up @@ -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;
}
Expand Down
18 changes: 0 additions & 18 deletions target/i386/kvm/kvm-stub.c

This file was deleted.

2 changes: 0 additions & 2 deletions target/i386/kvm/meson.build
@@ -1,5 +1,3 @@
i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))

i386_softmmu_kvm_ss = ss.source_set()

i386_softmmu_kvm_ss.add(files(
Expand Down

0 comments on commit ef1cf68

Please sign in to comment.