From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Date: Thu, 16 Apr 2009 14:08:29 +0000 Subject: [patch] ia64 restore irq state before calling kvm_vcpu_init Message-Id: <49E73BDD.6020008@sgi.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------090806020702070803020504" List-Id: References: <49E730B7.1000607@sgi.com> In-Reply-To: <49E730B7.1000607@sgi.com> To: kvm-ia64@vger.kernel.org This is a multi-part message in MIME format. --------------090806020702070803020504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Another one to avoid calling kmalloc() with local interrupts enabled on ia64. Cheers, Jes --------------090806020702070803020504 Content-Type: text/x-patch; name="0004-kvm-ia64-irq-sleep.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0004-kvm-ia64-irq-sleep.patch" 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 --- 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; } --------------090806020702070803020504--