Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 00:24, Paul Mackerras wrote: > On Tue, Sep 01, 2015 at 11:41:18PM +0200, Thomas Huth wrote: >> The size of the Problem State Priority Boost Register is only >> 32 bits, so let's change the type of the corresponding variable >> accordingly to avoid future trouble. > > Since we're alread

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 00:55, Benjamin Herrenschmidt wrote: > On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: >> On Wed, Sep 02, 2015 at 08:25:05AM +1000, Benjamin Herrenschmidt >> wrote: >>> On Tue, 2015-09-01 at 23:41 +0200, Thomas Huth wrote: The size of the Problem State Priority Boost Regis

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Alexander Graf
> Am 02.09.2015 um 09:26 schrieb Thomas Huth : > >> On 02/09/15 00:55, Benjamin Herrenschmidt wrote: >>> On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: >>> On Wed, Sep 02, 2015 at 08:25:05AM +1000, Benjamin Herrenschmidt >>> wrote: On Tue, 2015-09-01 at 23:41 +0200, Thomas Huth wr

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 10:26, Alexander Graf wrote: > >> Am 02.09.2015 um 09:26 schrieb Thomas Huth : >> >>> On 02/09/15 00:55, Benjamin Herrenschmidt wrote: On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: On Wed, Sep 02, 2015 at 08:25:05AM +1000, Benjamin Herrenschmidt wrote: > O

[PATCH v2] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
The size of the Problem State Priority Boost Register is only 32 bits, but the kvm_vcpu_arch->pspb variable is declared as "ulong", ie. 64-bit. However, the assembler code accesses this variable with 32-bit accesses, and the KVM_REG_PPC_PSPB macro is defined with SIZE_U32, too, so that the current

[PATCH] KVM: PPC: Book3S HV: Exit on H_DOORBELL only if HOST_IPI is set

2015-09-02 Thread Paul Mackerras
From: "Gautham R. Shenoy" The code that handles the case when we receive a H_DOORBELL interrupt has a comment which says "Hypervisor doorbell - exit only if host IPI flag set". However, the current code does not actually check if the host IPI flag is set. This is due to a comparison instruction

[PATCH] KVM: PPC: Book3S HV: Fix race in starting secondary threads

2015-09-02 Thread Paul Mackerras
From: "Gautham R. Shenoy" The current dynamic micro-threading code has a race due to which a secondary thread naps when it is supposed to be running a vcpu. As a side effect of this, on a guest exit, the primary thread in kvmppc_wait_for_nap() finds that this secondary thread hasn't cleared its v

Re: [PATCH 1/2] KVM: PPC: Book3S HV: Fix race in starting secondary threads

2015-09-02 Thread David Gibson
On Thu, Sep 03, 2015 at 03:20:50PM +1000, Paul Mackerras wrote: > From: "Gautham R. Shenoy" > > The current dynamic micro-threading code has a race due to which a > secondary thread naps when it is supposed to be running a vcpu. As a > side effect of this, on a guest exit, the primary thread in >

Re: [PATCH 2/2] KVM: PPC: Book3S HV: Exit on H_DOORBELL only if HOST_IPI is set

2015-09-02 Thread David Gibson
On Thu, Sep 03, 2015 at 03:21:23PM +1000, Paul Mackerras wrote: > From: "Gautham R. Shenoy" > > The code that handles the case when we receive a H_DOORBELL interrupt > has a comment which says "Hypervisor doorbell - exit only if host IPI > flag set". However, the current code does not actually c