From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] spapr: fix CAS-generated reset
Date: Sun, 10 Sep 2017 13:17:31 +1000 [thread overview]
Message-ID: <20170910031731.GY2735@umbus.fritz.box> (raw)
In-Reply-To: <20170908143344.12960-3-clg@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]
On Fri, Sep 08, 2017 at 04:33:43PM +0200, Cédric Le Goater wrote:
> The OV5_MMU_RADIX_300 requires special handling in the CAS negotiation
> process. It is cleared from the option vector of the guest before
> evaluating the changes and re-added later. But, when testing for a
> possible CAS reset :
>
> spapr->cas_reboot = spapr_ovec_diff(ov5_updates,
> ov5_cas_old, spapr->ov5_cas);
>
> the bit OV5_MMU_RADIX_300 will each time be seen as removed from the
> previous OV5 set, hence generating a reset loop.
>
> Fix this problem by also clearing the same bit in the ov5_cas_old set.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Kind of an ugly hack, but probably the easiest fix for now. Applied to ppc-for-2.11.
> ---
> hw/ppc/spapr_hcall.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index 07b3da8dc4cd..92f1e21358b8 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -1575,6 +1575,13 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
> * to worry about this for now.
> */
> ov5_cas_old = spapr_ovec_clone(spapr->ov5_cas);
> +
> + /* also clear the radix/hash bit from the current ov5_cas bits to
> + * be in sync with the newly ov5 bits. Else the radix bit will be
> + * seen as being removed and this will generate a reset loop
> + */
> + spapr_ovec_clear(ov5_cas_old, OV5_MMU_RADIX_300);
> +
> /* full range of negotiated ov5 capabilities */
> spapr_ovec_intersect(spapr->ov5_cas, spapr->ov5, ov5_guest);
> spapr_ovec_cleanup(ov5_guest);
--
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: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-09-10 3:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 14:33 [Qemu-devel] [PATCH 0/3] spapr: XIVE and CAS fixes Cédric Le Goater
2017-09-08 14:33 ` [Qemu-devel] [PATCH 1/3] ppc/xive: fix OV5_XIVE_EXPLOIT bits Cédric Le Goater
2017-09-08 16:24 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-09-10 3:16 ` [Qemu-devel] " David Gibson
2017-09-08 14:33 ` [Qemu-devel] [PATCH 2/3] spapr: fix CAS-generated reset Cédric Le Goater
2017-09-10 3:17 ` David Gibson [this message]
2017-09-10 19:23 ` Cédric Le Goater
2017-09-08 14:33 ` [Qemu-devel] [RFC PATCH 3/3] spapr: generate a CAS reset for the XIVE exploitation mode Cédric Le Goater
2017-09-10 3:19 ` David Gibson
2017-09-10 19:30 ` Cédric Le Goater
2017-09-11 3:54 ` David Gibson
2017-09-09 5:57 ` [Qemu-devel] [Qemu-ppc] [PATCH 0/3] spapr: XIVE and CAS fixes Cédric Le Goater
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=20170910031731.GY2735@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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 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).