qemu/0310-target-i386-Allow-tsc-frequency-to-be-larger-then-2..patch
Cole Robinson 9290838132 Fix boot hang if console is not connected (bz #894451)
Fix segfault with zero length virtio-scsi disk (bz #847549)
2013-02-02 15:47:37 -05:00

31 lines
1.0 KiB
Diff

From 4c512ed2aa98b5219b84fa98e8b3ac9ef0128436 Mon Sep 17 00:00:00 2001
From: Don Slutz <Don@CloudSwitch.com>
Date: Fri, 21 Sep 2012 20:13:13 -0400
Subject: [PATCH] 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 <foliveira@cloudswitch.com>
Signed-off-by: Don Slutz <Don@CloudSwitch.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
(cherry picked from commit 2e84849aa2cc7f220d3b3668f5f7e3c57bb1b590)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
target-i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 423e009..cbc172e 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -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);