aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2019-05-17 16:19:16 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-06-21 02:29:38 +0200
commit2d384d7c836142a1ce851442bd6fb8e03a72663a (patch)
tree44a1634d89d865788ed221f14565b4d47fd66f0a /hw
parent6f38dca615286796df9a967117f3ce42b918c8db (diff)
downloadqemu-2d384d7c836142a1ce851442bd6fb8e03a72663a.zip
qemu-2d384d7c836142a1ce851442bd6fb8e03a72663a.tar.gz
qemu-2d384d7c836142a1ce851442bd6fb8e03a72663a.tar.bz2
i386/kvm: convert hyperv enlightenments properties from bools to bits
Representing Hyper-V properties as bits will allow us to check features and dependencies between them in a natural way. Suggested-by: Roman Kagan <rkagan@virtuozzo.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20190517141924.19024-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/pc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2c5446b..e41192b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2386,7 +2386,8 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
}
cpu->thread_id = topo.smt_id;
- if (cpu->hyperv_vpindex && !kvm_hv_vpindex_settable()) {
+ if (hyperv_feat_enabled(cpu, HYPERV_FEAT_VPINDEX) &&
+ !kvm_hv_vpindex_settable()) {
error_setg(errp, "kernel doesn't allow setting HyperV VP_INDEX");
return;
}