From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Liu Yu <yu.liu@freescale.com>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
galak@kernel.crashing.org, timur@freescale.com,
Stuart Yoder <stuart.yoder@freescale.com>
Subject: Re: [PATCH v2 2/3] KVM: PPC: epapr: Add idle hcall support for host
Date: Mon, 09 Jan 2012 20:00:36 +0000 [thread overview]
Message-ID: <4F0B4764.6070801@freescale.com> (raw)
In-Reply-To: <9974D2A0-C91D-442E-8972-529E24418A28@suse.de>
On 01/09/2012 08:15 AM, Alexander Graf wrote:
>
> On 05.01.2012, at 10:07, Liu Yu wrote:
>
>> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
>> index c33f6a7..1242ee1 100644
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -81,6 +81,10 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
>>
>> /* Second return value is in r4 */
>> break;
>> + case HC_VENDOR_EPAPR | HC_EV_IDLE:
>> + r = HC_EV_SUCCESS;
>> + kvm_vcpu_block(vcpu);
>
> Hrm. This will return on signal. So if the guest sends an idle hcall,
> then user space gets a random signal, we'll continue executing the
> guest CPU, getting us out of idle even though the guest didn't expect
> it, since the guest really wants to get an interrupt after the idle
> hcall.
The ePAPR description of this hcall is a little vague (Stuart, put on
list to fix in next ePAPR revision?), but this is expected. It will
also be the case if a guest directly uses the wait instruction. Guests
must be able to deal with spurious wakeups.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Liu Yu <yu.liu@freescale.com>, <kvm-ppc@vger.kernel.org>,
<kvm@vger.kernel.org>, <galak@kernel.crashing.org>,
<timur@freescale.com>, Stuart Yoder <stuart.yoder@freescale.com>
Subject: Re: [PATCH v2 2/3] KVM: PPC: epapr: Add idle hcall support for host
Date: Mon, 9 Jan 2012 14:00:36 -0600 [thread overview]
Message-ID: <4F0B4764.6070801@freescale.com> (raw)
In-Reply-To: <9974D2A0-C91D-442E-8972-529E24418A28@suse.de>
On 01/09/2012 08:15 AM, Alexander Graf wrote:
>
> On 05.01.2012, at 10:07, Liu Yu wrote:
>
>> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
>> index c33f6a7..1242ee1 100644
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -81,6 +81,10 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
>>
>> /* Second return value is in r4 */
>> break;
>> + case HC_VENDOR_EPAPR | HC_EV_IDLE:
>> + r = HC_EV_SUCCESS;
>> + kvm_vcpu_block(vcpu);
>
> Hrm. This will return on signal. So if the guest sends an idle hcall,
> then user space gets a random signal, we'll continue executing the
> guest CPU, getting us out of idle even though the guest didn't expect
> it, since the guest really wants to get an interrupt after the idle
> hcall.
The ePAPR description of this hcall is a little vague (Stuart, put on
list to fix in next ePAPR revision?), but this is expected. It will
also be the case if a guest directly uses the wait instruction. Guests
must be able to deal with spurious wakeups.
-Scott
next prev parent reply other threads:[~2012-01-09 20:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 9:07 [PATCH v2 2/3] KVM: PPC: epapr: Add idle hcall support for host Liu Yu
2012-01-05 9:07 ` Liu Yu
2012-01-09 14:15 ` Alexander Graf
2012-01-09 14:15 ` Alexander Graf
2012-01-09 16:04 ` Yoder Stuart-B08248
2012-01-09 16:04 ` Yoder Stuart-B08248
2012-01-09 16:07 ` Alexander Graf
2012-01-09 16:07 ` Alexander Graf
2012-01-09 22:41 ` Yoder Stuart-B08248
2012-01-09 22:41 ` Yoder Stuart-B08248
2012-01-09 22:51 ` Alexander Graf
2012-01-09 22:51 ` Alexander Graf
2012-01-09 20:00 ` Scott Wood [this message]
2012-01-09 20:00 ` Scott Wood
2012-01-09 20:18 ` Alexander Graf
2012-01-09 20:18 ` Alexander Graf
2012-01-09 22:33 ` Scott Wood
2012-01-09 22:33 ` 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=4F0B4764.6070801@freescale.com \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=galak@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=stuart.yoder@freescale.com \
--cc=timur@freescale.com \
--cc=yu.liu@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 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.