On Mon, Jun 17, 2019 at 01:48:59PM +0000, Roman Kagan wrote: > On Sat, Jun 15, 2019 at 05:05:05PM -0300, Eduardo Habkost wrote: > > 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 <ehabk...@redhat.com> > > --- > > target/i386/cpu.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Reviewed-by: Roman Kagan <rka...@virtuozzo.com> > > That said, it's tempting to just nuke qdev_prop_spinlocks and make > hv-spinlocks a regular DEFINE_PROP_UINT32...
Agreed. The only difference is that we would validate the property at realize time instead of object_property_set(). -- Eduardo