提交 362b4ee6 编写于 作者: V Vitaly Kuznetsov 提交者: Andrea Bolognani

qemu: add support for Hyper-V Enlightened VMCS

QEMU 3.1 supports Hyper-V Enlightened VMCS feature which significantly
speeds up nested Hyper-V on KVM environments.
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
上级 c3d0d7cc
......@@ -6883,6 +6883,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
case VIR_DOMAIN_HYPERV_TLBFLUSH:
case VIR_DOMAIN_HYPERV_IPI:
case VIR_DOMAIN_HYPERV_EVMCS:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON)
virBufferAsprintf(&buf, ",hv_%s",
virDomainHypervTypeToString(i));
......@@ -6900,7 +6901,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
def->hyperv_vendor_id);
break;
case VIR_DOMAIN_HYPERV_EVMCS:
/* coverity[dead_error_begin] */
case VIR_DOMAIN_HYPERV_LAST:
break;
......
......@@ -1540,6 +1540,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
case VIR_DOMAIN_HYPERV_TLBFLUSH:
case VIR_DOMAIN_HYPERV_IPI:
case VIR_DOMAIN_HYPERV_EVMCS:
if (value) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("HyperV feature '%s' should not "
......@@ -1580,7 +1581,6 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
break;
case VIR_DOMAIN_HYPERV_EVMCS:
case VIR_DOMAIN_HYPERV_LAST:
break;
}
......
......@@ -3965,12 +3965,12 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
case VIR_DOMAIN_HYPERV_TLBFLUSH:
case VIR_DOMAIN_HYPERV_IPI:
case VIR_DOMAIN_HYPERV_EVMCS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("host doesn't support hyperv '%s' feature"),
virDomainHypervTypeToString(i));
return -1;
case VIR_DOMAIN_HYPERV_EVMCS:
/* coverity[dead_error_begin] */
case VIR_DOMAIN_HYPERV_VENDOR_ID:
case VIR_DOMAIN_HYPERV_LAST:
......
......@@ -24,6 +24,7 @@
<reenlightenment state='off'/>
<tlbflush state='off'/>
<ipi state='off'/>
<evmcs state='off'/>
</hyperv>
</features>
<clock offset='utc'/>
......
......@@ -10,7 +10,7 @@ QEMU_AUDIO_DRV=none \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-cpu 'qemu32,hv_relaxed,hv_vapic,hv_spinlocks=0x2fff,hv_vpindex,hv_runtime,\
hv_synic,hv_stimer,hv_reset,hv_vendor_id=KVM Hv,hv_frequencies,\
hv_reenlightenment,hv_tlbflush,hv_ipi' \
hv_reenlightenment,hv_tlbflush,hv_ipi,hv_evmcs' \
-m 214 \
-smp 6,sockets=6,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
......
......@@ -24,6 +24,7 @@
<reenlightenment state='on'/>
<tlbflush state='on'/>
<ipi state='on'/>
<evmcs state='on'/>
</hyperv>
</features>
<clock offset='utc'/>
......
......@@ -24,6 +24,7 @@
<reenlightenment state='off'/>
<tlbflush state='off'/>
<ipi state='off'/>
<evmcs state='off'/>
</hyperv>
</features>
<clock offset='utc'/>
......
......@@ -24,6 +24,7 @@
<reenlightenment state='on'/>
<tlbflush state='on'/>
<ipi state='on'/>
<evmcs state='on'/>
</hyperv>
</features>
<clock offset='utc'/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册