All of lore.kernel.org
 help / color / mirror / Atom feed
From: Warner Losh <wlosh@bsdimp.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Michal Suchánek" <msuchanek@suse.de>,
	"\"Daniel P . Berrangé\"" <berrange@redhat.com>,
	Qemu-block <qemu-block@nongnu.org>,
	"Bin Meng" <bin.meng@windriver.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Alexander Bulekov" <alxndr@bu.edu>,
	"Niek Linnenbank" <nieklinnenbank@gmail.com>,
	"Tom Yan" <tom.ty89@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Warner Losh" <imp@bsdimp.com>
Subject: Re: [RFC PATCH 9/9] hw/sd: Allow card size not power of 2 again
Date: Thu, 24 Jun 2021 10:08:42 -0600	[thread overview]
Message-ID: <F7D2C240-184F-4FAA-B4AD-13B492F6CAA0@bsdimp.com> (raw)
In-Reply-To: <CAFEAcA-x-ZWKM0wEHm0-iqLydtyuFCm2ba+j6RGNwLyB0UEtTw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]



> On Jun 24, 2021, at 4:56 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On Thu, 24 Jun 2021 at 11:27, Tom Yan <tom.ty89@gmail.com> wrote:
>> I really think we should get (/ have gotten) things clear first. What
>> exactly is the bug we have been talking about here? I mean like, where
>> does it occur and what's the nature of it.
>> 
>> 1. Is it specific to a certain type / model of backend / physical
>> storage device that will be made use of by qemu for the emulated
>> storage? (I presume not since you mention about image, unless you
>> irrationally related/bound the emulated storage type and the physical
>> storage type together.)
>> 
>> 2. Does it have anything to do with a certain flaw in qemu itself?
>> Like the code that does read/write operation is flawed that it cannot
>> be handled by a certain *proper* backend device?
>> 
>> 3. Or is it actually a bug in a certain driver / firmware blob that
>> will be used by an *emulated* device in the guest? In that case, can
>> we emulate another model so that it won't be using the problematic
>> driver / firmware?
> 
> Definitely agreed -- before we start changing QEMU code we need
> to identify clearly (a) what the real hardware does and (b) what
> the situation was we were originally trying to fix.

Real SD and MMC cards do not have power-of-two constraints in the
number of blocks. None of the SD/MMC bridges I’ve ever dealt with
have a power-of-two constraint on the size of the card. The only
constraint on the size related to the card is the block size.

If non-power-of-2 sized cards fail, that’s a cat-1 sev-1 bug that needs
to be fixed, rather than a warning be generated.

Warner

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 874 bytes --]

  reply	other threads:[~2021-06-24 16:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 18:00 [RFC PATCH 0/9] hw/sd: Allow card size not power of 2 again Philippe Mathieu-Daudé
2021-06-23 18:00 ` [PATCH 1/9] hw/sd: When card is in wrong state, log which state it is Philippe Mathieu-Daudé
2021-08-05 19:37   ` Eric Blake
2021-06-23 18:00 ` [PATCH 2/9] hw/sd: Extract address_in_range() helper, log invalid accesses Philippe Mathieu-Daudé
2021-08-05 19:46   ` Eric Blake
2021-06-23 18:00 ` [PATCH 3/9] tests/acceptance: Tag NetBSD tests as 'os:netbsd' Philippe Mathieu-Daudé
2021-07-03  8:41   ` Philippe Mathieu-Daudé
2021-07-03  8:43     ` Philippe Mathieu-Daudé
2021-07-04 12:35       ` Niek Linnenbank
2021-07-05  8:55         ` Philippe Mathieu-Daudé
2021-07-11 21:05           ` Philippe Mathieu-Daudé
2021-07-05 15:25   ` Willian Rampazzo
2021-07-13 16:57   ` Cleber Rosa
2021-06-23 18:00 ` [PATCH 4/9] tests/acceptance: Extract image_expand() helper Philippe Mathieu-Daudé
2021-07-05 15:27   ` Willian Rampazzo
2021-07-13 17:02   ` Cleber Rosa
2021-06-23 18:00 ` [PATCH 5/9] tests/acceptance: Use image_expand() in test_arm_orangepi_uboot_netbsd9 Philippe Mathieu-Daudé
2021-07-05 15:28   ` Willian Rampazzo
2021-08-04 20:54   ` Philippe Mathieu-Daudé
2021-08-05 17:06     ` Niek Linnenbank
2021-06-23 18:00 ` [RFC PATCH 6/9] tests/acceptance: Use image_expand() in test_arm_orangepi_bionic_20_08 Philippe Mathieu-Daudé
2021-07-05 15:30   ` Willian Rampazzo
2021-08-05 17:11   ` Niek Linnenbank
2021-06-23 18:00 ` [RFC PATCH 7/9] tests/acceptance: Do not expand SD card image in test_arm_orangepi_sd Philippe Mathieu-Daudé
2021-06-23 18:00 ` [PATCH 8/9] tests/acceptance: Remove now unused pow2ceil() Philippe Mathieu-Daudé
2021-07-05 15:32   ` Willian Rampazzo
2021-06-23 18:00 ` [RFC PATCH 9/9] hw/sd: Allow card size not power of 2 again Philippe Mathieu-Daudé
2021-06-24 10:17   ` Daniel P. Berrangé
2021-06-24 10:24   ` Tom Yan
2021-06-24 10:56     ` Peter Maydell
2021-06-24 16:08       ` Warner Losh [this message]
2021-06-24  2:50 ` [RFC PATCH 0/9] " Alexander Bulekov
2021-06-24  8:12   ` Philippe Mathieu-Daudé
2021-06-26  4:04     ` Alexander Bulekov

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=F7D2C240-184F-4FAA-B4AD-13B492F6CAA0@bsdimp.com \
    --to=wlosh@bsdimp.com \
    --cc=alxndr@bu.edu \
    --cc=berrange@redhat.com \
    --cc=bin.meng@windriver.com \
    --cc=f4bug@amsat.org \
    --cc=imp@bsdimp.com \
    --cc=msuchanek@suse.de \
    --cc=nieklinnenbank@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tom.ty89@gmail.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: 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.