qemu/target-i386
Paolo Bonzini 06ef227e51 target-i386: avoid overflow in the tsc-frequency property
The TSC frequency fits comfortably in an int when expressed in kHz,
but it may overflow when converted to Hz.  In this case,
tsc-frequency returns a negative value because x86_cpuid_get_tsc_freq
does a 32-bit multiplication before assigning to int64_t.

For simplicity just make tsc_khz a 64-bit value.

Spotted by Coverity.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-07-07 10:47:16 -03:00
..
2015-07-07 10:47:16 -03:00
2015-07-06 18:39:59 +02:00
2015-07-06 18:39:59 +02:00
2015-07-07 10:47:16 -03:00
2014-12-15 12:21:01 +01:00
2015-06-22 17:40:01 +02:00