public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Fritsch <sf@sfritsch.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Amos Kong <akong@redhat.com>,
	virtualization@lists.linux-foundation.org, rusty@rustcorp.com.au,
	kvm@vger.kernel.org, jasowang@redhat.com, penberg@iki.fi,
	sasha.levin@oracle.com, will.deacon@arm.com
Subject: Re: [PATCH RFC] virtio-pci: share config interrupt between virtio devices
Date: Tue, 23 Sep 2014 22:47:41 +0200	[thread overview]
Message-ID: <2448558.DYYccbiYmi@k> (raw)
In-Reply-To: <20140921102106.GA4303@redhat.com>

On Sunday 21 September 2014 13:21:06, Michael S. Tsirkin wrote:
> On Sun, Sep 21, 2014 at 11:36:44AM +0200, Stefan Fritsch wrote:
> > On Sunday 21 September 2014 11:09:14, Michael S. Tsirkin wrote:
> > > On Thu, Sep 18, 2014 at 09:18:37PM +0200, Stefan Fritsch wrote:
> > > > On Monday 01 September 2014 09:37:30, Michael S. Tsirkin 
wrote:
> > > > > Why do we need INT#x?
> > > > > How about setting IRQF_SHARED for the config interrupt
> > > > > while using MSI-X? You'd have to read ISR to check that the
> > > > > interrupt was intended for your device.
> > > >
> > > > 
> > > >
> > > > The virtio 0.9.5 spec says that ISR is "unused" when in MSI-X
> > > > mode. I  don't think that you can depend on the device to set
> > > > the
> > > > configuration changed bit.
> > > > The virtio 1.0 spec seems to have fixed that.
> > >
> > > 
> > >
> > > Yes, virtio 0.9.5 has this bug. But in practice qemu always set
> > > this bit, so for qemu we could do that
> > > unconditionally.  Pekka's lkvm tool doesn't
> > > unfortunately.  It's easy to fix that, but it would be nicer to
> > > additionally probe for old versions of the tool, and disable
> > > IRQF_SHARED in that case.
> >
> > 
> >
> > What about other implementations? I think Linux should try to
> > conform  to the spec so that all device implementations which
> > conform to the spec just work.
> >
> > 
> >
> > One implementation that comes to mind is virtualbox. But from a
> > quick  look at the source, it seems that it sets the ISR bit
> > always, too. And it uses qemu's subsystem vendor id.
> >
> > 
> >
> > But there are other implementations. For example bhyve.
> 
> I couldn't find any code in bhyve that sets VTCFG_ISR_CONF_CHANGED.
> Maybe it doesn't generate config changed interrupts?
> 
> bhyve sets subsystem vendor to 0 apparently?
> We could use that to detect it.

My point was that there are many virtio implementations by now and you 
can't assume you know all of them.

> But maybe we should just make it a 1.0 only feature.

FWIW, I think that would be the better option.

  reply	other threads:[~2014-09-23 20:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01  5:41 [PATCH RFC] virtio-pci: share config interrupt between virtio devices Amos Kong
2014-09-01  6:37 ` Michael S. Tsirkin
2014-09-01  7:58   ` Amos Kong
2014-09-01  8:12     ` Michael S. Tsirkin
2014-09-18 19:18   ` Stefan Fritsch
2014-09-21  8:09     ` Michael S. Tsirkin
2014-09-21  9:36       ` Stefan Fritsch
2014-09-21 10:21         ` Michael S. Tsirkin
2014-09-23 20:47           ` Stefan Fritsch [this message]
2014-09-21 13:47       ` Sasha Levin
2014-09-21 15:02         ` Michael S. Tsirkin
2014-09-21 15:19           ` Sasha Levin
2014-09-21 17:53             ` Michael S. Tsirkin

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=2448558.DYYccbiYmi@k \
    --to=sf@sfritsch.de \
    --cc=akong@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=penberg@iki.fi \
    --cc=rusty@rustcorp.com.au \
    --cc=sasha.levin@oracle.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox