]> rtime.felk.cvut.cz Git - jailhouse.git/commit
x86: Emulate MTRR enable/disable
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 3 Apr 2015 08:48:19 +0000 (10:48 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 10 Apr 2015 06:59:31 +0000 (08:59 +0200)
commitfe8fac80d74cd592f9ad3a99be521dc8b7771d80
treeb54081c9f69e2e815544234e273e23b6930ff6ad
parentdd6a4d8d185e5b45dc94d0fbf4c233e6b1dc9f50
x86: Emulate MTRR enable/disable

We assume that cells will only flip the enabled flag of
IA32_MTRR_DEF_TYPE, leaving the rest of the register in default state
(the one found during handover). SVM already implemented this but
emulated the disabled state by modifying the host PAT.

This approach works less invasively by only changing the effective guest
PAT to 0 in case MTRRs are off. And it provides this for Intel as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/include/asm/percpu.h
hypervisor/arch/x86/include/asm/processor.h
hypervisor/arch/x86/setup.c
hypervisor/arch/x86/svm.c
hypervisor/arch/x86/vcpu.c
hypervisor/arch/x86/vmx.c