diff mbox series

[RFC,6/8] i386/kvm: hv-stimer requires hv-time and hv-synic

Message ID 20190125114155.32062-7-vkuznets@redhat.com (mailing list archive)
State New, archived
Headers show
Series i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments | expand

Commit Message

Vitaly Kuznetsov Jan. 25, 2019, 11:41 a.m. UTC
Synthetic timers operate in hv-time time and Windows won't use these
without SynIC.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 target/i386/kvm.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 674c5dc185..7461bf05dd 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -1177,6 +1177,12 @@  static int hyperv_handle_properties(CPUState *cs,
     if (cpu->hyperv_evmcs && !cpu->hyperv_vapic) {
         r |= hv_report_missing_dep(cpu, "hv-evmcs", "hv-vapic");
     }
+    if (cpu->hyperv_stimer && !cpu->hyperv_synic) {
+        r |= hv_report_missing_dep(cpu, "hv-stimer", "hv-synic");
+    }
+    if (cpu->hyperv_stimer && !cpu->hyperv_time) {
+        r |= hv_report_missing_dep(cpu, "hv-stimer", "hv-time");
+    }
 
     /* Not exposed by KVM but needed to make CPU hotplug in Windows work */
     env->features[FEAT_HYPERV_EDX] |= HV_CPU_DYNAMIC_PARTITIONING_AVAILABLE;