]> rtime.felk.cvut.cz Git - jailhouse.git/commit
x86: Switch between host and guest PAT
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 29 Mar 2015 10:19:47 +0000 (12:19 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 10 Apr 2015 06:58:36 +0000 (08:58 +0200)
commitf4cdab01af711f5628bf5f8d734d72255f70a263
treee1bb32043899b272b1447fc5184cf5f22ffc326f
parent355118aac51e4f39338049a349debc0dfa44f5af
x86: Switch between host and guest PAT

Do not allow the guest to mess with the PAT MSR in a was that also
affects the host. This may cause the host to run in uncached mode,
slowing it down, or - even worse- access MMIO with caches enabled which
will cause inconsistencies.

On Intel, we have to require and enable the related save/restore
feature. On AMD, we need to intercept the MSR accesses and map them on
the g_pat field of the VMCB.

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/include/asm/vmx.h
hypervisor/arch/x86/setup.c
hypervisor/arch/x86/svm.c
hypervisor/arch/x86/vmx.c