mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2017-07-13' into staging
Error reporting patches for 2017-07-13 # gpg: Signature made Thu 13 Jul 2017 12:55:45 BST # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2017-07-13: Convert error_report*_err() to warn_report*_err() error: Implement the warn and free Error functions char-socket: Report TCP socket waiting as information Convert error_report() to warn_report() error: Functions to report warnings and informational messages util/qemu-error: Rename error_print_loc() to be more generic websock: Don't try to set *errp directly block: Don't try to set *errp directly xilinx: Fix latent error handling bug Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -4254,11 +4254,9 @@ bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp)
|
||||
assert((int) op >= 0 && op < BLOCK_OP_TYPE_MAX);
|
||||
if (!QLIST_EMPTY(&bs->op_blockers[op])) {
|
||||
blocker = QLIST_FIRST(&bs->op_blockers[op]);
|
||||
if (errp) {
|
||||
*errp = error_copy(blocker->reason);
|
||||
error_prepend(errp, "Node '%s' is busy: ",
|
||||
bdrv_get_device_or_node_name(bs));
|
||||
}
|
||||
error_propagate(errp, error_copy(blocker->reason));
|
||||
error_prepend(errp, "Node '%s' is busy: ",
|
||||
bdrv_get_device_or_node_name(bs));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
+6
-6
@@ -639,12 +639,12 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
|
||||
ret = bdrv_get_info(target, &bdi);
|
||||
if (ret == -ENOTSUP && !target->backing) {
|
||||
/* Cluster size is not defined */
|
||||
error_report("WARNING: The target block device doesn't provide "
|
||||
"information about the block size and it doesn't have a "
|
||||
"backing file. The default block size of %u bytes is "
|
||||
"used. If the actual block size of the target exceeds "
|
||||
"this default, the backup may be unusable",
|
||||
BACKUP_CLUSTER_SIZE_DEFAULT);
|
||||
warn_report("The target block device doesn't provide "
|
||||
"information about the block size and it doesn't have a "
|
||||
"backing file. The default block size of %u bytes is "
|
||||
"used. If the actual block size of the target exceeds "
|
||||
"this default, the backup may be unusable",
|
||||
BACKUP_CLUSTER_SIZE_DEFAULT);
|
||||
job->cluster_size = BACKUP_CLUSTER_SIZE_DEFAULT;
|
||||
} else if (ret < 0 && !target->backing) {
|
||||
error_setg_errno(errp, -ret,
|
||||
|
||||
+1
-2
@@ -345,8 +345,7 @@ static int qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf,
|
||||
is_unix = true;
|
||||
} else if (!strcmp(uri->scheme, "gluster+rdma")) {
|
||||
gsconf->type = SOCKET_ADDRESS_TYPE_INET;
|
||||
error_report("Warning: rdma feature is not supported, falling "
|
||||
"back to tcp");
|
||||
warn_report("rdma feature is not supported, falling back to tcp");
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
|
||||
+3
-3
@@ -1761,9 +1761,9 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
|
||||
* filename encoded options */
|
||||
filename = qdict_get_try_str(options, "filename");
|
||||
if (filename) {
|
||||
error_report("Warning: 'filename' option specified. "
|
||||
"This is an unsupported option, and may be deprecated "
|
||||
"in the future");
|
||||
warn_report("'filename' option specified. "
|
||||
"This is an unsupported option, and may be deprecated "
|
||||
"in the future");
|
||||
iscsi_parse_filename(filename, options, &local_err);
|
||||
if (local_err) {
|
||||
ret = -EINVAL;
|
||||
|
||||
+6
-6
@@ -558,8 +558,8 @@ static int64_t nfs_client_open(NFSClient *client, QDict *options,
|
||||
}
|
||||
client->readahead = qemu_opt_get_number(opts, "readahead-size", 0);
|
||||
if (client->readahead > QEMU_NFS_MAX_READAHEAD_SIZE) {
|
||||
error_report("NFS Warning: Truncating NFS readahead "
|
||||
"size to %d", QEMU_NFS_MAX_READAHEAD_SIZE);
|
||||
warn_report("Truncating NFS readahead size to %d",
|
||||
QEMU_NFS_MAX_READAHEAD_SIZE);
|
||||
client->readahead = QEMU_NFS_MAX_READAHEAD_SIZE;
|
||||
}
|
||||
nfs_set_readahead(client->context, client->readahead);
|
||||
@@ -579,8 +579,8 @@ static int64_t nfs_client_open(NFSClient *client, QDict *options,
|
||||
}
|
||||
client->pagecache = qemu_opt_get_number(opts, "page-cache-size", 0);
|
||||
if (client->pagecache > QEMU_NFS_MAX_PAGECACHE_SIZE) {
|
||||
error_report("NFS Warning: Truncating NFS pagecache "
|
||||
"size to %d pages", QEMU_NFS_MAX_PAGECACHE_SIZE);
|
||||
warn_report("Truncating NFS pagecache size to %d pages",
|
||||
QEMU_NFS_MAX_PAGECACHE_SIZE);
|
||||
client->pagecache = QEMU_NFS_MAX_PAGECACHE_SIZE;
|
||||
}
|
||||
nfs_set_pagecache(client->context, client->pagecache);
|
||||
@@ -595,8 +595,8 @@ static int64_t nfs_client_open(NFSClient *client, QDict *options,
|
||||
/* limit the maximum debug level to avoid potential flooding
|
||||
* of our log files. */
|
||||
if (client->debug > QEMU_NFS_MAX_DEBUG_LEVEL) {
|
||||
error_report("NFS Warning: Limiting NFS debug level "
|
||||
"to %d", QEMU_NFS_MAX_DEBUG_LEVEL);
|
||||
warn_report("Limiting NFS debug level to %d",
|
||||
QEMU_NFS_MAX_DEBUG_LEVEL);
|
||||
client->debug = QEMU_NFS_MAX_DEBUG_LEVEL;
|
||||
}
|
||||
nfs_set_debug(client->context, client->debug);
|
||||
|
||||
+3
-3
@@ -555,9 +555,9 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
|
||||
* filename encoded options */
|
||||
filename = qdict_get_try_str(options, "filename");
|
||||
if (filename) {
|
||||
error_report("Warning: 'filename' option specified. "
|
||||
"This is an unsupported option, and may be deprecated "
|
||||
"in the future");
|
||||
warn_report("'filename' option specified. "
|
||||
"This is an unsupported option, and may be deprecated "
|
||||
"in the future");
|
||||
qemu_rbd_parse_filename(filename, options, &local_err);
|
||||
if (local_err) {
|
||||
r = -EINVAL;
|
||||
|
||||
+2
-2
@@ -1114,8 +1114,8 @@ static coroutine_fn int ssh_co_writev(BlockDriverState *bs,
|
||||
static void unsafe_flush_warning(BDRVSSHState *s, const char *what)
|
||||
{
|
||||
if (!s->unsafe_flush_warning) {
|
||||
error_report("warning: ssh server %s does not support fsync",
|
||||
s->inet->host);
|
||||
warn_report("ssh server %s does not support fsync",
|
||||
s->inet->host);
|
||||
if (what) {
|
||||
error_report("to support fsync, you need %s", what);
|
||||
}
|
||||
|
||||
+1
-1
@@ -910,7 +910,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
|
||||
copy_on_read = qemu_opt_get_bool(legacy_opts, "copy-on-read", false);
|
||||
|
||||
if (read_only && copy_on_read) {
|
||||
error_report("warning: disabling copy-on-read on read-only drive");
|
||||
warn_report("disabling copy-on-read on read-only drive");
|
||||
copy_on_read = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -765,8 +765,8 @@ static int tcp_chr_wait_connected(Chardev *chr, Error **errp)
|
||||
* in TLS and telnet cases, only wait for an accepted socket */
|
||||
while (!s->ioc) {
|
||||
if (s->is_listen) {
|
||||
error_report("QEMU waiting for connection on: %s",
|
||||
chr->filename);
|
||||
info_report("QEMU waiting for connection on: %s",
|
||||
chr->filename);
|
||||
qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), true, NULL);
|
||||
tcp_chr_accept(QIO_CHANNEL(s->listen_ioc), G_IO_IN, chr);
|
||||
qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), false, NULL);
|
||||
|
||||
@@ -557,7 +557,7 @@ void qemu_start_warp_timer(void)
|
||||
if (deadline < 0) {
|
||||
static bool notified;
|
||||
if (!icount_sleep && !notified) {
|
||||
error_report("WARNING: icount sleep disabled and no active timers");
|
||||
warn_report("icount sleep disabled and no active timers");
|
||||
notified = true;
|
||||
}
|
||||
return;
|
||||
|
||||
+1
-1
@@ -2376,7 +2376,7 @@ static void coroutine_fn v9fs_flush(void *opaque)
|
||||
trace_v9fs_flush(pdu->tag, pdu->id, tag);
|
||||
|
||||
if (pdu->tag == tag) {
|
||||
error_report("Warning: the guest sent a self-referencing 9P flush request");
|
||||
warn_report("the guest sent a self-referencing 9P flush request");
|
||||
} else {
|
||||
QLIST_FOREACH(cancel_pdu, &s->active_list, next) {
|
||||
if (cancel_pdu->tag == tag) {
|
||||
|
||||
+3
-3
@@ -383,9 +383,9 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
|
||||
highbank_binfo.write_board_setup = hb_write_board_setup;
|
||||
highbank_binfo.secure_board_setup = true;
|
||||
} else {
|
||||
error_report("WARNING: cannot load built-in Monitor support "
|
||||
"if KVM is enabled. Some guests (such as Linux) "
|
||||
"may not boot.");
|
||||
warn_report("cannot load built-in Monitor support "
|
||||
"if KVM is enabled. Some guests (such as Linux) "
|
||||
"may not boot.");
|
||||
}
|
||||
|
||||
arm_load_kernel(ARM_CPU(first_cpu), &highbank_binfo);
|
||||
|
||||
+3
-3
@@ -80,9 +80,9 @@ static void imx25_pdk_init(MachineState *machine)
|
||||
|
||||
/* We need to initialize our memory */
|
||||
if (machine->ram_size > (FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE)) {
|
||||
error_report("WARNING: RAM size " RAM_ADDR_FMT " above max supported, "
|
||||
"reduced to %x", machine->ram_size,
|
||||
FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE);
|
||||
warn_report("RAM size " RAM_ADDR_FMT " above max supported, "
|
||||
"reduced to %x", machine->ram_size,
|
||||
FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE);
|
||||
machine->ram_size = FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -79,9 +79,9 @@ static void kzm_init(MachineState *machine)
|
||||
|
||||
/* Check the amount of memory is compatible with the SOC */
|
||||
if (machine->ram_size > (FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE)) {
|
||||
error_report("WARNING: RAM size " RAM_ADDR_FMT " above max supported, "
|
||||
"reduced to %x", machine->ram_size,
|
||||
FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE);
|
||||
warn_report("RAM size " RAM_ADDR_FMT " above max supported, "
|
||||
"reduced to %x", machine->ram_size,
|
||||
FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE);
|
||||
machine->ram_size = FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -741,11 +741,11 @@ static void machine_numa_finish_init(MachineState *machine)
|
||||
}
|
||||
}
|
||||
if (s->len && !qtest_enabled()) {
|
||||
error_report("warning: CPU(s) not present in any NUMA nodes: %s",
|
||||
s->str);
|
||||
error_report("warning: All CPU(s) up to maxcpus should be described "
|
||||
"in NUMA config, ability to start up with partial NUMA "
|
||||
"mappings is obsoleted and will be removed in future");
|
||||
warn_report("CPU(s) not present in any NUMA nodes: %s",
|
||||
s->str);
|
||||
warn_report("All CPU(s) up to maxcpus should be described "
|
||||
"in NUMA config, ability to start up with partial NUMA "
|
||||
"mappings is obsoleted and will be removed in future");
|
||||
}
|
||||
g_string_free(s, true);
|
||||
}
|
||||
|
||||
@@ -1132,15 +1132,15 @@ int qdev_prop_check_globals(void)
|
||||
oc = object_class_by_name(prop->driver);
|
||||
oc = object_class_dynamic_cast(oc, TYPE_DEVICE);
|
||||
if (!oc) {
|
||||
error_report("Warning: global %s.%s has invalid class name",
|
||||
prop->driver, prop->property);
|
||||
warn_report("global %s.%s has invalid class name",
|
||||
prop->driver, prop->property);
|
||||
ret = 1;
|
||||
continue;
|
||||
}
|
||||
dc = DEVICE_CLASS(oc);
|
||||
if (!dc->hotpluggable && !prop->used) {
|
||||
error_report("Warning: global %s.%s=%s not used",
|
||||
prop->driver, prop->property, prop->value);
|
||||
warn_report("global %s.%s=%s not used",
|
||||
prop->driver, prop->property, prop->value);
|
||||
ret = 1;
|
||||
continue;
|
||||
}
|
||||
@@ -1169,7 +1169,7 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev,
|
||||
error_propagate(prop->errp, err);
|
||||
} else {
|
||||
assert(prop->user_provided);
|
||||
error_reportf_err(err, "Warning: ");
|
||||
warn_report_err(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,9 +554,7 @@ static void xilinx_axidma_realize(DeviceState *dev, Error **errp)
|
||||
return;
|
||||
|
||||
xilinx_axidma_realize_fail:
|
||||
if (!*errp) {
|
||||
*errp = local_err;
|
||||
}
|
||||
error_propagate(errp, local_err);
|
||||
}
|
||||
|
||||
static void xilinx_axidma_init(Object *obj)
|
||||
|
||||
@@ -2766,17 +2766,17 @@ 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. */
|
||||
error_report("Warning: migration may not work.");
|
||||
warn_report("migration may not work.");
|
||||
}
|
||||
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. */
|
||||
error_report("Warning: ACPI tables are larger than 64k.");
|
||||
error_report("Warning: migration may not work.");
|
||||
error_report("Warning: please remove CPUs, NUMA nodes, "
|
||||
"memory slots or PCI bridges.");
|
||||
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.");
|
||||
}
|
||||
acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
|
||||
}
|
||||
|
||||
@@ -1353,9 +1353,9 @@ static int assigned_device_pci_cap_init(PCIDevice *pci_dev, Error **errp)
|
||||
PCI_CAP_ID_EXP);
|
||||
return -EINVAL;
|
||||
} else if (size != 0x3c) {
|
||||
error_report("WARNING, %s: PCIe cap-id 0x%x has "
|
||||
"non-standard size 0x%x; std size should be 0x3c",
|
||||
__func__, PCI_CAP_ID_EXP, size);
|
||||
warn_report("%s: PCIe cap-id 0x%x has "
|
||||
"non-standard size 0x%x; std size should be 0x3c",
|
||||
__func__, PCI_CAP_ID_EXP, size);
|
||||
}
|
||||
} else if (version == 0) {
|
||||
uint16_t vid, did;
|
||||
|
||||
+6
-7
@@ -381,8 +381,8 @@ ISADevice *pc_find_fdc0(void)
|
||||
}
|
||||
|
||||
if (state.multiple) {
|
||||
error_report("warning: multiple floppy disk controllers with "
|
||||
"iobase=0x3f0 have been found");
|
||||
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");
|
||||
}
|
||||
@@ -1320,8 +1320,7 @@ void pc_acpi_init(const char *default_dsdt)
|
||||
|
||||
acpi_table_add_builtin(opts, &err);
|
||||
if (err) {
|
||||
error_reportf_err(err, "WARNING: failed to load %s: ",
|
||||
filename);
|
||||
warn_reportf_err(err, "failed to load %s: ", filename);
|
||||
}
|
||||
g_free(filename);
|
||||
}
|
||||
@@ -2087,9 +2086,9 @@ static void pc_machine_set_max_ram_below_4g(Object *obj, Visitor *v,
|
||||
}
|
||||
|
||||
if (value < (1ULL << 20)) {
|
||||
error_report("Warning: small max_ram_below_4g(%"PRIu64
|
||||
") less than 1M. BIOS may not work..",
|
||||
value);
|
||||
warn_report("small max_ram_below_4g(%"PRIu64
|
||||
") less than 1M. BIOS may not work..",
|
||||
value);
|
||||
}
|
||||
|
||||
pcms->max_ram_below_4g = value;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user