qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts
@ 2019-06-15 20:05 Eduardo Habkost
  2019-06-17  6:59 ` Vitaly Kuznetsov
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Eduardo Habkost @ 2019-06-15 20:05 UTC (permalink / raw)
  To: Roman Kagan, Vitaly Kuznetsov, qemu-devel
  Cc: Paolo Bonzini, Eduardo Habkost, Richard Henderson

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>
---
 target/i386/cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 0732e059ec..8158d0de73 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1372,7 +1372,7 @@ struct X86CPU {
 
     bool hyperv_vapic;
     bool hyperv_relaxed_timing;
-    int hyperv_spinlock_attempts;
+    uint32_t hyperv_spinlock_attempts;
     char *hyperv_vendor_id;
     bool hyperv_time;
     bool hyperv_crash;
-- 
2.18.0.rc1.1.g3f1ff2140



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-06-18 22:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-15 20:05 [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts Eduardo Habkost
2019-06-17  6:59 ` Vitaly Kuznetsov
2019-06-17 13:48 ` Roman Kagan
2019-06-17 14:23   ` Eduardo Habkost
2019-06-17 17:32     ` Roman Kagan
2019-06-17 17:49       ` Eduardo Habkost
2019-06-18  1:24         ` Vadim Rozenfeld
2019-06-18 10:35           ` Roman Kagan
2019-06-18 11:08             ` Roman Kagan
2019-06-18 11:17             ` Vadim Rozenfeld
2019-06-18 22:54 ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).