[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/8] x86/mm: handle foreign mappings in p2m_entry_modify
>>> On 30.01.19 at 11:36, <roger.pau@xxxxxxxxxx> wrote: > --- a/xen/include/asm-x86/p2m.h > +++ b/xen/include/asm-x86/p2m.h > @@ -933,9 +933,12 @@ struct hvm_ioreq_server *p2m_get_ioreq_server(struct > domain *d, > unsigned int *flags); > > static inline void p2m_entry_modify(struct p2m_domain *p2m, p2m_type_t nt, > - p2m_type_t ot, unsigned int level) > + p2m_type_t ot, mfn_t nfn, mfn_t ofn, > + unsigned int level) > { > - if ( level != 1 || nt == ot ) > + struct page_info *pg; > + > + if ( level != 1 || (nt == ot && mfn_eq(nfn, ofn)) ) > return; > > switch ( nt ) > @@ -948,6 +951,17 @@ static inline void p2m_entry_modify(struct p2m_domain > *p2m, p2m_type_t nt, > p2m->ioreq.entry_count++; > break; > > + case p2m_map_foreign: > + pg = mfn_to_page(nfn); > + > + if ( !pg || !page_get_owner_and_reference(pg) ) mfn_to_page() can't return NULL, can it? You may want to ASSERT() beforehand that the MFN is not INVALID_MFN, though. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |