diff options
-rw-r--r-- | sys/amd64/amd64/apic_vector.S | 10 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index e868cf5..79ec5ed 100644 --- a/sys/amd64/amd64/apic_vector.S +++ b/sys/amd64/amd64/apic_vector.S @@ -160,11 +160,11 @@ IDTVEC(xen_intr_upcall) SUPERALIGN_TEXT global_invltlb: - movl %cr4,%eax - andl $~0x80,%eax - movl %eax,%cr4 - orl $0x80,%eax - movl %eax,%cr4 + movq %cr4,%rax + andq $~0x80,%rax /* PGE */ + movq %rax,%cr4 + orq $0x80,%rax + movq %rax,%cr4 invltlb_ret_clear_pm_save: movq smp_tlb_pmap,%rdx testq %rdx,%rdx diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a134e10..d905961 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -762,7 +762,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* Initialize the PAT MSR. */ pmap_init_pat(); -#ifdef SMP /* Initialize TLB Context Id. */ TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { @@ -773,8 +772,10 @@ pmap_bootstrap(vm_paddr_t *firstaddr) invpcid_works = (cpu_stdext_feature & CPUID_STDEXT_INVPCID) != 0; kernel_pmap->pm_pcid = 0; - } else +#ifndef SMP + pmap_pcid_enabled = 0; #endif + } else pmap_pcid_enabled = 0; } |