mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
qemu: add support for Hyper-V PV IPIs
QEMU 3.1 supports Hyper-V-style PV IPIs making it cheaper for Windows guests to send an IPI, especially when it targets many CPUs. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
This commit is contained in:
parent
988113f4fa
commit
1c596f4964
src/qemu
tests
@ -6882,6 +6882,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
|
||||
case VIR_DOMAIN_HYPERV_FREQUENCIES:
|
||||
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
|
||||
case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||
case VIR_DOMAIN_HYPERV_IPI:
|
||||
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON)
|
||||
virBufferAsprintf(&buf, ",hv_%s",
|
||||
virDomainHypervTypeToString(i));
|
||||
@ -6899,7 +6900,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
|
||||
def->hyperv_vendor_id);
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_HYPERV_IPI:
|
||||
/* coverity[dead_error_begin] */
|
||||
case VIR_DOMAIN_HYPERV_LAST:
|
||||
break;
|
||||
|
@ -1539,6 +1539,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
|
||||
case VIR_DOMAIN_HYPERV_FREQUENCIES:
|
||||
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
|
||||
case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||
case VIR_DOMAIN_HYPERV_IPI:
|
||||
if (value) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("HyperV feature '%s' should not "
|
||||
@ -1579,7 +1580,6 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
|
||||
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_HYPERV_IPI:
|
||||
case VIR_DOMAIN_HYPERV_LAST:
|
||||
break;
|
||||
}
|
||||
|
@ -3964,12 +3964,12 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def,
|
||||
case VIR_DOMAIN_HYPERV_FREQUENCIES:
|
||||
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
|
||||
case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||
case VIR_DOMAIN_HYPERV_IPI:
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("host doesn't support hyperv '%s' feature"),
|
||||
virDomainHypervTypeToString(i));
|
||||
return -1;
|
||||
|
||||
case VIR_DOMAIN_HYPERV_IPI:
|
||||
/* coverity[dead_error_begin] */
|
||||
case VIR_DOMAIN_HYPERV_VENDOR_ID:
|
||||
case VIR_DOMAIN_HYPERV_LAST:
|
||||
|
@ -23,6 +23,7 @@
|
||||
<frequencies state='off'/>
|
||||
<reenlightenment state='off'/>
|
||||
<tlbflush state='off'/>
|
||||
<ipi 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_reenlightenment,hv_tlbflush,hv_ipi' \
|
||||
-m 214 \
|
||||
-smp 6,sockets=6,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
|
@ -23,6 +23,7 @@
|
||||
<frequencies state='on'/>
|
||||
<reenlightenment state='on'/>
|
||||
<tlbflush state='on'/>
|
||||
<ipi state='on'/>
|
||||
</hyperv>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
|
@ -23,6 +23,7 @@
|
||||
<frequencies state='off'/>
|
||||
<reenlightenment state='off'/>
|
||||
<tlbflush state='off'/>
|
||||
<ipi state='off'/>
|
||||
</hyperv>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
|
@ -23,6 +23,7 @@
|
||||
<frequencies state='on'/>
|
||||
<reenlightenment state='on'/>
|
||||
<tlbflush state='on'/>
|
||||
<ipi state='on'/>
|
||||
</hyperv>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user