kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: mian-muhammad.hamayun@imag.fr
Cc: kvm@vger.kernel.org
Subject: Re: Can we force a KVM VCPU in Guest Mode to Exit to User Mode From User Mode ?
Date: Thu, 26 Jul 2012 13:06:25 +0300	[thread overview]
Message-ID: <501116A1.90607@redhat.com> (raw)
In-Reply-To: <5011102E.5020302@imag.fr>

On 07/26/2012 12:38 PM, Mian M. Hamayun wrote:

<snip>

> 
> This mechanism 'seems' to work fine when both vcpu threads are in User
> Mode. But when booting an SMP Guest, the boot processor (BSP) initially
> executes the bootstrap code while the non-boot processors (APs) are
> waiting for initial INIT-SIPI-SIPI messages.
> 
> What I fail to understand is if an AP is currently waiting for an INIT
> signal, and we call the "run_on_cpu" function above for this cpu, it
> blocks the whole system, as the AP is in Guest mode and cannot call the
> "flush_queued_work" and the BSP is waiting for this to happen.
> 
> How can we resolve this deadlock ? Is there a way to force the AP to
> quit the Guest Mode, by using some specific mechanism from the User mode ?

When a vcpu is waiting for an INIT, it still responds to signals and
will return to userspace if a signal is received.  Did you observe
something different?


-- 
error compiling committee.c: too many arguments to function



  reply	other threads:[~2012-07-26 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26  9:38 Can we force a KVM VCPU in Guest Mode to Exit to User Mode From User Mode ? Mian M. Hamayun
2012-07-26 10:06 ` Avi Kivity [this message]
2012-07-26 10:34   ` Mian M. Hamayun
2012-07-26 10:43     ` Avi Kivity
2012-07-26 13:39       ` Mian M. Hamayun
2012-07-26 13:55         ` 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=501116A1.90607@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mian-muhammad.hamayun@imag.fr \
    /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).