From patchwork Fri Aug 31 12:30:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fred Oliveira X-Patchwork-Id: 180960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 344EA2C0361 for ; Fri, 31 Aug 2012 23:38:23 +1000 (EST) Received: from localhost ([::1]:38439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7RQT-0005XV-Kp for incoming@patchwork.ozlabs.org; Fri, 31 Aug 2012 09:38:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7QkG-0003WF-3y for qemu-devel@nongnu.org; Fri, 31 Aug 2012 08:54:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7Qk8-00082W-4L for qemu-devel@nongnu.org; Fri, 31 Aug 2012 08:54:44 -0400 Received: from hub021-nj-6.exch021.serverdata.net ([206.225.164.222]:42617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7Qk8-00082P-0e for qemu-devel@nongnu.org; Fri, 31 Aug 2012 08:54:36 -0400 Received: from fred-dell.cloudswitch.com (131.239.15.22) by east.exch021.serverdata.net (10.240.4.93) with Microsoft SMTP Server (TLS) id 14.2.309.2; Fri, 31 Aug 2012 05:30:20 -0700 From: Fred Oliveira To: Date: Fri, 31 Aug 2012 08:30:08 -0400 Message-ID: <1346416208-28004-1-git-send-email-foliveira@cloudswitch.com> X-Mailer: git-send-email 1.7.7.6 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-Received-From: 206.225.164.222 X-Mailman-Approved-At: Fri, 31 Aug 2012 09:38:15 -0400 Cc: Fred Oliveira Subject: [Qemu-devel] [PATCH] target-i386: Allow tsc-frequency to be larger then 2.147G X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira --- target-i386/cpu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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);