aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/kvm-ia64.c
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2009-04-16 10:08:29 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:44 -0400
commit457459c3c738dfb37226ba116ba301140da0d1fb (patch)
tree666b628e63afdf0bce5aabbf8a0cefe5db5332f9 /arch/ia64/kvm/kvm-ia64.c
parentf9b647adda0e821538b6d80e52873d861ffb1799 (diff)
KVM: ia64: restore irq state before calling kvm_vcpu_init
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>
Diffstat (limited to 'arch/ia64/kvm/kvm-ia64.c')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 726317144a6f..5b868db1e9f2 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)
1290 1290
1291 local_irq_save(psr); 1291 local_irq_save(psr);
1292 r = kvm_insert_vmm_mapping(vcpu); 1292 r = kvm_insert_vmm_mapping(vcpu);
1293 local_irq_restore(psr);
1293 if (r) 1294 if (r)
1294 goto fail; 1295 goto fail;
1295 r = kvm_vcpu_init(vcpu, vcpu->kvm, id); 1296 r = kvm_vcpu_init(vcpu, vcpu->kvm, id);
@@ -1307,13 +1308,11 @@ static int vti_vcpu_setup(struct kvm_vcpu *vcpu, int id)
1307 goto uninit; 1308 goto uninit;
1308 1309
1309 kvm_purge_vmm_mapping(vcpu); 1310 kvm_purge_vmm_mapping(vcpu);
1310 local_irq_restore(psr);
1311 1311
1312 return 0; 1312 return 0;
1313uninit: 1313uninit:
1314 kvm_vcpu_uninit(vcpu); 1314 kvm_vcpu_uninit(vcpu);
1315fail: 1315fail:
1316 local_irq_restore(psr);
1317 return r; 1316 return r;
1318} 1317}
1319 1318