From: Cornelia Huck <cornelia.huck@de.ibm.com> To: Rusty Russell <rusty@rustcorp.com.au> Cc: KVM <kvm@vger.kernel.org>, linux-s390 <linux-s390@vger.kernel.org>, qemu-devel <qemu-devel@nongnu.org>, Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Anthony Liguori <aliguori@us.ibm.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Carsten Otte <cotte@de.ibm.com>, Alexander Graf <agraf@suse.de>, Heiko Carstens <heiko.carstens@de.ibm.com>, Martin Schwidefsky <schwidefsky@de.ibm.com>, Sebastian Ott <sebott@linux.vnet.ibm.com> Subject: Re: [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver. Date: Mon, 13 Aug 2012 10:56:38 +0200 [thread overview] Message-ID: <20120813105638.66df14a4@BR9GNB5Z> (raw) In-Reply-To: <87pq72t3ku.fsf@rustcorp.com.au> On Wed, 08 Aug 2012 13:52:57 +0930 Rusty Russell <rusty@rustcorp.com.au> wrote: > On Tue, 7 Aug 2012 16:52:47 +0200, Cornelia Huck <cornelia.huck@de.ibm.com> wrote: > > Add a driver for kvm guests that matches virtual ccw devices provided > > by the host as virtio bridge devices. > > Hi Cornelia, > > OK, this is a good opportunity to fix some limitations, just as > we did for virtio_mmio (drivers/virtio/virtio_mmio.c). > > 1) Please don't limit yourself to 32 feature bits! If you look at how > virtio_mmio does it, they use a selector to index into a > theoretically-infinite array of feature bits: > > * 0x010 R HostFeatures Features supported by the host > * 0x014 W HostFeaturesSel Set of host features to access via HostFeatures > * > * 0x020 W GuestFeatures Features activated by the guest > * 0x024 W GuestFeaturesSel Set of activated features to set via GuestFeatures It should be easy to extend the data processed by the feature ccws to a feature/index combination. Would it be practical to limit the index to an 8 bit value? > > 2) Please also allow the guest to set the alignment for virtio ring > layout (it controls the spacing between the rings), eg: > > * 0x03c W QueueAlign Used Ring alignment for the current queue I think the set_vq ccw could be extended with that info. > > 3) Finally, make sure the guest can set the size of the queue, in case > it can't allocate the size the host suggests, eg: > > * 0x034 R QueueNumMax Maximum size of the currently selected queue > * 0x038 W QueueNum Queue size for the currently selected queue > > This means the host can suggest huge queues, knowing the guest won't > simply fail if it does so. Makes sense, I didn't like just failing to allocate either. The actual size could probably go into the set_vq ccw as well. > > Note that we're also speculating a move to a new vring format, which > will probably be little-endian. But you probably want a completely new > ccw code for that anyway. Do you have a pointer to that discussion handy? If the host may support different vring formats, I'll probably want to add some kind of discovery mechanism for that as well (what discovery mechanism depends on whether this would be per-device or per-machine).
WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cornelia.huck@de.ibm.com> To: Rusty Russell <rusty@rustcorp.com.au> Cc: linux-s390 <linux-s390@vger.kernel.org>, Anthony Liguori <aliguori@us.ibm.com>, KVM <kvm@vger.kernel.org>, Carsten Otte <cotte@de.ibm.com>, Sebastian Ott <sebott@linux.vnet.ibm.com>, Marcelo Tosatti <mtosatti@redhat.com>, Heiko Carstens <heiko.carstens@de.ibm.com>, qemu-devel <qemu-devel@nongnu.org>, Alexander Graf <agraf@suse.de>, Christian Borntraeger <borntraeger@de.ibm.com>, Avi Kivity <avi@redhat.com>, Martin Schwidefsky <schwidefsky@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver. Date: Mon, 13 Aug 2012 10:56:38 +0200 [thread overview] Message-ID: <20120813105638.66df14a4@BR9GNB5Z> (raw) In-Reply-To: <87pq72t3ku.fsf@rustcorp.com.au> On Wed, 08 Aug 2012 13:52:57 +0930 Rusty Russell <rusty@rustcorp.com.au> wrote: > On Tue, 7 Aug 2012 16:52:47 +0200, Cornelia Huck <cornelia.huck@de.ibm.com> wrote: > > Add a driver for kvm guests that matches virtual ccw devices provided > > by the host as virtio bridge devices. > > Hi Cornelia, > > OK, this is a good opportunity to fix some limitations, just as > we did for virtio_mmio (drivers/virtio/virtio_mmio.c). > > 1) Please don't limit yourself to 32 feature bits! If you look at how > virtio_mmio does it, they use a selector to index into a > theoretically-infinite array of feature bits: > > * 0x010 R HostFeatures Features supported by the host > * 0x014 W HostFeaturesSel Set of host features to access via HostFeatures > * > * 0x020 W GuestFeatures Features activated by the guest > * 0x024 W GuestFeaturesSel Set of activated features to set via GuestFeatures It should be easy to extend the data processed by the feature ccws to a feature/index combination. Would it be practical to limit the index to an 8 bit value? > > 2) Please also allow the guest to set the alignment for virtio ring > layout (it controls the spacing between the rings), eg: > > * 0x03c W QueueAlign Used Ring alignment for the current queue I think the set_vq ccw could be extended with that info. > > 3) Finally, make sure the guest can set the size of the queue, in case > it can't allocate the size the host suggests, eg: > > * 0x034 R QueueNumMax Maximum size of the currently selected queue > * 0x038 W QueueNum Queue size for the currently selected queue > > This means the host can suggest huge queues, knowing the guest won't > simply fail if it does so. Makes sense, I didn't like just failing to allocate either. The actual size could probably go into the set_vq ccw as well. > > Note that we're also speculating a move to a new vring format, which > will probably be little-endian. But you probably want a completely new > ccw code for that anyway. Do you have a pointer to that discussion handy? If the host may support different vring formats, I'll probably want to add some kind of discovery mechanism for that as well (what discovery mechanism depends on whether this would be per-device or per-machine).
next prev parent reply other threads:[~2012-08-13 8:56 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-07 14:52 [RFC PATCH 0/4] s390: virtio-ccw guest kernel support Cornelia Huck 2012-08-07 14:52 ` [Qemu-devel] " Cornelia Huck 2012-08-07 14:52 ` [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio Cornelia Huck 2012-08-07 14:52 ` [Qemu-devel] " Cornelia Huck 2012-08-09 10:03 ` Avi Kivity 2012-08-09 10:03 ` [Qemu-devel] " Avi Kivity 2012-08-09 10:41 ` Cornelia Huck 2012-08-09 10:41 ` [Qemu-devel] " Cornelia Huck 2012-08-10 8:42 ` Heiko Carstens 2012-08-10 8:42 ` [Qemu-devel] " Heiko Carstens 2012-08-10 11:03 ` Cornelia Huck 2012-08-10 11:03 ` [Qemu-devel] " Cornelia Huck 2012-08-09 23:09 ` Alexander Graf 2012-08-09 23:09 ` [Qemu-devel] " Alexander Graf 2012-08-10 7:45 ` Cornelia Huck 2012-08-10 7:45 ` [Qemu-devel] " Cornelia Huck 2012-08-07 14:52 ` [PATCH 2/4] s390: Add a mechanism to get the subchannel id Cornelia Huck 2012-08-07 14:52 ` [Qemu-devel] " Cornelia Huck 2012-08-13 17:16 ` Sebastian Ott 2012-08-13 17:16 ` [Qemu-devel] " Sebastian Ott 2012-08-14 8:52 ` Sebastian Ott 2012-08-14 8:52 ` [Qemu-devel] " Sebastian Ott 2012-08-14 10:38 ` Cornelia Huck 2012-08-14 10:38 ` [Qemu-devel] " Cornelia Huck 2012-08-14 10:53 ` Sebastian Ott 2012-08-14 10:53 ` [Qemu-devel] " Sebastian Ott 2012-08-07 14:52 ` [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver Cornelia Huck 2012-08-07 14:52 ` [Qemu-devel] " Cornelia Huck 2012-08-08 4:22 ` Rusty Russell 2012-08-08 4:22 ` [Qemu-devel] " Rusty Russell 2012-08-13 8:56 ` Cornelia Huck [this message] 2012-08-13 8:56 ` Cornelia Huck 2012-08-14 0:10 ` Rusty Russell 2012-08-14 0:10 ` [Qemu-devel] " Rusty Russell 2012-08-14 11:03 ` Cornelia Huck 2012-08-14 11:03 ` [Qemu-devel] " Cornelia Huck 2012-08-15 3:15 ` Rusty Russell 2012-08-15 3:15 ` [Qemu-devel] " Rusty Russell 2012-08-14 19:56 ` Anthony Liguori 2012-08-14 19:56 ` [Qemu-devel] " Anthony Liguori 2012-08-15 7:28 ` Rusty Russell 2012-08-15 7:28 ` [Qemu-devel] " Rusty Russell 2012-08-15 7:48 ` Christian Borntraeger 2012-08-15 7:48 ` [Qemu-devel] " Christian Borntraeger 2012-08-21 5:35 ` Rusty Russell 2012-08-21 5:35 ` [Qemu-devel] " Rusty Russell 2012-08-07 14:52 ` [PATCH 4/4] s390/kvm: Split out early console code Cornelia Huck 2012-08-07 14:52 ` [Qemu-devel] " Cornelia Huck
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=20120813105638.66df14a4@BR9GNB5Z \ --to=cornelia.huck@de.ibm.com \ --cc=agraf@suse.de \ --cc=aliguori@us.ibm.com \ --cc=avi@redhat.com \ --cc=borntraeger@de.ibm.com \ --cc=cotte@de.ibm.com \ --cc=heiko.carstens@de.ibm.com \ --cc=kvm@vger.kernel.org \ --cc=linux-s390@vger.kernel.org \ --cc=mtosatti@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=rusty@rustcorp.com.au \ --cc=schwidefsky@de.ibm.com \ --cc=sebott@linux.vnet.ibm.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: linkBe 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.