qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 18/43] apic-common: make "id" property a uint


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v3 18/43] apic-common: make "id" property a uint32
Date: Thu, 08 Jun 2017 18:39:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> The getter and setter of TYPE_APIC_COMMON property "id" are
> apic_common_get_id() and apic_common_set_id().
>
> apic_common_get_id() reads either APICCommonState member uint32_t
> initial_apic_id or uint8_t id into an int64_t local variable.  It then
> passes this variable to visit_type_int().
>
> apic_common_set_id() uses visit_type_int() to read the value into a
> local variable, which it then assigns both to initial_apic_id and id.
>
> While the state backing the property is two unsigned members, 8 and 32
> bits wide, the actual visitor is 64 bits signed.
>
> Change getter and setter to use visit_type_uint32().  Then everything's
> uint32_t, except for @id.
>
> Suggested-by: Markus Armbruster <address@hidden>
> Signed-off-by: Marc-André Lureau <address@hidden>

Reviewed-by: Markus Armbruster <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]