>>> On 02.10.17 at 18:13, <andrew.coop...@citrix.com> wrote: > @@ -518,26 +522,29 @@ static void invalidate_shadow_ldt(struct vcpu *v, int > flush) > if ( v->arch.pv_vcpu.shadow_ldt_mapcnt == 0 ) > goto out; > > - v->arch.pv_vcpu.shadow_ldt_mapcnt = 0; > pl1e = pv_ldt_ptes(v); > > for ( i = 0; i < 16; i++ ) > { > if ( !(l1e_get_flags(pl1e[i]) & _PAGE_PRESENT) ) > continue; > + > page = l1e_get_page(pl1e[i]); > l1e_write(&pl1e[i], l1e_empty()); > + mappings_dropped++; > + > ASSERT_PAGE_IS_TYPE(page, PGT_seg_desc_page); > ASSERT_PAGE_IS_DOMAIN(page, v->domain); > put_page_and_type(page); > } > > - /* Rid TLBs of stale mappings (guest mappings and shadow mappings). */ > - if ( flush ) > - flush_tlb_mask(v->vcpu_dirty_cpumask); > + ASSERT(v->arch.pv_vcpu.shadow_ldt_mapcnt == mappings_dropped); > + v->arch.pv_vcpu.shadow_ldt_mapcnt = 0; > > out: > spin_unlock(&v->arch.pv_vcpu.shadow_ldt_lock); > + > + return !!mappings_dropped;
You don't need the !! here. With that Reviewed-by: Jan Beulich <jbeul...@suse.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel