qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	qemu-stable@nongnu.org
Subject: Re: [PATCH v3] hw/audio/virtio-snd: Use device endianness instead of target one
Date: Tue, 23 Apr 2024 12:18:50 +0300	[thread overview]
Message-ID: <CAAjaMXaoPeCVpd=q-d2GH25SfrNPVqh6hCerMOrQ6payXVMmyA@mail.gmail.com> (raw)
In-Reply-To: <CAAjaMXZxFJtEdJh38_76ZdL82JBM52Ke0+p1K07miiFeQSJtcw@mail.gmail.com>

On Tue, 23 Apr 2024 at 11:47, Manos Pitsidianakis
<manos.pitsidianakis@linaro.org> wrote:
>
> On Tue, 23 Apr 2024 at 00:11, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Mon, Apr 22, 2024 at 11:07:21PM +0200, Philippe Mathieu-Daudé wrote:
> > > On 22/4/24 23:02, Michael S. Tsirkin wrote:
> > > > On Mon, Apr 22, 2024 at 04:20:56PM +0200, Philippe Mathieu-Daudé wrote:
> > > > > Since VirtIO devices can change endianness at runtime,
> > > > > we need to use the device endianness, not the target
> > > > > one.
> > > > >
> > > > > Cc: qemu-stable@nongnu.org
> > > > > Fixes: eb9ad377bb ("virtio-sound: handle control messages and streams")
> > > > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > >
> > > >
> > > >
> > > > This is all completely bogus. Virtio SND is from Virtio 1.0 only.
> > > > It is unconditionally little endian.
>
>
> This part of the code is for PCM frames (raw bytes), not virtio spec
> fields (which indeed must be LE in modern VIRTIO).

Thought a little more about it. We should keep the target's endianness
here, if it's mutable then we should query the machine the device is
attached to somehow. the virtio device should never change endianness
like Michael says since it's not legacy.


  reply	other threads:[~2024-04-23  9:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 14:20 [PATCH v3] hw/audio/virtio-snd: Use device endianness instead of target one Philippe Mathieu-Daudé
2024-04-22 20:10 ` Manos Pitsidianakis
2024-04-22 21:02 ` Michael S. Tsirkin
2024-04-22 21:07   ` Philippe Mathieu-Daudé
2024-04-22 21:11     ` Michael S. Tsirkin
2024-04-23  8:47       ` Manos Pitsidianakis
2024-04-23  9:18         ` Manos Pitsidianakis [this message]
2024-04-23 11:05           ` Philippe Mathieu-Daudé
2024-04-24 10:31             ` Mark Cave-Ayland
2024-04-25  6:30               ` Manos Pitsidianakis
2024-04-25  7:49                 ` Mark Cave-Ayland
2024-04-25 10:04                   ` Manos Pitsidianakis
2024-04-25 10:24                     ` Michael S. Tsirkin
2024-04-25 10:26                       ` Manos Pitsidianakis
2024-04-25 10:31                         ` Michael S. Tsirkin
2024-04-25 10:40                         ` Mark Cave-Ayland
2024-04-25 11:15                           ` Philippe Mathieu-Daudé
2024-04-25 11:46                             ` Michael S. Tsirkin
2024-04-25 10:35                     ` Mark Cave-Ayland

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='CAAjaMXaoPeCVpd=q-d2GH25SfrNPVqh6hCerMOrQ6payXVMmyA@mail.gmail.com' \
    --to=manos.pitsidianakis@linaro.org \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).