lkml.org 
[lkml]   [2009]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 37/46] KVM: ia64: restore irq state before calling kvm_vcpu_init
    Date
    From: Jes Sorensen <jes@sgi.com>

    Make sure to restore the psr after calling kvm_insert_vmm_mapping()
    which calls ia64_itr_entry() as it disables local interrupts and
    kvm_vcpu_init() may sleep.

    Avoids a warning from the lock debugging code.

    Signed-off-by: Jes Sorensen <jes@sgi.com>
    Acked-by : Xiantao Zhang <xiantao.zhang@intel.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>
    ---
    arch/ia64/kvm/kvm-ia64.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
    index 7263171..5b868db 100644
    --- a/arch/ia64/kvm/kvm-ia64.c
    +++ b/arch/ia64/kvm/kvm-ia64.c
    @@ -1290,6 +1290,7 @@ static int vti_vcpu_setup(struct kvm_vcpu *vcpu, int id)

    local_irq_save(psr);
    r = kvm_insert_vmm_mapping(vcpu);
    + local_irq_restore(psr);
    if (r)
    goto fail;
    r = kvm_vcpu_init(vcpu, vcpu->kvm, id);
    @@ -1307,13 +1308,11 @@ static int vti_vcpu_setup(struct kvm_vcpu *vcpu, int id)
    goto uninit;

    kvm_purge_vmm_mapping(vcpu);
    - local_irq_restore(psr);

    return 0;
    uninit:
    kvm_vcpu_uninit(vcpu);
    fail:
    - local_irq_restore(psr);
    return r;
    }

    --
    1.6.0.6


    \
     
     \ /
      Last update: 2009-05-20 13:31    [W:0.035 / U:1.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site