qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Daniel Henrique Barboza <danielhb413@gmail.com>,
	<qemu-ppc@nongnu.org>, <qemu-devel@nongnu.org>
Cc: Greg Kurz <groug@kaod.org>, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] ppc/spapr: Advertise StoreEOI for POWER10 compat guests
Date: Thu, 17 Feb 2022 18:42:36 +0100	[thread overview]
Message-ID: <44f1d4ba-b7a7-1dad-0db4-aa5644b718ba@kaod.org> (raw)
In-Reply-To: <0b285039-c797-3746-d4e8-1ae1a5ed731e@gmail.com>

>> Unfortunately, this patch breaks migration under TCG because the XIVE
>> source flag is not updated on the target side. KVM is not impacted
>> because the emulated sources are not used. This needs to be addressed
>> in a v2.
>>
>> That said, even without this patch, TCG migration is broken. some CPUs
>> on the receive side are stalled on CPU Hard LOCKUPs. QEMU 6.2 is impacted.
>> So it has been a while :/
> 
> Ouch. Guess we need to add TCG migration tests in the test workflow ...

Regarding the first issue with the new XIVE source flag, this routine
changes an object property after realize which is a no-no for migration :

     void spapr_xive_enable_store_eoi(SpaprXive *xive, bool enable)
     {
         if (enable) {
             xive->source.esb_flags |= XIVE_SRC_STORE_EOI;
         } else {
             xive->source.esb_flags &= ~XIVE_SRC_STORE_EOI;
         }
     }

I think we need a new SpaprXive state to represent the characteristic
of the source indirectly negotiated by CAS when the CPU is a POWER10.
we would use it to update xive->source.esb_flags at post_load time
after migration.

Or simply mimick CAS :

@@ -531,6 +531,14 @@ static int spapr_xive_post_load(SpaprInt
          return kvmppc_xive_post_load(xive, version_id);
      }
  
+    PowerPCCPU *first_ppc_cpu = POWERPC_CPU(first_cpu);
+    bool enable = ppc_check_compat(first_ppc_cpu, CPU_POWERPC_LOGICAL_3_10, 0,
+                                   first_ppc_cpu->compat_pvr);
+    spapr_xive_enable_store_eoi(xive, enable);
+
      return 0;
  }
  
which has the benefit of being stateless.

Ideas ?

Thanks,

C.



  reply	other threads:[~2022-02-17 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 14:11 [PATCH] ppc/spapr: Advertise StoreEOI for POWER10 compat guests Cédric Le Goater
2022-02-16 22:17 ` Daniel Henrique Barboza
2022-02-17  7:51   ` Cédric Le Goater
2022-02-17 11:28     ` Daniel Henrique Barboza
2022-02-17 11:28 ` Daniel Henrique Barboza
2022-02-17 13:23   ` Cédric Le Goater
2022-02-17 13:30     ` Daniel Henrique Barboza
2022-02-17 17:42       ` Cédric Le Goater [this message]
2022-02-17 21:03     ` Daniel Henrique Barboza

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=44f1d4ba-b7a7-1dad-0db4-aa5644b718ba@kaod.org \
    --to=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --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).