@@ -1795,7 +1795,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);
@@ -779,7 +779,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,