tests/qtest/migration: Specify the geometry of the bootsector
commit3cb9c6553be28b01761c97768abb41c4b5aaa333
authorFabiano Rosas <farosas@suse.de>
Wed, 18 Oct 2023 19:27:37 +0000 (18 16:27 -0300)
committerJuan Quintela <quintela@redhat.com>
Fri, 20 Oct 2023 06:51:41 +0000 (20 08:51 +0200)
treee353f986fd6e49881fb4edbc6734e6539febe447
parentc99613910106fd9a79005a3e8f47b1ce7d46dbc4
tests/qtest/migration: Specify the geometry of the bootsector

We're about to enable the x86_64 tests to run with the q35 machine,
but that machine does not work with the program we use to dirty the
memory for the tests.

The issue is that QEMU needs to guess the geometry of the "disk" we
give to it and the guessed geometry doesn't pass the sanity checks
done by SeaBIOS. This causes SeaBIOS to interpret the geometry as if
needing a translation from LBA to CHS and SeaBIOS ends up miscomputing
the number of cylinders and aborting due to that.

The reason things work with the "pc" machine is that is uses ATA
instead of AHCI like q35 and SeaBIOS has an exception for ATA that
ends up skipping the sanity checks and ignoring translation
altogether.

Workaround this situation by specifying a geometry in the command
line.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231018192741.25885-9-farosas@suse.de>
tests/qtest/migration-test.c