linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* "KVM: PPC: booke: Improve timer register emulation" breaks Book3s HV
@ 2011-12-06  4:03 Paul Mackerras
  2011-12-06 11:43 ` Paul Mackerras
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Mackerras @ 2011-12-06  4:03 UTC (permalink / raw)
  To: Alexander Graf, Scott Wood; +Cc: linuxppc-dev, kvm-ppc

I'm not sure why yet, but commit 8a97c432 ("KVM: PPC: booke: Improve
timer register emulation") in Alex's kvm-ppc-next branch is breaking
Book3S HV KVM on POWER7.  Guest cpus fail to spin up, and even with
just one cpu, the guest stalls every so often.  If I stop the guest
and inspect the state with qemu, PC is at 0x900.  Reverting 8a97c432
makes it work properly again.

Paul.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "KVM: PPC: booke: Improve timer register emulation" breaks Book3s HV
  2011-12-06  4:03 "KVM: PPC: booke: Improve timer register emulation" breaks Book3s HV Paul Mackerras
@ 2011-12-06 11:43 ` Paul Mackerras
  2011-12-06 11:46   ` Alexander Graf
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Mackerras @ 2011-12-06 11:43 UTC (permalink / raw)
  To: Alexander Graf, Scott Wood; +Cc: linuxppc-dev, kvm-ppc

On Tue, Dec 06, 2011 at 03:03:00PM +1100, Paul Mackerras wrote:
> I'm not sure why yet, but commit 8a97c432 ("KVM: PPC: booke: Improve
> timer register emulation") in Alex's kvm-ppc-next branch is breaking
> Book3S HV KVM on POWER7.  Guest cpus fail to spin up, and even with
> just one cpu, the guest stalls every so often.  If I stop the guest
> and inspect the state with qemu, PC is at 0x900.  Reverting 8a97c432
> makes it work properly again.

This fixes it:

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 534cbe1..83bcb44 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -560,7 +560,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
 
 void kvm_vcpu_kick(struct kvm_vcpu *vcpu)
 {
-	if (waitqueue_active(&vcpu->wq)) {
+	if (waitqueue_active(vcpu->arch.wqp)) {
 		wake_up_interruptible(vcpu->arch.wqp);
 		vcpu->stat.halt_wakeup++;
 	} else if (vcpu->cpu != -1) {

Alex, do you want to roll that in with Scott's patch, or do you want me
to send a separate patch on top?

Paul.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: "KVM: PPC: booke: Improve timer register emulation" breaks Book3s HV
  2011-12-06 11:43 ` Paul Mackerras
@ 2011-12-06 11:46   ` Alexander Graf
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2011-12-06 11:46 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Scott Wood, linuxppc-dev, kvm-ppc


On 06.12.2011, at 12:43, Paul Mackerras wrote:

> On Tue, Dec 06, 2011 at 03:03:00PM +1100, Paul Mackerras wrote:
>> I'm not sure why yet, but commit 8a97c432 ("KVM: PPC: booke: Improve
>> timer register emulation") in Alex's kvm-ppc-next branch is breaking
>> Book3S HV KVM on POWER7.  Guest cpus fail to spin up, and even with
>> just one cpu, the guest stalls every so often.  If I stop the guest
>> and inspect the state with qemu, PC is at 0x900.  Reverting 8a97c432
>> makes it work properly again.
>=20
> This fixes it:
>=20
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 534cbe1..83bcb44 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -560,7 +560,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, =
struct kvm_run *run)
>=20
> void kvm_vcpu_kick(struct kvm_vcpu *vcpu)
> {
> -	if (waitqueue_active(&vcpu->wq)) {
> +	if (waitqueue_active(vcpu->arch.wqp)) {

:(

> 		wake_up_interruptible(vcpu->arch.wqp);
> 		vcpu->stat.halt_wakeup++;
> 	} else if (vcpu->cpu !=3D -1) {
>=20
> Alex, do you want to roll that in with Scott's patch, or do you want =
me
> to send a separate patch on top?

I usually like praise where praise belongs, so I'll put this right after =
Scott's patch if you give me a nice and shiny patch description with a =
signed-off-by line :)


Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-06 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06  4:03 "KVM: PPC: booke: Improve timer register emulation" breaks Book3s HV Paul Mackerras
2011-12-06 11:43 ` Paul Mackerras
2011-12-06 11:46   ` Alexander Graf

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).