From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: virtio-pci new configuration proposal Date: Wed, 02 Nov 2011 21:07:12 +0200 Message-ID: <1320260832.22582.3.camel@lappy> References: <1320259767.22582.2.camel@lappy> <20111102190804.GA13914@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111102190804.GA13914@redhat.com> 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: "Michael S. Tsirkin" Cc: linux-kernel , kvm , virtualization List-Id: virtualization@lists.linuxfoundation.org On Wed, 2011-11-02 at 21:08 +0200, Michael S. Tsirkin wrote: > On Wed, Nov 02, 2011 at 08:49:27PM +0200, Sasha Levin wrote: > > This is a proposal for a new layout of the virtio-pci config space. > > > > We will separate the current configuration into two: A virtio-pci common > > configuration and a device specific configuration. This allows more flexibility > > with adding features and makes usage easier, specifically in cases like the > > ones in virtio-net where device specific configurations depend on device > > specific features. > > > > The preferred location of the configuration will be a MMIO BAR, therefore > > several size optimizations such as the queue selector which were useful > > on a PIO BAR were removed and linked lists were introduced to add > > flexibility to existing structures in attempt to keep their size and > > offsets constant and not dependent on features. > > > > While this is not a complete specification, it describes all the main > > structures and should be enough to make sure the idea is solid before > > going into implementation specifics. > > > > A new virtio-pci capability structure will be introduced. This structure > > will be used to describe the basics of a virtio-pci device. The > > structure is actually a PCI capability structure which wraps the new virtio-pci > > capability structure: > > > > +------------++------------+------------+------------+--------------+----------------- > > | Bits || 8 | 8 | 8 | 8 | Cap specific > > +------------++------------+------------+------------+--------------+----------------- > > | Read/Write || R | R | R | R | Cap specific > > +------------++------------+------------+------------+--------------+----------------- > > | Purpose || Capability | Capability | virtio-pci | virtio-pci | Cap specific > > | || ID | Next PTR | Cap ID | Next Cap PTR | > > +------------++------------+------------+------------+--------------+----------------- > > > > Currently, only one virtio-pci capability is defined, and is the one that defines > > the layout of the virtio-pci config space. > > > > VIRTIO_PCI_C_LAYOUT: > > > > +------------++---------------+---------------+-----------------+-----------------+ > > | Bits || 29 | 3 | 29 | 3 | > > +------------++---------------+---------------+-----------------+-----------------+ > > | Read/Write || R | R | R | R | > > +------------++---------------+---------------+-----------------+-----------------+ > > | Purpose || Common config | Common config | Device specific | Device specific | > > | || Offset | BIR | Offset | BIR | > > +------------++---------------+---------------+-----------------+-----------------+ > > I'm implementing a different layout, with > separate capabilities for common and device specific > fields. Which is what I have here, no? -- Sasha.