]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: fix running nested guests when npt=0
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Feb 2021 12:16:59 +0000 (07:16 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Feb 2021 12:33:30 +0000 (07:33 -0500)
commitec3633b6e5721aa0a5856c0bb3347cc55748dca5
treeb62e3ebbf40ad1545e52193c0310c2a802d58a33
parentd2ee37002fbfb75f3f9a3d9a5fd4feaec31f258b
KVM: nSVM: fix running nested guests when npt=0

In case of npt=0 on host, nSVM needs the same .inject_page_fault tweak
as VMX has, to make sure that shadow mmu faults are injected as vmexits.

It is not clear why this is needed at all, but for now keep the same
code as VMX and we'll fix it for both.

Based on a patch by Maxim Levitsky <mlevitsk@redhat.com>.

Fixes: 034446f0fa0d ("KVM: nSVM: inject exceptions via svm_check_nested_events")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c