[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 2/8] arch, arm: add consistency check to REMOVE p2m changes
Hi Arianna, Thank you for the patch. On 04/07/2014 12:31 AM, Arianna Avanzini wrote: > --- > xen/arch/arm/p2m.c | 27 +++++++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c > index 403fd89..395a0b2 100644 > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -319,6 +319,7 @@ static int apply_p2m_changes(struct domain *d, > if ( !populate ) > { > addr = (addr + FIRST_SIZE) & FIRST_MASK; > + maddr = (maddr + FIRST_SIZE) & FIRST_MASK; > continue; > } > > @@ -345,6 +346,7 @@ static int apply_p2m_changes(struct domain *d, > if ( !populate ) > { > addr = (addr + SECOND_SIZE) & SECOND_MASK; > + maddr = (maddr + SECOND_SIZE) & SECOND_MASK; > continue; > } > > @@ -406,12 +408,32 @@ static int apply_p2m_changes(struct domain *d, > { > pte = mfn_to_p2m_entry(maddr >> PAGE_SHIFT, mattr, t); > write_pte(&third[third_table_offset(addr)], pte); > - maddr += PAGE_SIZE; > } > break; > - case RELINQUISH: > case REMOVE: > { > + unsigned long mfn; > + > + if ( !pte.p2m.valid ) > + { > + count++; count is only used for RELINQUISH mapping, you don't need to update here. > + break; I think we should fail if we can't remove rather than continuing. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |