linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ian Munsie <imunsie@au1.ibm.com>
To: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>, mikey <mikey@neuling.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Frederic Barrat <frederic.barrat@fr.ibm.com>
Subject: Re: [PATCH] cxl: Ensure PSL interrupt is configured for contexts with no AFU IRQs
Date: Thu, 05 May 2016 10:14:34 +1000	[thread overview]
Message-ID: <1462406618-sup-6140@x230.ozlabs.ibm.com> (raw)
In-Reply-To: <572A0681.4080703@linux.vnet.ibm.com>

Excerpts from Frederic Barrat's message of 2016-05-05 00:26:09 +1000:
> I believe there's a potential problem there for powerVM guest.
> In afu_allocate_irqs(), the allocation of the bitmap for the AFU 
> interrupts should return NULL (since count = 0). Therefore we'll skip 
> the allocation for the irq names. Yet we need one for the PSL interrupt. 
> I'm not too sure of what the effect of calling cxl_map_irq with a NULL 
> name is (later, in afu_register_hwirqs), but it's likely not very good.
> That is admittedly a latent pb introduced by the powerVM patch, only 
> revealed here.

Actually I believe it should be fine - kcalloc should return
ZERO_SIZE_POINTER, not NULL and the names should still be allocated.
I'm pretty sure we already rely on this for AFUs that don't use any
interrupts per context, otherwise they would fail with -ENOMEM.

> Of course, this is highly theoretical. pHyp only supports cxlflash, so 
> count is not supposed to be null. Still...

Yeah, I was somewhat tempted not to bother coping with this situation in
PowerVM given we don't have any users that need it, but it seemed like a
better idea to make the API's behaviour consistent regardless of the
underlying platform.

> Other than that, the patch looks good to me.

Thanks for the review :)

Cheers,
-Ian

  reply	other threads:[~2016-05-05  0:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04  4:52 [PATCH] cxl: Ensure PSL interrupt is configured for contexts with no AFU IRQs Ian Munsie
2016-05-04 14:26 ` Frederic Barrat
2016-05-05  0:14   ` Ian Munsie [this message]
2016-05-05  5:58     ` Frederic Barrat
2016-05-10 21:48 ` Michael Ellerman

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=1462406618-sup-6140@x230.ozlabs.ibm.com \
    --to=imunsie@au1.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=frederic.barrat@fr.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    /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).