On Thu, Oct 10, 2024 at 04:56:27PM +0200, Markus Armbruster wrote:
> Properties "family", "model", and "stepping" are visited as signed
> integers.  They are backed by bits in CPUX86State member
> @cpuid_version.  The code to extract and insert these bits mixes
> signed and unsigned.  Not actually wrong, but avoiding such mixing is
> good practice.
> 
> Visit them as unsigned integers instead.
> 
> This adds a few mildly ugly cast in arguments of error_setg().  The
> next commit will get rid of them.
> 
> Property "tsc-frequency" is also visited as signed integer.  The value
> ultimately flows into the kernel, where it is 31 bits unsigned.  The
> QEMU code freely mixes int, uint32_t, int64_t.  I elect not to try
> draining this swamp today.
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  target/i386/cpu.c | 45 +++++++++++++++++++++------------------------
>  1 file changed, 21 insertions(+), 24 deletions(-)

Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to