[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests
El 10/04/15 a les 19.29, Roger Pau Monne ha escrit: > When the caller of paging_log_dirty_op is a hvm guest Xen would choke when > trying to copy the dirty bitmap to the guest because the paging lock is > already held. > > Fix this by independently mapping each page of the guest bitmap as needed > without the paging lock held. > > Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> > Cc: Tim Deegan <tim@xxxxxxx> > Cc: Jan Beulich <jbeulich@xxxxxxxx> > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > Changes since v2: > - Add checks for p2m_is_ram and p2m_is_discard_write when mapping a guest > page. > - Remove error checking from memset/memcpy, they unconditionally return > dst. > --- > xen/arch/x86/mm/paging.c | 103 > +++++++++++++++++++++++++++++++++++++++++------ > 1 file changed, 91 insertions(+), 12 deletions(-) > > diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c > index b54d76a..cb5feb8 100644 > --- a/xen/arch/x86/mm/paging.c > +++ b/xen/arch/x86/mm/paging.c > @@ -397,6 +397,53 @@ int paging_mfn_is_dirty(struct domain *d, mfn_t gmfn) > return rv; > } > > +static inline void *map_dirty_bitmap(XEN_GUEST_HANDLE_64(uint8) dirty_bitmap, > + unsigned long pages, > + struct page_info **page, > + unsigned long *mapped_page) > +{ > + p2m_type_t p2mt; > + uint32_t pfec; This should be: uint32_t pfec = PFEC_page_present | PFEC_write_access; Will wait for other's comments before resending the series. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |