[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3/3] gnttab: Drop the frame field from struct gnttab_copy_buf



It is redundant with *page.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/common/grant_table.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index d8307b7..bef3b26 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -2393,7 +2393,6 @@ struct gnttab_copy_buf {
 
     /* Mapped etc. */
     struct domain *domain;
-    unsigned long frame;
     struct page_info *page;
     void *virt;
     bool_t read_only;
@@ -2502,7 +2501,6 @@ static int gnttab_copy_claim_buf(const struct gnttab_copy 
*op,
                                     &buf->ptr.offset, &buf->len, true);
         if ( rc != GNTST_okay )
             goto out;
-        buf->frame = page_to_mfn(buf->page);
         buf->ptr.u.ref = ptr->u.ref;
         buf->have_grant = 1;
     }
@@ -2514,7 +2512,6 @@ static int gnttab_copy_claim_buf(const struct gnttab_copy 
*op,
             PIN_FAIL(out, rc,
                      "source frame %"PRI_xen_pfn" invalid.\n", ptr->u.gmfn);
 
-        buf->frame = page_to_mfn(buf->page);
         buf->ptr.u.gmfn = ptr->u.gmfn;
         buf->ptr.offset = 0;
         buf->len = PAGE_SIZE;
@@ -2525,14 +2522,15 @@ static int gnttab_copy_claim_buf(const struct 
gnttab_copy *op,
         if ( !get_page_type(buf->page, PGT_writable_page) )
         {
             if ( !buf->domain->is_dying )
-                gdprintk(XENLOG_WARNING, "Could not get writable frame %lx\n", 
buf->frame);
+                gdprintk(XENLOG_WARNING, "Could not get writable mfn 
%"PRI_mfn"\n",
+                         page_to_mfn(buf->page));
             rc = GNTST_general_error;
             goto out;
         }
         buf->have_type = 1;
     }
 
-    buf->virt = map_domain_page(_mfn(buf->frame));
+    buf->virt = __map_domain_page(buf->page);
     rc = GNTST_okay;
 
  out:
@@ -2576,7 +2574,7 @@ static int gnttab_copy_buf(const struct gnttab_copy *op,
 
     memcpy(dest->virt + op->dest.offset, src->virt + op->source.offset,
            op->len);
-    gnttab_mark_dirty(dest->domain, dest->frame);
+    gnttab_mark_dirty(dest->domain, page_to_mfn(dest->page));
     rc = GNTST_okay;
  out:
     return rc;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.