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

[Xen-devel] Question about xenpage_list

Hi all,
I'm trying to track down how a call in common/grant_table.c to
share_xen_page_with_guest will actually populate that page into the
guest's physmap. Immediately after the call the page doesn't seem to
be present in the physmap, as share_xen_page_with_guest will just add
the page to the domain's xenpage_list linked-list:

        unsigned long mfn;
        unsigned long gfn;

        share_xen_page_with_guest(virt_to_page(gt->shared_raw[i]), d, SHARE_rw);

        mfn = virt_to_mfn(gt->shared_raw[i]);
        gfn = mfn_to_gmfn(d, mfn);

        gdprintk(XENLOG_INFO, "Sharing %lx -> %lx with domain %u\n",
gfn, mfn, d->domain_id);

This results in the following:

(XEN) grant_table.c:1820:d0v0 Sharing ffffffffffffffff -> 42c71e with domain 1

AFAICT the page only gets populated into the physmap once the domain
gets unpaused. If I let the domain run and then pause it I can see
that the page is in the guest's physmap (by looping through all the
entries in its EPT):

(XEN) mem_sharing.c:1636:d0v0 0xf2000 -> 0x42c71e is a grant mapping
shared with the guest

Grepping for xenpage_list in the codebase doesn't seem to reveal where
it gets plugged in to the physmap. I would need to find the GFN where
the page will get plugged into the guest before it's unpaused. Anyone
has an insight on how I could do that?


Xen-devel mailing list



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