Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

*** 20,29 **** --- 20,31 ---- */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2018 Joyent, Inc. */ #include <sys/debug.h> #include <sys/types.h> #include <sys/param.h>
*** 97,107 **** #ifdef __xpv /* * The hypervisor doesn't allow r/w mappings to some pages, such as * page tables, gdt, etc. Detect %cr3 to notify users of this interface. */ ! if (start == mmu_ptob(mmu_btop(getcr3()))) return (0); #endif if (mode == GFXP_MEMORY_CACHED) hat_attr = HAT_STORECACHING_OK; --- 99,109 ---- #ifdef __xpv /* * The hypervisor doesn't allow r/w mappings to some pages, such as * page tables, gdt, etc. Detect %cr3 to notify users of this interface. */ ! if (start == mmu_ptob(mmu_btop(getcr3_pa()))) return (0); #endif if (mode == GFXP_MEMORY_CACHED) hat_attr = HAT_STORECACHING_OK;
*** 316,326 **** #ifdef __xpv /* * The hypervisor doesn't allow r/w mappings to some pages, such as * page tables, gdt, etc. Detect %cr3 to notify users of this interface. */ ! if (start == mmu_ptob(mmu_btop(getcr3()))) return; #endif if (mode == GFXP_MEMORY_CACHED) hat_attr = HAT_STORECACHING_OK; --- 318,328 ---- #ifdef __xpv /* * The hypervisor doesn't allow r/w mappings to some pages, such as * page tables, gdt, etc. Detect %cr3 to notify users of this interface. */ ! if (start == mmu_ptob(mmu_btop(getcr3_pa()))) return; #endif if (mode == GFXP_MEMORY_CACHED) hat_attr = HAT_STORECACHING_OK;