Fixed KVM problems with old DOS programs. Compatibility can be forced by module parameter.
PATCH 1/1 Fixed KVM problems with old DOS programs. Compatibility can be forced by module parameter.
Signed-off-by Gerhard Wiesinger <[email protected]>
--- arch/x86/kvm/svm.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/x86/kvm/svm.c +6 -0
@@ -198,6 +198,10 @@ static bool npt_enabled;static int npt = true;module_param (npt, int,S_IRUGO ); +/* allow backward compatibility with e.g. old DOS application */ +static int npt_task_switch_emulation = true; +module_param (npt_task_switch_emulation, int,S_IRUGO ); +/* allow nested virtualization in KVM/SVM */ static int nested = true;module_param (nested, int,S_IRUGO );
@@ -1177,6 +1181,9 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event)if (npt_enabled) {/* Setup VMCB for Nested Paging */ control->nested_ctl =1 ; +if (!npt_task_switch_emulation) { +clr_intercept (svm,INTERCEPT_TASK_SWITCH ); + }clr_intercept (svm,INTERCEPT_INVLPG );clr_exception_intercept (svm,PF_VECTOR );clr_cr_intercept (svm,INTERCEPT_CR3_READ );
Signature · 1 line
2.4.3