lkml.org 
[lkml]   [2007]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 9/9] KVM: Simplify test for interrupt window
    From
    Date
    No need to test for rflags.if as both VT and SVM specs assure us that on exit caused from
    interrupt window opening, 'if' is set.

    Signed-off-by: Dor Laor <dor.laor@qumranet.com>
    Signed-off-by: Avi Kivity <avi@qumranet.com>

    Index: linux-2.6/drivers/kvm/svm.c
    ===================================================================
    --- linux-2.6.orig/drivers/kvm/svm.c
    +++ linux-2.6/drivers/kvm/svm.c
    @@ -1206,8 +1206,7 @@ static int interrupt_window_interception
    * possible
    */
    if (kvm_run->request_interrupt_window &&
    - !vcpu->irq_summary &&
    - (vcpu->svm->vmcb->save.rflags & X86_EFLAGS_IF)) {
    + !vcpu->irq_summary) {
    ++kvm_stat.irq_window_exits;
    kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
    return 0;
    Index: linux-2.6/drivers/kvm/vmx.c
    ===================================================================
    --- linux-2.6.orig/drivers/kvm/vmx.c
    +++ linux-2.6/drivers/kvm/vmx.c
    @@ -1604,8 +1604,7 @@ static int handle_interrupt_window(struc
    * possible
    */
    if (kvm_run->request_interrupt_window &&
    - !vcpu->irq_summary &&
    - (vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_IF)) {
    + !vcpu->irq_summary) {
    kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
    ++kvm_stat.irq_window_exits;
    return 0;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-01-05 09:01    [W:0.021 / U:28.596 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site