Skip to content

Commit

Permalink
KVM: SVM: Fix CPL export via SS.DPL
Browse files Browse the repository at this point in the history
We import the CPL via SS.DPL since ae9fedc. However, we fail to
export it this way so far. This caused spurious guest crashes, e.g. of
Linux when accessing the vmport from guest user space which triggered
register saving/restoring to/from host user space.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Jan Kiszka authored and Paolo Bonzini committed Jun 30, 2014
1 parent ae9fedc commit 33b458d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,7 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
*/
if (var->unusable)
var->db = 0;
var->dpl = to_svm(vcpu)->vmcb->save.cpl;
break;
}
}
Expand Down

0 comments on commit 33b458d

Please sign in to comment.