qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "John R. Lange" <jarusl@cs.northwestern.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] fixed bug in SVM_EXIT_MSR handlers MSR bitmap lookup for low order MSRs
Date: Fri, 18 Sep 2009 13:11:52 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0909181310150.20744@zappa.cs.northwestern.edu> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 737 bytes --]


It looks like there was a minor calculation error in the SVM_EXIT_MSR bitmap
lookup.

---
  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 c3f5af6..dcee7a3 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -5209,7 +5209,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.6.0.2

[-- Attachment #2: Type: TEXT/PLAIN, Size: 910 bytes --]

From 37ae301634c1d535f77b879dae48e68abb6e69ba Mon Sep 17 00:00:00 2001
From: Jack Lange <jarusl@cs.northwestern.edu>
Date: Thu, 17 Sep 2009 13:43:14 -0500
Subject: [PATCH] fixed bug in SVM_EXIT_MSR handler's bitmap lookup for low order MSRs

---
 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 c3f5af6..dcee7a3 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -5209,7 +5209,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.6.0.2


             reply	other threads:[~2009-09-18 18:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-18 18:11 John R. Lange [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-17 20:13 [Qemu-devel] [PATCH] fixed bug in SVM_EXIT_MSR handlers MSR bitmap lookup for low order MSRs John R. Lange
2009-09-30 19:19 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0909181310150.20744@zappa.cs.northwestern.edu \
    --to=jarusl@cs.northwestern.edu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).