From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [RFC 7/11] virtio_pci: new, capability-aware driver. Date: Thu, 12 Jan 2012 12:05:06 +1030 Message-ID: <87zkdt4sad.fsf@rustcorp.com.au> References: <20111212182533.GB25916@redhat.com> <87liqhtdnj.fsf@rustcorp.com.au> <20111215063004.GA3630@redhat.com> <87zketp9nz.fsf@rustcorp.com.au> <20111218101831.GB30374@redhat.com> <87bor5nlht.fsf@rustcorp.com.au> <20111219091324.GA19535@redhat.com> <871us0om2t.fsf@rustcorp.com.au> <20111220113718.GF3913@redhat.com> <878vm6daqy.fsf@rustcorp.com.au> <20120110170334.GA18404@redhat.com> <8762gj6q5r.fsf@rustcorp.com.au> <4F0D8EFA.3010503@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F0D8EFA.3010503@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Anthony Liguori Cc: Pawel Moll , "Michael S. Tsirkin" , Benjamin Herrenschmidt , virtualization , Christian Borntraeger , Sasha Levin List-Id: virtualization@lists.linuxfoundation.org On Wed, 11 Jan 2012 07:30:34 -0600, Anthony Liguori wrote: > I think the more important thing to do is require accesses to integers in the > config space to always be aligned and to use the appropriate accessor. > Non-integer fields should be restricted to byte access. > > That limits config space entries to 32-bit but also means that there is no need > for a generation counter. Unfortunately not, see virtio_blk. capacity is 64 bits, and geometry is multiple fields. > If we're already making the change, the endianness ought to be a feature bit. I'd rather tie it to the new PCI config layout (and ring format). Then we can simply have two backends, legacy and modern. For non-PCI, we would need a feature bit. Cheers, Rusty.