From: Yang, Sheng Date: Thu, 16 Aug 2007 10:01:00 +0000 (+0300) Subject: KVM: Communicate cr8 changes to userspace X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=253abdee5ec2edd0a7f6dc2358bef42e3fdf1f39;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git KVM: Communicate cr8 changes to userspace This allows running 64-bit Windows. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity --- 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) 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 */ 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 { 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) */