diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-09-19 15:44:07 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-09-19 15:44:07 +0100 |
commit | 7ec6a364916c0d1eba01128481e503a550a2b466 (patch) | |
tree | b88db8c6396c5e4ae6560da723e726729cc0e42c /hw/i386 | |
parent | 11e06ce1ed28fd0ffcbc1e2436b72f3412b4ecc8 (diff) | |
parent | 7437866bfc3b25663f415a8c660fd78360e84598 (diff) | |
download | qemu-7ec6a364916c0d1eba01128481e503a550a2b466.zip qemu-7ec6a364916c0d1eba01128481e503a550a2b466.tar.gz qemu-7ec6a364916c0d1eba01128481e503a550a2b466.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* warning improvements (Alistair)
* KVM code cleanup (David)
* scsi-block support for rerror/werror (Fam)
* support for >64 vCPUs in Windows (Gonglei)
* SCSI fix (Hannes)
* SSE bugfixes (Joseph)
* SmartOS compilation fixes (Kamil)
* Hyper-V frequency MSR support (Ladi)
* move more files to accel/tcg (Philippe, Thomas)
* multiboot validation (PJP)
* virtqueue size configuration for virtio-scsi (Richard)
* Hyper-V header cleanup (Roman)
* Maintainer email update (Guangrong)
* checkpatch.pl --branch (Daniel), fixes (Greg)
* introducing scsi/ (me)
# gpg: Signature made Tue 19 Sep 2017 15:21:26 BST
# gpg: using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream: (51 commits)
docker: fix creation of archives
default-configs: Replace $(and ...) with $(call land, ...)
osdep.h: Prohibit disabling assert() in supported builds
checkpatch: add hwaddr to @typeList
accel/hax: move hax-stub.c to accel/stubs/
target/i386: fix "info mem" for LA57 mode
scripts: let checkpatch.pl process an entire GIT branch
update-linux-headers: prepare for hyperv.h removal
hyperv: add header with protocol definitions
i386/cpu/hyperv: support over 64 vcpus for windows guests
Convert remaining single line fprintf() to warn_report()
Makefile: Remove libqemustub.a
ptimer-test: do not link to libqemustub.a/libqemuutil.a
target/mips: Convert VM clock update prints to warn_report
General warn report fixups
Convert multi-line fprintf() to warn_report()
Convert single line fprintf(.../n) to warn_report()
Convert remaining error_report() to warn_report()
hw/i386: Improve some of the warning messages
test-qga: add missing qemu-ga tool dependency
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/acpi-build.c | 15 | ||||
-rw-r--r-- | hw/i386/multiboot.c | 19 | ||||
-rw-r--r-- | hw/i386/pc.c | 9 | ||||
-rw-r--r-- | hw/i386/pc_q35.c | 8 | ||||
-rw-r--r-- | hw/i386/xen/xen-mapcache.c | 5 |
5 files changed, 41 insertions, 15 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4d19d91..9776812 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2750,17 +2750,22 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) ACPI_BUILD_ALIGN_SIZE); if (tables_blob->len > legacy_table_size) { /* 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); } else { /* Make sure we have a buffer in case we need to resize the tables. */ if (tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) { /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI tables are larger than 64k."); - warn_report("migration may not work."); - warn_report("please remove CPUs, NUMA nodes, " - "memory slots or PCI bridges."); + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges."); } acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); } diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 6001f4c..c7b70c9 100644 --- a/hw/i386/multiboot.c +++ b/hw/i386/multiboot.c @@ -221,15 +221,34 @@ int load_multiboot(FWCfgState *fw_cfg, uint32_t mh_header_addr = ldl_p(header+i+12); uint32_t mh_load_end_addr = ldl_p(header+i+20); uint32_t mh_bss_end_addr = ldl_p(header+i+24); + mh_load_addr = ldl_p(header+i+16); + if (mh_header_addr < mh_load_addr) { + fprintf(stderr, "invalid mh_load_addr address\n"); + exit(1); + } + uint32_t mb_kernel_text_offset = i - (mh_header_addr - mh_load_addr); uint32_t mb_load_size = 0; mh_entry_addr = ldl_p(header+i+28); if (mh_load_end_addr) { + if (mh_bss_end_addr < mh_load_addr) { + fprintf(stderr, "invalid mh_bss_end_addr address\n"); + exit(1); + } mb_kernel_size = mh_bss_end_addr - mh_load_addr; + + if (mh_load_end_addr < mh_load_addr) { + fprintf(stderr, "invalid mh_load_end_addr address\n"); + exit(1); + } mb_load_size = mh_load_end_addr - mh_load_addr; } else { + if (kernel_file_size < mb_kernel_text_offset) { + fprintf(stderr, "invalid kernel_file_size\n"); + exit(1); + } mb_kernel_size = kernel_file_size - mb_kernel_text_offset; mb_load_size = mb_kernel_size; } diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2108104..ef5f30e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -384,7 +384,7 @@ ISADevice *pc_find_fdc0(void) warn_report("multiple floppy disk controllers with " "iobase=0x3f0 have been found"); error_printf("the one being picked for CMOS setup might not reflect " - "your intent\n"); + "your intent"); } return state.floppy; @@ -1310,7 +1310,7 @@ void pc_acpi_init(const char *default_dsdt) filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, default_dsdt); if (filename == NULL) { - fprintf(stderr, "WARNING: failed to find %s\n", default_dsdt); + warn_report("failed to find %s", default_dsdt); } else { QemuOpts *opts = qemu_opts_create(qemu_find_opts("acpi"), NULL, 0, &error_abort); @@ -2098,9 +2098,8 @@ static void pc_machine_set_max_ram_below_4g(Object *obj, Visitor *v, } if (value < (1ULL << 20)) { - warn_report("small max_ram_below_4g(%"PRIu64 - ") less than 1M. BIOS may not work..", - value); + warn_report("Only %" PRIu64 " bytes of RAM below the 4GiB boundary," + "BIOS may not work with less than 1MiB", value); } pcms->max_ram_below_4g = value; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index c1cba58..6c4ec4b 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -101,9 +101,11 @@ static void pc_q35_init(MachineState *machine) lowmem = pcms->max_ram_below_4g; if (machine->ram_size - lowmem > lowmem && lowmem & ((1ULL << 30) - 1)) { - warn_report("Large machine and max_ram_below_4g(%"PRIu64 - ") not a multiple of 1G; possible bad performance.", - pcms->max_ram_below_4g); + warn_report("There is possibly poor performance as the ram size " + " (0x%" PRIx64 ") is more then twice the size of" + " 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); } } diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c index 369c3df..baab93b 100644 --- a/hw/i386/xen/xen-mapcache.c +++ b/hw/i386/xen/xen-mapcache.c @@ -9,6 +9,7 @@ */ #include "qemu/osdep.h" +#include "qemu/error-report.h" #include <sys/resource.h> @@ -125,8 +126,8 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque) rlimit_as.rlim_cur = rlimit_as.rlim_max; if (rlimit_as.rlim_max != RLIM_INFINITY) { - fprintf(stderr, "Warning: QEMU's maximum size of virtual" - " memory is not infinity.\n"); + warn_report("QEMU's maximum size of virtual" + " memory is not infinity"); } if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) { mapcache->max_mcache_size = rlimit_as.rlim_max - |