bootdevice.c | 148 +++++++++--- hw/block/virtio-blk.c | 6 + hw/ide/qdev.c | 7 +- hw/nvram/fw_cfg.c | 14 +- hw/scsi/scsi-bus.c | 15 ++ hw/scsi/scsi-disk.c | 14 ++ include/hw/block/block.h | 22 +- include/hw/scsi/scsi.h | 1 + include/sysemu/sysemu.h | 4 + tests/Makefile.include | 2 +- tests/hd-geo-test.c | 581 +++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 773 insertions(+), 41 deletions(-)
v1:
Non-standard logical geometries break under QEMU.
A virtual disk which contains an operating system which depends on
logical geometries (consistent values being reported from BIOS INT13
AH=08) will most likely break under QEMU/SeaBIOS if it has non-standard
logical geometries - for example 56 SPT (sectors per track).
No matter what QEMU will guess - SeaBIOS, for large enough disks - will
use LBA translation, which will report 63 SPT instead.
In addition we can not enforce SeaBIOS to rely on phyiscal geometries at
all. A virtio-blk-pci virtual disk with 255 phyiscal heads can not
report more than 16 physical heads when moved to an IDE controller, the
ATA spec allows a maximum of 16 heads - this is an artifact of
virtualization.
By supplying the logical geometies directly we are able to support such
"exotic" disks.
We will use fw_cfg to do just that.
v2:
Fix missing parenthesis check in
"hd-geo-test: Add tests for lchs override"
v3:
* Rename fw_cfg key to "bios-geometry".
* Remove "extendible" interface.
* Add cpu_to_le32 fix as Laszlo suggested or big endian hosts
* Fix last qtest commit - automatic docker tester for some reason does not have qemu-img set
v4:
* Change fw_cfg interface from mixed textual/binary to textual only
Sam Eiderman (8):
block: Refactor macros - fix tabbing
block: Support providing LCHS from user
bootdevice: Add interface to gather LCHS
scsi: Propagate unrealize() callback to scsi-hd
bootdevice: Gather LCHS from all relevant devices
bootdevice: Refactor get_boot_devices_list
bootdevice: FW_CFG interface for LCHS values
hd-geo-test: Add tests for lchs override
bootdevice.c | 148 +++++++++---
hw/block/virtio-blk.c | 6 +
hw/ide/qdev.c | 7 +-
hw/nvram/fw_cfg.c | 14 +-
hw/scsi/scsi-bus.c | 15 ++
hw/scsi/scsi-disk.c | 14 ++
include/hw/block/block.h | 22 +-
include/hw/scsi/scsi.h | 1 +
include/sysemu/sysemu.h | 4 +
tests/Makefile.include | 2 +-
tests/hd-geo-test.c | 581 +++++++++++++++++++++++++++++++++++++++++++++++
11 files changed, 773 insertions(+), 41 deletions(-)
--
2.13.3
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
Patchew URL: https://patchew.org/QEMU/20190619092905.24029-1-shmuel.eiderman@oracle.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [SeaBIOS] [QEMU] [PATCH v4 0/8] Add Qemu to SeaBIOS LCHS interface
Type: series
Message-id: 20190619092905.24029-1-shmuel.eiderman@oracle.com
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
From https://github.com/patchew-project/qemu
* [new tag] patchew/20190619092905.24029-1-shmuel.eiderman@oracle.com -> patchew/20190619092905.24029-1-shmuel.eiderman@oracle.com
Switched to a new branch 'test'
6664d7d898 hd-geo-test: Add tests for lchs override
29baed3dac bootdevice: FW_CFG interface for LCHS values
2ffcda53e3 bootdevice: Refactor get_boot_devices_list
4bb8461066 bootdevice: Gather LCHS from all relevant devices
a7ae6f4985 scsi: Propagate unrealize() callback to scsi-hd
1fc16041c0 bootdevice: Add interface to gather LCHS
d9ebbe8309 block: Support providing LCHS from user
cf2168a66d block: Refactor macros - fix tabbing
=== OUTPUT BEGIN ===
1/8 Checking commit cf2168a66dbd (block: Refactor macros - fix tabbing)
ERROR: Macros with complex values should be enclosed in parenthesis
#55: FILE: include/hw/block/block.h:65:
+#define DEFINE_BLOCK_CHS_PROPERTIES(_state, _conf) \
+ DEFINE_PROP_UINT32("cyls", _state, _conf.cyls, 0), \
+ DEFINE_PROP_UINT32("heads", _state, _conf.heads, 0), \
DEFINE_PROP_UINT32("secs", _state, _conf.secs, 0)
total: 1 errors, 0 warnings, 37 lines checked
Patch 1/8 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/8 Checking commit d9ebbe83096f (block: Support providing LCHS from user)
3/8 Checking commit 1fc16041c029 (bootdevice: Add interface to gather LCHS)
4/8 Checking commit a7ae6f4985e2 (scsi: Propagate unrealize() callback to scsi-hd)
5/8 Checking commit 4bb846106697 (bootdevice: Gather LCHS from all relevant devices)
6/8 Checking commit 2ffcda53e362 (bootdevice: Refactor get_boot_devices_list)
7/8 Checking commit 29baed3dac05 (bootdevice: FW_CFG interface for LCHS values)
8/8 Checking commit 6664d7d898d5 (hd-geo-test: Add tests for lchs override)
WARNING: line over 80 characters
#242: FILE: tests/hd-geo-test.c:579:
+ (char *)r->dev_path, &(r->chs.c), &(r->chs.h), &(r->chs.s));
WARNING: Block comments use a leading /* on a separate line
#640: FILE: tests/hd-geo-test.c:995:
+ "skipping hd-geo/override/* tests");
total: 0 errors, 2 warnings, 608 lines checked
Patch 8/8 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20190619092905.24029-1-shmuel.eiderman@oracle.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
> === OUTPUT BEGIN ===
> 1/8 Checking commit cf2168a66dbd (block: Refactor macros - fix tabbing)
> ERROR: Macros with complex values should be enclosed in parenthesis
> #55: FILE: include/hw/block/block.h:65:
> +#define DEFINE_BLOCK_CHS_PROPERTIES(_state, _conf) \
> + DEFINE_PROP_UINT32("cyls", _state, _conf.cyls, 0), \
> + DEFINE_PROP_UINT32("heads", _state, _conf.heads, 0), \
> DEFINE_PROP_UINT32("secs", _state, _conf.secs, 0)
False positive.
> 8/8 Checking commit 6664d7d898d5 (hd-geo-test: Add tests for lchs override)
> WARNING: line over 80 characters
> #242: FILE: tests/hd-geo-test.c:579:
> + (char *)r->dev_path, &(r->chs.c), &(r->chs.h), &(r->chs.s));
Should be fixed.
> WARNING: Block comments use a leading /* on a separate line
> #640: FILE: tests/hd-geo-test.c:995:
> + "skipping hd-geo/override/* tests");
False positive too.
cheers,
Gerd
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
> On 20 Jun 2019, at 8:50, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
>> === OUTPUT BEGIN ===
>> 1/8 Checking commit cf2168a66dbd (block: Refactor macros - fix tabbing)
>> ERROR: Macros with complex values should be enclosed in parenthesis
>> #55: FILE: include/hw/block/block.h:65:
>> +#define DEFINE_BLOCK_CHS_PROPERTIES(_state, _conf) \
>> + DEFINE_PROP_UINT32("cyls", _state, _conf.cyls, 0), \
>> + DEFINE_PROP_UINT32("heads", _state, _conf.heads, 0), \
>> DEFINE_PROP_UINT32("secs", _state, _conf.secs, 0)
>
> False positive.
>
>> 8/8 Checking commit 6664d7d898d5 (hd-geo-test: Add tests for lchs override)
>> WARNING: line over 80 characters
>> #242: FILE: tests/hd-geo-test.c:579:
>> + (char *)r->dev_path, &(r->chs.c), &(r->chs.h), &(r->chs.s));
>
> Should be fixed.
I’ll resubmit.
Sam
>
>> WARNING: Block comments use a leading /* on a separate line
>> #640: FILE: tests/hd-geo-test.c:995:
>> + "skipping hd-geo/override/* tests");
>
> False positive too.
>
> cheers,
> Gerd
>
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
Patchew URL: https://patchew.org/QEMU/20190619092905.24029-1-shmuel.eiderman@oracle.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [SeaBIOS] [QEMU] [PATCH v4 0/8] Add Qemu to SeaBIOS LCHS interface
Type: series
Message-id: 20190619092905.24029-1-shmuel.eiderman@oracle.com
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Switched to a new branch 'test'
4060750 hd-geo-test: Add tests for lchs override
ec0929e bootdevice: FW_CFG interface for LCHS values
9106987 bootdevice: Refactor get_boot_devices_list
fe6a0c0 bootdevice: Gather LCHS from all relevant devices
f68a15e scsi: Propagate unrealize() callback to scsi-hd
1347e7f bootdevice: Add interface to gather LCHS
2fcd94d block: Support providing LCHS from user
43c0cdf block: Refactor macros - fix tabbing
=== OUTPUT BEGIN ===
1/8 Checking commit 43c0cdf73c6a (block: Refactor macros - fix tabbing)
ERROR: Macros with complex values should be enclosed in parenthesis
#55: FILE: include/hw/block/block.h:65:
+#define DEFINE_BLOCK_CHS_PROPERTIES(_state, _conf) \
+ DEFINE_PROP_UINT32("cyls", _state, _conf.cyls, 0), \
+ DEFINE_PROP_UINT32("heads", _state, _conf.heads, 0), \
DEFINE_PROP_UINT32("secs", _state, _conf.secs, 0)
total: 1 errors, 0 warnings, 37 lines checked
Patch 1/8 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/8 Checking commit 2fcd94d78d62 (block: Support providing LCHS from user)
3/8 Checking commit 1347e7f38d62 (bootdevice: Add interface to gather LCHS)
4/8 Checking commit f68a15e41072 (scsi: Propagate unrealize() callback to scsi-hd)
5/8 Checking commit fe6a0c0ad0de (bootdevice: Gather LCHS from all relevant devices)
6/8 Checking commit 9106987ba4fa (bootdevice: Refactor get_boot_devices_list)
7/8 Checking commit ec0929e04764 (bootdevice: FW_CFG interface for LCHS values)
8/8 Checking commit 4060750b63c9 (hd-geo-test: Add tests for lchs override)
WARNING: line over 80 characters
#242: FILE: tests/hd-geo-test.c:579:
+ (char *)r->dev_path, &(r->chs.c), &(r->chs.h), &(r->chs.s));
WARNING: Block comments use a leading /* on a separate line
#640: FILE: tests/hd-geo-test.c:995:
+ "skipping hd-geo/override/* tests");
total: 0 errors, 2 warnings, 608 lines checked
Patch 8/8 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20190619092905.24029-1-shmuel.eiderman@oracle.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Patchew URL: https://patchew.org/QEMU/20190619092905.24029-1-shmuel.eiderman@oracle.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [SeaBIOS] [QEMU] [PATCH v4 0/8] Add Qemu to SeaBIOS LCHS interface
Type: series
Message-id: 20190619092905.24029-1-shmuel.eiderman@oracle.com
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
From https://github.com/patchew-project/qemu
- [tag update] patchew/20190619092905.24029-1-shmuel.eiderman@oracle.com -> patchew/20190619092905.24029-1-shmuel.eiderman@oracle.com
Switched to a new branch 'test'
f3f56eb hd-geo-test: Add tests for lchs override
4591e7f bootdevice: FW_CFG interface for LCHS values
ed2d76c bootdevice: Refactor get_boot_devices_list
a92514c bootdevice: Gather LCHS from all relevant devices
a6dba7c scsi: Propagate unrealize() callback to scsi-hd
22b09c2 bootdevice: Add interface to gather LCHS
c896dc9 block: Support providing LCHS from user
d8aaee5 block: Refactor macros - fix tabbing
=== OUTPUT BEGIN ===
1/8 Checking commit d8aaee50ba0b (block: Refactor macros - fix tabbing)
ERROR: Macros with complex values should be enclosed in parenthesis
#55: FILE: include/hw/block/block.h:65:
+#define DEFINE_BLOCK_CHS_PROPERTIES(_state, _conf) \
+ DEFINE_PROP_UINT32("cyls", _state, _conf.cyls, 0), \
+ DEFINE_PROP_UINT32("heads", _state, _conf.heads, 0), \
DEFINE_PROP_UINT32("secs", _state, _conf.secs, 0)
total: 1 errors, 0 warnings, 37 lines checked
Patch 1/8 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/8 Checking commit c896dc9812bc (block: Support providing LCHS from user)
3/8 Checking commit 22b09c20fef1 (bootdevice: Add interface to gather LCHS)
4/8 Checking commit a6dba7c32890 (scsi: Propagate unrealize() callback to scsi-hd)
5/8 Checking commit a92514c5d015 (bootdevice: Gather LCHS from all relevant devices)
6/8 Checking commit ed2d76c93845 (bootdevice: Refactor get_boot_devices_list)
7/8 Checking commit 4591e7fe95ed (bootdevice: FW_CFG interface for LCHS values)
8/8 Checking commit f3f56ebe6354 (hd-geo-test: Add tests for lchs override)
WARNING: line over 80 characters
#242: FILE: tests/hd-geo-test.c:579:
+ (char *)r->dev_path, &(r->chs.c), &(r->chs.h), &(r->chs.s));
WARNING: Block comments use a leading /* on a separate line
#640: FILE: tests/hd-geo-test.c:995:
+ "skipping hd-geo/override/* tests");
total: 0 errors, 2 warnings, 608 lines checked
Patch 8/8 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20190619092905.24029-1-shmuel.eiderman@oracle.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
© 2016 - 2025 Red Hat, Inc.