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] Improve commenting of xencomm_ctxt_next()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Improve commenting of xencomm_ctxt_next().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Sep 2007 09:13:20 -0700
Delivery-date: Fri, 07 Sep 2007 09:20:15 -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 1188396117 -3600
# Node ID adad9f3820f17762ab23ca1bfb879cf310e87e04
# Parent  828e1df114d4b59ebc0a84db3b079f7087fc9b20
Improve commenting of xencomm_ctxt_next().
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/common/xencomm.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletion(-)

diff -r 828e1df114d4 -r adad9f3820f1 xen/common/xencomm.c
--- a/xen/common/xencomm.c      Wed Aug 29 14:57:12 2007 +0100
+++ b/xen/common/xencomm.c      Wed Aug 29 15:01:57 2007 +0100
@@ -138,6 +138,22 @@ xencomm_ctxt_init(const void *handle, st
     return 0;
 }
 
+/*
+ * Calculate the vaddr of &ctxt->desc_in_paddr->address[i] and get_page().
+ * And put the results in ctxt->page and ctxt->address.
+ * If there is the previous page, put_page().
+ *
+ * A guest domain passes the array, ctxt->desc_in_paddr->address[].
+ * It is gpaddr-contiguous, but not maddr-contiguous so that
+ * we can't obtain the vaddr by simple offsetting.
+ * We need to convert gpaddr, &ctxt->desc_in_paddr->address[i],
+ * into maddr and then convert it to the xen virtual address in order
+ * to access there.
+ * The conversion can be optimized out by using the last result of
+ * ctxt->address because we access the array sequentially.
+ * The conversion, gpaddr -> maddr -> vaddr, is necessary only when
+ * crossing page boundary.
+ */
 static int
 xencomm_ctxt_next(struct xencomm_ctxt *ctxt, int i)
 {
@@ -147,7 +163,7 @@ xencomm_ctxt_next(struct xencomm_ctxt *c
 
     BUG_ON(i >= ctxt->nr_addrs);
 
-    /* In i == 0 case, we already calculated in xecomm_addr_init(). */
+    /* For i == 0 case we already calculated it in xencomm_ctxt_init(). */
     if ( i != 0 )
         ctxt->address++;
 

_______________________________________________
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] Improve commenting of xencomm_ctxt_next()., Xen patchbot-unstable <=