mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
virtio,pc,pci: bugfixes Some minor fixes plus a big patchset from Igor fixing a regression with windows. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmX4NzsPHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRpkp0H/1foAaDYrApMiIkji4aI94bq/fwTnu5CshNP # +YEzwJCS4qbl67/Ix2Z+xVz7twjQbgGdLd6hb9ZypAQfclUk5tDoKyCmqHtQMakX # T080FayOvWmUEostAw7MXvuz0HpJlgnJaJBn29l1hHjA/XXahKqcc705cup+W8hv # F7xb6AoFcbdETMzNaoqekNaHiiYyQPITY9p/UYPLzj2zyLsspR9kBebIeA1yhtXw # Tmc3+FMquoM2fMNxpwfhCBswg662MlOXhLN3dmyLqeJRl09x1GvaeJIGMY2MbefM # RMMv0/jqwAyii5HXew2rPIbLdULGq+hSjZo2NOlx3EOjTCaOkXc= # =XGMp # -----END PGP SIGNATURE----- # gpg: Signature made Mon 18 Mar 2024 12:44:43 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (24 commits) smbios: add extra comments to smbios_get_table_legacy() tests: acpi: update expected SSDT.dimmpxm blob pc/q35: set SMBIOS entry point type to 'auto' by default tests: acpi/smbios: whitelist expected blobs smbios: error out when building type 4 table is not possible smbios: in case of entry point is 'auto' try to build v2 tables 1st smbios: extend smbios-entry-point-type with 'auto' value smbios: clear smbios_type4_count before building tables smbios: get rid of global smbios_ep_type smbios: handle errors consistently smbios: build legacy mode code only for 'pc' machine smbios: rename/expose structures/bitmaps used by both legacy and modern code smbios: add smbios_add_usr_blob_size() helper smbios: don't check type4 structures in legacy mode smbios: avoid mangling user provided tables smbios: get rid of smbios_legacy global smbios: get rid of smbios_smp_sockets global smbios: cleanup smbios_get_tables() from legacy handling tests: smbios: add test for legacy mode CLI options tests: smbios: add test for -smbios type=11 option ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Binary file not shown.
BIN
tests/data/smbios/type11_blob
Normal file
BIN
tests/data/smbios/type11_blob
Normal file
Binary file not shown.
BIN
tests/data/smbios/type11_blob.legacy
Normal file
BIN
tests/data/smbios/type11_blob.legacy
Normal file
Binary file not shown.
@ -858,6 +858,27 @@ static void test_vm_prepare(const char *params, test_data *data)
|
||||
g_free(args);
|
||||
}
|
||||
|
||||
static void process_smbios_tables_noexit(test_data *data)
|
||||
{
|
||||
/*
|
||||
* TODO: make SMBIOS tests work with UEFI firmware,
|
||||
* Bug on uefi-test-tools to provide entry point:
|
||||
* https://bugs.launchpad.net/qemu/+bug/1821884
|
||||
*/
|
||||
if (!(data->uefi_fl1 && data->uefi_fl2)) {
|
||||
SmbiosEntryPointType ep_type = test_smbios_entry_point(data);
|
||||
test_smbios_structs(data, ep_type);
|
||||
}
|
||||
}
|
||||
|
||||
static void test_smbios(const char *params, test_data *data)
|
||||
{
|
||||
test_vm_prepare(params, data);
|
||||
boot_sector_test(data->qts);
|
||||
process_smbios_tables_noexit(data);
|
||||
qtest_quit(data->qts);
|
||||
}
|
||||
|
||||
static void process_acpi_tables_noexit(test_data *data)
|
||||
{
|
||||
test_acpi_load_tables(data);
|
||||
@ -868,15 +889,7 @@ static void process_acpi_tables_noexit(test_data *data)
|
||||
test_acpi_asl(data);
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: make SMBIOS tests work with UEFI firmware,
|
||||
* Bug on uefi-test-tools to provide entry point:
|
||||
* https://bugs.launchpad.net/qemu/+bug/1821884
|
||||
*/
|
||||
if (!(data->uefi_fl1 && data->uefi_fl2)) {
|
||||
SmbiosEntryPointType ep_type = test_smbios_entry_point(data);
|
||||
test_smbios_structs(data, ep_type);
|
||||
}
|
||||
process_smbios_tables_noexit(data);
|
||||
}
|
||||
|
||||
static void process_acpi_tables(test_data *data)
|
||||
@ -2064,6 +2077,50 @@ static void test_acpi_q35_pvpanic_isa(void)
|
||||
free_test_data(&data);
|
||||
}
|
||||
|
||||
static void test_acpi_pc_smbios_options(void)
|
||||
{
|
||||
uint8_t req_type11[] = { 11 };
|
||||
test_data data = {
|
||||
.machine = MACHINE_PC,
|
||||
.variant = ".pc_smbios_options",
|
||||
.required_struct_types = req_type11,
|
||||
.required_struct_types_len = ARRAY_SIZE(req_type11),
|
||||
};
|
||||
|
||||
test_smbios("-smbios type=11,value=TEST", &data);
|
||||
free_test_data(&data);
|
||||
}
|
||||
|
||||
static void test_acpi_pc_smbios_blob(void)
|
||||
{
|
||||
uint8_t req_type11[] = { 11 };
|
||||
test_data data = {
|
||||
.machine = MACHINE_PC,
|
||||
.variant = ".pc_smbios_blob",
|
||||
.required_struct_types = req_type11,
|
||||
.required_struct_types_len = ARRAY_SIZE(req_type11),
|
||||
};
|
||||
|
||||
test_smbios("-machine smbios-entry-point-type=32 "
|
||||
"-smbios file=tests/data/smbios/type11_blob", &data);
|
||||
free_test_data(&data);
|
||||
}
|
||||
|
||||
static void test_acpi_isapc_smbios_legacy(void)
|
||||
{
|
||||
uint8_t req_type11[] = { 1, 11 };
|
||||
test_data data = {
|
||||
.machine = "isapc",
|
||||
.variant = ".pc_smbios_legacy",
|
||||
.required_struct_types = req_type11,
|
||||
.required_struct_types_len = ARRAY_SIZE(req_type11),
|
||||
};
|
||||
|
||||
test_smbios("-smbios file=tests/data/smbios/type11_blob.legacy "
|
||||
"-smbios type=1,family=TEST", &data);
|
||||
free_test_data(&data);
|
||||
}
|
||||
|
||||
static void test_oem_fields(test_data *data)
|
||||
{
|
||||
int i;
|
||||
@ -2215,6 +2272,12 @@ int main(int argc, char *argv[])
|
||||
#ifdef CONFIG_POSIX
|
||||
qtest_add_func("acpi/piix4/acpierst", test_acpi_piix4_acpi_erst);
|
||||
#endif
|
||||
qtest_add_func("acpi/piix4/smbios-options",
|
||||
test_acpi_pc_smbios_options);
|
||||
qtest_add_func("acpi/piix4/smbios-blob",
|
||||
test_acpi_pc_smbios_blob);
|
||||
qtest_add_func("acpi/piix4/smbios-legacy",
|
||||
test_acpi_isapc_smbios_legacy);
|
||||
}
|
||||
if (qtest_has_machine(MACHINE_Q35)) {
|
||||
qtest_add_func("acpi/q35", test_acpi_q35_tcg);
|
||||
|
Reference in New Issue
Block a user