@@ -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;
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(-)