]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: X86: Raise #GP when clearing CR0_PG in 64 bit mode
authorLai Jiangshan <laijs@linux.alibaba.com>
Tue, 7 Dec 2021 09:52:30 +0000 (17:52 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Dec 2021 14:38:01 +0000 (09:38 -0500)
commit777ab82d7ce0451fd47bb57e331548deba57394e
tree5e00debaa29d98948bea76576ba01d36dbff5cce
parentc8cc43c1eae2910ac96daa4216e0fb3391ad0504
KVM: X86: Raise #GP when clearing CR0_PG in 64 bit mode

In the SDM:
If the logical processor is in 64-bit mode or if CR4.PCIDE = 1, an
attempt to clear CR0.PG causes a general-protection exception (#GP).
Software should transition to compatibility mode and clear CR4.PCIDE
before attempting to disable paging.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Message-Id: <20211207095230.53437-1-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c