]> git.proxmox.com Git - mirror_qemu.git/commitdiff
i386: Fix signedness of hyperv_spinlock_attempts
authorEduardo Habkost <ehabkost@redhat.com>
Sat, 15 Jun 2019 20:05:05 +0000 (17:05 -0300)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 5 Jul 2019 20:08:03 +0000 (17:08 -0300)
The current default value for hv-spinlocks is 0xFFFFFFFF (meaning
"never retry").  However, the value is stored as a signed
integer, making the getter of the hv-spinlocks QOM property
return -1 instead of 0xFFFFFFFF.

Fix this by changing the type of X86CPU::hyperv_spinlock_attempts
to uint32_t.  This has no visible effect to guest operating
systems, affecting just the behavior of the QOM getter.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190615200505.31348-1-ehabkost@redhat.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target/i386/cpu.h

index 4d2ae2384eab0791c2a2582552d48e0d0078f108..ff2635153810289fce76f8913f301450f0029d86 100644 (file)
@@ -1408,7 +1408,7 @@ struct X86CPU {
     CPUNegativeOffsetState neg;
     CPUX86State env;
 
-    int hyperv_spinlock_attempts;
+    uint32_t hyperv_spinlock_attempts;
     char *hyperv_vendor_id;
     bool hyperv_synic_kvm_only;
     uint64_t hyperv_features;