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

[Xen-devel] [PATCH 1/7] xencomm take 3: xen side trivial bug fix

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/7] xencomm take 3: xen side trivial bug fix
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 14 Aug 2007 18:50:23 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx, xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 14 Aug 2007 02:51:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1187077482 -32400
# Node ID 68867379b785a9a6fd37ca75be64fa7b5e3b8a2b
# Parent  cd51fa91956be20dbd744d46117f7f989e08c334
[xen, xencomm] xencomm trivial bug fix
- fix return address of xencomm_copy_to_guest()
- fix xencomm_add_offset()
PATCHNAME: xencomm_trivial_fix

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r cd51fa91956b -r 68867379b785 xen/common/xencomm.c
--- a/xen/common/xencomm.c      Sun Aug 12 14:50:02 2007 -0600
+++ b/xen/common/xencomm.c      Tue Aug 14 16:44:42 2007 +0900
@@ -232,7 +232,7 @@ xencomm_copy_to_guest(void *to, const vo
 
             dest_maddr = paddr_to_maddr(dest_paddr + chunk_skip);
             if (dest_maddr == 0)
-                return -1;
+                return n - from_pos;
 
             if (xencomm_debug)
                 printk("%lx[%d] -> %lx\n", source, bytes, dest_maddr);
@@ -279,6 +279,11 @@ int xencomm_add_offset(void **handle, un
         unsigned int pgoffset;
         unsigned int chunksz;
         unsigned int chunk_skip;
+
+        if (dest_paddr == XENCOMM_INVALID) {
+            i++;
+            continue;
+        }
 
         pgoffset = dest_paddr % PAGE_SIZE;
         chunksz = PAGE_SIZE - pgoffset;
@@ -291,6 +296,8 @@ int xencomm_add_offset(void **handle, un
             desc->address[i] += chunk_skip;
         }
         bytes -= chunk_skip;
+
+        i++;
     }
     return 0;
 }

Attachment: 15725_68867379b785_xencomm_trivial_fix.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 1/7] xencomm take 3: xen side trivial bug fix, Isaku Yamahata <=