From: Pekka Enberg <penberg@kernel.org>
To: KVM General <kvm@vger.kernel.org>, Avi Kivity <avi@redhat.com>,
Ingo Molnar <mingo@elte.hu>, Cyrill Gorcunov <gorcunov@gmail.com>
Subject: Is KVM_GET_SREGS safe from other threads?
Date: Sun, 8 May 2011 11:24:24 +0300 [thread overview]
Message-ID: <BANLkTikB0NmgSzOV5YO-+Qm2fh1MFw6utw@mail.gmail.com> (raw)
Hi!
We've noticed that sometimes KVM_GET_SREGS from a signal handler
hangs. We use it like this:
static void handle_sigquit(int sig)
{
int i;
for (i = 0; i < nrcpus; i++) {
struct kvm_cpu *cpu = kvm_cpus[i];
kvm_cpu__show_registers(cpu); <-- here
kvm_cpu__show_code(cpu);
kvm_cpu__show_page_tables(cpu);
}
and
void kvm_cpu__show_registers(struct kvm_cpu *self)
{
[...]
if (ioctl(self->vcpu_fd, KVM_GET_SREGS, &sregs) < 0)
die("KVM_GET_REGS failed");
is it not OK to call KVM_GET_SREGS from other threads than the one
that's doing KVM_RUN?
Pekka
next reply other threads:[~2011-05-08 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 8:24 Pekka Enberg [this message]
2011-05-08 8:50 ` Is KVM_GET_SREGS safe from other threads? Avi Kivity
2011-05-08 9:07 ` Pekka Enberg
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=BANLkTikB0NmgSzOV5YO-+Qm2fh1MFw6utw@mail.gmail.com \
--to=penberg@kernel.org \
--cc=avi@redhat.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
/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 NNTP newsgroup(s).