qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Joel Stanley" <joel@jms.id.au>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Frédéric Barrat" <fbarrat@linux.ibm.com>
Cc: <qemu-devel@nongnu.org>, <qemu-ppc@nongnu.org>
Subject: Re: [PATCH 4/4] ppc/pnv: Return zero for core thread state xscom
Date: Sat, 01 Jul 2023 20:22:27 +1000	[thread overview]
Message-ID: <CTQRF129NSME.300WPYT84MANM@wheely> (raw)
In-Reply-To: <20230630035547.80329-5-joel@jms.id.au>

On Fri Jun 30, 2023 at 1:55 PM AEST, Joel Stanley wrote:
> Firmware now warns if booting in LPAR per core mode (PPC bit 62). So
> this warning doesn't trigger report the core thread state is 0.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  hw/ppc/pnv_core.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
> index 7fff2fd9e298..98356d7f6538 100644
> --- a/hw/ppc/pnv_core.c
> +++ b/hw/ppc/pnv_core.c
> @@ -116,6 +116,8 @@ static const MemoryRegionOps pnv_core_power8_xscom_ops = {
>  #define PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_HYP 0xf010d
>  #define PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_OTR 0xf010a
>  
> +#define PNV9_XSCOM_EC_CORE_THREAD_STATE    0x10ab3
> +
>  static uint64_t pnv_core_power9_xscom_read(void *opaque, hwaddr addr,
>                                             unsigned int width)
>  {
> @@ -134,6 +136,9 @@ static uint64_t pnv_core_power9_xscom_read(void *opaque, hwaddr addr,
>      case PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_OTR:
>          val = 0x0;
>          break;
> +    case PNV9_XSCOM_EC_CORE_THREAD_STATE:
> +        val = 0;
> +        break;
>      default:
>          qemu_log_mask(LOG_UNIMP, "Warning: reading reg=0x%" HWADDR_PRIx "\n",
>                    addr);
> @@ -408,6 +413,8 @@ static const MemoryRegionOps pnv_quad_power9_xscom_ops = {
>   * POWER10 Quads
>   */
>  
> +#define PNV10_XSCOM_EC_PC_PMC_CORE_THREAD_STATE 0x28412
> +
>  static uint64_t pnv_quad_power10_xscom_read(void *opaque, hwaddr addr,
>                                              unsigned int width)
>  {
> @@ -415,6 +422,9 @@ static uint64_t pnv_quad_power10_xscom_read(void *opaque, hwaddr addr,
>      uint64_t val = -1;
>  
>      switch (offset) {
> +    case PNV10_XSCOM_EC_PC_PMC_CORE_THREAD_STATE:
> +        val = 0;
> +        break;
>      default:
>          qemu_log_mask(LOG_UNIMP, "%s: writing @0x%08x\n", __func__,
>                        offset);

Yeah this is the problem, this is just addressing one core in the quad.
AFAIKS P9 may have the same problem though so I don't blame the
confusion.

The other patches seem good because we'll want a P10 quad too I think.

Thanks,
Nick


  parent reply	other threads:[~2023-07-01 10:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  3:55 [PATCH 0/4] ppc/pnv: Extend "quad" model for p10 Joel Stanley
2023-06-30  3:55 ` [PATCH 1/4] ppc/pnv: quad xscom callbacks are P9 specific Joel Stanley
2023-06-30  5:23   ` Cédric Le Goater
2023-06-30  3:55 ` [PATCH 2/4] ppc/pnv: Subclass quad xscom callbacks Joel Stanley
2023-06-30  5:24   ` Cédric Le Goater
2023-06-30  3:55 ` [PATCH 3/4] ppc/pnv: Add P10 quad ops Joel Stanley
2023-06-30  5:24   ` Cédric Le Goater
2023-06-30  7:30   ` Frederic Barrat
2023-06-30  7:35     ` Joel Stanley
2023-06-30  7:44       ` Cédric Le Goater
2023-06-30 13:47         ` Daniel Henrique Barboza
2023-06-30  3:55 ` [PATCH 4/4] ppc/pnv: Return zero for core thread state xscom Joel Stanley
2023-06-30  5:24   ` Cédric Le Goater
2023-07-01 10:22   ` Nicholas Piggin [this message]
2023-07-01 10:10 ` [PATCH 0/4] ppc/pnv: Extend "quad" model for p10 Nicholas Piggin

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=CTQRF129NSME.300WPYT84MANM@wheely \
    --to=npiggin@gmail.com \
    --cc=clg@kaod.org \
    --cc=fbarrat@linux.ibm.com \
    --cc=joel@jms.id.au \
    --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).