xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 3/3] gnttab: Drop the frame field from struct gnttab_copy_buf
Date: Thu, 24 Aug 2017 18:55:55 +0100	[thread overview]
Message-ID: <1503597355-21334-4-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1503597355-21334-1-git-send-email-andrew.cooper3@citrix.com>

It is redundant with *page.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: George Dunlap <George.Dunlap@eu.citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
---
 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@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-08-24 17:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 17:55 [PATCH 0/3] gnttab: Further XSA-226 cleanup Andrew Cooper
2017-08-24 17:55 ` [PATCH 1/3] gnttab: Drop the frame parameter from acquire_grant_for_copy() Andrew Cooper
2017-08-25  8:55   ` Wei Liu
2017-08-25 10:13   ` Jan Beulich
2017-08-25 10:50     ` Andrew Cooper
2017-08-25 11:54       ` Jan Beulich
2017-08-24 17:55 ` [PATCH 2/3] gnttab: Drop the frame parameter from get_paged_frame() Andrew Cooper
2017-08-25  9:02   ` Wei Liu
2017-08-25  9:38     ` Andrew Cooper
2017-08-25  9:39       ` Wei Liu
2017-08-24 17:55 ` Andrew Cooper [this message]
2017-08-25  9:10   ` [PATCH 3/3] gnttab: Drop the frame field from struct gnttab_copy_buf Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503597355-21334-4-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).