[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempt
From: |
Roman Kagan |
Subject: |
Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts |
Date: |
Mon, 17 Jun 2019 13:48:59 +0000 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
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 <address@hidden>
> ---
> target/i386/cpu.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Roman Kagan <address@hidden>
That said, it's tempting to just nuke qdev_prop_spinlocks and make
hv-spinlocks a regular DEFINE_PROP_UINT32...
>
> 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
>
- [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Eduardo Habkost, 2019/06/15
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Vitaly Kuznetsov, 2019/06/17
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts,
Roman Kagan <=
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Eduardo Habkost, 2019/06/17
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Roman Kagan, 2019/06/17
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Eduardo Habkost, 2019/06/17
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Vadim Rozenfeld, 2019/06/17
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Roman Kagan, 2019/06/18
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Roman Kagan, 2019/06/18
- Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Vadim Rozenfeld, 2019/06/18
Re: [Qemu-devel] [PATCH] i386: Fix signedness of hyperv_spinlock_attempts, Eduardo Habkost, 2019/06/18