From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtio-dev@lists.oasis-open.org,
open list <linux-kernel@vger.kernel.org>,
"open list:ABI/API" <linux-api@vger.kernel.org>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/1] Add virtio-input driver.
Date: Mon, 23 Mar 2015 19:20:51 +0100 [thread overview]
Message-ID: <20150323191949-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1427123129.27137.62.camel@nilsson.home.kraxel.org>
On Mon, Mar 23, 2015 at 04:05:29PM +0100, Gerd Hoffmann wrote:
> On Mo, 2015-03-23 at 15:54 +0100, Michael S. Tsirkin wrote:
> > On Mon, Mar 23, 2015 at 03:27:35PM +0100, Gerd Hoffmann wrote:
> > > Hi,
> > >
> > > > > > > You are doing leXXX everywhere, that's VERSION_1 dependency.
> > > > > > > virtio_cread will do byteswaps differently without VERSION_1.
> > > > > > > Just don't go there.
> > >
> > > > So to clarify, you dislike using __virtio32 in virtio input header?
> > >
> > > Well, as I understand things __virtio32 implies byteorder depends on
> > > whenever we are using VERSION_1 or not. And non-transitional drivers
> > > should not need it as everything is by definition little endian.
> > >
> > > So, yes, your suggestion to just require VERSION_1 in the driver implies
> > > in my eyes that there should be no reason to use __virtio32 instead of
> > > __le32.
> > >
> > > Or do I miss something here?
> > >
> > > cheers,
> > > Gerd
> > >
> >
> > You are right but then if you do require VERSION_1 then
> > __virtio32 becomes identical to __le32.
>
> Except that sparse doesn't know that and throws errors when I mix the
> two.
>
> > There's some runtime overhead as we check on each access,
> > but it shouldn't matter here, right?
>
> Correct, config space is used at initialization time only.
>
> > I guess we could add virtio_cread_le - is this what
> > you'd like?
>
> I just want something that makes both you and sparse happy. I don't
> care much whenever that is adding virtio_cread_le() or using __virtio32
> even though it'll effectively is __le32 due to VERSION_1 being required.
>
> cheers,
> Gerd
>
OK so how about we just use __virtio32 everywhere for now?
--
MST
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtio-dev@lists.oasis-open.org,
virtualization@lists.linux-foundation.org,
Rusty Russell <rusty@rustcorp.com.au>,
open list <linux-kernel@vger.kernel.org>,
"open list:ABI/API" <linux-api@vger.kernel.org>
Subject: Re: [PATCH 1/1] Add virtio-input driver.
Date: Mon, 23 Mar 2015 19:20:51 +0100 [thread overview]
Message-ID: <20150323191949-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1427123129.27137.62.camel@nilsson.home.kraxel.org>
On Mon, Mar 23, 2015 at 04:05:29PM +0100, Gerd Hoffmann wrote:
> On Mo, 2015-03-23 at 15:54 +0100, Michael S. Tsirkin wrote:
> > On Mon, Mar 23, 2015 at 03:27:35PM +0100, Gerd Hoffmann wrote:
> > > Hi,
> > >
> > > > > > > You are doing leXXX everywhere, that's VERSION_1 dependency.
> > > > > > > virtio_cread will do byteswaps differently without VERSION_1.
> > > > > > > Just don't go there.
> > >
> > > > So to clarify, you dislike using __virtio32 in virtio input header?
> > >
> > > Well, as I understand things __virtio32 implies byteorder depends on
> > > whenever we are using VERSION_1 or not. And non-transitional drivers
> > > should not need it as everything is by definition little endian.
> > >
> > > So, yes, your suggestion to just require VERSION_1 in the driver implies
> > > in my eyes that there should be no reason to use __virtio32 instead of
> > > __le32.
> > >
> > > Or do I miss something here?
> > >
> > > cheers,
> > > Gerd
> > >
> >
> > You are right but then if you do require VERSION_1 then
> > __virtio32 becomes identical to __le32.
>
> Except that sparse doesn't know that and throws errors when I mix the
> two.
>
> > There's some runtime overhead as we check on each access,
> > but it shouldn't matter here, right?
>
> Correct, config space is used at initialization time only.
>
> > I guess we could add virtio_cread_le - is this what
> > you'd like?
>
> I just want something that makes both you and sparse happy. I don't
> care much whenever that is adding virtio_cread_le() or using __virtio32
> even though it'll effectively is __le32 due to VERSION_1 being required.
>
> cheers,
> Gerd
>
OK so how about we just use __virtio32 everywhere for now?
--
MST
next prev parent reply other threads:[~2015-03-23 18:20 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1426756391-26585-1-git-send-email-kraxel@redhat.com>
2015-03-19 9:13 ` [PATCH 1/1] Add virtio-input driver Gerd Hoffmann
[not found] ` <1426756391-26585-1-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-03-19 9:13 ` Gerd Hoffmann
2015-03-19 9:13 ` Gerd Hoffmann
[not found] ` <1426756391-26585-2-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-03-19 12:27 ` Michael S. Tsirkin
2015-03-19 12:27 ` Michael S. Tsirkin
2015-03-20 10:28 ` Gerd Hoffmann
2015-03-20 10:28 ` Gerd Hoffmann
2015-03-21 22:22 ` Michael S. Tsirkin
2015-03-21 22:22 ` Michael S. Tsirkin
2015-03-23 7:53 ` Gerd Hoffmann
2015-03-23 7:53 ` Gerd Hoffmann
2015-03-23 11:52 ` [virtio-dev] " Paolo Bonzini
2015-03-23 13:44 ` Gerd Hoffmann
2015-03-23 13:51 ` Michael S. Tsirkin
2015-03-23 14:27 ` Gerd Hoffmann
2015-03-23 14:27 ` Gerd Hoffmann
2015-03-23 14:54 ` Michael S. Tsirkin
[not found] ` <1427120855.27137.55.camel-3OfP5uLMi4C46o+2HkPkLj4oCIwMql/M@public.gmane.org>
2015-03-23 14:54 ` Michael S. Tsirkin
2015-03-23 14:54 ` Michael S. Tsirkin
2015-03-23 15:05 ` Gerd Hoffmann
2015-03-23 15:05 ` Gerd Hoffmann
[not found] ` <1427123129.27137.62.camel-3OfP5uLMi4C46o+2HkPkLj4oCIwMql/M@public.gmane.org>
2015-03-23 16:17 ` Cornelia Huck
2015-03-23 16:17 ` Cornelia Huck
2015-03-23 16:17 ` Cornelia Huck
2015-03-23 18:20 ` Michael S. Tsirkin [this message]
2015-03-23 18:20 ` Michael S. Tsirkin
2015-03-23 13:51 ` Michael S. Tsirkin
2015-03-23 13:44 ` Gerd Hoffmann
2015-03-19 12:27 ` Michael S. Tsirkin
2015-03-19 12:29 ` David Herrmann
2015-03-19 16:27 ` Dmitry Torokhov
[not found] ` <CANq1E4TDj4pq3J_BVc=Yuzo5dVR=QcNexVUqaqwjg7Qi5_xX4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-19 16:27 ` Dmitry Torokhov
2015-03-19 16:27 ` Dmitry Torokhov
2015-03-19 17:16 ` David Herrmann
2015-03-19 17:16 ` David Herrmann
2015-03-20 9:54 ` Gerd Hoffmann
2015-03-20 9:54 ` Gerd Hoffmann
2015-03-20 9:48 ` Gerd Hoffmann
2015-03-20 9:48 ` Gerd Hoffmann
[not found] ` <1426844885.32097.36.camel-3OfP5uLMi4C46o+2HkPkLj4oCIwMql/M@public.gmane.org>
2015-03-20 9:55 ` David Herrmann
2015-03-20 9:55 ` David Herrmann
2015-03-20 10:36 ` Gerd Hoffmann
[not found] ` <CANq1E4QLPSK6NVeEx6yihYPdF-XPpXx4rKv0deHwX+s2RzFHCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-20 10:36 ` Gerd Hoffmann
2015-03-20 10:36 ` Gerd Hoffmann
2015-03-20 10:43 ` David Herrmann
[not found] ` <1426847799.32097.66.camel-3OfP5uLMi4C46o+2HkPkLj4oCIwMql/M@public.gmane.org>
2015-03-20 10:43 ` David Herrmann
2015-03-20 10:43 ` David Herrmann
2015-03-20 9:55 ` David Herrmann
2015-03-20 9:48 ` Gerd Hoffmann
2015-03-19 12:29 ` David Herrmann
2015-03-19 13:35 ` [PATCH 0/1] " Michael S. Tsirkin
2015-03-19 13:35 ` [Qemu-devel] " Michael S. Tsirkin
2015-03-19 14:46 ` Gerd Hoffmann
2015-03-19 14:46 ` [Qemu-devel] " Gerd Hoffmann
2015-03-19 16:33 ` Michael S. Tsirkin
2015-03-19 16:33 ` [Qemu-devel] " Michael S. Tsirkin
2015-03-19 17:05 ` Paolo Bonzini
2015-03-19 17:05 ` [Qemu-devel] " Paolo Bonzini
2015-03-19 16:46 ` Michael S. Tsirkin
2015-03-19 16:46 ` [Qemu-devel] " Michael S. Tsirkin
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=20150323191949-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=kraxel@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtio-dev@lists.oasis-open.org \
--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.