From: Gerd Hoffmann <kraxel@redhat.com>
To: Sam Eiderman <shmuel.eiderman@oracle.com>
Cc: kwolf@redhat.com, qemu-block@nongnu.org, arbel.moshe@oracle.com,
seabios@seabios.org, qemu-devel@nongnu.org, mreitz@redhat.com,
kevin@koconnor.net, liran.alon@oracle.com,
karl.heubaum@oracle.com
Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices
Date: Thu, 20 Jun 2019 07:42:24 +0200 [thread overview]
Message-ID: <20190620054224.hfspxgorpd6mjxca@sirius.home.kraxel.org> (raw)
In-Reply-To: <20190619092352.23583-5-shmuel.eiderman@oracle.com>
> +static int
> +overriden_lchs_supplied(struct drive_s *drive)
> +{
> + return drive->lchs.cylinder || drive->lchs.head || drive->lchs.sector;
> +}
> + case TRANSLATION_MACHINE:
Hmm, why this name? Doesn't look intuitive to me.
> + desc = "overriden";
I'd name that "host-supplied" or "fw-cfg".
> + cylinders = drive->lchs.cylinder;
> + heads = drive->lchs.head;
> + if (heads > 255)
> + heads = 255;
I suggest to move these sanity checks to overriden_lchs_supplied(), then
ignore the override altogether when heads or sectors is out of range
instead of trying to fixup things.
The other patches look all sane to me.
cheers,
Gerd
next prev parent reply other threads:[~2019-06-20 5:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 9:23 [Qemu-devel] [SeaBIOS] [PATCH v3 0/4] Add Qemu to SeaBIOS LCHS interface Sam Eiderman
2019-06-19 9:23 ` [Qemu-devel] [SeaBIOS] [PATCH v3 1/4] geometry: Read LCHS from fw_cfg Sam Eiderman
2019-06-19 9:23 ` [Qemu-devel] [SeaBIOS] [PATCH v3 2/4] boot: Reorder functions in boot.c Sam Eiderman
2019-06-19 9:23 ` [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions Sam Eiderman
2019-06-20 14:37 ` Kevin O'Connor
2019-06-21 17:42 ` Sam Eiderman
2019-06-21 18:59 ` Kevin O'Connor
2019-06-22 8:51 ` Sam Eiderman
2019-06-22 15:27 ` Kevin O'Connor
2019-06-22 17:33 ` Sam Eiderman
2019-06-26 11:34 ` Sam Eiderman
2019-06-19 9:23 ` [Qemu-devel] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices Sam Eiderman
2019-06-20 5:42 ` Gerd Hoffmann [this message]
2019-06-20 8:52 ` Sam Eiderman
2019-06-20 11:47 ` Gerd Hoffmann
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=20190620054224.hfspxgorpd6mjxca@sirius.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=arbel.moshe@oracle.com \
--cc=karl.heubaum@oracle.com \
--cc=kevin@koconnor.net \
--cc=kwolf@redhat.com \
--cc=liran.alon@oracle.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
--cc=shmuel.eiderman@oracle.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 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).