hw/i386: Improve some of the warning messages

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1d6ef2ccd9667878ed5820fcf17eef35957ea5d8.1505158760.git.alistair.francis@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Alistair Francis 2017-09-11 12:52:43 -07:00 committed by Paolo Bonzini
parent 4be75077b9
commit 9e5d2c5273
3 changed files with 18 additions and 12 deletions

View file

@ -2750,17 +2750,22 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
ACPI_BUILD_ALIGN_SIZE); ACPI_BUILD_ALIGN_SIZE);
if (tables_blob->len > legacy_table_size) { if (tables_blob->len > legacy_table_size) {
/* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */
warn_report("migration may not work."); warn_report("ACPI table size %u exceeds %d bytes,"
" migration may not work",
tables_blob->len, legacy_table_size);
error_printf("Try removing CPUs, NUMA nodes, memory slots"
" or PCI bridges.");
} }
g_array_set_size(tables_blob, legacy_table_size); g_array_set_size(tables_blob, legacy_table_size);
} else { } else {
/* Make sure we have a buffer in case we need to resize the tables. */ /* Make sure we have a buffer in case we need to resize the tables. */
if (tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) { if (tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) {
/* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */
warn_report("ACPI tables are larger than 64k."); warn_report("ACPI table size %u exceeds %d bytes,"
warn_report("migration may not work."); " migration may not work",
warn_report("please remove CPUs, NUMA nodes, " tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
"memory slots or PCI bridges."); error_printf("Try removing CPUs, NUMA nodes, memory slots"
" or PCI bridges.");
} }
acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
} }

View file

@ -384,7 +384,7 @@ ISADevice *pc_find_fdc0(void)
warn_report("multiple floppy disk controllers with " warn_report("multiple floppy disk controllers with "
"iobase=0x3f0 have been found"); "iobase=0x3f0 have been found");
error_printf("the one being picked for CMOS setup might not reflect " error_printf("the one being picked for CMOS setup might not reflect "
"your intent\n"); "your intent");
} }
return state.floppy; return state.floppy;
@ -2098,9 +2098,8 @@ static void pc_machine_set_max_ram_below_4g(Object *obj, Visitor *v,
} }
if (value < (1ULL << 20)) { if (value < (1ULL << 20)) {
warn_report("small max_ram_below_4g(%"PRIu64 warn_report("Only %" PRIu64 " bytes of RAM below the 4GiB boundary,"
") less than 1M. BIOS may not work..", "BIOS may not work with less than 1MiB", value);
value);
} }
pcms->max_ram_below_4g = value; pcms->max_ram_below_4g = value;

View file

@ -101,9 +101,11 @@ static void pc_q35_init(MachineState *machine)
lowmem = pcms->max_ram_below_4g; lowmem = pcms->max_ram_below_4g;
if (machine->ram_size - lowmem > lowmem && if (machine->ram_size - lowmem > lowmem &&
lowmem & ((1ULL << 30) - 1)) { lowmem & ((1ULL << 30) - 1)) {
warn_report("Large machine and max_ram_below_4g(%"PRIu64 warn_report("There is possibly poor performance as the ram size "
") not a multiple of 1G; possible bad performance.", " (0x%" PRIx64 ") is more then twice the size of"
pcms->max_ram_below_4g); " max-ram-below-4g (%"PRIu64") and"
" max-ram-below-4g is not a multiple of 1G.",
(uint64_t)machine->ram_size, pcms->max_ram_below_4g);
} }
} }