aboutsummaryrefslogtreecommitdiff
path: root/target/i386/kvm.c
diff options
context:
space:
mode:
authorRoman Kagan <rkagan@virtuozzo.com>2018-09-21 11:20:39 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-19 13:44:13 +0200
commit701189e31140a7c82ec02a7f4ca632cfd6a8559d (patch)
tree3d8be9e7f4a05214a33cf713a7f732be797ae0d9 /target/i386/kvm.c
parent51f0ac63812abf41d3a9284a272c6275d7318705 (diff)
hyperv: factor out arch-independent API into hw/hyperv
A significant part of hyperv.c is not actually tied to x86, and can be moved to hw/. This will allow to maintain most of Hyper-V and VMBus target-independent, and to avoid conflicts with inclusion of arch-specific headers down the road in VMBus implementation. Also this stuff can now be opt-out with CONFIG_HYPERV. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> Message-Id: <20180921082041.29380-4-rkagan@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/kvm.c')
-rw-r--r--target/i386/kvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 4e62b5c39b..b0b42d2991 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -774,7 +774,7 @@ static int hyperv_init_vcpu(X86CPU *cpu)
}
assert(ret == 1);
- if (msr_data.entries[0].data != hyperv_vp_index(cpu)) {
+ if (msr_data.entries[0].data != hyperv_vp_index(CPU(cpu))) {
error_report("kernel's vp_index != QEMU's vp_index");
return -ENXIO;
}
@@ -1949,7 +1949,8 @@ static int kvm_put_msrs(X86CPU *cpu, int level)
kvm_msr_entry_add(cpu, HV_X64_MSR_VP_RUNTIME, env->msr_hv_runtime);
}
if (cpu->hyperv_vpindex && hv_vpindex_settable) {
- kvm_msr_entry_add(cpu, HV_X64_MSR_VP_INDEX, hyperv_vp_index(cpu));
+ kvm_msr_entry_add(cpu, HV_X64_MSR_VP_INDEX,
+ hyperv_vp_index(CPU(cpu)));
}
if (cpu->hyperv_synic) {
int j;