summaryrefslogtreecommitdiff
path: root/target/i386/hyperv.h
diff options
context:
space:
mode:
authorRoman Kagan <rkagan@virtuozzo.com>2018-09-21 11:20:38 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-19 13:44:13 +0200
commit51f0ac63812abf41d3a9284a272c6275d7318705 (patch)
tree637d5b87f5ff427af193d754c6871bfcf9151ba6 /target/i386/hyperv.h
parent5116122af70357d895ecc61c0211dbf786226081 (diff)
hyperv: make hyperv_vp_index inline
Also make the inverse function, hyperv_find_vcpu, static as it's not used outside hyperv.c This paves the way to making hyperv.c built optionally. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> Message-Id: <20180921082041.29380-3-rkagan@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hyperv.h')
-rw-r--r--target/i386/hyperv.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h
index 59e9f9a1e1..8d4619c078 100644
--- a/target/i386/hyperv.h
+++ b/target/i386/hyperv.h
@@ -30,7 +30,9 @@ void hyperv_sint_route_unref(HvSintRoute *sint_route);
int hyperv_sint_route_set_sint(HvSintRoute *sint_route);
-uint32_t hyperv_vp_index(X86CPU *cpu);
-X86CPU *hyperv_find_vcpu(uint32_t vp_index);
+static inline uint32_t hyperv_vp_index(X86CPU *cpu)
+{
+ return CPU(cpu)->cpu_index;
+}
#endif