Print this page
5601 TLB invalidation regression in 5498


2148                 if (va == DEMAP_ALL_ADDR) {
2149                         xen_gflush_tlb(cpus_to_shootdown);
2150                 } else {
2151                         for (size_t i = 0; i < len; i += MMU_PAGESIZE) {
2152                                 xen_gflush_va((caddr_t)(va + i),
2153                                     cpus_to_shootdown);
2154                         }
2155                 }
2156 #else
2157                 xc_call((xc_arg_t)hat, (xc_arg_t)va, (xc_arg_t)len,
2158                     CPUSET2BV(cpus_to_shootdown), hati_demap_func);
2159 #endif
2160 
2161         }
2162         kpreempt_enable();
2163 }
2164 
2165 void
2166 hat_tlb_inval(hat_t *hat, uintptr_t va)
2167 {
2168         hat_tlb_inval_range(hat, va, MMU_PAGESIZE);
2169 }
2170 
2171 /*
2172  * Interior routine for HAT_UNLOADs from hat_unload_callback(),
2173  * hat_kmap_unload() OR from hat_steal() code.  This routine doesn't
2174  * handle releasing of the htables.
2175  */
2176 void
2177 hat_pte_unmap(
2178         htable_t        *ht,
2179         uint_t          entry,
2180         uint_t          flags,
2181         x86pte_t        old_pte,
2182         void            *pte_ptr,
2183         boolean_t       tlb)
2184 {
2185         hat_t           *hat = ht->ht_hat;
2186         hment_t         *hm = NULL;
2187         page_t          *pp = NULL;
2188         level_t         l = ht->ht_level;




2148                 if (va == DEMAP_ALL_ADDR) {
2149                         xen_gflush_tlb(cpus_to_shootdown);
2150                 } else {
2151                         for (size_t i = 0; i < len; i += MMU_PAGESIZE) {
2152                                 xen_gflush_va((caddr_t)(va + i),
2153                                     cpus_to_shootdown);
2154                         }
2155                 }
2156 #else
2157                 xc_call((xc_arg_t)hat, (xc_arg_t)va, (xc_arg_t)len,
2158                     CPUSET2BV(cpus_to_shootdown), hati_demap_func);
2159 #endif
2160 
2161         }
2162         kpreempt_enable();
2163 }
2164 
2165 void
2166 hat_tlb_inval(hat_t *hat, uintptr_t va)
2167 {
2168         hat_tlb_inval_range(hat, va, 1);
2169 }
2170 
2171 /*
2172  * Interior routine for HAT_UNLOADs from hat_unload_callback(),
2173  * hat_kmap_unload() OR from hat_steal() code.  This routine doesn't
2174  * handle releasing of the htables.
2175  */
2176 void
2177 hat_pte_unmap(
2178         htable_t        *ht,
2179         uint_t          entry,
2180         uint_t          flags,
2181         x86pte_t        old_pte,
2182         void            *pte_ptr,
2183         boolean_t       tlb)
2184 {
2185         hat_t           *hat = ht->ht_hat;
2186         hment_t         *hm = NULL;
2187         page_t          *pp = NULL;
2188         level_t         l = ht->ht_level;