Commit 253abdee authored by Yang, Sheng's avatar Yang, Sheng Committed by Avi Kivity

KVM: Communicate cr8 changes to userspace

This allows running 64-bit Windows.
Signed-off-by: default avatarSheng Yang <sheng.yang@intel.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 7e66f350
...@@ -1831,7 +1831,8 @@ static int handle_cr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) ...@@ -1831,7 +1831,8 @@ static int handle_cr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
vcpu_load_rsp_rip(vcpu); vcpu_load_rsp_rip(vcpu);
set_cr8(vcpu, vcpu->regs[reg]); set_cr8(vcpu, vcpu->regs[reg]);
skip_emulated_instruction(vcpu); skip_emulated_instruction(vcpu);
return 1; kvm_run->exit_reason = KVM_EXIT_SET_TPR;
return 0;
}; };
break; break;
case 2: /* clts */ case 2: /* clts */
......
...@@ -46,6 +46,7 @@ enum kvm_exit_reason { ...@@ -46,6 +46,7 @@ enum kvm_exit_reason {
KVM_EXIT_SHUTDOWN = 8, KVM_EXIT_SHUTDOWN = 8,
KVM_EXIT_FAIL_ENTRY = 9, KVM_EXIT_FAIL_ENTRY = 9,
KVM_EXIT_INTR = 10, KVM_EXIT_INTR = 10,
KVM_EXIT_SET_TPR = 11
}; };
/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment