|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [hybrid]: code review for function mapping pfn to foreign mfn
On Mon, 16 Apr 2012 14:53:22 +0100
Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> > Similar to
> > * XENMEM_add_to_physmap
>
> Why a whole new hypercall rather than a new XENMAPSPACE for the
> exiting XENMEM_add_to_physmap.
> Ideally we'd have the definition of this (or the equivalent mod to the
> XENMEM_add_to_physmap associated struct) for context, but I can
> probably guess what the content looks like.
Not a new hcall, just a new subcall. Forgot to include the struct:
#define XENMEM_add_foreign_to_pmap_batch 19
struct xen_add_to_foreign_pmap_batch {
domid_t foreign_domid; /* IN: gmfn belongs to this domain */
int count; /* IN/OUT: number of contigous
frames */ unsigned long gpfn; /* IN: pfn in the current
domain */ unsigned long gmfn; /* IN: from foreign domain */
int fpmap_flags; /* future use */
};
typedef struct xen_add_to_foreign_pmap_batch
xen_add_to_foreign_pmap_batch_t;
DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_foreign_pmap_batch_t);
> > rc = set_mmio_p2m_entry(p2m_get_hostp2m(currd), gpfn, mfn);
>
> This ends up setting the page type to p2m_mmio_direct, which doesn't
> seem likely to be correct. Perhaps you should be calling
> set_p2m_entry()? Or adding a set_ram_p2m_entry which does similar
> checks etc to set_mmio_p2m_entry (or maybe you could abstract out
> some generic bits there)?
well, set_mmio_p2m_entry() calls set_p2m_entry() with a couple checks.
I can add those to my function and just call set_p2m_entry too. It says
mmio, but doesn't seem to do anything mmio specific.
thanks,
Mukesh
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |