[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2 1/2] xen/altp2m: set access_required properly for all altp2ms
On 06/27/2018 05:09 PM, Wei Liu wrote: > On Wed, Jun 13, 2018 at 11:52:18AM +0300, Razvan Cojocaru wrote: >> --- >> xen/arch/arm/mem_access.c | 5 +++++ >> xen/arch/x86/mm/mem_access.c | 18 ++++++++++++++++++ >> xen/arch/x86/mm/p2m.c | 3 ++- >> xen/common/domctl.c | 4 ++-- >> xen/include/xen/domain.h | 2 ++ >> 5 files changed, 29 insertions(+), 3 deletions(-) >> >> diff --git a/xen/arch/arm/mem_access.c b/xen/arch/arm/mem_access.c >> index ae2686f..a59c6ef 100644 >> --- a/xen/arch/arm/mem_access.c >> +++ b/xen/arch/arm/mem_access.c >> @@ -453,6 +453,11 @@ int p2m_get_mem_access(struct domain *d, gfn_t gfn, >> return ret; >> } >> >> +void arch_domain_set_access_required(struct domain *d, bool access_required) >> +{ >> + p2m_get_hostp2m(d)->access_required = access_required; >> +} >> + >> /* >> * Local variables: >> * mode: C >> diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c >> index c0cd017..6811572 100644 >> --- a/xen/arch/x86/mm/mem_access.c >> +++ b/xen/arch/x86/mm/mem_access.c >> @@ -465,6 +465,24 @@ int p2m_get_mem_access(struct domain *d, gfn_t gfn, >> xenmem_access_t *access) >> return _p2m_get_mem_access(p2m, gfn, access); >> } >> >> +void arch_domain_set_access_required(struct domain *d, bool access_required) > > arch_p2m_set_access_required? I'll change it. >> +{ >> + unsigned int i; >> + >> + p2m_get_hostp2m(d)->access_required = access_required; >> + >> + if ( !altp2m_active(d) ) >> + return; >> + >> + for ( i = 0; i < MAX_ALTP2M; i++ ) >> + { >> + struct p2m_domain *p2m = d->arch.altp2m_p2m[i]; >> + >> + if ( p2m ) >> + p2m->access_required = access_required; >> + } > > It seems to me you should check for domain pause count at the beginning > of this function to avoid mistakes. Do you mean ASSERT(atomic_read(&d->pause_count)); ? > The rest of looks fine (to my untrained eye). Thanks! _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |