mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-11-05 16:24:27 +03:00
qemu: Fix hyperv spinlock retries count type mismatch
Use unsigned int for sprintf and update tests to ensure it can hold INT_MAX+1. Signed-off-by: Friedrich Oslage <friedrich@oslage.de> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
6862969cf8
commit
d0de1b89be
@@ -28633,7 +28633,7 @@ virDomainFeaturesHyperVDefFormat(virBuffer *buf,
|
||||
case VIR_DOMAIN_HYPERV_SPINLOCKS:
|
||||
if (def->hyperv.features[j] == VIR_TRISTATE_SWITCH_ON) {
|
||||
virBufferAsprintf(&hypervAttrBuf,
|
||||
" retries='%d'", def->hyperv.spinlocks);
|
||||
" retries='%u'", def->hyperv.spinlocks);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-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-time=on,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' \
|
||||
-cpu 'qemu64,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x80000000,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 \
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<hyperv mode='custom'>
|
||||
<relaxed state='on'/>
|
||||
<vapic state='on'/>
|
||||
<spinlocks state='on' retries='12287'/>
|
||||
<spinlocks state='on' retries='2147483648'/>
|
||||
<vpindex state='on'/>
|
||||
<runtime state='on'/>
|
||||
<synic state='on'/>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<hyperv>
|
||||
<relaxed state='on'/>
|
||||
<vapic state='on'/>
|
||||
<spinlocks state='on' retries='12287'/>
|
||||
<spinlocks state='on' retries='2147483648'/>
|
||||
<vpindex state='on'/>
|
||||
<runtime state='on'/>
|
||||
<synic state='on'/>
|
||||
|
||||
Reference in New Issue
Block a user