diff mbox series

[7/8] i386/kvm: hv-tlbflush/ipi require hv-vpindex

Message ID 20190329141832.22882-8-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 March 29, 2019, 2:18 p.m. UTC
The corresponding hypercalls require using VP indexes.

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 524ee28e9c..976c1d570f 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -1192,6 +1192,12 @@  static int hyperv_handle_properties(CPUState *cs,
     if (cpu->hyperv_stimer && !cpu->hyperv_time) {
         r |= hv_report_missing_dep(cpu, "hv-stimer", "hv-time");
     }
+    if (cpu->hyperv_tlbflush && !cpu->hyperv_vpindex) {
+        r |= hv_report_missing_dep(cpu, "hv-tlbflush", "hv-vpindex");
+    }
+    if (cpu->hyperv_ipi && !cpu->hyperv_vpindex) {
+        r |= hv_report_missing_dep(cpu, "hv-ipi", "hv-vpindex");
+    }
 
     /* Not exposed by KVM but needed to make CPU hotplug in Windows work */
     env->features[FEAT_HYPERV_EDX] |= HV_CPU_DYNAMIC_PARTITIONING_AVAILABLE;