public inbox for kvm-ppc@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Scott Wood <scottwood@freescale.com>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: booke: check for signals in kvmppc_vcpu_run
Date: Fri, 11 Nov 2011 15:35:30 +0000	[thread overview]
Message-ID: <4EBD40C2.4090406@suse.de> (raw)
In-Reply-To: <20111111153206.GB14488@schlenkerla.am.freescale.net>

On 11/11/2011 04:32 PM, Scott Wood wrote:
> On Fri, Nov 11, 2011 at 03:09:17PM +0100, Alexander Graf wrote:
>> On 11/08/2011 11:11 PM, Scott Wood wrote:
>>> Currently we check prior to returning from a lightweight exit,
>>> but not prior to initial entry.
>>>
>>> book3s already does a similar test.
>>>
>>> Signed-off-by: Scott Wood<scottwood@freescale.com>
>>> ---
>>>   arch/powerpc/kvm/booke.c |   10 +++++++++-
>>>   1 files changed, 9 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
>>> index b642200..9c78589 100644
>>> --- a/arch/powerpc/kvm/booke.c
>>> +++ b/arch/powerpc/kvm/booke.c
>>> @@ -322,11 +322,19 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
>>>   	}
>>>
>>>   	local_irq_disable();
>>> +
>>> +	if (signal_pending(current)) {
>> Any reason you're doing this after irq_disable()?
> If we get a signal after the check, we want to be sure that we don't
> receive the reschedule IPI until after we're in the guest, so that it
> will cause another signal check.

Makes sense. So the current book3s implementation is wrong?


Alex


  reply	other threads:[~2011-11-11 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 22:11 [PATCH] KVM: PPC: booke: check for signals in kvmppc_vcpu_run Scott Wood
2011-11-11 14:09 ` Alexander Graf
2011-11-11 15:32   ` Scott Wood
2011-11-11 15:35     ` Alexander Graf [this message]
2011-11-11 19:05       ` Scott Wood

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=4EBD40C2.4090406@suse.de \
    --to=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=scottwood@freescale.com \
    /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