qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11
@ 2014-11-11 14:46 Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 01/11] icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE Michael Tokarev
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev

Here's another week's trivial patches pull req, for 2.2 release.
There's nothing exciting in there, but some patches are worth to
mention.

  4/11: numa: make 'info numa' take into account hotplugged memory
    this one has been pinged several times, and the numa
    maintainer agreed to push it using other tree.  It can
    be considered a bugfix for `info numa' output (not taking
    some memory into account), and while somewhat large for
    -trivial, it is actually rather trivial

  5/11: gdbstub: Add a missing case of signal number translation in gdbstub
    a bugfix to allow gdb debugging

  7/11: coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
    this one is a bugfix discussed today

Please consider applying/pulling.

Thanks,

/mjt

The following changes since commit 7135781f65f1267a72bf554ee2b7bd605f9e59aa:

  Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2014-11-02' into staging (2014-11-03 14:55:17 +0000)

are available in the git repository at:

  git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2014-11-11

for you to fetch changes up to 705be728c0b5546da10d8ef4239a112d1616bb97:

  block: Fix comment for bdrv_co_get_block_status (2014-11-11 17:36:19 +0300)

----------------------------------------------------------------
trivial patches for 2014-11-11

----------------------------------------------------------------
Chen Fan (1):
      target-i386: cpu: keeping function parameters alignment on new line

Chen Gang (2):
      pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b'
      xen-hvm: Remove redundant variable 'xstate'

Fam Zheng (1):
      block: Fix comment for bdrv_co_get_block_status

Gonglei (2):
      qemu-doc.texi: fix typos in x509 examples
      sysbus: Correct SYSTEM_BUS(obj) defines

Martin Simmons (1):
      gdbstub: Add a missing case of signal number translation in gdbstub

Peter Wu (1):
      slirp/smbd: modify/set several parameters in generated smbd.conf

Willem Pinckaers (1):
      coroutine-sigaltstack: Change jmp_buf to sigjmp_buf

Zhu Guihua (1):
      icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE

zhanghailiang (1):
      numa: make 'info numa' take into account hotplugged memory

 block.c                          |    6 +++---
 coroutine-sigaltstack.c          |    2 +-
 gdbstub.c                        |    5 ++++-
 hw/cpu/icc_bus.c                 |    4 ++--
 include/block/block.h            |    4 +++-
 include/hw/sysbus.h              |    2 +-
 include/sysemu/sysemu.h          |    1 +
 monitor.c                        |    6 +++++-
 net/slirp.c                      |    9 ++++++++-
 numa.c                           |   38 ++++++++++++++++++++++++++++++++++++++
 pc-bios/petalogix-s3adsp1800.dtb |  Bin 8259 -> 8259 bytes
 qemu-doc.texi                    |    4 ++--
 target-i386/cpu.c                |    6 +++---
 xen-hvm.c                        |    3 +--
 14 files changed, 72 insertions(+), 18 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 01/11] icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 02/11] qemu-doc.texi: fix typos in x509 examples Michael Tokarev
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Zhu Guihua, Michael Tokarev

From: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>

Rename ICC_BRIGDE for better readability.

Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/cpu/icc_bus.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/cpu/icc_bus.c b/hw/cpu/icc_bus.c
index 9575fd6..6646ea2 100644
--- a/hw/cpu/icc_bus.c
+++ b/hw/cpu/icc_bus.c
@@ -73,11 +73,11 @@ typedef struct ICCBridgeState {
     MemoryRegion apic_container;
 } ICCBridgeState;
 
-#define ICC_BRIGDE(obj) OBJECT_CHECK(ICCBridgeState, (obj), TYPE_ICC_BRIDGE)
+#define ICC_BRIDGE(obj) OBJECT_CHECK(ICCBridgeState, (obj), TYPE_ICC_BRIDGE)
 
 static void icc_bridge_init(Object *obj)
 {
-    ICCBridgeState *s = ICC_BRIGDE(obj);
+    ICCBridgeState *s = ICC_BRIDGE(obj);
     SysBusDevice *sb = SYS_BUS_DEVICE(obj);
 
     qbus_create_inplace(&s->icc_bus, sizeof(s->icc_bus), TYPE_ICC_BUS,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 02/11] qemu-doc.texi: fix typos in x509 examples
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 01/11] icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 03/11] slirp/smbd: modify/set several parameters in generated smbd.conf Michael Tokarev
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 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>
---
 qemu-doc.texi |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-doc.texi b/qemu-doc.texi
index 9973090..ad418f8 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1631,7 +1631,7 @@ EOF
 # certtool --generate-certificate \
            --load-ca-certificate ca-cert.pem \
            --load-ca-privkey ca-key.pem \
-           --load-privkey server server-key.pem \
+           --load-privkey server-key.pem \
            --template server.info \
            --outfile server-cert.pem
 @end example
@@ -1654,7 +1654,7 @@ the secure CA private key:
 country = GB
 state = London
 locality = London
-organiazation = Name of your organization
+organization = Name of your organization
 cn = client.foo.example.com
 tls_www_client
 encryption_key
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 03/11] slirp/smbd: modify/set several parameters in generated smbd.conf
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 01/11] icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 02/11] qemu-doc.texi: fix typos in x509 examples Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 04/11] numa: make 'info numa' take into account hotplugged memory Michael Tokarev
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Jan Kiszka, Michael Tokarev, Peter Wu

From: Peter Wu <peter@lekensteyn.nl>

The file sharing module should not handle printers, so disable it.
The options 'load printers' and 'printing' have been available since the
beginning (May 1996, commit 0e8fd3398771da2f016d72830179507f3edda51b).
Option 'disable spoolss' is available since Samba 2.0.4, commit
de5f42c9d9172592779fa2504d44544e3b6b1c0d).

Next, "socket address" was reported as deprecated, use a combination of
"interfaces" and "bind interfaces only" instead (available since October
1997, commit 79f4fb52c1ed56fd843f81b4eb0cdd2991d4d0f4).

Override cache directory to avoid writing to a global directory. Option
available since Samba 3.4.0, Jan 2009, commit
19a05bf2f485023b11b41dfae3f6459847d55ef7.

Set "usershare max shared=0" to prevent a global directory from being
used. Option available since Samba 3.0.23, February 2006, commit
5831715049f2d460ce42299963a5defdc160891b.

The last option was introduced with Samba 3.4.0, but previously
"state directory" was already added which exists in Samba 3.4.0. As
unknown parameters are ignored (while printing a warning), it should be
safe to add another option.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 net/slirp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/net/slirp.c b/net/slirp.c
index 920af30..dc89e6b 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -523,15 +523,21 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
     fprintf(f,
             "[global]\n"
             "private dir=%s\n"
-            "socket address=127.0.0.1\n"
+            "interfaces=127.0.0.1\n"
+            "bind interfaces only=yes\n"
             "pid directory=%s\n"
             "lock directory=%s\n"
             "state directory=%s\n"
+            "cache directory=%s\n"
             "ncalrpc dir=%s/ncalrpc\n"
             "log file=%s/log.smbd\n"
             "smb passwd file=%s/smbpasswd\n"
             "security = user\n"
             "map to guest = Bad User\n"
+            "load printers = no\n"
+            "printing = bsd\n"
+            "disable spoolss = yes\n"
+            "usershare max shares = 0\n"
             "[qemu]\n"
             "path=%s\n"
             "read only=no\n"
@@ -544,6 +550,7 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
             s->smb_dir,
             s->smb_dir,
             s->smb_dir,
+            s->smb_dir,
             exported_dir,
             passwd->pw_name
             );
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 04/11] numa: make 'info numa' take into account hotplugged memory
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (2 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 03/11] slirp/smbd: modify/set several parameters in generated smbd.conf Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 05/11] gdbstub: Add a missing case of signal number translation in gdbstub Michael Tokarev
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, zhanghailiang

From: zhanghailiang <zhang.zhanghailiang@huawei.com>

When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.

It affects the result of hmp command "info numa".

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/sysemu/sysemu.h |    1 +
 monitor.c               |    6 +++++-
 numa.c                  |   38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 0037a69..50de1d3 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -161,6 +161,7 @@ typedef struct node_info {
 extern NodeInfo numa_info[MAX_NODES];
 void set_numa_nodes(void);
 void set_numa_modes(void);
+void query_numa_node_mem(uint64_t node_mem[]);
 extern QemuOptsList qemu_numa_opts;
 int numa_init_func(QemuOpts *opts, void *opaque);
 
diff --git a/monitor.c b/monitor.c
index 1fc201a..32db7ee 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1948,7 +1948,10 @@ static void do_info_numa(Monitor *mon, const QDict *qdict)
 {
     int i;
     CPUState *cpu;
+    uint64_t *node_mem;
 
+    node_mem = g_new0(uint64_t, nb_numa_nodes);
+    query_numa_node_mem(node_mem);
     monitor_printf(mon, "%d nodes\n", nb_numa_nodes);
     for (i = 0; i < nb_numa_nodes; i++) {
         monitor_printf(mon, "node %d cpus:", i);
@@ -1959,8 +1962,9 @@ static void do_info_numa(Monitor *mon, const QDict *qdict)
         }
         monitor_printf(mon, "\n");
         monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i,
-            numa_info[i].node_mem >> 20);
+                       node_mem[i] >> 20);
     }
+    g_free(node_mem);
 }
 
 #ifdef CONFIG_PROFILER
diff --git a/numa.c b/numa.c
index 3b98135..afd2866 100644
--- a/numa.c
+++ b/numa.c
@@ -35,6 +35,7 @@
 #include "hw/boards.h"
 #include "sysemu/hostmem.h"
 #include "qmp-commands.h"
+#include "hw/mem/pc-dimm.h"
 
 QemuOptsList qemu_numa_opts = {
     .name = "numa",
@@ -315,6 +316,43 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
     }
 }
 
+static void numa_stat_memory_devices(uint64_t node_mem[])
+{
+    MemoryDeviceInfoList *info_list = NULL;
+    MemoryDeviceInfoList **prev = &info_list;
+    MemoryDeviceInfoList *info;
+
+    qmp_pc_dimm_device_list(qdev_get_machine(), &prev);
+    for (info = info_list; info; info = info->next) {
+        MemoryDeviceInfo *value = info->value;
+
+        if (value) {
+            switch (value->kind) {
+            case MEMORY_DEVICE_INFO_KIND_DIMM:
+                node_mem[value->dimm->node] += value->dimm->size;
+                break;
+            default:
+                break;
+            }
+        }
+    }
+    qapi_free_MemoryDeviceInfoList(info_list);
+}
+
+void query_numa_node_mem(uint64_t node_mem[])
+{
+    int i;
+
+    if (nb_numa_nodes <= 0) {
+        return;
+    }
+
+    numa_stat_memory_devices(node_mem);
+    for (i = 0; i < nb_numa_nodes; i++) {
+        node_mem[i] += numa_info[i].node_mem;
+    }
+}
+
 static int query_memdev(Object *obj, void *opaque)
 {
     MemdevList **list = opaque;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 05/11] gdbstub: Add a missing case of signal number translation in gdbstub
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (3 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 04/11] numa: make 'info numa' take into account hotplugged memory Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 06/11] pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b' Michael Tokarev
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Martin Simmons, Michael Tokarev

From: Martin Simmons <martin@lispworks.com>

While using qemu with gdb "target remote" to debug an application that uses
fork and exec, the qemu process receives SIGSTOP every time the forked process
terminates (sending SIGCHLD).

This is caused by a missing call to gdb_signal_to_target in gdbstub.c, which
is fixed by this patch:

Signed-off-by: Martin Simmons <martin@lispworks.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 gdbstub.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdbstub.c b/gdbstub.c
index d1b5afd..0faca56 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -823,7 +823,10 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
                 action = *p++;
                 signal = 0;
                 if (action == 'C' || action == 'S') {
-                    signal = strtoul(p, (char **)&p, 16);
+                    signal = gdb_signal_to_target(strtoul(p, (char **)&p, 16));
+                    if (signal == -1) {
+                        signal = 0;
+                    }
                 } else if (action != 'c' && action != 's') {
                     res = 0;
                     break;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 06/11] pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b'
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (4 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 05/11] gdbstub: Add a missing case of signal number translation in gdbstub Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 07/11] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf Michael Tokarev
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Chen Gang

From: Chen Gang <gang.chen.5i5j@gmail.com>

For Linux upstream kernel (e.g. 3.17-rc7), the related compatible string
'xlnx,xps-ethernetlite-2.00.a' is supported, but 'b' is not supported,
so change qemu dtb file to match kernel driver.

The related operation for qemu (after this patch):

   yum install libvirt
   yum install tunctl
   tunctl -b
   ip link set tap0 up
   brctl addif virbr0 tap0

   ./configure
   make
   ./microblaze-softmmu/qemu-system-microblaze -M petalogix-s3adsp1800 \
     -kernel ../linux-stable.microblaze/arch/microblaze/boot/linux.bin \
     -no-reboot -append "console=ttyUL0,115200 doreboot" -nographic \
     -net nic,vlan=0,model=xlnx.xps-ethernetlite,macaddr=00:16:35:AF:94:00 \
     -net tap,vlan=0,ifname=tap0,script=no,downscript=no

   in microblaze qemu bash (guest machine):

     ifconfig eth0 add 192.168.122.2 netmask 255.255.255.0
     ifconfig eth0 up

   Then can telnet 192.168.122.2 directly without password from the host
   machine.

The related operation for generating new dtb:

   building Linux kernel firstly, then get dts tool "./scripts/dts/dts".
   "./scripts/dtc/dtc -I dtb -O dts  -o ../work.dts ../qemu/petalogix-s3adsp1800.dtb"
   edit work.dts (replace 'xlnx,xps-ethernetlite-2.00.b')
   "./scripts/dtc/dtc -I dts -O dtb  -o ..qemu/petalogix-s3adsp1800.dtb ../work.dts"

(Since I am not quite sure whether can read this patch or not, I put the
related dtb file in attachment, please check, thanks).

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 pc-bios/petalogix-s3adsp1800.dtb |  Bin 8259 -> 8259 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/pc-bios/petalogix-s3adsp1800.dtb b/pc-bios/petalogix-s3adsp1800.dtb
index 93c5973fd81244268aace6e5e6006ad6fb4d6199..8ac80f2f2d191a8491b71182be50b3df2989551d 100644
GIT binary patch
delta 14
VcmX@?aM)pkI6GtFW(js}NdPEw1Wf<{

delta 14
VcmX@?aM)pkI6Gs~W(js}NdPE$1Wo_|

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 07/11] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (5 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 06/11] pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b' Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 08/11] xen-hvm: Remove redundant variable 'xstate' Michael Tokarev
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Willem Pinckaers, qemu-trivial, Michael Tokarev

From: Willem Pinckaers <willem_qemu@lekkertech.net>

This is a simple patch to change the type of old_env from jmp_buf
to sigjmp_buf.  old_env is used by sigsetjmp and as such should be
a sigjmp_buf.

This fixes a stack_chk fail in a OSX 32bit build. Since at least on
OSX sigjmp_buf is four bytes larger then a jmpbuf, resulting in an
overflow in sigsetjmp. Due to variable reordering this overwrites
the stack cookie.

Signed-off-by: Willem Pinckaers <willem_qemu@lekkertech.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Peter: I think I must have missed this one when I converted
       all the jmp_buf to sigjmp_buf in commit 6ab7e546.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 coroutine-sigaltstack.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 3de0bb3..63519ff 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -155,7 +155,7 @@ Coroutine *qemu_coroutine_new(void)
     stack_t oss;
     sigset_t sigs;
     sigset_t osigs;
-    jmp_buf old_env;
+    sigjmp_buf old_env;
 
     /* The way to manipulate stack is with the sigaltstack function. We
      * prepare a stack, with it delivering a signal to ourselves and then
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 08/11] xen-hvm: Remove redundant variable 'xstate'
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (6 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 07/11] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 09/11] target-i386: cpu: keeping function parameters alignment on new line Michael Tokarev
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Chen Gang

From: Chen Gang <gang.chen.5i5j@gmail.com>

In xen_hvm_change_state_handler(), we can pass 'opaque' with type cast
to xen_main_loop_prepare() directly, there's no need to use additional
variable for it.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 xen-hvm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen-hvm.c b/xen-hvm.c
index 21f1cbb..7548794 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -993,9 +993,8 @@ static void xen_main_loop_prepare(XenIOState *state)
 static void xen_hvm_change_state_handler(void *opaque, int running,
                                          RunState rstate)
 {
-    XenIOState *xstate = opaque;
     if (running) {
-        xen_main_loop_prepare(xstate);
+        xen_main_loop_prepare((XenIOState *)opaque);
     }
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 09/11] target-i386: cpu: keeping function parameters alignment on new line
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (7 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 08/11] xen-hvm: Remove redundant variable 'xstate' Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 10/11] sysbus: Correct SYSTEM_BUS(obj) defines Michael Tokarev
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Fan, qemu-trivial, Michael Tokarev

From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>

Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 target-i386/cpu.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index e4ccee1..236bbee 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -533,8 +533,8 @@ void host_cpuid(uint32_t function, uint32_t count,
  * otherwise the string is assumed to sized by a terminating nul.
  * Return lexical ordering of *s1:*s2.
  */
-static int sstrcmp(const char *s1, const char *e1, const char *s2,
-    const char *e2)
+static int sstrcmp(const char *s1, const char *e1,
+                   const char *s2, const char *e2)
 {
     for (;;) {
         if (!*s1 || !*s2 || *s1 != *s2)
@@ -1845,7 +1845,7 @@ static void x86_cpu_parse_featurestr(CPUState *cs, char *features,
  * if flags, suppress names undefined in featureset.
  */
 static void listflags(char *buf, int bufsize, uint32_t fbits,
-    const char **featureset, uint32_t flags)
+                      const char **featureset, uint32_t flags)
 {
     const char **p = &featureset[31];
     char *q, *b, bit;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 10/11] sysbus: Correct SYSTEM_BUS(obj) defines
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (8 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 09/11] target-i386: cpu: keeping function parameters alignment on new line Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 14:46 ` [Qemu-devel] [PULL 11/11] block: Fix comment for bdrv_co_get_block_status Michael Tokarev
  2014-11-11 16:03 ` [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Peter Maydell
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 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>
---
 include/hw/sysbus.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h
index 9fb1782..9bddfde 100644
--- a/include/hw/sysbus.h
+++ b/include/hw/sysbus.h
@@ -10,7 +10,7 @@
 #define QDEV_MAX_PIO 32
 
 #define TYPE_SYSTEM_BUS "System"
-#define SYSTEM_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS)
+#define SYSTEM_BUS(obj) OBJECT_CHECK(BusState, (obj), TYPE_SYSTEM_BUS)
 
 typedef struct SysBusDevice SysBusDevice;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL 11/11] block: Fix comment for bdrv_co_get_block_status
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (9 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 10/11] sysbus: Correct SYSTEM_BUS(obj) defines Michael Tokarev
@ 2014-11-11 14:46 ` Michael Tokarev
  2014-11-11 16:03 ` [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Peter Maydell
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Fam Zheng

From: Fam Zheng <famz@redhat.com>

It returns more information than binary, fix the comment.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 block.c               |    6 +++---
 include/block/block.h |    4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/block.c b/block.c
index 88f6d9b..5f5b244 100644
--- a/block.c
+++ b/block.c
@@ -3877,9 +3877,9 @@ typedef struct BdrvCoGetBlockStatusData {
 } BdrvCoGetBlockStatusData;
 
 /*
- * Returns true iff the specified sector is present in the disk image. Drivers
- * not implementing the functionality are assumed to not support backing files,
- * hence all their sectors are reported as allocated.
+ * Returns the allocation status of the specified sectors.
+ * Drivers not implementing the functionality are assumed to not support
+ * backing files, hence all their sectors are reported as allocated.
  *
  * If 'sector_num' is beyond the end of the disk image the return value is 0
  * and 'pnum' is set to 0.
diff --git a/include/block/block.h b/include/block/block.h
index 341054d..603d4b4 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -83,7 +83,9 @@ typedef enum {
 #define BDRV_SECTOR_SIZE   (1ULL << BDRV_SECTOR_BITS)
 #define BDRV_SECTOR_MASK   ~(BDRV_SECTOR_SIZE - 1)
 
-/* BDRV_BLOCK_DATA: data is read from bs->file or another file
+/*
+ * Allocation status flags
+ * BDRV_BLOCK_DATA: data is read from bs->file or another file
  * BDRV_BLOCK_ZERO: sectors read as zero
  * BDRV_BLOCK_OFFSET_VALID: sector stored in bs->file as raw data
  * BDRV_BLOCK_ALLOCATED: the content of the block is determined by this
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11
  2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
                   ` (10 preceding siblings ...)
  2014-11-11 14:46 ` [Qemu-devel] [PULL 11/11] block: Fix comment for bdrv_co_get_block_status Michael Tokarev
@ 2014-11-11 16:03 ` Peter Maydell
  11 siblings, 0 replies; 13+ messages in thread
