From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42800 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OkdjS-0006jt-RK for qemu-devel@nongnu.org; Sun, 15 Aug 2010 09:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OkdjR-0003rl-I9 for qemu-devel@nongnu.org; Sun, 15 Aug 2010 09:58:38 -0400 Received: from os.inf.tu-dresden.de ([141.76.48.99]:41595) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkdjR-0003rA-DE for qemu-devel@nongnu.org; Sun, 15 Aug 2010 09:58:37 -0400 Received: from erwin.inf.tu-dresden.de ([141.76.48.80] helo=os.inf.tu-dresden.de) by os.inf.tu-dresden.de with esmtps (TLSv1:AES128-SHA:128) (Exim 4.72) id 1OkdjO-00044C-V0 for qemu-devel@nongnu.org; Sun, 15 Aug 2010 15:58:35 +0200 Date: Sun, 15 Aug 2010 15:58:32 +0200 From: Adam Lackorzynski Message-ID: <20100815135832.GA5355@os.inf.tu-dresden.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Subject: [Qemu-devel] [PATCH] target-i386: svm: Fix MSRPM check List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Correct the calculation of the offset in the msrpm for the MSR range 0 - 0x1fff. Signed-off-by: Adam Lackorzynski --- target-i386/op_helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index c50e818..ec6b3e9 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -5237,7 +5237,7 @@ void helper_svm_check_intercept_param(uint32_t type, uint64_t param) switch((uint32_t)ECX) { case 0 ... 0x1fff: t0 = (ECX * 2) % 8; - t1 = ECX / 8; + t1 = (ECX * 2) / 8; break; case 0xc0000000 ... 0xc0001fff: t0 = (8192 + ECX - 0xc0000000) * 2; -- 1.7.1