Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
@@ -20,10 +20,12 @@
*/
/*
* 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,11 +99,11 @@
#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())))
+ if (start == mmu_ptob(mmu_btop(getcr3_pa())))
return (0);
#endif
if (mode == GFXP_MEMORY_CACHED)
hat_attr = HAT_STORECACHING_OK;
@@ -316,11 +318,11 @@
#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())))
+ if (start == mmu_ptob(mmu_btop(getcr3_pa())))
return;
#endif
if (mode == GFXP_MEMORY_CACHED)
hat_attr = HAT_STORECACHING_OK;