Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e5314067f6a77688a3d36548e7618430ce4a6236
Commit:     e5314067f6a77688a3d36548e7618430ce4a6236
Parent:     e934c9c1c8742872a53efb84966d9c1d7b8c8e24
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 6 16:32:45 2007 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:53:19 2008 +0200

    KVM: VMX: Avoid exit when setting cr8 if the local apic is in the kernel
    
    With apic in userspace, we must exit to userspace after a cr8 write in order
    to update the tpr.  But if the apic is in the kernel, the exit is 
unnecessary.
    
    Noticed by Joerg Roedel.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/vmx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 3b44573..8308434 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1973,6 +1973,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);
+                       if (irqchip_in_kernel(vcpu->kvm))
+                               return 1;
                        kvm_run->exit_reason = KVM_EXIT_SET_TPR;
                        return 0;
                };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to