target-i386: Allow tsc-frequency to be larger then 2.147G
PATCH 1/1 target-i386: Allow tsc-frequency to be larger then 2.147G
The check using INT_MAX (2147483647) is wrong in this case.
Signed-off-by Fred Oliveira <[email protected]>
--- target-i386/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
target-i386/cpu.c +1 -1
@@ -846,7 +846,7 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque, {X86CPU *cpu =X86_CPU (obj);const int64_t min =0 ; -const int64_t max =INT_MAX ; +const int64_t max =INT64_MAX ;int64_t value;visit_type_int (v, &value, name, errp);
Signature · 1 line
1.7.7.6
Quoted 12 lines · Fred Oliveira
The check using
INT_MAX(2147483647) is wrong in this case.Signed-off-by Fred Oliveira <[email protected]>--- target-i386/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)target-i386/cpu.c +0
-0
target-i386/cpu.c static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque, · line 852
Quoted 8 lines
target-i386/cpu.c +1
-1@@ -846,7 +846,7 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque, {X86CPU *cpu =X86_CPU (obj);const int64_t min =0 ; -const int64_t max =INT_MAX ; +const int64_t max =INT64_MAX ;int64_t value;visit_type_int (v, &value, name, errp);
I think this a *trivial patch. Adding *[email protected].
-Don Slutz
**