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-devel

[Xen-devel] Re: [PATCH 2/5] exec.c: Use ram_addr_t in cpu_physical_memor

To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 2/5] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...).
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Fri, 15 Jul 2011 16:46:23 +0200
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, QEMU-devel <qemu-devel@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Alexander Graf <agraf@xxxxxxx>
Delivery-date: Fri, 15 Jul 2011 07:47:23 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:newsgroups:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WQvCNpswI7eHP5yhDVLCz6GWfCtW73DzR5+0YE5Kw4U=; b=RS5oJ+YSsKH+fduey7z6uuhlpIsaHxNju77zGfVNc0kip1/iASux8ucE2TcXtn6Lit qw2KaHWteivOqnW3bNNhWNXlZJNemMHdSmGcNRDv3WxNsGljnv8cJMaIYs6j5Ug25wOv YdDmz1ujKtstOkrWBqbiXNKdZ5ynT6r9taN64=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1310740376-13323-3-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: gmane.comp.emulators.xen.devel, gmane.comp.emulators.qemu
References: <1310740376-13323-1-git-send-email-anthony.perard@xxxxxxxxxx> <1310740376-13323-3-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10
On 07/15/2011 04:32 PM, Anthony PERARD wrote:
As the variable pd and addr1 inside the function cpu_physical_memory_rw
are mean to handle a RAM address, they should be of the ram_addr_t type
instead of unsigned long.

Signed-off-by: Anthony PERARD<anthony.perard@xxxxxxxxxx>
---
  exec.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec.c b/exec.c
index c0673c2..4220d45 100644
--- a/exec.c
+++ b/exec.c
@@ -3858,7 +3858,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, 
uint8_t *buf,
      uint8_t *ptr;
      uint32_t val;
      target_phys_addr_t page;
-    unsigned long pd;
+    ram_addr_t pd;
      PhysPageDesc *p;

      while (len>  0) {
@@ -3898,7 +3898,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, 
uint8_t *buf,
                      l = 1;
                  }
              } else {
-                unsigned long addr1;
+                ram_addr_t addr1;
                  addr1 = (pd&  TARGET_PAGE_MASK) + (addr&  ~TARGET_PAGE_MASK);
                  /* RAM case */
                  ptr = qemu_get_ram_ptr(addr1);

Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Paolo


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