From: Jes Sorensen <jes@sgi.com>
To: kvm-ia64@vger.kernel.org
Subject: [patch] ia64 restore irq state before calling kvm_vcpu_init
Date: Thu, 16 Apr 2009 13:20:55 +0000 [thread overview]
Message-ID: <49E730B7.1000607@sgi.com> (raw)
[-- 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;
}
next reply other threads:[~2009-04-16 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 13:20 Jes Sorensen [this message]
2009-04-16 14:08 ` [patch] ia64 restore irq state before calling kvm_vcpu_init Jes Sorensen
2009-04-19 13:19 ` Zhang, Xiantao
2009-04-20 7:49 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49E730B7.1000607@sgi.com \
--to=jes@sgi.com \
--cc=kvm-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).