[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/17] tests/qtest/migration: Specify the geometry of the bootsect
From: |
Juan Quintela |
Subject: |
[PULL 13/17] tests/qtest/migration: Specify the geometry of the bootsector |
Date: |
Fri, 20 Oct 2023 08:57:47 +0200 |
From: Fabiano Rosas <farosas@suse.de>
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 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index dfea75b76f..9959a0dc12 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -757,7 +757,9 @@ static int test_migrate_start(QTestState **from, QTestState
**to,
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
memory_size = "150M";
machine_alias = "pc";
- arch_opts = g_strdup_printf("-drive file=%s,format=raw", bootpath);
+ arch_opts = g_strdup_printf(
+ "-drive if=none,id=d0,file=%s,format=raw "
+ "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1", bootpath);
start_address = X86_TEST_MEM_START;
end_address = X86_TEST_MEM_END;
} else if (g_str_equal(arch, "s390x")) {
--
2.41.0
- [PULL 05/17] migration/multifd: Stop checking p->quit in multifd_send_thread, (continued)
- [PULL 05/17] migration/multifd: Stop checking p->quit in multifd_send_thread, Juan Quintela, 2023/10/20
- [PULL 03/17] migration: Fix parse_ramblock() on overwritten retvals, Juan Quintela, 2023/10/20
- [PULL 04/17] migration: simplify notifiers, Juan Quintela, 2023/10/20
- [PULL 06/17] tests/qtest: Allow qtest_qemu_binary to use a custom environment variable, Juan Quintela, 2023/10/20
- [PULL 07/17] tests/qtest: Introduce qtest_init_with_env, Juan Quintela, 2023/10/20
- [PULL 09/17] tests/qtest: Introduce qtest_has_machine_with_env, Juan Quintela, 2023/10/20
- [PULL 08/17] tests/qtest: Allow qtest_get_machines to use an alternate QEMU binary, Juan Quintela, 2023/10/20
- [PULL 11/17] tests/qtest/migration: Introduce find_common_machine_version, Juan Quintela, 2023/10/20
- [PULL 10/17] tests/qtest: Introduce qtest_resolve_machine_alias, Juan Quintela, 2023/10/20
- [PULL 12/17] tests/qtest/migration: Define a machine for all architectures, Juan Quintela, 2023/10/20
- [PULL 13/17] tests/qtest/migration: Specify the geometry of the bootsector,
Juan Quintela <=
- [PULL 15/17] tests/qtest/migration: Support more than one QEMU binary, Juan Quintela, 2023/10/20
- [PULL 16/17] tests/qtest/migration: Allow user to specify a machine type, Juan Quintela, 2023/10/20
- [PULL 14/17] tests/qtest/migration: Set q35 as the default machine for x86_86, Juan Quintela, 2023/10/20
- [PULL 17/17] tests/qtest: Don't print messages from query instances, Juan Quintela, 2023/10/20
- Re: [PULL 00/17] Migration 20231020 patches, Stefan Hajnoczi, 2023/10/20