bootdevice.c | 158 ++++++++++--- 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 | 565 +++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 767 insertions(+), 41 deletions(-)
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. 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 | 158 ++++++++++--- 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 | 565 +++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 767 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/20190612094237.47462-1-shmuel.eiderman@oracle.com/
Hi,
This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===
clang -iquote /tmp/qemu-test/build/tests -iquote tests -iquote /tmp/qemu-test/src/tcg -iquote /tmp/qemu-test/src/tcg/i386 -I/tmp/qemu-test/src/linux-headers -I/tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -I/tmp/qemu-test/src/tests -MMD -MP -MT tests/tpm-tis-swtpm-test.o -MF tests/tpm-tis-swtpm-test.d -fsanitize=undefined -fsanitize=address -g -c -o tests/tpm-tis-swtpm-test.o /tmp/qemu-test/src/tests/tpm-tis-swtpm-test.c
clang -iquote /tmp/qemu-test/build/tests -iquote tests -iquote /tmp/qemu-test/src/tcg -iquote /tmp/qemu-test/src/tcg/i386 -I/tmp/qemu-test/src/linux-headers -I/tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -I/tmp/qemu-test/src/tests -MMD -MP -MT tests/tpm-tis-test.o -MF tests/tpm-tis-test.d -fsanitize=undefined -fsanitize=address -g -c -o tests/tpm-tis-test.o /tmp/qemu-test/src/tests/tpm-tis-test.c
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg -iquote /tmp/qemu-test/src/tcg/i386 -I/tmp/qemu-test/src/linux-headers -I/tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64 -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80 -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT test_a_i64_z_f16.o -MF ./test_a_i64_z_f16.d -fsanitize=undefined -fsanitize=address -g -c -o test_a_i64_z_f16.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/test_a_i64_z_f16.c
/tmp/qemu-test/src/tests/hd-geo-test.c:743:47: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/ide@1,1/drive@0/disk@0", 10000, 120, 30},
^~~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:744:47: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/ide@1,1/drive@0/disk@1", 9000, 120, 30},
^~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:745:47: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/ide@1,1/drive@1/disk@0", 0, 1, 1},
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:746:47: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/ide@1,1/drive@1/disk@1", 1, 0, 0},
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:747:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{NULL, 0, 0, 0}
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:764:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/channel@0/disk@0,0", 10000, 120, 30},
^~~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:765:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/channel@0/disk@1,0", 9000, 120, 30},
^~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:766:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/channel@0/disk@2,0", 1, 0, 0},
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:767:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/channel@0/disk@3,0", 0, 1, 0},
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:768:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{NULL, 0, 0, 0}
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:786:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/channel@0/disk@0,0", 10000, 120, 30},
^~~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:787:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/channel@0/disk@1,0", 9000, 120, 30},
^~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:788:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@4/channel@0/disk@0,1", 1, 0, 0},
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:789:50: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@4/channel@0/disk@1,2", 0, 1, 0},
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:790:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{NULL, 0, 0, 0}
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:809:40: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@3/disk@0,0", 10000, 120, 30},
^~~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:810:40: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{"/pci@i0cf8/scsi@4/disk@0,0", 9000, 120, 30},
^~~~~~~~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:811:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{NULL, 0, 0, 0}
^~~~~~~
{ }
/tmp/qemu-test/src/tests/hd-geo-test.c:824:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{NULL, 0, 0, 0}
^~~~~~~
{ }
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
clang -iquote /tmp/qemu-test/build/tests -iquote tests -iquote /tmp/qemu-test/src/tcg -iquote /tmp/qemu-test/src/tcg/i386 -I/tmp/qemu-test/src/linux-headers -I/tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -I/tmp/qemu-test/src/tests -MMD -MP -MT tests/test-netfilter.o -MF tests/test-netfilter.d -fsanitize=undefined -fsanitize=address -g -c -o tests/test-netfilter.o /tmp/qemu-test/src/tests/test-netfilter.c
make: *** [/tmp/qemu-test/src/rules.mak:69: tests/hd-geo-test.o] Error 1
The full log is available at
http://patchew.org/logs/20190612094237.47462-1-shmuel.eiderman@oracle.com/testing.asan/?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/20190612094237.47462-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 0/8] Add Qemu to SeaBIOS LCHS interface
Type: series
Message-id: 20190612094237.47462-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/20190612094237.47462-1-shmuel.eiderman@oracle.com -> patchew/20190612094237.47462-1-shmuel.eiderman@oracle.com
Switched to a new branch 'test'
a9a0cfc956 hd-geo-test: Add tests for lchs override
d1b86f9f47 bootdevice: FW_CFG interface for LCHS values
48dd083d65 bootdevice: Refactor get_boot_devices_list
f37e8f7c3c bootdevice: Gather LCHS from all relevant devices
8a7193c16b scsi: Propagate unrealize() callback to scsi-hd
c0a3a43fe2 bootdevice: Add interface to gather LCHS
9ebc9c1fd9 block: Support providing LCHS from user
6593400075 block: Refactor macros - fix tabbing
=== OUTPUT BEGIN ===
1/8 Checking commit 659340007537 (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 9ebc9c1fd9a2 (block: Support providing LCHS from user)
3/8 Checking commit c0a3a43fe22e (bootdevice: Add interface to gather LCHS)
4/8 Checking commit 8a7193c16bb9 (scsi: Propagate unrealize() callback to scsi-hd)
5/8 Checking commit f37e8f7c3cc6 (bootdevice: Gather LCHS from all relevant devices)
6/8 Checking commit 48dd083d65ed (bootdevice: Refactor get_boot_devices_list)
7/8 Checking commit d1b86f9f478c (bootdevice: FW_CFG interface for LCHS values)
8/8 Checking commit a9a0cfc956a7 (hd-geo-test: Add tests for lchs override)
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20190612094237.47462-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 - 2026 Red Hat, Inc.