* [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04
@ 2015-03-04 17:06 Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 01/47] xen-pt: fix Negative array index read Michael Tokarev
` (46 more replies)
0 siblings, 47 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
This is yet another trivial-patches pull request. There are many patches
in there accumulated in over 3 weeks. Trivial stuff really. Please
consider pulling.
Thanks,
/mjt
The following changes since commit 576a94d8bcaa1bb07a81d9ffd2cf76095a66ad9a:
vl: take iothread lock very early (2015-03-03 13:21:53 +0000)
are available in the git repository at:
git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2015-03-04
for you to fetch changes up to 6212a2aeae17a1452e37af11e9938feea098404b:
9pfs: remove useless return (2015-03-04 20:03:49 +0300)
----------------------------------------------------------------
trivial patches for 2015-03-04
----------------------------------------------------------------
Alberto Garcia (2):
qerror.h: Swap definitions that were not in alphabetical order
qmp-commands.hx: Fix several typos
Borislav Petkov (1):
memsave: Improve and disambiguate error message
Cole Robinson (3):
qapi-schema: Fix SpiceChannel docs
gitignore: Track common.env in iotests gitignore
gitignore: Ignore new tests
Gabriel L. Somlo (1):
smbios: document cmdline options for smbios type 2-4, 17 structures
Gonglei (19):
xen-pt: fix Negative array index read
xen-pt: fix Out-of-bounds read
block: remove superfluous '\n' around error_report/error_setg
a9gtimer: remove superfluous '\n' around error_setg
pl330.c: remove superfluous '\n' around error_setg
numa: remove superfluous '\n' around error_setg
Remove superfluous '\n' around error_report()
vhost-scsi: Remove superfluous '\n' around error_report()
vfio: Remove superfluous '\n' around error_report()
xtensa: Remove superfluous '\n' around error_report()
tpm: Remove superfluous '\n' around error_report()
arm/digic_boards: Remove superfluous '\n' around error_report()
vhost: Remove superfluous '\n' around error_report()
nbd: fix resource leak
sparc/leon3.c: fix memory leak
macio: fix possible memory leak
milkymist.c: fix memory leak
sysbus: fix memory leak
microblaze: fix memory leak
Markus Armbruster (1):
xilinx_ethlite: Clean up after commit 2f991ad
Michael Tokarev (4):
migration/rdma: clean up qemu_rdma_dest_init a bit
qemu-options: fix/document -incoming options
e500: fix memory leak
9pfs: remove useless return
Paolo Bonzini (2):
cutils: refine strtol error handling in parse_debug_env
gdbstub: avoid possible NULL pointer dereference
Radim Krčmář (2):
fix GCC 5.0.0 logical-not-parentheses warnings
milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning
Stefan Berger (1):
Add copyright and author after file split
Stefan Weil (6):
vhost_net: Add missing 'static' attribute
disas/arm: Fix warnings caused by missing 'static' attribute
disas/cris: Fix warning caused by missing 'static' attribute
disas/microblaze: Fix warnings caused by missing 'static' attribute
oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code
migration: Fix coding style (whitespace issues)
Thomas Huth (3):
ui: Removed unused functions
ui/vnc: Remove vnc_stop_worker_thread()
xen: Remove xen_cmos_set_s3_resume()
Wang Xin (2):
qemu-char: add cyrillic characters 'numerosign' to VNC keysyms
qemu-char: add cyrillic key 'numerosign' to Russian keymap
.gitignore | 1 -
block/archipelago.c | 6 +-
block/nbd.c | 1 +
cpus.c | 4 +-
disas/arm.c | 128 ------------------------------------------
disas/cris.c | 2 +-
disas/microblaze.c | 13 +++--
exec.c | 2 +-
gdbstub.c | 8 ++-
hw/9pfs/virtio-9p-local.c | 1 -
hw/arm/digic_boards.c | 6 +-
hw/block/nand.c | 2 +-
hw/core/sysbus.c | 2 +
hw/dma/pl330.c | 4 +-
hw/ide/pci.c | 2 +-
hw/lm32/milkymist.c | 1 +
hw/microblaze/boot.c | 6 +-
hw/misc/macio/macio.c | 3 +-
hw/misc/milkymist-pfpu.c | 2 +-
hw/net/vhost_net.c | 2 +-
hw/net/virtio-net.c | 4 +-
hw/net/xilinx_ethlite.c | 1 +
hw/ppc/e500.c | 1 +
hw/scsi/vhost-scsi.c | 6 +-
hw/sparc/leon3.c | 1 +
hw/timer/a9gtimer.c | 2 +-
hw/tpm/tpm_passthrough.c | 12 ++--
hw/vfio/common.c | 10 ++--
hw/virtio/vhost-backend.c | 2 +-
hw/xen/xen_pt_config_init.c | 8 +--
hw/xtensa/sim.c | 2 +-
hw/xtensa/xtfpga.c | 10 ++--
include/hw/xen/xen.h | 1 -
include/qapi/qmp/qerror.h | 6 +-
include/ui/console.h | 3 -
kvm-all.c | 2 +-
migration/qemu-file-buf.c | 4 ++
migration/rdma.c | 73 +++++++++++-------------
net/vhost-user.c | 4 +-
numa.c | 6 +-
pc-bios/keymaps/ru | 2 +-
qapi-schema.json | 6 +-
qemu-img.c | 5 +-
qemu-options.hx | 56 ++++++++++++++++--
qmp-commands.hx | 6 +-
target-s390x/kvm.c | 2 +-
tests/.gitignore | 3 +
tests/qemu-iotests/.gitignore | 1 +
tpm.c | 2 +-
trace/control.c | 2 +-
ui/console.c | 12 ----
ui/d3des.c | 9 ---
ui/d3des.h | 6 --
ui/input-legacy.c | 6 --
ui/vnc-jobs.c | 13 -----
ui/vnc-jobs.h | 1 -
ui/vnc_keysym.h | 1 +
util/cutils.c | 5 +-
util/oslib-posix.c | 4 +-
xen-hvm-stub.c | 4 --
60 files changed, 188 insertions(+), 312 deletions(-)
^ permalink raw reply [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 01/47] xen-pt: fix Negative array index read
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 02/47] xen-pt: fix Out-of-bounds read Michael Tokarev
` (45 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Coverity spot:
Function xen_pt_bar_offset_to_index() may return a negative
value (-1) which is used as an index to d->io_regions[] down
the line.
Let's pass index directly as an argument to
xen_pt_bar_reg_parse().
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/xen/xen_pt_config_init.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index de9a20f..710fe50 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -360,15 +360,13 @@ static uint64_t xen_pt_get_bar_size(PCIIORegion *r)
}
static XenPTBarFlag xen_pt_bar_reg_parse(XenPCIPassthroughState *s,
- XenPTRegInfo *reg)
+ int index)
{
PCIDevice *d = &s->dev;
XenPTRegion *region = NULL;
PCIIORegion *r;
- int index = 0;
/* check 64bit BAR */
- index = xen_pt_bar_offset_to_index(reg->offset);
if ((0 < index) && (index < PCI_ROM_SLOT)) {
int type = s->real_device.io_regions[index - 1].type;
@@ -422,7 +420,7 @@ static int xen_pt_bar_reg_init(XenPCIPassthroughState *s, XenPTRegInfo *reg,
}
/* set BAR flag */
- s->bases[index].bar_flag = xen_pt_bar_reg_parse(s, reg);
+ s->bases[index].bar_flag = xen_pt_bar_reg_parse(s, index);
if (s->bases[index].bar_flag == XEN_PT_BAR_FLAG_UNUSED) {
reg_field = XEN_PT_INVALID_REG;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 02/47] xen-pt: fix Out-of-bounds read
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 01/47] xen-pt: fix Negative array index read Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 03/47] xilinx_ethlite: Clean up after commit 2f991ad Michael Tokarev
` (44 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
The array length of s->real_device.io_regions[] is
"PCI_NUM_REGIONS - 1".
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/xen/xen_pt_config_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index 710fe50..d99c22e 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -438,7 +438,7 @@ static int xen_pt_bar_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry,
/* get BAR index */
index = xen_pt_bar_offset_to_index(reg->offset);
- if (index < 0 || index >= PCI_NUM_REGIONS) {
+ if (index < 0 || index >= PCI_NUM_REGIONS - 1) {
XEN_PT_ERR(&s->dev, "Internal error: Invalid BAR index [%d].\n", index);
return -1;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 03/47] xilinx_ethlite: Clean up after commit 2f991ad
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 01/47] xen-pt: fix Negative array index read Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 02/47] xen-pt: fix Out-of-bounds read Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 04/47] memsave: Improve and disambiguate error message Michael Tokarev
` (43 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Markus Armbruster
From: Markus Armbruster <armbru@redhat.com>
The "fall through" added by the commit is clearly intentional. Mark
it so. Hushes up Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/net/xilinx_ethlite.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c
index 9536f64..ad6b553 100644
--- a/hw/net/xilinx_ethlite.c
+++ b/hw/net/xilinx_ethlite.c
@@ -146,6 +146,7 @@ eth_write(void *opaque, hwaddr addr,
if (!(value & CTRL_S)) {
qemu_flush_queued_packets(qemu_get_queue(s->nic));
}
+ /* fall through */
case R_TX_LEN0:
case R_TX_LEN1:
case R_TX_GIE0:
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 04/47] memsave: Improve and disambiguate error message
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (2 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 03/47] xilinx_ethlite: Clean up after commit 2f991ad Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 05/47] smbios: document cmdline options for smbios type 2-4, 17 structures Michael Tokarev
` (42 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Borislav Petkov, Michael Tokarev
From: Borislav Petkov <bp@suse.de>
When requesting a size which cannot be read, the error message shows
a different address which is misleading to the user and it looks like
something's wrong with the address parsing. This is because the input
@addr variable is incremented in the memory dumping loop:
(qemu) memsave 0xffffffff8418069c 0xb00000 mem
Invalid addr 0xffffffff849ffe9c specified
Fix that by saving the original address and size and use them in the
error message:
(qemu) memsave 0xffffffff8418069c 0xb00000 mem
Invalid addr 0xffffffff8418069c/size 11534336 specified
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
cpus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index 0fac143..1ce90a1 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1474,6 +1474,7 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename,
uint32_t l;
CPUState *cpu;
uint8_t buf[1024];
+ int64_t orig_addr = addr, orig_size = size;
if (!has_cpu) {
cpu_index = 0;
@@ -1497,7 +1498,8 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename,
if (l > size)
l = size;
if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) != 0) {
- error_setg(errp, "Invalid addr 0x%016" PRIx64 "specified", addr);
+ error_setg(errp, "Invalid addr 0x%016" PRIx64 "/size %" PRId64
+ " specified", orig_addr, orig_size);
goto exit;
}
if (fwrite(buf, 1, l, f) != l) {
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 05/47] smbios: document cmdline options for smbios type 2-4, 17 structures
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (3 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 04/47] memsave: Improve and disambiguate error message Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 06/47] migration/rdma: clean up qemu_rdma_dest_init a bit Michael Tokarev
` (41 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gabriel L. Somlo, Michael Tokarev, Gabriel Somlo
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-options.hx | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 85ca3ad..ee4b223 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1364,11 +1364,25 @@ ETEXI
DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
"-smbios file=binary\n"
" load SMBIOS entry from binary file\n"
- "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d][,uefi=on|off]\n"
+ "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]\n"
+ " [,uefi=on|off]\n"
" specify SMBIOS type 0 fields\n"
"-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
" [,uuid=uuid][,sku=str][,family=str]\n"
- " specify SMBIOS type 1 fields\n", QEMU_ARCH_I386)
+ " specify SMBIOS type 1 fields\n"
+ "-smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
+ " [,asset=str][,location=str]\n"
+ " specify SMBIOS type 2 fields\n"
+ "-smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str]\n"
+ " [,sku=str]\n"
+ " specify SMBIOS type 3 fields\n"
+ "-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]\n"
+ " [,asset=str][,part=str]\n"
+ " specify SMBIOS type 4 fields\n"
+ "-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
+ " [,asset=str][,part=str]\n"
+ " specify SMBIOS type 17 fields\n",
+ QEMU_ARCH_I386)
STEXI
@item -smbios file=@var{binary}
@findex -smbios
@@ -1377,8 +1391,20 @@ Load SMBIOS entry from binary file.
@item -smbios type=0[,vendor=@var{str}][,version=@var{str}][,date=@var{str}][,release=@var{%d.%d}][,uefi=on|off]
Specify SMBIOS type 0 fields
-@item -smbios type=1[,manufacturer=@var{str}][,product=@var{str}] [,version=@var{str}][,serial=@var{str}][,uuid=@var{uuid}][,sku=@var{str}] [,family=@var{str}]
+@item -smbios type=1[,manufacturer=@var{str}][,product=@var{str}][,version=@var{str}][,serial=@var{str}][,uuid=@var{uuid}][,sku=@var{str}][,family=@var{str}]
Specify SMBIOS type 1 fields
+
+@item -smbios type=2[,manufacturer=@var{str}][,product=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,location=@var{str}][,family=@var{str}]
+Specify SMBIOS type 2 fields
+
+@item -smbios type=3[,manufacturer=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,sku=@var{str}]
+Specify SMBIOS type 3 fields
+
+@item -smbios type=4[,sock_pfx=@var{str}][,manufacturer=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
+Specify SMBIOS type 4 fields
+
+@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
+Specify SMBIOS type 17 fields
ETEXI
STEXI
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 06/47] migration/rdma: clean up qemu_rdma_dest_init a bit
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (4 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 05/47] smbios: document cmdline options for smbios type 2-4, 17 structures Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:11 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 07/47] qemu-options: fix/document -incoming options Michael Tokarev
` (40 subsequent siblings)
46 siblings, 1 reply; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
Do not check for rdma->host being empty twice. This removes a large
"if" block, so code indentation is changed. While at it, remove an
ugly goto from the loop, replacing it with a cleaner if logic. And
finally, there's no need to initialize `ret' variable since is always
has a value.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/rdma.c | 51 ++++++++++++++++++++++-----------------------------
1 file changed, 22 insertions(+), 29 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 6bee30c..a7bca91 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -2366,10 +2366,10 @@ err_rdma_source_connect:
static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
{
- int ret = -EINVAL, idx;
+ int ret, idx;
struct rdma_cm_id *listen_id;
char ip[40] = "unknown";
- struct rdma_addrinfo *res;
+ struct rdma_addrinfo *res, *e;
char port_str[16];
for (idx = 0; idx < RDMA_WRID_MAX; idx++) {
@@ -2377,7 +2377,7 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
rdma->wr_data[idx].control_curr = NULL;
}
- if (rdma->host == NULL) {
+ if (!rdma->host || !rdma->host[0]) {
ERROR(errp, "RDMA host is not set!");
rdma->error_state = -EINVAL;
return -1;
@@ -2400,40 +2400,33 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
snprintf(port_str, 16, "%d", rdma->port);
port_str[15] = '\0';
- if (rdma->host && strcmp("", rdma->host)) {
- struct rdma_addrinfo *e;
+ ret = rdma_getaddrinfo(rdma->host, port_str, NULL, &res);
+ if (ret < 0) {
+ ERROR(errp, "could not rdma_getaddrinfo address %s", rdma->host);
+ goto err_dest_init_bind_addr;
+ }
- ret = rdma_getaddrinfo(rdma->host, port_str, NULL, &res);
- if (ret < 0) {
- ERROR(errp, "could not rdma_getaddrinfo address %s", rdma->host);
- goto err_dest_init_bind_addr;
+ for (e = res; e != NULL; e = e->ai_next) {
+ inet_ntop(e->ai_family,
+ &((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof ip);
+ trace_qemu_rdma_dest_init_trying(rdma->host, ip);
+ ret = rdma_bind_addr(listen_id, e->ai_dst_addr);
+ if (ret) {
+ continue;
}
-
- for (e = res; e != NULL; e = e->ai_next) {
- inet_ntop(e->ai_family,
- &((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof ip);
- trace_qemu_rdma_dest_init_trying(rdma->host, ip);
- ret = rdma_bind_addr(listen_id, e->ai_dst_addr);
- if (!ret) {
- if (e->ai_family == AF_INET6) {
- ret = qemu_rdma_broken_ipv6_kernel(errp, listen_id->verbs);
- if (ret) {
- continue;
- }
- }
-
- goto listen;
+ if (e->ai_family == AF_INET6) {
+ ret = qemu_rdma_broken_ipv6_kernel(errp, listen_id->verbs);
+ if (ret) {
+ continue;
}
}
+ break;
+ }
+ if (!e) {
ERROR(errp, "Error: could not rdma_bind_addr!");
goto err_dest_init_bind_addr;
- } else {
- ERROR(errp, "migration host and port not specified!");
- ret = -EINVAL;
- goto err_dest_init_bind_addr;
}
-listen:
rdma->listen_id = listen_id;
qemu_rdma_dump_gid("dest_init", listen_id);
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 07/47] qemu-options: fix/document -incoming options
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (5 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 06/47] migration/rdma: clean up qemu_rdma_dest_init a bit Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 08/47] cutils: refine strtol error handling in parse_debug_env Michael Tokarev
` (39 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-options.hx | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index ee4b223..303d13c 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3195,12 +3195,30 @@ Set TB size.
ETEXI
DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
- "-incoming p prepare for incoming migration, listen on port p\n",
+ "-incoming tcp:[host]:port[,to=maxport][,ipv4][,ipv6]\n" \
+ "-incoming rdma:host:port[,ipv4][,ipv6]\n" \
+ "-incoming unix:socketpath\n" \
+ " prepare for incoming migration, listen on\n" \
+ " specified protocol and socket address\n" \
+ "-incoming fd:fd\n" \
+ "-incoming exec:cmdline\n" \
+ " accept incoming migration on given file descriptor\n" \
+ " or from given external command\n",
QEMU_ARCH_ALL)
STEXI
-@item -incoming @var{port}
+@item -incoming tcp:[@var{host}]:@var{port}[,to=@var{maxport}][,ipv4][,ipv6]
+@item -incoming rdma:@var{host}:@var{port}[,ipv4][,ipv6]
@findex -incoming
-Prepare for incoming migration, listen on @var{port}.
+Prepare for incoming migration, listen on a given tcp port.
+
+@item -incoming unix:@var{socketpath}
+Prepare for incoming migration, listen on a given unix socket.
+
+@item -incoming fd:@var{fd}
+Accept incoming migration from a given filedescriptor.
+
+@item -incoming exec:@var{cmdline}
+Accept incoming migration as an output from specified external command.
ETEXI
DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 08/47] cutils: refine strtol error handling in parse_debug_env
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (6 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 07/47] qemu-options: fix/document -incoming options Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 09/47] Add copyright and author after file split Michael Tokarev
` (38 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev
From: Paolo Bonzini <pbonzini@redhat.com>
Avoid truncation of a 64-bit long to a 32-bit int, and check for errno
(especially ERANGE).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
util/cutils.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/cutils.c b/util/cutils.c
index dbe7412..9312e45 100644
--- a/util/cutils.c
+++ b/util/cutils.c
@@ -523,16 +523,17 @@ int parse_debug_env(const char *name, int max, int initial)
{
char *debug_env = getenv(name);
char *inv = NULL;
- int debug;
+ long debug;
if (!debug_env) {
return initial;
}
+ errno = 0;
debug = strtol(debug_env, &inv, 10);
if (inv == debug_env) {
return initial;
}
- if (debug < 0 || debug > max) {
+ if (debug < 0 || debug > max || errno != 0) {
fprintf(stderr, "warning: %s not in [0, %d]", name, max);
return initial;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 09/47] Add copyright and author after file split
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (7 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 08/47] cutils: refine strtol error handling in parse_debug_env Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 10/47] qerror.h: Swap definitions that were not in alphabetical order Michael Tokarev
` (37 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Stefan Berger
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
migration/qemu-file-buf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/migration/qemu-file-buf.c b/migration/qemu-file-buf.c
index e97e0bd..e56a8ad 100644
--- a/migration/qemu-file-buf.c
+++ b/migration/qemu-file-buf.c
@@ -2,6 +2,10 @@
* QEMU System Emulator
*
* Copyright (c) 2003-2008 Fabrice Bellard
+ * Copyright (c) 2014 IBM Corp.
+ *
+ * Authors:
+ * Stefan Berger <stefanb@linux.vnet.ibm.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 10/47] qerror.h: Swap definitions that were not in alphabetical order
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (8 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 09/47] Add copyright and author after file split Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 11/47] qmp-commands.hx: Fix several typos Michael Tokarev
` (36 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Alberto Garcia
From: Alberto Garcia <berto@igalia.com>
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/qapi/qmp/qerror.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index 986260f..57a62d4 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -37,12 +37,12 @@ void qerror_report_err(Error *err);
#define QERR_BASE_NOT_FOUND \
ERROR_CLASS_GENERIC_ERROR, "Base '%s' not found"
-#define QERR_BLOCK_JOB_NOT_READY \
- ERROR_CLASS_GENERIC_ERROR, "The active block job for device '%s' cannot be completed"
-
#define QERR_BLOCK_FORMAT_FEATURE_NOT_SUPPORTED \
ERROR_CLASS_GENERIC_ERROR, "Block format '%s' used by device '%s' does not support feature '%s'"
+#define QERR_BLOCK_JOB_NOT_READY \
+ ERROR_CLASS_GENERIC_ERROR, "The active block job for device '%s' cannot be completed"
+
#define QERR_BUS_NO_HOTPLUG \
ERROR_CLASS_GENERIC_ERROR, "Bus '%s' does not support hotplugging"
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 11/47] qmp-commands.hx: Fix several typos
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (9 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 10/47] qerror.h: Swap definitions that were not in alphabetical order Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 12/47] block: remove superfluous '\n' around error_report/error_setg Michael Tokarev
` (35 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Alberto Garcia
From: Alberto Garcia <berto@igalia.com>
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qmp-commands.hx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/qmp-commands.hx b/qmp-commands.hx
index a85d847..c12334a 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1,5 +1,5 @@
HXCOMM QMP dispatch table and documentation
-HXCOMM Text between SQMP and EQMP is copied to the QMP documention file and
+HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and
HXCOMM does not show up in the other formats.
SQMP
@@ -1767,7 +1767,7 @@ Arguments:
- "protocol": protocol name (json-string)
- "password": password (json-string)
-- "connected": [ keep | disconnect | fail ] (josn-string, optional)
+- "connected": [ keep | disconnect | fail ] (json-string, optional)
Example:
@@ -2922,7 +2922,7 @@ Channels are described by a json-object, each one contain the following:
- "channel-id": channel id. Usually "0", might be different needed when
multiple channels of the same type exist, such as multiple
display channels in a multihead setup (json-int)
-- "tls": whevener the channel is encrypted (json-bool)
+- "tls": whether the channel is encrypted (json-bool)
Example:
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 12/47] block: remove superfluous '\n' around error_report/error_setg
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (10 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 11/47] qmp-commands.hx: Fix several typos Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 13/47] a9gtimer: remove superfluous '\n' around error_setg Michael Tokarev
` (34 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
block/archipelago.c | 6 +++---
hw/block/nand.c | 2 +-
qemu-img.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/archipelago.c b/block/archipelago.c
index a8114b5..855655c 100644
--- a/block/archipelago.c
+++ b/block/archipelago.c
@@ -291,7 +291,7 @@ static int qemu_archipelago_init(BDRVArchipelagoState *s)
ret = qemu_archipelago_xseg_init(s);
if (ret < 0) {
- error_report("Cannot initialize XSEG. Aborting...\n");
+ error_report("Cannot initialize XSEG. Aborting...");
goto err_exit;
}
@@ -645,7 +645,7 @@ static int qemu_archipelago_create_volume(Error **errp, const char *volname,
target = xseg_get_target(xseg, req);
if (!target) {
- error_setg(errp, "Cannot get XSEG target.\n");
+ error_setg(errp, "Cannot get XSEG target.");
goto err_exit;
}
memcpy(target, volname, targetlen);
@@ -889,7 +889,7 @@ static BlockAIOCB *qemu_archipelago_aio_rw(BlockDriverState *bs,
return &aio_cb->common;
err_exit:
- error_report("qemu_archipelago_aio_rw(): I/O Error\n");
+ error_report("qemu_archipelago_aio_rw(): I/O Error");
qemu_aio_unref(aio_cb);
return NULL;
}
diff --git a/hw/block/nand.c b/hw/block/nand.c
index 1882a0c..61d2cec 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -393,7 +393,7 @@ static void nand_realize(DeviceState *dev, Error **errp)
nand_init_2048(s);
break;
default:
- error_setg(errp, "Unsupported NAND block size %#x\n",
+ error_setg(errp, "Unsupported NAND block size %#x",
1 << s->page_shift);
return;
}
diff --git a/qemu-img.c b/qemu-img.c
index 7ac7f56..6d17755 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1645,7 +1645,7 @@ static int img_convert(int argc, char **argv)
if (skip_create) {
int64_t output_sectors = blk_nb_sectors(out_blk);
if (output_sectors < 0) {
- error_report("unable to get output image length: %s\n",
+ error_report("unable to get output image length: %s",
strerror(-output_sectors));
ret = -1;
goto out;
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 13/47] a9gtimer: remove superfluous '\n' around error_setg
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (11 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 12/47] block: remove superfluous '\n' around error_report/error_setg Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 14/47] pl330.c: " Michael Tokarev
` (33 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/timer/a9gtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index 435142a..b087bbd 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -289,7 +289,7 @@ static void a9_gtimer_realize(DeviceState *dev, Error **errp)
int i;
if (s->num_cpu < 1 || s->num_cpu > A9_GTIMER_MAX_CPUS) {
- error_setg(errp, "%s: num-cpu must be between 1 and %d\n",
+ error_setg(errp, "%s: num-cpu must be between 1 and %d",
__func__, A9_GTIMER_MAX_CPUS);
return;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 14/47] pl330.c: remove superfluous '\n' around error_setg
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (12 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 13/47] a9gtimer: remove superfluous '\n' around error_setg Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 15/47] numa: " Michael Tokarev
` (32 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/dma/pl330.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c
index 16cf77e..5be3df5 100644
--- a/hw/dma/pl330.c
+++ b/hw/dma/pl330.c
@@ -1566,7 +1566,7 @@ static void pl330_realize(DeviceState *dev, Error **errp)
s->cfg[1] |= 5;
break;
default:
- error_setg(errp, "Bad value for i-cache_len property: %" PRIx8 "\n",
+ error_setg(errp, "Bad value for i-cache_len property: %" PRIx8,
s->i_cache_len);
return;
}
@@ -1601,7 +1601,7 @@ static void pl330_realize(DeviceState *dev, Error **errp)
s->cfg[CFG_CRD] |= 0x4;
break;
default:
- error_setg(errp, "Bad value for data_width property: %" PRIx8 "\n",
+ error_setg(errp, "Bad value for data_width property: %" PRIx8,
s->data_width);
return;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 15/47] numa: remove superfluous '\n' around error_setg
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (13 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 14/47] pl330.c: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 16/47] Remove superfluous '\n' around error_report() Michael Tokarev
` (31 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
numa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/numa.c b/numa.c
index 5634bf0..ffbec68 100644
--- a/numa.c
+++ b/numa.c
@@ -66,7 +66,7 @@ static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp)
if (nodenr >= MAX_NODES) {
error_setg(errp, "Max number of NUMA nodes reached: %"
- PRIu16 "\n", nodenr);
+ PRIu16 "", nodenr);
return;
}
@@ -85,7 +85,7 @@ static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp)
}
if (node->has_mem && node->has_memdev) {
- error_setg(errp, "qemu: cannot specify both mem= and memdev=\n");
+ error_setg(errp, "qemu: cannot specify both mem= and memdev=");
return;
}
@@ -94,7 +94,7 @@ static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp)
}
if (node->has_memdev != have_memdevs) {
error_setg(errp, "qemu: memdev option must be specified for either "
- "all or no nodes\n");
+ "all or no nodes");
return;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 16/47] Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (14 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 15/47] numa: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 17/47] vhost-scsi: " Michael Tokarev
` (30 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
exec.c | 2 +-
hw/ide/pci.c | 2 +-
hw/microblaze/boot.c | 2 +-
migration/rdma.c | 2 +-
target-s390x/kvm.c | 2 +-
trace/control.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index c85321a..ebee8cc 100644
--- a/exec.c
+++ b/exec.c
@@ -1188,7 +1188,7 @@ static void *file_ram_alloc(RAMBlock *block,
error:
if (mem_prealloc) {
- error_report("%s\n", error_get_pretty(*errp));
+ error_report("%s", error_get_pretty(*errp));
exit(1);
}
return NULL;
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index e3f2054..913a976 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -99,7 +99,7 @@ static int32_t bmdma_prepare_buf(IDEDMA *dma, int is_write)
* This should accommodate the largest ATA transaction
* for LBA48 (65,536 sectors) and 32K sector sizes. */
if (s->sg.size > INT32_MAX) {
- error_report("IDE: sglist describes more than 2GiB.\n");
+ error_report("IDE: sglist describes more than 2GiB.");
break;
}
bm->cur_prd_addr += l;
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index a2843cd..38c59db 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -185,7 +185,7 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
ram_size - initrd_offset);
}
if (initrd_size < 0) {
- error_report("qemu: could not load initrd '%s'\n",
+ error_report("qemu: could not load initrd '%s'",
initrd_filename);
exit(EXIT_FAILURE);
}
diff --git a/migration/rdma.c b/migration/rdma.c
index a7bca91..a8c2407 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -1627,7 +1627,7 @@ static int qemu_rdma_exchange_get_response(RDMAContext *rdma,
return -EIO;
}
if (head->len > RDMA_CONTROL_MAX_BUFFER - sizeof(*head)) {
- error_report("too long length: %d\n", head->len);
+ error_report("too long length: %d", head->len);
return -EINVAL;
}
if (sizeof(*head) + head->len != byte_len) {
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index d7c57d9..508cc0a 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -211,7 +211,7 @@ void kvm_s390_reset_vcpu(S390CPU *cpu)
* Before this ioctl cpu_synchronize_state() is called in common kvm
* code (kvm-all) */
if (kvm_vcpu_ioctl(cs, KVM_S390_INITIAL_RESET, NULL)) {
- error_report("Initial CPU reset failed on CPU %i\n", cs->cpu_index);
+ error_report("Initial CPU reset failed on CPU %i", cs->cpu_index);
}
}
diff --git a/trace/control.c b/trace/control.c
index 0d30801..995beb3 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -126,7 +126,7 @@ static void trace_init_events(const char *fname)
error_report("WARNING: trace event '%s' does not exist",
line_ptr);
} else if (!trace_event_get_state_static(ev)) {
- error_report("WARNING: trace event '%s' is not traceable\n",
+ error_report("WARNING: trace event '%s' is not traceable",
line_ptr);
} else {
trace_event_set_state_dynamic(ev, enable);
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 17/47] vhost-scsi: Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (15 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 16/47] Remove superfluous '\n' around error_report() Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 18/47] vfio: " Michael Tokarev
` (29 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/scsi/vhost-scsi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 618b0af..335f442 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -83,7 +83,7 @@ static int vhost_scsi_start(VHostSCSI *s)
if (abi_version > VHOST_SCSI_ABI_VERSION) {
error_report("vhost-scsi: The running tcm_vhost kernel abi_version:"
" %d is greater than vhost_scsi userspace supports: %d, please"
- " upgrade your version of QEMU\n", abi_version,
+ " upgrade your version of QEMU", abi_version,
VHOST_SCSI_ABI_VERSION);
return -ENOSYS;
}
@@ -141,7 +141,7 @@ static void vhost_scsi_stop(VHostSCSI *s)
if (k->set_guest_notifiers) {
ret = k->set_guest_notifiers(qbus->parent, s->dev.nvqs, false);
if (ret < 0) {
- error_report("vhost guest notifier cleanup failed: %d\n", ret);
+ error_report("vhost guest notifier cleanup failed: %d", ret);
}
}
assert(ret >= 0);
@@ -186,7 +186,7 @@ static void vhost_scsi_set_status(VirtIODevice *vdev, uint8_t val)
ret = vhost_scsi_start(s);
if (ret < 0) {
- error_report("virtio-scsi: unable to start vhost: %s\n",
+ error_report("virtio-scsi: unable to start vhost: %s",
strerror(-ret));
/* There is no userspace virtio-scsi fallback so exit */
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 18/47] vfio: Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (16 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 17/47] vhost-scsi: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 19/47] xtensa: " Michael Tokarev
` (28 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/vfio/common.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index c5d1551..9289389 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -201,7 +201,7 @@ static int vfio_dma_unmap(VFIOContainer *container,
};
if (ioctl(container->fd, VFIO_IOMMU_UNMAP_DMA, &unmap)) {
- error_report("VFIO_UNMAP_DMA: %d\n", -errno);
+ error_report("VFIO_UNMAP_DMA: %d", -errno);
return -errno;
}
@@ -234,7 +234,7 @@ static int vfio_dma_map(VFIOContainer *container, hwaddr iova,
return 0;
}
- error_report("VFIO_MAP_DMA: %d\n", -errno);
+ error_report("VFIO_MAP_DMA: %d", -errno);
return -errno;
}
@@ -274,7 +274,7 @@ static void vfio_iommu_map_notify(Notifier *n, void *data)
iotlb->translated_addr,
&xlat, &len, iotlb->perm & IOMMU_WO);
if (!memory_region_is_ram(mr)) {
- error_report("iommu map to non memory area %"HWADDR_PRIx"\n",
+ error_report("iommu map to non memory area %"HWADDR_PRIx"",
xlat);
return;
}
@@ -283,7 +283,7 @@ static void vfio_iommu_map_notify(Notifier *n, void *data)
* check that it did not truncate too much.
*/
if (len & iotlb->addr_mask) {
- error_report("iommu has granularity incompatible with target AS\n");
+ error_report("iommu has granularity incompatible with target AS");
return;
}
@@ -566,7 +566,7 @@ static void vfio_kvm_device_add_group(VFIOGroup *group)
};
if (kvm_vm_ioctl(kvm_state, KVM_CREATE_DEVICE, &cd)) {
- error_report("Failed to create KVM VFIO device: %m\n");
+ error_report("Failed to create KVM VFIO device: %m");
return;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 19/47] xtensa: Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (17 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 18/47] vfio: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 20/47] tpm: " Michael Tokarev
` (27 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/xtensa/sim.c | 2 +-
hw/xtensa/xtfpga.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 37ea9ae..328d209 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -64,7 +64,7 @@ static void xtensa_sim_init(MachineState *machine)
for (n = 0; n < smp_cpus; n++) {
cpu = cpu_xtensa_init(cpu_model);
if (cpu == NULL) {
- error_report("unable to find CPU definition '%s'\n",
+ error_report("unable to find CPU definition '%s'",
cpu_model);
exit(EXIT_FAILURE);
}
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index e5a6bba..bb90eb2 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -190,7 +190,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
for (n = 0; n < smp_cpus; n++) {
cpu = cpu_xtensa_init(cpu_model);
if (cpu == NULL) {
- error_report("unable to find CPU definition '%s'\n",
+ error_report("unable to find CPU definition '%s'",
cpu_model);
exit(EXIT_FAILURE);
}
@@ -235,7 +235,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
board->flash_size / board->flash_sector_size,
4, 0x0000, 0x0000, 0x0000, 0x0000, be);
if (flash == NULL) {
- error_report("unable to mount pflash\n");
+ error_report("unable to mount pflash");
exit(EXIT_FAILURE);
}
}
@@ -287,7 +287,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
uint32_t dtb_addr = tswap32(cur_lowmem);
if (!fdt) {
- error_report("could not load DTB '%s'\n", dtb_filename);
+ error_report("could not load DTB '%s'", dtb_filename);
exit(EXIT_FAILURE);
}
@@ -307,7 +307,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
lowmem_end - cur_lowmem);
}
if (initrd_size < 0) {
- error_report("could not load initrd '%s'\n", initrd_filename);
+ error_report("could not load initrd '%s'", initrd_filename);
exit(EXIT_FAILURE);
}
initrd_location.start = tswap32(cur_lowmem);
@@ -333,7 +333,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
if (success > 0 && is_linux) {
entry_point = ep;
} else {
- error_report("could not load kernel '%s'\n",
+ error_report("could not load kernel '%s'",
kernel_filename);
exit(EXIT_FAILURE);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 20/47] tpm: Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (18 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 19/47] xtensa: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 21/47] arm/digic_boards: " Michael Tokarev
` (26 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/tpm/tpm_passthrough.c | 12 ++++++------
tpm.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 2bf3c6f..13ac1d2 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -126,7 +126,7 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
if (!tpm_pt->tpm_op_canceled ||
(tpm_pt->tpm_op_canceled && errno != ECANCELED)) {
error_report("tpm_passthrough: error while transmitting data "
- "to TPM: %s (%i)\n",
+ "to TPM: %s (%i)",
strerror(errno), errno);
}
goto err_exit;
@@ -139,14 +139,14 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
if (!tpm_pt->tpm_op_canceled ||
(tpm_pt->tpm_op_canceled && errno != ECANCELED)) {
error_report("tpm_passthrough: error while reading data from "
- "TPM: %s (%i)\n",
+ "TPM: %s (%i)",
strerror(errno), errno);
}
} else if (ret < sizeof(struct tpm_resp_hdr) ||
tpm_passthrough_get_size_from_buffer(out) != ret) {
ret = -1;
error_report("tpm_passthrough: received invalid response "
- "packet from TPM\n");
+ "packet from TPM");
}
err_exit:
@@ -282,7 +282,7 @@ static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
if (tpm_pt->cancel_fd >= 0) {
n = write(tpm_pt->cancel_fd, "-", 1);
if (n != 1) {
- error_report("Canceling TPM command failed: %s\n",
+ error_report("Canceling TPM command failed: %s",
strerror(errno));
} else {
tpm_pt->tpm_op_canceled = true;
@@ -413,13 +413,13 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
tpm_pt->tpm_fd = qemu_open(tpm_pt->tpm_dev, O_RDWR);
if (tpm_pt->tpm_fd < 0) {
- error_report("Cannot access TPM device using '%s': %s\n",
+ error_report("Cannot access TPM device using '%s': %s",
tpm_pt->tpm_dev, strerror(errno));
goto err_free_parameters;
}
if (tpm_passthrough_test_tpmdev(tpm_pt->tpm_fd)) {
- error_report("'%s' is not a TPM device.\n",
+ error_report("'%s' is not a TPM device.",
tpm_pt->tpm_dev);
goto err_close_tpmdev;
}
diff --git a/tpm.c b/tpm.c
index 4ffd9b9..963b7ee 100644
--- a/tpm.c
+++ b/tpm.c
@@ -134,7 +134,7 @@ static int configure_tpm(QemuOpts *opts)
Error *local_err = NULL;
if (!QLIST_EMPTY(&tpm_backends)) {
- error_report("Only one TPM is allowed.\n");
+ error_report("Only one TPM is allowed.");
return 1;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 21/47] arm/digic_boards: Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (19 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 20/47] tpm: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 22/47] vhost: " Michael Tokarev
` (25 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/arm/digic_boards.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index 2a4b872..7114c36 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -65,7 +65,7 @@ static void digic4_board_init(DigicBoard *board)
s->digic = DIGIC(object_new(TYPE_DIGIC));
object_property_set_bool(OBJECT(s->digic), true, "realized", &err);
if (err != NULL) {
- error_report("Couldn't realize DIGIC SoC: %s\n",
+ error_report("Couldn't realize DIGIC SoC: %s",
error_get_pretty(err));
exit(1);
}
@@ -104,13 +104,13 @@ static void digic_load_rom(DigicBoardState *s, hwaddr addr,
char *fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, filename);
if (!fn) {
- error_report("Couldn't find rom image '%s'.\n", filename);
+ error_report("Couldn't find rom image '%s'.", filename);
exit(1);
}
rom_size = load_image_targphys(fn, addr, max_size);
if (rom_size < 0 || rom_size > max_size) {
- error_report("Couldn't load rom image '%s'.\n", filename);
+ error_report("Couldn't load rom image '%s'.", filename);
exit(1);
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 22/47] vhost: Remove superfluous '\n' around error_report()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (20 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 21/47] arm/digic_boards: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 23/47] ui: Removed unused functions Michael Tokarev
` (24 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/virtio/vhost-backend.c | 2 +-
net/vhost-user.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index ff4f200..4d68a27 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -61,7 +61,7 @@ int vhost_set_backend_type(struct vhost_dev *dev, VhostBackendType backend_type)
dev->vhost_ops = &user_ops;
break;
default:
- error_report("Unknown vhost backend type\n");
+ error_report("Unknown vhost backend type");
r = -1;
}
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 24e050c..23babd6 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -122,12 +122,12 @@ static void net_vhost_user_event(void *opaque, int event)
case CHR_EVENT_OPENED:
vhost_user_start(s);
net_vhost_link_down(s, false);
- error_report("chardev \"%s\" went up\n", s->chr->label);
+ error_report("chardev \"%s\" went up", s->chr->label);
break;
case CHR_EVENT_CLOSED:
net_vhost_link_down(s, true);
vhost_user_stop(s);
- error_report("chardev \"%s\" went down\n", s->chr->label);
+ error_report("chardev \"%s\" went down", s->chr->label);
break;
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 23/47] ui: Removed unused functions
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (21 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 22/47] vhost: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 24/47] ui/vnc: Remove vnc_stop_worker_thread() Michael Tokarev
` (23 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Thomas Huth
From: Thomas Huth <thuth@linux.vnet.ibm.com>
Remove qemu_console_displaystate(), qemu_remove_kbd_event_handler(),
qemu_different_endianness_pixelformat() and cpkey(), since they are
completely unused.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/ui/console.h | 3 ---
ui/console.c | 12 ------------
ui/d3des.c | 9 ---------
ui/d3des.h | 6 ------
ui/input-legacy.c | 6 ------
5 files changed, 36 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index 0f97d86..6e5a867 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -36,7 +36,6 @@ typedef struct QEMUPutLEDEntry QEMUPutLEDEntry;
QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func,
void *opaque);
-void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry);
QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func,
void *opaque, int absolute,
const char *name);
@@ -194,7 +193,6 @@ DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
pixman_format_code_t format,
int linesize,
uint64_t addr);
-PixelFormat qemu_different_endianness_pixelformat(int bpp);
PixelFormat qemu_default_pixelformat(int bpp);
DisplaySurface *qemu_create_displaysurface(int width, int height);
@@ -322,7 +320,6 @@ void qemu_console_resize(QemuConsole *con, int width, int height);
void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
int dst_x, int dst_y, int w, int h);
DisplaySurface *qemu_console_surface(QemuConsole *con);
-DisplayState *qemu_console_displaystate(QemuConsole *console);
/* sdl.c */
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
diff --git a/ui/console.c b/ui/console.c
index 87574a7..87af6b5 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2005,18 +2005,6 @@ DisplaySurface *qemu_console_surface(QemuConsole *console)
return console->surface;
}
-DisplayState *qemu_console_displaystate(QemuConsole *console)
-{
- return console->ds;
-}
-
-PixelFormat qemu_different_endianness_pixelformat(int bpp)
-{
- pixman_format_code_t fmt = qemu_default_pixman_format(bpp, false);
- PixelFormat pf = qemu_pixelformat_from_pixman(fmt);
- return pf;
-}
-
PixelFormat qemu_default_pixelformat(int bpp)
{
pixman_format_code_t fmt = qemu_default_pixman_format(bpp, true);
diff --git a/ui/d3des.c b/ui/d3des.c
index 60c840e..5bc99b8 100644
--- a/ui/d3des.c
+++ b/ui/d3des.c
@@ -121,15 +121,6 @@ static void cookey(register unsigned long *raw1)
return;
}
-void cpkey(register unsigned long *into)
-{
- register unsigned long *from, *endp;
-
- from = KnL, endp = &KnL[32];
- while( from < endp ) *into++ = *from++;
- return;
- }
-
void usekey(register unsigned long *from)
{
register unsigned long *to, *endp;
diff --git a/ui/d3des.h b/ui/d3des.h
index 70cb6b5..773667e 100644
--- a/ui/d3des.h
+++ b/ui/d3des.h
@@ -36,12 +36,6 @@ void usekey(unsigned long *);
* Loads the internal key register with the data in cookedkey.
*/
-void cpkey(unsigned long *);
-/* cookedkey[32]
- * Copies the contents of the internal key register into the storage
- * located at &cookedkey[0].
- */
-
void des(unsigned char *, unsigned char *);
/* from[8] to[8]
* Encrypts/Decrypts (according to the key currently loaded in the
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index a698a34..2d4ca19 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -143,12 +143,6 @@ QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
return entry;
}
-void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry)
-{
- qemu_input_handler_unregister(entry->s);
- g_free(entry);
-}
-
static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 24/47] ui/vnc: Remove vnc_stop_worker_thread()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (22 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 23/47] ui: Removed unused functions Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 25/47] xen: Remove xen_cmos_set_s3_resume() Michael Tokarev
` (22 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Thomas Huth
From: Thomas Huth <thuth@linux.vnet.ibm.com>
This function is not used anymore, let's remove it.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
ui/vnc-jobs.c | 13 -------------
ui/vnc-jobs.h | 1 -
2 files changed, 14 deletions(-)
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index 68f3d77..c8ee203 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -342,16 +342,3 @@ void vnc_start_worker_thread(void)
QEMU_THREAD_DETACHED);
queue = q; /* Set global queue */
}
-
-void vnc_stop_worker_thread(void)
-{
- if (!vnc_worker_thread_running())
- return ;
-
- /* Remove all jobs and wake up the thread */
- vnc_lock_queue(queue);
- queue->exit = true;
- vnc_unlock_queue(queue);
- vnc_jobs_clear(NULL);
- qemu_cond_broadcast(&queue->cond);
-}
diff --git a/ui/vnc-jobs.h b/ui/vnc-jobs.h
index 31da103..044bf9f 100644
--- a/ui/vnc-jobs.h
+++ b/ui/vnc-jobs.h
@@ -40,7 +40,6 @@ void vnc_jobs_join(VncState *vs);
void vnc_jobs_consume_buffer(VncState *vs);
void vnc_start_worker_thread(void);
-void vnc_stop_worker_thread(void);
/* Locks */
static inline int vnc_trylock_display(VncDisplay *vd)
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 25/47] xen: Remove xen_cmos_set_s3_resume()
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (23 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 24/47] ui/vnc: Remove vnc_stop_worker_thread() Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 26/47] qapi-schema: Fix SpiceChannel docs Michael Tokarev
` (21 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Thomas Huth
From: Thomas Huth <thuth@linux.vnet.ibm.com>
The function is not used anymore, and thus can be deleted.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/hw/xen/xen.h | 1 -
xen-hvm-stub.c | 4 ----
2 files changed, 5 deletions(-)
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index b0ed04c..4356af4 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -32,7 +32,6 @@ int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
void xen_piix3_set_irq(void *opaque, int irq_num, int level);
void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len);
void xen_hvm_inject_msi(uint64_t addr, uint32_t data);
-void xen_cmos_set_s3_resume(void *opaque, int irq, int level);
qemu_irq *xen_interrupt_controller_init(void);
diff --git a/xen-hvm-stub.c b/xen-hvm-stub.c
index 2d98696..46867d8 100644
--- a/xen-hvm-stub.c
+++ b/xen-hvm-stub.c
@@ -30,10 +30,6 @@ void xen_hvm_inject_msi(uint64_t addr, uint32_t data)
{
}
-void xen_cmos_set_s3_resume(void *opaque, int irq, int level)
-{
-}
-
void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr)
{
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 26/47] qapi-schema: Fix SpiceChannel docs
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (24 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 25/47] xen: Remove xen_cmos_set_s3_resume() Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 27/47] qemu-char: add cyrillic characters 'numerosign' to VNC keysyms Michael Tokarev
` (20 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Cole Robinson
From: Cole Robinson <crobinso@redhat.com>
The value is called channel-type, not connection-type
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qapi-schema.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index e16f8eb..8141f71 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -871,9 +871,9 @@
# @connection-id: SPICE connection id number. All channels with the same id
# belong to the same SPICE session.
#
-# @connection-type: SPICE channel type number. "1" is the main control
-# channel, filter for this one if you want to track spice
-# sessions only
+# @channel-type: SPICE channel type number. "1" is the main control
+# channel, filter for this one if you want to track spice
+# sessions only
#
# @channel-id: SPICE channel ID number. Usually "0", might be different when
# multiple channels of the same type exist, such as multiple
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 27/47] qemu-char: add cyrillic characters 'numerosign' to VNC keysyms
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (25 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 26/47] qapi-schema: Fix SpiceChannel docs Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 28/47] qemu-char: add cyrillic key 'numerosign' to Russian keymap Michael Tokarev
` (19 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Wang Xin, Gonglei, Michael Tokarev
From: Wang Xin <wangxinxin.wang@huawei.com>
This patch adds missing cyrillic character 'numerosign' to the VNC
keysym table, it's needed by Russian keyboard. And I get the keysym from
'<X11/keysymdef.h>', the current keysym table in Qemu was generated from
it.
Signed-off-by: Wang xin <wangxinxin.wang@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
ui/vnc_keysym.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/vnc_keysym.h b/ui/vnc_keysym.h
index 1dc039f..7fa2bc1 100644
--- a/ui/vnc_keysym.h
+++ b/ui/vnc_keysym.h
@@ -404,6 +404,7 @@ static const name2keysym_t name2keysym[]={
{"breve", 0x01a2}, /* U+02D8 BREVE */
{"caron", 0x01b7}, /* U+02C7 CARON */
{"Ccaron", 0x01c8}, /* U+010C LATIN CAPITAL LETTER C WITH CARON */
+{"numerosign", 0x06b0}, /* U+2116 NUMERO SIGN */
{"Cyrillic_a", 0x06c1}, /* U+0430 CYRILLIC SMALL LETTER A */
{"Cyrillic_A", 0x06e1}, /* U+0410 CYRILLIC CAPITAL LETTER A */
{"Cyrillic_be", 0x06c2}, /* U+0431 CYRILLIC SMALL LETTER BE */
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 28/47] qemu-char: add cyrillic key 'numerosign' to Russian keymap
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (26 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 27/47] qemu-char: add cyrillic characters 'numerosign' to VNC keysyms Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 29/47] nbd: fix resource leak Michael Tokarev
` (18 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Wang Xin, Gonglei, Michael Tokarev
From: Wang Xin <wangxinxin.wang@huawei.com>
numero sign is the number sign key of Russian keyboard layout, we
get this key with 'shift + 3'. It's missing in current Russian keymap file,
this patch fixes it.
As number sign does not exsit in Russian keyboard layout[1][2], this
patch also removes the 'numbersign' from Russian keymap.
[1] http://en.wikipedia.org/wiki/Keyboard_layout#Russian
[2] http://kbd-intl.narod.ru/english/layouts
Signed-off-by: Wang Xin <wangxinxin.wang@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
pc-bios/keymaps/ru | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc-bios/keymaps/ru b/pc-bios/keymaps/ru
index b3e7d24..8f652d5 100644
--- a/pc-bios/keymaps/ru
+++ b/pc-bios/keymaps/ru
@@ -4,7 +4,7 @@ map 0x419
exclam 0x02 shift
at 0x03 shift
quotedbl 0x03 shift altgr
-numbersign 0x04 shift
+numerosign 0x04 shift
dollar 0x05 shift
asterisk 0x05 shift altgr
percent 0x06 shift
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 29/47] nbd: fix resource leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (27 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 28/47] qemu-char: add cyrillic key 'numerosign' to Russian keymap Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 30/47] sparc/leon3.c: fix memory leak Michael Tokarev
` (17 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
block/nbd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/nbd.c b/block/nbd.c
index 697c021..6634a69 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -274,6 +274,7 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags,
*/
sock = nbd_establish_connection(bs, errp);
if (sock < 0) {
+ g_free(export);
return sock;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 30/47] sparc/leon3.c: fix memory leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (28 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 29/47] nbd: fix resource leak Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 31/47] macio: fix possible " Michael Tokarev
` (16 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/sparc/leon3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 751392e..e41ec0b 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -186,6 +186,7 @@ static void leon3_generic_hw_init(MachineState *machine)
fprintf(stderr, "Can't read bios image %s\n", filename);
exit(1);
}
+ g_free(filename);
/* Can directly load an application. */
if (kernel_filename != NULL) {
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 31/47] macio: fix possible memory leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (29 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 30/47] sparc/leon3.c: fix memory leak Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 32/47] milkymist.c: fix " Michael Tokarev
` (15 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
If ret = macio_initfn_ide() is less than 0, the timer_memory
will leak the memory it points to.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/misc/macio/macio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index e0f1e88..bf96844 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -273,7 +273,7 @@ static int macio_newworld_initfn(PCIDevice *d)
MacIOState *s = MACIO(d);
NewWorldMacIOState *ns = NEWWORLD_MACIO(d);
SysBusDevice *sysbus_dev;
- MemoryRegion *timer_memory = g_new(MemoryRegion, 1);
+ MemoryRegion *timer_memory = NULL;
int i;
int cur_irq = 0;
int ret = macio_common_initfn(d);
@@ -301,6 +301,7 @@ static int macio_newworld_initfn(PCIDevice *d)
}
/* Timer */
+ timer_memory = g_new(MemoryRegion, 1);
memory_region_init_io(timer_memory, OBJECT(s), &timer_ops, NULL, "timer",
0x1000);
memory_region_add_subregion(&s->bar, 0x15000, timer_memory);
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 32/47] milkymist.c: fix memory leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (30 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 31/47] macio: fix possible " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 33/47] sysbus: " Michael Tokarev
` (14 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/lm32/milkymist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index 256c102..7f62261 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -155,6 +155,7 @@ milkymist_init(MachineState *machine)
bios_name);
exit(1);
}
+ g_free(bios_filename);
milkymist_uart_create(0x60000000, irq[0]);
milkymist_sysctl_create(0x60001000, irq[1], irq[2], irq[3],
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 33/47] sysbus: fix memory leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (31 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 32/47] milkymist.c: fix " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 34/47] microblaze: " Michael Tokarev
` (13 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/core/sysbus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 84af593..b53c351 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -91,6 +91,8 @@ bool sysbus_has_irq(SysBusDevice *dev, int n)
ObjectProperty *r;
r = object_property_find(OBJECT(dev), prop, NULL);
+ g_free(prop);
+
return (r != NULL);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 34/47] microblaze: fix memory leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (32 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 33/47] sysbus: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 35/47] gitignore: Track common.env in iotests gitignore Michael Tokarev
` (12 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev
From: Gonglei <arei.gonglei@huawei.com>
When not assign a -dtb argument, the variable dtb_filename
storage returned from qemu_find_file(), which should be freed
after using.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/microblaze/boot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index 38c59db..e3c1c51 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -205,5 +205,7 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
kernel_cmdline,
dtb_filename);
}
-
+ if (!dtb_arg) {
+ g_free(dtb_filename);
+ }
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 35/47] gitignore: Track common.env in iotests gitignore
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (33 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 34/47] microblaze: " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 36/47] gitignore: Ignore new tests Michael Tokarev
` (11 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Cole Robinson
From: Cole Robinson <crobinso@redhat.com>
Rather than track it in the toplevel gitignore
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
.gitignore | 1 -
tests/qemu-iotests/.gitignore | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 090f974..e32a584 100644
--- a/.gitignore
+++ b/.gitignore
@@ -109,4 +109,3 @@ cscope.*
tags
TAGS
*~
-/tests/qemu-iotests/common.env
diff --git a/tests/qemu-iotests/.gitignore b/tests/qemu-iotests/.gitignore
index 0541f80..0711cbd 100644
--- a/tests/qemu-iotests/.gitignore
+++ b/tests/qemu-iotests/.gitignore
@@ -1,5 +1,6 @@
check.log
check.time
+common.env
*.out.bad
*.notrun
socket_scm_helper
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 36/47] gitignore: Ignore new tests
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (34 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 35/47] gitignore: Track common.env in iotests gitignore Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 37/47] e500: fix memory leak Michael Tokarev
` (10 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Cole Robinson
From: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
tests/.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/.gitignore b/tests/.gitignore
index e2e4957..0dcb618 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,6 +5,7 @@ check-qjson
check-qlist
check-qstring
check-qom-interface
+rcutorture
test-aio
test-bitops
test-coroutine
@@ -26,6 +27,7 @@ test-qmp-input-strict
test-qmp-input-visitor
test-qmp-marshal.c
test-qmp-output-visitor
+test-rcu-list
test-rfifolock
test-string-input-visitor
test-string-output-visitor
@@ -33,6 +35,7 @@ test-thread-pool
test-throttle
test-visitor-serialization
test-vmstate
+test-write-threshold
test-x86-cpuid
test-xbzrle
*-test
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 37/47] e500: fix memory leak
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (35 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 36/47] gitignore: Ignore new tests Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 38/47] vhost_net: Add missing 'static' attribute Michael Tokarev
` (9 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
---
hw/ppc/e500.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 7e17d18..a8237a3 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -308,6 +308,7 @@ static int ppce500_load_device_tree(MachineState *machine,
}
fdt = load_device_tree(filename, &fdt_size);
+ g_free(filename);
if (!fdt) {
goto out;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 38/47] vhost_net: Add missing 'static' attribute
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (36 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 37/47] e500: fix memory leak Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 39/47] disas/arm: Fix warnings caused by " Michael Tokarev
` (8 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev
From: Stefan Weil <sw@weilnetz.de>
This fixes a warning from smatch.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/net/vhost_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 4e3a061..ebfb6db 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -56,7 +56,7 @@ static const int kernel_feature_bits[] = {
};
/* Features supported by others. */
-const int user_feature_bits[] = {
+static const int user_feature_bits[] = {
VIRTIO_F_NOTIFY_ON_EMPTY,
VIRTIO_RING_F_INDIRECT_DESC,
VIRTIO_RING_F_EVENT_IDX,
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 39/47] disas/arm: Fix warnings caused by missing 'static' attribute
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (37 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 38/47] vhost_net: Add missing 'static' attribute Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 40/47] disas/cris: Fix warning " Michael Tokarev
` (7 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev
From: Stefan Weil <sw@weilnetz.de>
Warnings from the Sparse static analysis tool:
disas/arm.c:1552:15: warning:
symbol 'last_type' was not declared. Should it be static?
disas/arm.c:1553:5: warning:
symbol 'last_mapping_sym' was not declared. Should it be static?
disas/arm.c:1554:9: warning:
symbol 'last_mapping_addr' was not declared. Should it be static?
Instead of adding 'static', the unused variables and the unused code which
refers to those variables (which was deactivated a long time ago in
commit 4b0f1a8b) are removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
disas/arm.c | 128 ------------------------------------------------------------
1 file changed, 128 deletions(-)
diff --git a/disas/arm.c b/disas/arm.c
index 76e97a8..6165246 100644
--- a/disas/arm.c
+++ b/disas/arm.c
@@ -1549,10 +1549,6 @@ enum map_type {
MAP_DATA
};
-enum map_type last_type;
-int last_mapping_sym = -1;
-bfd_vma last_mapping_addr = 0;
-
/* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
Returns pointer to following character of the format string and
fills in *VALUEP and *WIDTHP with the extracted value and number of
@@ -3878,135 +3874,11 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info)
int is_data = false;
unsigned int size = 4;
void (*printer) (bfd_vma, struct disassemble_info *, long);
-#if 0
- bfd_boolean found = false;
-
- if (info->disassembler_options)
- {
- parse_disassembler_options (info->disassembler_options);
-
- /* To avoid repeated parsing of these options, we remove them here. */
- info->disassembler_options = NULL;
- }
-
- /* First check the full symtab for a mapping symbol, even if there
- are no usable non-mapping symbols for this address. */
- if (info->symtab != NULL
- && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
- {
- bfd_vma addr;
- int n;
- int last_sym = -1;
- enum map_type type = MAP_ARM;
-
- if (pc <= last_mapping_addr)
- last_mapping_sym = -1;
- is_thumb = (last_type == MAP_THUMB);
- found = false;
- /* Start scanning at the start of the function, or wherever
- we finished last time. */
- n = info->symtab_pos + 1;
- if (n < last_mapping_sym)
- n = last_mapping_sym;
-
- /* Scan up to the location being disassembled. */
- for (; n < info->symtab_size; n++)
- {
- addr = bfd_asymbol_value (info->symtab[n]);
- if (addr > pc)
- break;
- if ((info->section == NULL
- || info->section == info->symtab[n]->section)
- && get_sym_code_type (info, n, &type))
- {
- last_sym = n;
- found = true;
- }
- }
-
- if (!found)
- {
- n = info->symtab_pos;
- if (n < last_mapping_sym - 1)
- n = last_mapping_sym - 1;
-
- /* No mapping symbol found at this address. Look backwards
- for a preceding one. */
- for (; n >= 0; n--)
- {
- if (get_sym_code_type (info, n, &type))
- {
- last_sym = n;
- found = true;
- break;
- }
- }
- }
-
- last_mapping_sym = last_sym;
- last_type = type;
- is_thumb = (last_type == MAP_THUMB);
- is_data = (last_type == MAP_DATA);
-
- /* Look a little bit ahead to see if we should print out
- two or four bytes of data. If there's a symbol,
- mapping or otherwise, after two bytes then don't
- print more. */
- if (is_data)
- {
- size = 4 - (pc & 3);
- for (n = last_sym + 1; n < info->symtab_size; n++)
- {
- addr = bfd_asymbol_value (info->symtab[n]);
- if (addr > pc)
- {
- if (addr - pc < size)
- size = addr - pc;
- break;
- }
- }
- /* If the next symbol is after three bytes, we need to
- print only part of the data, so that we can use either
- .byte or .short. */
- if (size == 3)
- size = (pc & 1) ? 1 : 2;
- }
- }
-
- if (info->symbols != NULL)
- {
- if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
- {
- coff_symbol_type * cs;
-
- cs = coffsymbol (*info->symbols);
- is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT
- || cs->native->u.syment.n_sclass == C_THUMBSTAT
- || cs->native->u.syment.n_sclass == C_THUMBLABEL
- || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
- || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
- }
- else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
- && !found)
- {
- /* If no mapping symbol has been found then fall back to the type
- of the function symbol. */
- elf_symbol_type * es;
- unsigned int type;
-
- es = *(elf_symbol_type **)(info->symbols);
- type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
-
- is_thumb = (type == STT_ARM_TFUNC) || (type == STT_ARM_16BIT);
- }
- }
-#else
int little;
little = (info->endian == BFD_ENDIAN_LITTLE);
is_thumb |= (pc & 1);
pc &= ~(bfd_vma)1;
-#endif
if (force_thumb)
is_thumb = true;
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 40/47] disas/cris: Fix warning caused by missing 'static' attribute
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (38 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 39/47] disas/arm: Fix warnings caused by " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 41/47] disas/microblaze: Fix warnings " Michael Tokarev
` (6 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev
From: Stefan Weil <sw@weilnetz.de>
Warning from the Sparse static analysis tool:
disas/cris.c:1218:26: warning:
symbol 'cris_cond15s' was not declared. Should it be static?
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
disas/cris.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/disas/cris.c b/disas/cris.c
index 9dfb4e3..a034dba 100644
--- a/disas/cris.c
+++ b/disas/cris.c
@@ -1215,7 +1215,7 @@ cris_cc_strings[] =
};
/* Different names and semantics for condition 1111 (0xf). */
-const struct cris_cond15 cris_cond15s[] =
+static const struct cris_cond15 cris_cond15s[] =
{
/* FIXME: In what version did condition "ext" disappear? */
{"ext", cris_ver_v0_3},
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 41/47] disas/microblaze: Fix warnings caused by missing 'static' attribute
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (39 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 40/47] disas/cris: Fix warning " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 42/47] oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code Michael Tokarev
` (5 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev
From: Stefan Weil <sw@weilnetz.de>
Warnings from the Sparse static analysis tool:
disas/microblaze.c:289:3: warning:
symbol 'opcodes' was not declared. Should it be static?
disas/microblaze.c:570:6: warning:
symbol 'register_prefix' was not declared. Should it be static?
disas/microblaze.c:571:6: warning:
symbol 'special_register_prefix' was not declared. Should it be static?
disas/microblaze.c:572:6: warning:
symbol 'fsl_register_prefix' was not declared. Should it be static?
disas/microblaze.c:573:6: warning:
symbol 'pvr_register_prefix' was not declared. Should it be static?
Remove the unused variable special_register_prefix.
The variable pvr_register_prefix was unused, too, but can be used.
Add also 'const' where possible.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
disas/microblaze.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/disas/microblaze.c b/disas/microblaze.c
index ec91af3..c14ab89 100644
--- a/disas/microblaze.c
+++ b/disas/microblaze.c
@@ -275,7 +275,7 @@ enum microblaze_instr_type {
#define MAX_OPCODES 280
-struct op_code_struct {
+static struct op_code_struct {
const char *name;
short inst_type; /* registers and immediate values involved */
short inst_offset_type; /* immediate vals offset from PC? (= 1 for branches) */
@@ -567,10 +567,9 @@ struct op_code_struct {
};
/* prefix for register names */
-char register_prefix[] = "r";
-char special_register_prefix[] = "spr";
-char fsl_register_prefix[] = "rfsl";
-char pvr_register_prefix[] = "rpvr";
+static const char register_prefix[] = "r";
+static const char fsl_register_prefix[] = "rfsl";
+static const char pvr_register_prefix[] = "rpvr";
/* #defines for valid immediate range */
@@ -738,7 +737,9 @@ get_field_special (long instr, struct op_code_struct * op)
default :
{
if ( ((((instr & IMM_MASK) >> IMM_LOW) ^ op->immval_mask) & 0xE000) == REG_PVR_MASK) {
- sprintf(tmpstr, "%spvr%d", register_prefix, (unsigned short)(((instr & IMM_MASK) >> IMM_LOW) ^ op->immval_mask) ^ REG_PVR_MASK);
+ sprintf(tmpstr, "%s%u", pvr_register_prefix,
+ (unsigned short)(((instr & IMM_MASK) >> IMM_LOW) ^
+ op->immval_mask) ^ REG_PVR_MASK);
return(strdup(tmpstr));
} else {
strcpy(spr, "pc");
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 42/47] oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (40 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 41/47] disas/microblaze: Fix warnings " Michael Tokarev
@ 2015-03-04 17:06 ` Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 43/47] migration: Fix coding style (whitespace issues) Michael Tokarev
` (4 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev
From: Stefan Weil <sw@weilnetz.de>
gcc reports this warning with -Wclobbered:
util/oslib-posix.c: In function ‘os_mem_prealloc’:
util/oslib-posix.c:374:49: error: argument ‘memory’ might be clobbered by
‘longjmp’ or ‘vfork’ [-Werror=clobbered]
Fix this and simplify the code by using an existing macro.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
util/oslib-posix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 16fcec2..37ffd96 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -399,10 +399,10 @@ void os_mem_prealloc(int fd, char *area, size_t memory)
} else {
int i;
size_t hpagesize = fd_getpagesize(fd);
+ size_t numpages = DIV_ROUND_UP(memory, hpagesize);
/* MAP_POPULATE silently ignores failures */
- memory = (memory + hpagesize - 1) & -hpagesize;
- for (i = 0; i < (memory / hpagesize); i++) {
+ for (i = 0; i < numpages; i++) {
memset(area + (hpagesize * i), 0, 1);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 43/47] migration: Fix coding style (whitespace issues)
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (41 preceding siblings ...)
2015-03-04 17:06 ` [Qemu-devel] [PULL 42/47] oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code Michael Tokarev
@ 2015-03-04 17:07 ` Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 44/47] fix GCC 5.0.0 logical-not-parentheses warnings Michael Tokarev
` (3 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:07 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev
From: Stefan Weil <sw@weilnetz.de>
* Remove trailing whitespace (fixes 9 errors from checkpatch.pl).
One comment line was longer than 80 characters, so wrap it
and fix a typo, too.
* Replace tabs by blanks (fixes 1 error).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
migration/rdma.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index a8c2407..1cb14c0 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -703,7 +703,7 @@ static void qemu_rdma_dump_id(const char *who, struct ibv_context *verbs)
verbs->device->ibdev_path,
port.link_layer,
(port.link_layer == IBV_LINK_LAYER_INFINIBAND) ? "Infiniband" :
- ((port.link_layer == IBV_LINK_LAYER_ETHERNET)
+ ((port.link_layer == IBV_LINK_LAYER_ETHERNET)
? "Ethernet" : "Unknown"));
}
@@ -738,7 +738,7 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
* and validate what time of hardware it is.
*
* Unfortunately, this puts the user in a fix:
- *
+ *
* If the source VM connects with an IPv4 address without knowing that the
* destination has bound to '[::]' the migration will unconditionally fail
* unless the management software is explicitly listening on the the IPv4
@@ -746,13 +746,13 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
*
* If the source VM connects with an IPv6 address, then we're OK because we can
* throw an error on the source (and similarly on the destination).
- *
+ *
* But in mixed environments, this will be broken for a while until it is fixed
* inside linux.
*
* We do provide a *tiny* bit of help in this function: We can list all of the
* devices in the system and check to see if all the devices are RoCE or
- * Infiniband.
+ * Infiniband.
*
* If we detect that we have a *pure* RoCE environment, then we can safely
* thrown an error even if the management software has specified '[::]' as the
@@ -771,17 +771,17 @@ static int qemu_rdma_broken_ipv6_kernel(Error **errp, struct ibv_context *verbs)
/* This bug only exists in linux, to our knowledge. */
#ifdef CONFIG_LINUX
- /*
+ /*
* Verbs are only NULL if management has bound to '[::]'.
- *
+ *
* Let's iterate through all the devices and see if there any pure IB
* devices (non-ethernet).
- *
+ *
* If not, then we can safely proceed with the migration.
* Otherwise, there are no guarantees until the bug is fixed in linux.
*/
if (!verbs) {
- int num_devices, x;
+ int num_devices, x;
struct ibv_device ** dev_list = ibv_get_device_list(&num_devices);
bool roce_found = false;
bool ib_found = false;
@@ -826,8 +826,8 @@ static int qemu_rdma_broken_ipv6_kernel(Error **errp, struct ibv_context *verbs)
/*
* If we have a verbs context, that means that some other than '[::]' was
- * used by the management software for binding. In which case we can actually
- * warn the user about a potential broken kernel;
+ * used by the management software for binding. In which case we can
+ * actually warn the user about a potentially broken kernel.
*/
/* IB ports start with 1, not 0 */
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 44/47] fix GCC 5.0.0 logical-not-parentheses warnings
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (42 preceding siblings ...)
2015-03-04 17:07 ` [Qemu-devel] [PULL 43/47] migration: Fix coding style (whitespace issues) Michael Tokarev
@ 2015-03-04 17:07 ` Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 45/47] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning Michael Tokarev
` (2 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:07 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Radim Krčmář
From: Radim Krčmář <rkrcmar@redhat.com>
man gcc:
Warn about logical not used on the left hand side operand of a
comparison. This option does not warn if the RHS operand is of a
boolean type.
By preferring bool over int where sensible, but without modifying any
depending code, make GCC happy in cases like this,
qemu-img.c: In function ‘compare_sectors’:
qemu-img.c:992:39: error: logical not is only applied to the left hand
side of comparison [-Werror=logical-not-parentheses]
if (!!memcmp(buf1, buf2, 512) != res) {
hw/ide/core.c:1836 doesn't throw an error,
assert(!!s->error == !!(s->status & ERR_STAT));
even thought the second operand is int (and first hunk of this patch has
a very similar case), maybe GCC developers still have a little faith in
C programmers.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/net/virtio-net.c | 4 ++--
kvm-all.c | 2 +-
qemu-img.c | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 45da34a..9381867 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -120,8 +120,8 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
return;
}
- if (!!n->vhost_started ==
- (virtio_net_started(n, status) && !nc->peer->link_down)) {
+ if ((virtio_net_started(n, status) && !nc->peer->link_down) ==
+ !!n->vhost_started) {
return;
}
if (!n->vhost_started) {
diff --git a/kvm-all.c b/kvm-all.c
index 05a79c2..07ef62c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -366,7 +366,7 @@ static void kvm_log_stop(MemoryListener *listener,
}
}
-static int kvm_set_migration_log(int enable)
+static int kvm_set_migration_log(bool enable)
{
KVMState *s = kvm_state;
KVMSlot *mem;
diff --git a/qemu-img.c b/qemu-img.c
index 6d17755..5af6f45 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -976,7 +976,8 @@ static int is_allocated_sectors_min(const uint8_t *buf, int n, int *pnum,
static int compare_sectors(const uint8_t *buf1, const uint8_t *buf2, int n,
int *pnum)
{
- int res, i;
+ bool res;
+ int i;
if (n <= 0) {
*pnum = 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 45/47] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (43 preceding siblings ...)
2015-03-04 17:07 ` [Qemu-devel] [PULL 44/47] fix GCC 5.0.0 logical-not-parentheses warnings Michael Tokarev
@ 2015-03-04 17:07 ` Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 46/47] gdbstub: avoid possible NULL pointer dereference Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 47/47] 9pfs: remove useless return Michael Tokarev
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:07 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Radim Krčmář
From: Radim Krčmář <rkrcmar@redhat.com>
man gcc:
Warn if in a loop with constant number of iterations the compiler
detects undefined behavior in some statement during one or more of
the iterations.
Milkymist pfpu has no jump instructions, so checking for MICROCODE_WORDS
instructions should have kept us in bounds of s->microcode, but i++
allowed one loop too many,
hw/misc/milkymist-pfpu.c: In function ‘pfpu_write’:
hw/misc/milkymist-pfpu.c:365:20: error: loop exit may only be reached after undefined behavior [-Werror=aggressive-loop-optimizations]
if (i++ >= MICROCODE_WORDS) {
^
hw/misc/milkymist-pfpu.c:167:14: note: possible undefined statement is here
uint32_t insn = s->microcode[pc];
^
The code can still access out of bounds, because it presumes that PC register
always begins at 0, and we allow writing to it.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/misc/milkymist-pfpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
index 609f33f..08b604f 100644
--- a/hw/misc/milkymist-pfpu.c
+++ b/hw/misc/milkymist-pfpu.c
@@ -362,7 +362,7 @@ static void pfpu_start(MilkymistPFPUState *s)
i = 0;
while (pfpu_decode_insn(s)) {
/* decode at most MICROCODE_WORDS instructions */
- if (i++ >= MICROCODE_WORDS) {
+ if (++i >= MICROCODE_WORDS) {
error_report("milkymist_pfpu: too many instructions "
"executed in microcode. No VECTOUT?");
break;
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 46/47] gdbstub: avoid possible NULL pointer dereference
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (44 preceding siblings ...)
2015-03-04 17:07 ` [Qemu-devel] [PULL 45/47] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning Michael Tokarev
@ 2015-03-04 17:07 ` Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 47/47] 9pfs: remove useless return Michael Tokarev
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:07 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev
From: Paolo Bonzini <pbonzini@redhat.com>
Coverity reports that s->chr is checked after put_packet dereferences it.
Move the check earlier, consistent with the code used for user-mode
emulation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
gdbstub.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gdbstub.c b/gdbstub.c
index e4a1a79..8abcb8a 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1443,15 +1443,17 @@ void gdb_exit(CPUArchState *env, int code)
if (gdbserver_fd < 0 || s->fd < 0) {
return;
}
+#else
+ if (!s->chr) {
+ return;
+ }
#endif
snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
put_packet(s, buf);
#ifndef CONFIG_USER_ONLY
- if (s->chr) {
- qemu_chr_delete(s->chr);
- }
+ qemu_chr_delete(s->chr);
#endif
}
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [Qemu-devel] [PULL 47/47] 9pfs: remove useless return
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
` (45 preceding siblings ...)
2015-03-04 17:07 ` [Qemu-devel] [PULL 46/47] gdbstub: avoid possible NULL pointer dereference Michael Tokarev
@ 2015-03-04 17:07 ` Michael Tokarev
46 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:07 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/9pfs/virtio-9p-local.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index a183eee..d05c917 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -332,7 +332,6 @@ static ssize_t local_readlink(FsContext *fs_ctx, V9fsPath *fs_path,
tsize = read(fd, (void *)buf, bufsz);
} while (tsize == -1 && errno == EINTR);
close(fd);
- return tsize;
} else if ((fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||
(fs_ctx->export_flags & V9FS_SM_NONE)) {
buffer = rpath(fs_ctx, path);
--
2.1.4
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [Qemu-devel] [PULL 06/47] migration/rdma: clean up qemu_rdma_dest_init a bit
2015-03-04 17:06 ` [Qemu-devel] [PULL 06/47] migration/rdma: clean up qemu_rdma_dest_init a bit Michael Tokarev
@ 2015-03-04 17:11 ` Michael Tokarev
0 siblings, 0 replies; 49+ messages in thread
From: Michael Tokarev @ 2015-03-04 17:11 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Amit Shah, Juan Quintela
I'm terrible sorry for this -- I forgot to remove this patch
from the trivial-patches queue. Should I re-do the pull
request?
04.03.2015 20:06, Michael Tokarev wrote:
> Do not check for rdma->host being empty twice. This removes a large
> "if" block, so code indentation is changed. While at it, remove an
> ugly goto from the loop, replacing it with a cleaner if logic. And
> finally, there's no need to initialize `ret' variable since is always
> has a value.
>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/rdma.c | 51 ++++++++++++++++++++++-----------------------------
> 1 file changed, 22 insertions(+), 29 deletions(-)
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 6bee30c..a7bca91 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -2366,10 +2366,10 @@ err_rdma_source_connect:
>
> static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
> {
> - int ret = -EINVAL, idx;
> + int ret, idx;
> struct rdma_cm_id *listen_id;
> char ip[40] = "unknown";
> - struct rdma_addrinfo *res;
> + struct rdma_addrinfo *res, *e;
> char port_str[16];
>
> for (idx = 0; idx < RDMA_WRID_MAX; idx++) {
> @@ -2377,7 +2377,7 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
> rdma->wr_data[idx].control_curr = NULL;
> }
>
> - if (rdma->host == NULL) {
> + if (!rdma->host || !rdma->host[0]) {
> ERROR(errp, "RDMA host is not set!");
> rdma->error_state = -EINVAL;
> return -1;
> @@ -2400,40 +2400,33 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
> snprintf(port_str, 16, "%d", rdma->port);
> port_str[15] = '\0';
>
> - if (rdma->host && strcmp("", rdma->host)) {
> - struct rdma_addrinfo *e;
> + ret = rdma_getaddrinfo(rdma->host, port_str, NULL, &res);
> + if (ret < 0) {
> + ERROR(errp, "could not rdma_getaddrinfo address %s", rdma->host);
> + goto err_dest_init_bind_addr;
> + }
>
> - ret = rdma_getaddrinfo(rdma->host, port_str, NULL, &res);
> - if (ret < 0) {
> - ERROR(errp, "could not rdma_getaddrinfo address %s", rdma->host);
> - goto err_dest_init_bind_addr;
> + for (e = res; e != NULL; e = e->ai_next) {
> + inet_ntop(e->ai_family,
> + &((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof ip);
> + trace_qemu_rdma_dest_init_trying(rdma->host, ip);
> + ret = rdma_bind_addr(listen_id, e->ai_dst_addr);
> + if (ret) {
> + continue;
> }
> -
> - for (e = res; e != NULL; e = e->ai_next) {
> - inet_ntop(e->ai_family,
> - &((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof ip);
> - trace_qemu_rdma_dest_init_trying(rdma->host, ip);
> - ret = rdma_bind_addr(listen_id, e->ai_dst_addr);
> - if (!ret) {
> - if (e->ai_family == AF_INET6) {
> - ret = qemu_rdma_broken_ipv6_kernel(errp, listen_id->verbs);
> - if (ret) {
> - continue;
> - }
> - }
> -
> - goto listen;
> + if (e->ai_family == AF_INET6) {
> + ret = qemu_rdma_broken_ipv6_kernel(errp, listen_id->verbs);
> + if (ret) {
> + continue;
> }
> }
> + break;
> + }
>
> + if (!e) {
> ERROR(errp, "Error: could not rdma_bind_addr!");
> goto err_dest_init_bind_addr;
> - } else {
> - ERROR(errp, "migration host and port not specified!");
> - ret = -EINVAL;
> - goto err_dest_init_bind_addr;
> }
> -listen:
>
> rdma->listen_id = listen_id;
> qemu_rdma_dump_gid("dest_init", listen_id);
>
^ permalink raw reply [flat|nested] 49+ messages in thread
end of thread, other threads:[~2015-03-04 23:06 UTC | newest]
Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 17:06 [Qemu-devel] [PULL 00/47] Trivial patches for 2015-03-04 Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 01/47] xen-pt: fix Negative array index read Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 02/47] xen-pt: fix Out-of-bounds read Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 03/47] xilinx_ethlite: Clean up after commit 2f991ad Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 04/47] memsave: Improve and disambiguate error message Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 05/47] smbios: document cmdline options for smbios type 2-4, 17 structures Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 06/47] migration/rdma: clean up qemu_rdma_dest_init a bit Michael Tokarev
2015-03-04 17:11 ` Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 07/47] qemu-options: fix/document -incoming options Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 08/47] cutils: refine strtol error handling in parse_debug_env Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 09/47] Add copyright and author after file split Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 10/47] qerror.h: Swap definitions that were not in alphabetical order Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 11/47] qmp-commands.hx: Fix several typos Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 12/47] block: remove superfluous '\n' around error_report/error_setg Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 13/47] a9gtimer: remove superfluous '\n' around error_setg Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 14/47] pl330.c: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 15/47] numa: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 16/47] Remove superfluous '\n' around error_report() Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 17/47] vhost-scsi: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 18/47] vfio: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 19/47] xtensa: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 20/47] tpm: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 21/47] arm/digic_boards: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 22/47] vhost: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 23/47] ui: Removed unused functions Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 24/47] ui/vnc: Remove vnc_stop_worker_thread() Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 25/47] xen: Remove xen_cmos_set_s3_resume() Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 26/47] qapi-schema: Fix SpiceChannel docs Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 27/47] qemu-char: add cyrillic characters 'numerosign' to VNC keysyms Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 28/47] qemu-char: add cyrillic key 'numerosign' to Russian keymap Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 29/47] nbd: fix resource leak Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 30/47] sparc/leon3.c: fix memory leak Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 31/47] macio: fix possible " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 32/47] milkymist.c: fix " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 33/47] sysbus: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 34/47] microblaze: " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 35/47] gitignore: Track common.env in iotests gitignore Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 36/47] gitignore: Ignore new tests Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 37/47] e500: fix memory leak Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 38/47] vhost_net: Add missing 'static' attribute Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 39/47] disas/arm: Fix warnings caused by " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 40/47] disas/cris: Fix warning " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 41/47] disas/microblaze: Fix warnings " Michael Tokarev
2015-03-04 17:06 ` [Qemu-devel] [PULL 42/47] oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 43/47] migration: Fix coding style (whitespace issues) Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 44/47] fix GCC 5.0.0 logical-not-parentheses warnings Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 45/47] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 46/47] gdbstub: avoid possible NULL pointer dereference Michael Tokarev
2015-03-04 17:07 ` [Qemu-devel] [PULL 47/47] 9pfs: remove useless return Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).