if ((i == VIR_DOMAIN_HYPERV_STIMER) &&
(def->hyperv_stimer_direct == VIR_TRISTATE_SWITCH_ON))
virBufferAsprintf(&buf, ",%s=on", VIR_CPU_x86_HV_STIMER_DIRECT);
+ if (i == VIR_DOMAIN_HYPERV_TLBFLUSH) {
+ if (def->hyperv_tlbflush_direct == VIR_TRISTATE_SWITCH_ON)
+ virBufferAsprintf(&buf, ",%s=on", VIR_CPU_x86_HV_TLBFLUSH_DIRECT);
+ if (def->hyperv_tlbflush_extended == VIR_TRISTATE_SWITCH_ON)
+ virBufferAsprintf(&buf, ",%s=on", VIR_CPU_x86_HV_TLBFLUSH_EXT);
+ }
break;
case VIR_DOMAIN_HYPERV_SPINLOCKS:
"direct");
return -1;
}
+ if (i == VIR_DOMAIN_HYPERV_TLBFLUSH) {
+ if (def->hyperv_tlbflush_direct == VIR_TRISTATE_SWITCH_ON) {
+ rc = virCPUDataCheckFeature(cpu, VIR_CPU_x86_HV_TLBFLUSH_DIRECT);
+ if (rc < 0)
+ return -1;
+ if (rc == 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("host doesn't support hyperv tlbflush '%1$s' feature"),
+ "direct");
+ return -1;
+ }
+ }
+ if (def->hyperv_tlbflush_extended == VIR_TRISTATE_SWITCH_ON) {
+ rc = virCPUDataCheckFeature(cpu, VIR_CPU_x86_HV_TLBFLUSH_EXT);
+ if (rc < 0)
+ return -1;
+ if (rc == 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("host doesn't support hyperv tlbflush '%1$s' feature"),
+ "extended");
+ return -1;
+ }
+ }
+ }
continue;
}
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \
-accel tcg \
--cpu 'qemu64,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x2fff,hv-vpindex=on,hv-runtime=on,hv-synic=on,hv-stimer=on,hv-reset=on,hv-vendor-id=KVM Hv,hv-frequencies=on,hv-reenlightenment=on,hv-tlbflush=on,hv-ipi=on,hv-evmcs=on,hv-avic=on,hv-emsr-bitmap=on,hv-xmm-input=on' \
+-cpu 'qemu64,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x2fff,hv-vpindex=on,hv-runtime=on,hv-synic=on,hv-stimer=on,hv-reset=on,hv-vendor-id=KVM Hv,hv-frequencies=on,hv-reenlightenment=on,hv-tlbflush=on,hv-tlbflush-direct=on,hv-tlbflush-ext=on,hv-ipi=on,hv-evmcs=on,hv-avic=on,hv-emsr-bitmap=on,hv-xmm-input=on' \
-m size=219136k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
-overcommit mem-lock=off \
<vendor_id state='on' value='KVM Hv'/>
<frequencies state='on'/>
<reenlightenment state='on'/>
- <tlbflush state='on'/>
+ <tlbflush state='on'>
+ <direct state='on'/>
+ <extended state='on'/>
+ </tlbflush>
<ipi state='on'/>
<evmcs state='on'/>
<avic state='on'/>