All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Pavel Fedin <p.fedin@samsung.com>
Cc: kvm@vger.kernel.org, 'Marc Zyngier' <marc.zyngier@arm.com>,
	'Gleb Natapov' <gleb@kernel.org>,
	'Paolo Bonzini' <pbonzini@redhat.com>,
	kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP
Date: Mon, 30 Nov 2015 13:13:31 +0100	[thread overview]
Message-ID: <20151130131331.78d98df5.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <017101d12b66$2c8cf970$85a6ec50$@samsung.com>

On Mon, 30 Nov 2015 14:56:38 +0300
Pavel Fedin <p.fedin@samsung.com> wrote:

>  Hello!
> 
> > >  	case KVM_CAP_INTERNAL_ERROR_DATA:
> > >  #ifdef CONFIG_HAVE_KVM_MSI
> > >  	case KVM_CAP_SIGNAL_MSI:
> > > +		/* Fallthrough */
> > >  #endif
> > > +	case KVM_CAP_CHECK_EXTENSION_VM:
> > > +		return 1;
> > >  #ifdef CONFIG_HAVE_KVM_IRQFD
> > >  	case KVM_CAP_IRQFD:
> > >  	case KVM_CAP_IRQFD_RESAMPLE:
> > > +		return kvm_vm_ioctl_check_extension(kvm, KVM_CAP_IRQCHIP);
> > 
> > This won't work for s390, as it doesn't have KVM_CAP_IRQCHIP but
> > KVM_CAP_S390_IRQCHIP (which needs to be enabled).
> 
>  Thank you for the note, i didn't know about irqchip-specific capability codes. There's the same issue with PowerPC, now i
> understand why there's no KVM_CAP_IRQCHIP for them. Because they have KVM_CAP_IRQ_MPIC and KVM_CAP_IRQ_XICS, similar to S390.
>  But isn't it just weird? I understand that perhaps we have some real need to distinguish between different irqchip types, but
> shouldn't the kernel also publish KVM_CAP_IRQCHIP, which stands just for "we support some irqchip virtualization"?
>  May be we should just add this for PowerPC and S390, to make things less ambiguous?

Note that we explicitly need to _enable_ the s390 cap (for
compatibility). I'd need to recall the exact details but I came to the
conclusion back than that I could not simply enable KVM_CAP_IRQCHIP for
s390 (and current qemu would fail to enable the s390 cap if we started
advertising KVM_CAP_IRQCHIP now).

  reply	other threads:[~2015-11-30 12:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30  9:40 [PATCH v5 0/2] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip Pavel Fedin
2015-11-30  9:40 ` [PATCH v5 1/2] arm/arm64: KVM: Detect vGIC presence at runtime Pavel Fedin
2016-04-21 21:41   ` Alexander Graf
2016-04-21 22:04     ` Peter Maydell
2016-04-21 22:35       ` Alexander Graf
2016-04-21 22:41         ` Peter Maydell
2016-04-22  7:50     ` Marc Zyngier
2015-11-30  9:40 ` [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP Pavel Fedin
2015-11-30 11:26   ` Cornelia Huck
2015-11-30 11:56     ` Pavel Fedin
2015-11-30 12:13       ` Cornelia Huck [this message]
2015-11-30 12:41         ` Pavel Fedin
2015-11-30 14:38           ` Cornelia Huck
2015-11-30 14:45             ` Pavel Fedin
2015-12-01 11:07             ` Pavel Fedin
2015-12-01 16:00             ` Paolo Bonzini

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=20151130131331.78d98df5.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@arm.com \
    --cc=p.fedin@samsung.com \
    --cc=pbonzini@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.