public inbox for kvm-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ia64 restore irq state before calling kvm_vcpu_init
@ 2009-04-16 13:20 Jes Sorensen
  2009-04-16 14:08 ` Jes Sorensen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jes Sorensen @ 2009-04-16 13:20 UTC (permalink / raw)
  To: kvm-ia64

[-- Attachment #1: Type: text/plain, Size: 97 bytes --]

Hi,

Another one to avoid calling kmalloc() with local interrupts enabled
on ia64.

Cheers,
Jes


[-- Attachment #2: 0004-kvm-ia64-irq-sleep.patch --]
[-- Type: text/x-patch, Size: 918 bytes --]

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>

---
 arch/ia64/kvm/kvm-ia64.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: linux-2.6.git/arch/ia64/kvm/kvm-ia64.c
===================================================================
--- linux-2.6.git.orig/arch/ia64/kvm/kvm-ia64.c
+++ linux-2.6.git/arch/ia64/kvm/kvm-ia64.c
@@ -1235,6 +1235,7 @@
 
 	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);
@@ -1252,13 +1253,11 @@
 		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;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-20  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 13:20 [patch] ia64 restore irq state before calling kvm_vcpu_init Jes Sorensen
2009-04-16 14:08 ` Jes Sorensen
2009-04-19 13:19 ` Zhang, Xiantao
2009-04-20  7:49 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox