From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
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 19:05:02 +0000 [thread overview]
Message-ID: <4EBD71DE.60905@freescale.com> (raw)
In-Reply-To: <4EBD40C2.4090406@suse.de>
On 11/11/2011 09:35 AM, Alexander Graf wrote:
> 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?
I think so.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
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 13:05:02 -0600 [thread overview]
Message-ID: <4EBD71DE.60905@freescale.com> (raw)
In-Reply-To: <4EBD40C2.4090406@suse.de>
On 11/11/2011 09:35 AM, Alexander Graf wrote:
> 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?
I think so.
-Scott
next prev parent reply other threads:[~2011-11-11 19:05 UTC|newest]
Thread overview: 10+ 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-08 22:11 ` Scott Wood
2011-11-11 14:09 ` Alexander Graf
2011-11-11 14:09 ` Alexander Graf
2011-11-11 15:32 ` Scott Wood
2011-11-11 15:32 ` Scott Wood
2011-11-11 15:35 ` Alexander Graf
2011-11-11 15:35 ` Alexander Graf
2011-11-11 19:05 ` Scott Wood [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=4EBD71DE.60905@freescale.com \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.