WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] 64-bit hvm on 32-bit dom0 - ioemu adjustm

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] 64-bit hvm on 32-bit dom0 - ioemu adjustments
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 May 2007 08:21:31 -0700
Delivery-date: Tue, 15 May 2007 08:23:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1179219591 -3600
# Node ID 3581a77791e3a4951174585fbc60510b5b6f01f9
# Parent  75b4c7cb007dd4cdf30321c4fbd2e67e885628c3
64-bit hvm on 32-bit dom0 - ioemu adjustments

Don't mask off data bits when running 64-bit hvm guests on 32-bit dom0.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 tools/ioemu/target-i386-dm/helper2.c |   33 +++++++++++++++------------------
 1 files changed, 15 insertions(+), 18 deletions(-)

diff -r 75b4c7cb007d -r 3581a77791e3 tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c      Tue May 15 09:54:27 2007 +0100
+++ b/tools/ioemu/target-i386-dm/helper2.c      Tue May 15 09:59:51 2007 +0100
@@ -322,7 +322,7 @@ void cpu_ioreq_pio(CPUState *env, ioreq_
             do_outp(env, req->addr, req->size, req->data);
         } else {
             for (i = 0; i < req->count; i++) {
-                unsigned long tmp;
+                unsigned long tmp = 0;
 
                 read_physical((target_phys_addr_t) req->data
                   + (sign * i * req->size),
@@ -354,7 +354,7 @@ void cpu_ioreq_move(CPUState *env, ioreq
             }
         }
     } else {
-        unsigned long tmp;
+        target_ulong tmp;
 
         if (req->dir == IOREQ_READ) {
             for (i = 0; i < req->count; i++) {
@@ -380,14 +380,14 @@ void cpu_ioreq_move(CPUState *env, ioreq
 
 void cpu_ioreq_and(CPUState *env, ioreq_t *req)
 {
-    unsigned long tmp1, tmp2;
+    target_ulong tmp1, tmp2;
 
     if (req->data_is_ptr != 0)
         hw_error("expected scalar value");
 
     read_physical(req->addr, req->size, &tmp1);
     if (req->dir == IOREQ_WRITE) {
-        tmp2 = tmp1 & (unsigned long) req->data;
+        tmp2 = tmp1 & (target_ulong) req->data;
         write_physical(req->addr, req->size, &tmp2);
     }
     req->data = tmp1;
@@ -395,14 +395,14 @@ void cpu_ioreq_and(CPUState *env, ioreq_
 
 void cpu_ioreq_add(CPUState *env, ioreq_t *req)
 {
-    unsigned long tmp1, tmp2;
+    target_ulong tmp1, tmp2;
 
     if (req->data_is_ptr != 0)
         hw_error("expected scalar value");
 
     read_physical(req->addr, req->size, &tmp1);
     if (req->dir == IOREQ_WRITE) {
-        tmp2 = tmp1 + (unsigned long) req->data;
+        tmp2 = tmp1 + (target_ulong) req->data;
         write_physical(req->addr, req->size, &tmp2);
     }
     req->data = tmp1;
@@ -410,14 +410,14 @@ void cpu_ioreq_add(CPUState *env, ioreq_
 
 void cpu_ioreq_sub(CPUState *env, ioreq_t *req)
 {
-    unsigned long tmp1, tmp2;
+    target_ulong tmp1, tmp2;
 
     if (req->data_is_ptr != 0)
         hw_error("expected scalar value");
 
     read_physical(req->addr, req->size, &tmp1);
     if (req->dir == IOREQ_WRITE) {
-        tmp2 = tmp1 - (unsigned long) req->data;
+        tmp2 = tmp1 - (target_ulong) req->data;
         write_physical(req->addr, req->size, &tmp2);
     }
     req->data = tmp1;
@@ -425,14 +425,14 @@ void cpu_ioreq_sub(CPUState *env, ioreq_
 
 void cpu_ioreq_or(CPUState *env, ioreq_t *req)
 {
-    unsigned long tmp1, tmp2;
+    target_ulong tmp1, tmp2;
 
     if (req->data_is_ptr != 0)
         hw_error("expected scalar value");
 
     read_physical(req->addr, req->size, &tmp1);
     if (req->dir == IOREQ_WRITE) {
-        tmp2 = tmp1 | (unsigned long) req->data;
+        tmp2 = tmp1 | (target_ulong) req->data;
         write_physical(req->addr, req->size, &tmp2);
     }
     req->data = tmp1;
@@ -440,14 +440,14 @@ void cpu_ioreq_or(CPUState *env, ioreq_t
 
 void cpu_ioreq_xor(CPUState *env, ioreq_t *req)
 {
-    unsigned long tmp1, tmp2;
+    target_ulong tmp1, tmp2;
 
     if (req->data_is_ptr != 0)
         hw_error("expected scalar value");
 
     read_physical(req->addr, req->size, &tmp1);
     if (req->dir == IOREQ_WRITE) {
-        tmp2 = tmp1 ^ (unsigned long) req->data;
+        tmp2 = tmp1 ^ (target_ulong) req->data;
         write_physical(req->addr, req->size, &tmp2);
     }
     req->data = tmp1;
@@ -495,12 +495,9 @@ void cpu_ioreq_xchg(CPUState *env, ioreq
 
 void __handle_ioreq(CPUState *env, ioreq_t *req)
 {
-    if (!req->data_is_ptr && (req->dir == IOREQ_WRITE)) {
-        /* Clamp data operand to size of a long. */
-        if (req->size < sizeof(long))
-            req->data &= (1UL << (8 * req->size)) - 1;
-        req->data = (unsigned long)req->data;
-    }
+    if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) &&
+        (req->size < sizeof(target_ulong)))
+        req->data &= ((target_ulong)1 << (8 * req->size)) - 1;
 
     switch (req->type) {
     case IOREQ_TYPE_PIO:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] 64-bit hvm on 32-bit dom0 - ioemu adjustments, Xen patchbot-unstable <=