From: Peter Maydell @ 2014-11-11 16:03 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: QEMU Trivial, QEMU Developers

On 11 November 2014 14:46, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Here's another week's trivial patches pull req, for 2.2 release.
> There's nothing exciting in there, but some patches are worth to
> mention.
>
>   4/11: numa: make 'info numa' take into account hotplugged memory
>     this one has been pinged several times, and the numa
>     maintainer agreed to push it using other tree.  It can
>     be considered a bugfix for `info numa' output (not taking
>     some memory into account), and while somewhat large for
>     -trivial, it is actually rather trivial
>
>   5/11: gdbstub: Add a missing case of signal number translation in gdbstub
>     a bugfix to allow gdb debugging
>
>   7/11: coroutine-sigaltstack: Change jmp_buf to sigjmp_buf
>     this one is a bugfix discussed today
>
> Please consider applying/pulling.
>
> Thanks,
>
> /mjt
>
> The following changes since commit 7135781f65f1267a72bf554ee2b7bd605f9e59aa:
>
>   Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2014-11-02' into staging (2014-11-03 14:55:17 +0000)
>
> are available in the git repository at:
>
>   git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2014-11-11
>
> for you to fetch changes up to 705be728c0b5546da10d8ef4239a112d1616bb97:
>
>   block: Fix comment for bdrv_co_get_block_status (2014-11-11 17:36:19 +0300)
>
> ----------------------------------------------------------------
> trivial patches for 2014-11-11
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-11-11 16:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11 14:46 [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 01/11] icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 02/11] qemu-doc.texi: fix typos in x509 examples Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 03/11] slirp/smbd: modify/set several parameters in generated smbd.conf Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 04/11] numa: make 'info numa' take into account hotplugged memory Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 05/11] gdbstub: Add a missing case of signal number translation in gdbstub Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 06/11] pc-bios: petalogix-s3adsp1800.dtb: Use 'xlnx, xps-ethernetlite-2.00.a' instead of 'xlnx, xps-ethernetlite-2.00.b' Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 07/11] coroutine-sigaltstack: Change jmp_buf to sigjmp_buf Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 08/11] xen-hvm: Remove redundant variable 'xstate' Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 09/11] target-i386: cpu: keeping function parameters alignment on new line Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 10/11] sysbus: Correct SYSTEM_BUS(obj) defines Michael Tokarev
2014-11-11 14:46 ` [Qemu-devel] [PULL 11/11] block: Fix comment for bdrv_co_get_block_status Michael Tokarev
2014-11-11 16:03 ` [Qemu-devel] [PULL 00/11 for-2.2] Trivial patches for 2014-11-11 Peter Maydell

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).