lkml.org 
[lkml]   [2009]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 31/47] KVM: SVM: check for nested VINTR flag in svm_interrupt_allowed
    Date
    From: Joerg Roedel <joerg.roedel@amd.com>

    Not checking for this flag breaks any nested hypervisor that does not
    set VINTR. So fix it with this patch.

    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>
    ---
    arch/x86/kvm/svm.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
    index ff04a4b..825035e 100644
    --- a/arch/x86/kvm/svm.c
    +++ b/arch/x86/kvm/svm.c
    @@ -2466,7 +2466,7 @@ static int svm_interrupt_allowed(struct kvm_vcpu *vcpu)
    return (vmcb->save.rflags & X86_EFLAGS_IF) &&
    !(vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) &&
    gif_set(svm) &&
    - !is_nested(svm);
    + !(is_nested(svm) && (svm->vcpu.arch.hflags & HF_VINTR_MASK));
    }

    static void enable_irq_window(struct kvm_vcpu *vcpu)
    --
    1.6.4.1


    \
     
     \ /
      Last update: 2009-08-26 12:37    [W:4.340 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site