From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: PPC: Book3S HV: Exit on H_DOORBELL only if HOST_IPI is set
Date: Thu, 03 Sep 2015 05:32:45 +0000 [thread overview]
Message-ID: <20150903053245.GN6537@voom.redhat.com> (raw)
In-Reply-To: <20150903052123.GB4377@iris.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
On Thu, Sep 03, 2015 at 03:21:23PM +1000, Paul Mackerras wrote:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
>
> 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 that
> got missed.
>
> As a result, the current code performs the exit to host only
> if some sibling thread or a sibling sub-core is exiting to the
> host. This implies that, an IPI sent to a sibling core in
> (subcores-per-core != 1) mode will be missed by the host unless the
> sibling core is on the exit path to the host.
>
> This patch adds the missing comparison operation which will ensure
> that when HOST_IPI flag is set, we unconditionally exit to the host.
>
> Fixes: 66feed61cdf6
> Cc: stable@vger.kernel.org # v4.1+
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index b07f045..2273dca 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -1213,6 +1213,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
> cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL
> bne 3f
> lbz r0, HSTATE_HOST_IPI(r13)
> + cmpwi r0, 0
> beq 4f
> b guest_exit_cont
> 3:
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: PPC: Book3S HV: Exit on H_DOORBELL only if HOST_IPI is set
Date: Thu, 3 Sep 2015 15:32:45 +1000 [thread overview]
Message-ID: <20150903053245.GN6537@voom.redhat.com> (raw)
In-Reply-To: <20150903052123.GB4377@iris.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
On Thu, Sep 03, 2015 at 03:21:23PM +1000, Paul Mackerras wrote:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
>
> 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 that
> got missed.
>
> As a result, the current code performs the exit to host only
> if some sibling thread or a sibling sub-core is exiting to the
> host. This implies that, an IPI sent to a sibling core in
> (subcores-per-core != 1) mode will be missed by the host unless the
> sibling core is on the exit path to the host.
>
> This patch adds the missing comparison operation which will ensure
> that when HOST_IPI flag is set, we unconditionally exit to the host.
>
> Fixes: 66feed61cdf6
> Cc: stable@vger.kernel.org # v4.1+
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index b07f045..2273dca 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -1213,6 +1213,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
> cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL
> bne 3f
> lbz r0, HSTATE_HOST_IPI(r13)
> + cmpwi r0, 0
> beq 4f
> b guest_exit_cont
> 3:
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next parent reply other threads:[~2015-09-03 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150903052123.GB4377@iris.ozlabs.ibm.com>
2015-09-03 5:32 ` David Gibson [this message]
2015-09-03 5:32 ` [PATCH 2/2] KVM: PPC: Book3S HV: Exit on H_DOORBELL only if HOST_IPI is set David Gibson
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=20150903053245.GN6537@voom.redhat.com \
--to=david@gibson.dropbear.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@ozlabs.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.