From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Stuart Yoder <stuart.yoder@freescale.com>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v9 2/4] KVM: PPC: epapr: Add idle hcall support for host
Date: Wed, 07 Mar 2012 23:37:17 +0000 [thread overview]
Message-ID: <4F57F12D.20502@freescale.com> (raw)
In-Reply-To: <3C0902B7-B7F3-4B78-BC8F-F99DEC2F73BD@suse.de>
On 03/07/2012 05:27 PM, Alexander Graf wrote:
> On 08.03.2012, at 00:12, Stuart Yoder wrote:
>>
>> if (vcpu->requests) {
>> + /* kvm_vcpu_block() sets KVM_REQ_UNHALT, but it is
>> + * not cleared elsewhere as on x86. Clear it here
>> + * for now, otherwise we never go idle.
>> + */
>> + clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
>
> Shouldn't the same thing hit us on non-booke as well? Also, it sounds unrelated to me and probably shouldn't be in this patch.
Until recently we didn't check for requests in kvm_arch_vcpu_runnable().
And yes, book3s will need this too.
>> if (kvm_check_request(KVM_REQ_PENDING_TIMER, vcpu)) {
>> smp_mb();
>> update_timer_ints(vcpu);
>> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
>> index ee489f4..2595916 100644
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -48,8 +48,7 @@ static unsigned int perfmon_refcount;
>>
>> int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)
>> {
>> - bool ret = !(v->arch.shared->msr & MSR_WE) ||
>> - !!(v->arch.pending_exceptions) ||
>> + bool ret = !!(v->arch.pending_exceptions) ||
>> v->requests;
>
> Huh?
MSR_WE is not going to get set if the idle hcall is used, so this check
was preventing us from blocking.
The check isn't needed anyway, as nothing can actually change MSR_WE
while we're in kvm_vcpu_block(), which is the only user of
kvm_arch_vcpu_runnable(), and the MSR_WE path won't call
kvm_vcpu_block() if MSR_WE isn't set.
-Scott
next prev parent reply other threads:[~2012-03-07 23:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 23:12 [PATCH v9 0/4] KVM: PPC: Add ePAPR idle hcall support Stuart Yoder
2012-03-07 23:12 ` [PATCH v9 1/4] KVM: PPC: epapr: Factor out the epapr init Stuart Yoder
2012-03-07 23:19 ` Alexander Graf
2012-03-15 19:50 ` Stuart Yoder
2012-03-07 23:12 ` [PATCH v9 2/4] KVM: PPC: epapr: Add idle hcall support for host Stuart Yoder
2012-03-07 23:27 ` Alexander Graf
2012-03-07 23:37 ` Scott Wood [this message]
2012-03-07 23:38 ` Alexander Graf
2012-03-08 4:18 ` Yoder Stuart-B08248
2012-03-08 12:20 ` Alexander Graf
2012-03-15 15:56 ` Stuart Yoder
2012-03-07 23:12 ` [PATCH v9 3/4] KVM: PPC: epapr: install ev_idle hcall for e500 guest Stuart Yoder
2012-03-07 23:36 ` Alexander Graf
2012-03-07 23:12 ` [PATCH v9 4/4] KVM: PPC: epapr: Update other hypercall invoking Stuart Yoder
2012-03-07 23:37 ` Alexander Graf
2012-03-07 23:40 ` 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=4F57F12D.20502@freescale.com \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=stuart.yoder@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