From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: check if kernel irqchip is actually enabled
Date: Thu, 9 Jan 2020 17:46:15 +0100 [thread overview]
Message-ID: <20200109174615.5eeebab8.cohuck@redhat.com> (raw)
In-Reply-To: <6020c443-a5b4-8064-87b6-a61e1b0b7c40@redhat.com>
On Thu, 9 Jan 2020 14:57:43 +0100
David Hildenbrand <david@redhat.com> wrote:
> On 09.01.20 14:47, Cornelia Huck wrote:
> > On s390, we only allow userspace to create an in-kernel irqchip
> > if it has first enabled the KVM_CAP_S390_IRQCHIP vm capability.
> > Let's assume that a userspace that enabled that capability has
> > created an irqchip as well.
> >
> > Fixes: 84223598778b ("KVM: s390: irq routing for adapter interrupts.")
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> >
> > A more precise check would be to add a field in kvm_arch that tracks
> > whether an irqchip has actually been created; not sure if that is
> > really needed.
> >
> > Found while trying to hunt down QEMU crashes with kvm-irqchip=off;
> > this is not sufficient, though. I *think* everything but irqfds
> > should work without kvm-irqchip as well, but have not found the problem
> > yet.
> >
> > ---
> > arch/s390/kvm/irq.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/s390/kvm/irq.h b/arch/s390/kvm/irq.h
> > index 484608c71dd0..30e13d031379 100644
> > --- a/arch/s390/kvm/irq.h
> > +++ b/arch/s390/kvm/irq.h
> > @@ -13,7 +13,7 @@
> >
> > static inline int irqchip_in_kernel(struct kvm *kvm)
> > {
> > - return 1;
> > + return !!kvm->arch.use_irqchip;
> > }
> >
> > #endif
> >
>
> This function is used on s390x/common code only in
>
> virt/kvm/irqchip.c:kvm_send_userspace_msi()
>
> That function is only used with CONFIG_HAVE_KVM_MSI. That is not
> selected for s390x.
>
> What does this patch fix?
Currently, only future callers... but maybe this should be an optional
function instead that is only defined by the architectures that can
actually do something useful here? TBH, I'm not completely sure what
this function is actually supposed to indicate...
next prev parent reply other threads:[~2020-01-09 16:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 13:47 [PATCH] KVM: s390: check if kernel irqchip is actually enabled Cornelia Huck
2020-01-09 13:50 ` Cornelia Huck
2020-01-09 13:57 ` David Hildenbrand
2020-01-09 16:46 ` Cornelia Huck [this message]
2020-01-09 14:06 ` Christian Borntraeger
2020-01-09 16:49 ` Cornelia Huck
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=20200109174615.5eeebab8.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.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