| 1003 | } |
| 1004 | |
| 1005 | static void |
| 1006 | invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, |
| 1007 | vm_offset_t smp_tlb_addr2) |
| 1008 | { |
| 1009 | vm_offset_t addr, addr2; |
| 1010 | uint64_t kcr3, ucr3; |
| 1011 | uint32_t pcid; |
| 1012 | |
| 1013 | #ifdef COUNT_XINVLTLB_HITS |
| 1014 | xhits_rng[PCPU_GET(cpuid)]++; |
| 1015 | #endif /* COUNT_XINVLTLB_HITS */ |
| 1016 | #ifdef COUNT_IPIS |
| 1017 | (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; |
| 1018 | #endif /* COUNT_IPIS */ |
| 1019 | |
| 1020 | addr = smp_tlb_addr1; |
| 1021 | addr2 = smp_tlb_addr2; |
| 1022 | do { |
| 1023 | invlpg(addr); |
| 1024 | addr += PAGE_SIZE; |
| 1025 | } while (addr < addr2); |
| 1026 | if (smp_tlb_pmap == PCPU_GET(curpmap) && |
| 1027 | (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && |
| 1028 | PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { |
| 1029 | pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; |
| 1030 | kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; |
| 1031 | ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; |
| 1032 | pmap_pti_pcid_invlrng(ucr3, kcr3, smp_tlb_addr1, addr2); |
| 1033 | } |
| 1034 | } |
| 1035 | |
| 1036 | static void |
| 1037 | invlcache_handler(void) |
no test coverage detected