[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/np2m: add break to np2m_flush_eptp()
commit 23044a4e00c1a6bfb70a19a8ed263d47ea5412fc Author: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> AuthorDate: Tue Oct 3 16:21:04 2017 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Oct 6 13:36:43 2017 +0100 x86/np2m: add break to np2m_flush_eptp() Now that np2m sharing is implemented, there can be only one np2m object with the same np2m_base. Break from loop if the required np2m was found during np2m_flush_eptp(). Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jun Nakajima <jun.nakajima@xxxxxxxxx> --- xen/arch/x86/mm/p2m.c | 4 ++++ xen/include/asm-x86/p2m.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 05a6a7d..c72a3cd 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1813,7 +1813,11 @@ void np2m_flush_base(struct vcpu *v, unsigned long np2m_base) p2m = d->arch.nested_p2m[i]; p2m_lock(p2m); if ( p2m->np2m_base == np2m_base ) + { p2m_flush_table_locked(p2m); + p2m_unlock(p2m); + break; + } p2m_unlock(p2m); } nestedp2m_unlock(d); diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index a68524f..17b1d0c 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -777,7 +777,7 @@ int p2m_pt_handle_deferred_changes(uint64_t gpa); void p2m_flush(struct vcpu *v, struct p2m_domain *p2m); /* Flushes all nested p2m tables */ void p2m_flush_nestedp2m(struct domain *d); -/* Flushes all np2m objects with the specified np2m_base */ +/* Flushes the np2m specified by np2m_base (if it exists) */ void np2m_flush_base(struct vcpu *v, unsigned long np2m_base); void nestedp2m_write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |