aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang, Sheng <sheng.yang@intel.com>2007-08-16 06:01:00 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:23 -0400
commit253abdee5ec2edd0a7f6dc2358bef42e3fdf1f39 (patch)
treea9823774dcf3fa7a66c1895b78528d3239eaa71b
parent7e66f350cfc853043bfa71b281581dd6f92fa347 (diff)
KVM: Communicate cr8 changes to userspace
This allows running 64-bit Windows. Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--drivers/kvm/vmx.c3
-rw-r--r--include/linux/kvm.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index a9b4cb51dec8..cd999c0a24c4 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1831,7 +1831,8 @@ static int handle_cr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
1831 vcpu_load_rsp_rip(vcpu); 1831 vcpu_load_rsp_rip(vcpu);
1832 set_cr8(vcpu, vcpu->regs[reg]); 1832 set_cr8(vcpu, vcpu->regs[reg]);
1833 skip_emulated_instruction(vcpu); 1833 skip_emulated_instruction(vcpu);
1834 return 1; 1834 kvm_run->exit_reason = KVM_EXIT_SET_TPR;
1835 return 0;
1835 }; 1836 };
1836 break; 1837 break;
1837 case 2: /* clts */ 1838 case 2: /* clts */
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 91a446f450b8..1d5a49cdda3b 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -46,6 +46,7 @@ enum kvm_exit_reason {
46 KVM_EXIT_SHUTDOWN = 8, 46 KVM_EXIT_SHUTDOWN = 8,
47 KVM_EXIT_FAIL_ENTRY = 9, 47 KVM_EXIT_FAIL_ENTRY = 9,
48 KVM_EXIT_INTR = 10, 48 KVM_EXIT_INTR = 10,
49 KVM_EXIT_SET_TPR = 11
49}; 50};
50 51
51/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ 52/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */