]> err.no Git - linux-2.6/commitdiff
KVM: Communicate cr8 changes to userspace
authorYang, Sheng <sheng.yang@intel.com>
Thu, 16 Aug 2007 10:01:00 +0000 (13:01 +0300)
committerAvi Kivity <avi@qumranet.com>
Sat, 13 Oct 2007 08:18:23 +0000 (10:18 +0200)
This allows running 64-bit Windows.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/vmx.c
include/linux/kvm.h

index a9b4cb51dec8638de9327ec2d37cedc8d6a3c915..cd999c0a24c4c79cf95e8f45ebc571881024951d 100644 (file)
@@ -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 */
index 91a446f450b8e76ed5d46ff32cd67c95caec35f4..1d5a49cdda3b05dd296e34e06aee1049570a6afc 100644 (file)
@@ -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) */