All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Krishna Kumar <krkumar2@in.ibm.com>,
	kvm@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
	Wang Sheng-Hui <shhuiw@gmail.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	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, 23 Nov 2011 11:38:40 +0200	[thread overview]
Message-ID: <1322041120.3581.6.camel@lappy> (raw)
In-Reply-To: <20111123084932.GF22734@redhat.com>

On Wed, 2011-11-23 at 10:49 +0200, Michael S. Tsirkin wrote:
> On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote:
> > +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */
> > +struct virtio_pci_common_cfg {
> > +	/* About the whole device. */
> > +	__u64 device_features;	/* read-only */
> > +	__u64 guest_features;	/* read-write */
> 
> We currently require atomic accesses to common fields.
> Some architectures might not have such for 64 bit,
> so these need to be split I think ...

We can consider stealing the feature implementation from virtio-mmio:
Use the first 32 bits as a selector and the last as the features
themselves.

It's more complex to work with, but it provides 2**32 32 feature bits
(which should be enough for a while) and it solves the atomic access
issue.

> > +	__u64 queue_address;	/* read-write */
> > +	__u16 msix_config;	/* read-write */
> > +	__u8 device_status;	/* read-write */
> > +	__u8 unused;
> > +
> > +	/* About a specific virtqueue. */
> > +	__u16 queue_select;	/* read-write */
> > +	__u16 queue_align;	/* read-write, power of 2. */
> > +	__u16 queue_size;	/* read-write, power of 2. */
> > +	__u16 queue_msix_vector;/* read-write */
> > +};
> >  #endif
> > 
> > 

-- 

Sasha.

WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <levinsasha928@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Amit Shah <amit.shah@redhat.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Krishna Kumar <krkumar2@in.ibm.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Wang Sheng-Hui <shhuiw@gmail.com>,
	virtualization@lists.linux-foundation.org, kvm@vger.kernel.org
Subject: Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout
Date: Wed, 23 Nov 2011 11:38:40 +0200	[thread overview]
Message-ID: <1322041120.3581.6.camel@lappy> (raw)
In-Reply-To: <20111123084932.GF22734@redhat.com>

On Wed, 2011-11-23 at 10:49 +0200, Michael S. Tsirkin wrote:
> On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote:
> > +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */
> > +struct virtio_pci_common_cfg {
> > +	/* About the whole device. */
> > +	__u64 device_features;	/* read-only */
> > +	__u64 guest_features;	/* read-write */
> 
> We currently require atomic accesses to common fields.
> Some architectures might not have such for 64 bit,
> so these need to be split I think ...

We can consider stealing the feature implementation from virtio-mmio:
Use the first 32 bits as a selector and the last as the features
themselves.

It's more complex to work with, but it provides 2**32 32 feature bits
(which should be enough for a while) and it solves the atomic access
issue.

> > +	__u64 queue_address;	/* read-write */
> > +	__u16 msix_config;	/* read-write */
> > +	__u8 device_status;	/* read-write */
> > +	__u8 unused;
> > +
> > +	/* About a specific virtqueue. */
> > +	__u16 queue_select;	/* read-write */
> > +	__u16 queue_align;	/* read-write, power of 2. */
> > +	__u16 queue_size;	/* read-write, power of 2. */
> > +	__u16 queue_msix_vector;/* read-write */
> > +};
> >  #endif
> > 
> > 

-- 

Sasha.


  reply	other threads:[~2011-11-23  9:38 UTC|newest]

Thread overview: 40+ 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-22 18:36 ` Michael S. Tsirkin
2011-11-23  2:32 ` Rusty Russell
2011-11-23  2:32   ` Rusty Russell
2011-11-23  8:46   ` Michael S. Tsirkin
2011-11-23  8:46     ` Michael S. Tsirkin
2011-11-23 15:34     ` Michael S. Tsirkin
2011-11-23 15:34       ` Michael S. Tsirkin
2011-11-24  0:36     ` Rusty Russell
2011-11-24  0:36       ` Rusty Russell
2011-11-24  6:24       ` Michael S. Tsirkin
2011-11-24  6:24         ` Michael S. Tsirkin
2011-11-24  7:11       ` Michael S. Tsirkin
2011-11-24  7:11         ` Michael S. Tsirkin
2011-11-28  0:55         ` Rusty Russell
2011-11-28  0:55           ` Rusty Russell
2011-11-28  8:41           ` Michael S. Tsirkin
2011-11-28  8:41             ` Michael S. Tsirkin
2011-11-29 23:28             ` Rusty Russell
2011-11-29 23:28               ` Rusty Russell
2011-11-30  7:18               ` Michael S. Tsirkin
2011-11-30  7:18                 ` Michael S. Tsirkin
2011-11-28  9:15           ` Sasha Levin
2011-11-28  9:15             ` Sasha Levin
2011-11-29 23:40             ` Rusty Russell
2011-11-29 23:40               ` Rusty Russell
2011-11-30  8:14               ` Michael S. Tsirkin
2011-11-30  8:14                 ` Michael S. Tsirkin
2011-11-30 13:12               ` Sasha Levin
2011-11-30 13:12                 ` Sasha Levin
2011-12-01  2:42                 ` Rusty Russell
2011-12-01  2:42                   ` Rusty Russell
2011-11-23  8:49   ` Michael S. Tsirkin
2011-11-23  8:49     ` Michael S. Tsirkin
2011-11-23  9:38     ` Sasha Levin [this message]
2011-11-23  9:38       ` Sasha Levin
2011-11-24  1:07       ` Rusty Russell
2011-11-24  1:07         ` Rusty Russell
2011-11-23  9:44   ` Sasha Levin
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=1322041120.3581.6.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=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 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.