ia64 restore irq state before calling kvm_vcpu_init
PATCH 1/1 ia64 restore irq state before calling kvm_vcpu_init
Hi,
Another one to avoid calling kmalloc() with local interrupts enabled on ia64.
Cheers,
Jes
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.
--- arch/ia64/kvm/kvm-ia64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/kvm/kvm-ia64.c +1 -2
@@ -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; }
PATCH 1/1 ia64 restore irq state before calling kvm_vcpu_init
Hi,
Another one to avoid calling kmalloc() with local interrupts enabled on ia64.
Cheers,
Jes
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.
--- arch/ia64/kvm/kvm-ia64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/kvm/kvm-ia64.c +1 -2
@@ -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; }
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jes Sorensen
Sent: Thursday, April 16, 2009 10:08 PM
To: Avi Kivity
Cc: Zhang, Xiantao; [email protected]
Subject: [patch] ia64 restore irq state before calling kvm_vcpu_init
Hi,
Another one to avoid calling kmalloc() with local interrupts enabled on ia64.
Cheers,
Jes
Avi Kivity
AppliedQuoted 5 lines · Jes Sorensen
Hi,
Another one to avoid calling
kmalloc()with local interrupts enabled on ia64.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function