diff mbox

fixed bug in SVM_EXIT_MSR handlers MSR bitmap lookup for low order MSRs

Message ID Pine.LNX.4.64.0909171511210.24341@zappa.cs.northwestern.edu
State Superseded
Headers show

Commit Message

John R. Lange Sept. 17, 2009, 8:13 p.m. UTC
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(-)

Comments

Anthony Liguori Sept. 30, 2009, 7:19 p.m. UTC | #1
John R. Lange wrote:
>
> It looks like there was a minor calculation error in the SVM_EXIT_MSR 
> bitmap lookup.

Missinged Signed-off-by, also doesn't apply to tip.

Regards,

Anthony Liguori

> ---
>  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;
diff mbox

Patch

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;