From: Sasha Levin <levinsasha928@gmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Krishna Kumar <krkumar2@in.ibm.com>,
kvm@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Wang Sheng-Hui <shhuiw@gmail.com>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization@lists.linux-foundation.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Amit Shah <amit.shah@redhat.com>
Subject: Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout
Date: Wed, 30 Nov 2011 15:12:43 +0200 [thread overview]
Message-ID: <1322658763.3985.4.camel@lappy> (raw)
In-Reply-To: <87pqgats49.fsf@rustcorp.com.au>
On Wed, 2011-11-30 at 10:10 +1030, Rusty Russell wrote:
> On Mon, 28 Nov 2011 11:15:31 +0200, Sasha Levin <levinsasha928@gmail.com> wrote:
> > On Mon, 2011-11-28 at 11:25 +1030, Rusty Russell wrote:
> > > I'd like to see kvmtools remove support for legacy mode altogether,
> > > but they probably have existing users.
> >
> > While we can't simply remove it right away, instead of mixing our
> > implementation for both legacy and new spec in the same code we can
> > split the virtio-pci implementation into two:
> >
> > - virtio/virtio-pci-legacy.c
> > - virtio/virtio-pci.c
> >
> > At that point we can #ifdef the entire virtio-pci-legacy.c for now and
> > remove it at the same time legacy virtio-pci is removed from the kernel.
>
> Hmm, that might be neat, but we can't tell the driver core to try
> virtio-pci before virtio-pci-legacy, so we need detection code in both
> modules (and add a "force" flag to virtio-pci-legacy to tell it to
> accept the device even if it's not a legacy-only one).
I was thinking more in the direction of fallback code in virtio-pci.c to
virtio-pci-legacy.c.
Something like:
#ifdef VIRTIO_PCI_LEGACY
[Create BAR0 and map it to virtio-pci-legacy.c]
#endif
So BAR0 isn't defined as long as legacy code is there, which makes
falling back to legacy pretty simple.
--
Sasha.
next prev parent reply other threads:[~2011-11-30 13:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 18:36 [PATCHv3 RFC] virtio-pci: flexible configuration layout Michael S. Tsirkin
2011-11-23 2:32 ` Rusty Russell
2011-11-23 8:46 ` Michael S. Tsirkin
2011-11-23 15:34 ` Michael S. Tsirkin
2011-11-24 0:36 ` Rusty Russell
2011-11-24 6:24 ` Michael S. Tsirkin
2011-11-24 7:11 ` Michael S. Tsirkin
2011-11-28 0:55 ` Rusty Russell
2011-11-28 8:41 ` Michael S. Tsirkin
2011-11-29 23:28 ` Rusty Russell
2011-11-30 7:18 ` Michael S. Tsirkin
2011-11-28 9:15 ` Sasha Levin
2011-11-29 23:40 ` Rusty Russell
2011-11-30 8:14 ` Michael S. Tsirkin
2011-11-30 13:12 ` Sasha Levin [this message]
2011-12-01 2:42 ` Rusty Russell
2011-11-23 8:49 ` Michael S. Tsirkin
2011-11-23 9:38 ` Sasha Levin
2011-11-24 1:07 ` Rusty Russell
2011-11-23 9:44 ` Sasha Levin
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=1322658763.3985.4.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=aik@ozlabs.ru \
--cc=amit.shah@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=krkumar2@in.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pawel.moll@arm.com \
--cc=rusty@rustcorp.com.au \
--cc=shhuiw@gmail.com \
--cc=virtualization@lists.linux-foundation.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).