Skip to content

Commit

Permalink
KVM: Communicate cr8 changes to userspace
Browse files Browse the repository at this point in the history
This allows running 64-bit Windows.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Yang, Sheng authored and Avi Kivity committed Oct 13, 2007
1 parent 7e66f35 commit 253abde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,8 @@ static int handle_cr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
vcpu_load_rsp_rip(vcpu);
set_cr8(vcpu, vcpu->regs[reg]);
skip_emulated_instruction(vcpu);
return 1;
kvm_run->exit_reason = KVM_EXIT_SET_TPR;
return 0;
};
break;
case 2: /* clts */
Expand Down
1 change: 1 addition & 0 deletions include/linux/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enum kvm_exit_reason {
KVM_EXIT_SHUTDOWN = 8,
KVM_EXIT_FAIL_ENTRY = 9,
KVM_EXIT_INTR = 10,
KVM_EXIT_SET_TPR = 11
};

/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
Expand Down

0 comments on commit 253abde

Please sign in to comment.