All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: Daniel Palmer <daniel@thingy.jp>
Cc: angelo@kernel-space.org, bmeng.cn@gmail.com, u-boot@lists.denx.de
Subject: Re: [PATCH v3 4/5] virtio: blk: Fix converting the vendor id to a string
Date: Mon, 13 Apr 2026 06:00:17 +0800	[thread overview]
Message-ID: <adwV8fQUTwBlo1sj@google.com> (raw)
In-Reply-To: <CAFr9PXmVeWjFNM8x0rKeLHjvZOFLyvbMyNngt8EpMqkBbugHGw@mail.gmail.com>

Hi Daniel,

On Mon, Apr 13, 2026 at 06:47:37AM +0900, Daniel Palmer wrote:
> Hi Kuan-Wei,
> 
> On Mon, 13 Apr 2026 at 06:34, Kuan-Wei Chiu <visitorckw@gmail.com> wrote:
> > Is there a chance that other non qemu virtio-mmio devices also use a
> > 4 character string for their vendor ID? If so, this patch will regress
> > their output from a human-readable string to a raw hex value.
> 
> There might be other implementations of virtio but probably not used
> together with u-boot.
> I think this goes the other way too, we are assuming the ids are
> printable ascii chars and it's possible to have an id that isn't.
> What is currently happening looks like luck and seems unsafe to me so
> I think regressing to printing hex is better.

I just took a quick look through the virtio spec, and indeed it never
mentions that the mmio vendor id should be a string.

Given this, should we even treat qemu as a special case here?
Perhaps the simplest and most spec-compliant approach is to never
assume it's a string, and just uniformly print the hex value for all
devices. What do you think?

Regards,
Kuan-Wei

  reply	other threads:[~2026-04-12 22:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 22:09 [PATCH v3 0/5] Add virtio-mmio support to m68k virt machine Daniel Palmer
2026-04-08 22:09 ` [PATCH v3 1/5] sysreset: qemu virt: Use __raw_writel() Daniel Palmer
2026-04-11 16:28   ` Simon Glass
2026-04-11 19:40   ` Angelo Dureghello
2026-04-08 22:09 ` [PATCH v3 2/5] m68k: Fix writew(), writel(), readw(), readl() endianness for classic m68k Daniel Palmer
2026-04-11 16:28   ` Simon Glass
2026-04-11 21:07   ` Angelo Dureghello
2026-04-12  0:59     ` Daniel Palmer
2026-04-08 22:09 ` [PATCH v3 3/5] virtio: mmio: Allow instantiation via platform data Daniel Palmer
2026-04-11 16:28   ` Simon Glass
2026-04-11 21:15   ` Angelo Dureghello
2026-04-12  5:12     ` Daniel Palmer
2026-04-08 22:09 ` [PATCH v3 4/5] virtio: blk: Fix converting the vendor id to a string Daniel Palmer
2026-04-11 20:30   ` Simon Glass
2026-04-12 21:34   ` Kuan-Wei Chiu
2026-04-12 21:47     ` Daniel Palmer
2026-04-12 22:00       ` Kuan-Wei Chiu [this message]
2026-04-12 22:05         ` Daniel Palmer
2026-04-08 22:09 ` [PATCH v3 5/5] board: qemu: m68k: Create virtio mmio instances Daniel Palmer
2026-04-11 20:28   ` Angelo Dureghello
2026-04-12  6:42     ` Daniel Palmer
2026-04-11 20:31   ` Simon Glass

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=adwV8fQUTwBlo1sj@google.com \
    --to=visitorckw@gmail.com \
    --cc=angelo@kernel-space.org \
    --cc=bmeng.cn@gmail.com \
    --cc=daniel@thingy.jp \
    --cc=u-boot@lists.denx.de \
    /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.