Skip to contentSkip to conversation

Misc patches for 2017-08-08

GIT PULL Applied Paolo Bonzini 2 participants 11 messages Aug 8, 2017

lore
Share & tools
lore
#0 lore raw

The following changes since commit c233a35d3d91af666aa95a6a3ba8244d4ce728c6:

Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170803' into staging (2017-08-04 13:03:58 +0100)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to f5048cb7517348a20ba202e435e1006a8f5001cf:

  maint: Include bug-reporting info in --help output (2017-08-08 17:28:53 +0200)

----------------------------------------------------------------
* --help/--version improvements (Eric)
* GCC 7 workaround (Greg)
* Small SCSI fix (Hannes)
* SSE 4.1 fix (Joseph)
* RCU deadlock fix (myself)

----------------------------------------------------------------
Eric Blake (4):

      qemu-img: Sort sub-command names in --help
      qemu-io: Give more --version information
      qga: Give more --version information
      maint: Include bug-reporting info in --help output

Greg Kurz (1):
kvm: workaround build break on gcc-7.1.1 / fedora26

Hannes Reinecke (1):
scsi: clarify sense codes for LUN0 emulation

Joseph Myers (1):
target/i386: set rip_offset for some SSE4.1 instructions

Paolo Bonzini (2):
rcu: completely disable pthread_atfork callbacks as soon as possible Revert "rcu: do not create thread in pthread_atfork callback"

 bsd-user/main.c         |  2 ++
 hw/scsi/scsi-bus.c      |  7 ++++++-
 include/qemu-common.h   |  5 +++++
 include/qemu/rcu.h      |  7 ++++++-
 include/sysemu/kvm.h    | 14 ++++----------
 linux-user/main.c       |  4 +++-
 linux-user/syscall.c    |  1 -
 os-posix.c              |  2 --
 qemu-img-cmds.hx        | 22 +++++++++++++---------
 qemu-img.c              |  2 +-
 qemu-io.c               |  9 ++++++---
 qemu-nbd.c              |  2 +-
 qga/main.c              |  8 +++++---
 target/i386/translate.c |  1 +
 util/rcu.c              | 30 +++++++++++++++++++++++++++---
 vl.c                    |  5 ++++-
 16 files changed, 84 insertions(+), 37 deletions(-)
Signature · 1 line
2.13.3
#1 lore raw

[Qemu-devel] [PULL 1/9] rcu: completely disable pthread_atfork callbacks as soon as possible

Because of -daemonize, system mode QEMU sometimes needs to fork() and keep RCU enabled in the child. However, there is a possible deadlock with synchronize_rcu:

- the CPU thread is inside a RCU critical section and wants to take the BQL in order to do MMIO

- the monitor thread, which is owning the BQL, calls rcu_init_lock which tries to take the rcu_sync_lock

- the call_rcu thread has taken rcu_sync_lock in synchronize_rcu, but synchronize_rcu needs the CPU thread to end the critical section before returning.

This cannot happen for user-mode emulation, because it does not have a BQL.

To fix it, assume that system mode QEMU only forks in preparation for exec (except when daemonizing) and disable pthread_atfork as soon as the double fork has happened.

---
 include/qemu/rcu.h |  6 ++++++
 util/rcu.c         | 20 ++++++++++++++++++++
 vl.c               |  1 +
 3 files changed, 27 insertions(+)
include/qemu/rcu.h +6 -0
index 83ae2808be..c0da9907e8 100644
@@ -105,6 +105,12 @@ extern void synchronize_rcu(void);
  */
 extern void rcu_register_thread(void);
 extern void rcu_unregister_thread(void);
+
+/*
+ * Support for fork().  fork() support is enabled at startup.
+ */
+extern void rcu_enable_atfork(void);
+extern void rcu_disable_atfork(void);
 extern void rcu_after_fork(void);
 
 struct rcu_head;
util/rcu.c +20 -0
index 9adc5e4a36..2142ddd93b 100644
@@ -318,15 +318,35 @@ static void rcu_init_complete(void)
     rcu_register_thread();
 }
 
+static int atfork_depth = 1;
+
+void rcu_enable_atfork(void)
+{
+    atfork_depth++;
+}
+
+void rcu_disable_atfork(void)
+{
+    atfork_depth--;
+}
+
 #ifdef CONFIG_POSIX
 static void rcu_init_lock(void)
 {
+    if (atfork_depth < 1) {
+        return;
+    }
+
     qemu_mutex_lock(&rcu_sync_lock);
     qemu_mutex_lock(&rcu_registry_lock);
 }
 
 static void rcu_init_unlock(void)
 {
+    if (atfork_depth < 1) {
+        return;
+    }
+
     qemu_mutex_unlock(&rcu_registry_lock);
     qemu_mutex_unlock(&rcu_sync_lock);
 }
vl.c +1 -0
index 99fcfa0442..8967115514 100644
@@ -4121,6 +4121,7 @@ int main(int argc, char **argv, char **envp)
     set_memory_options(&ram_slots, &maxram_size, machine_class);
 
     os_daemonize();
+    rcu_disable_atfork();
 
     if (pid_file && qemu_create_pidfile(pid_file) != 0) {
         error_report("could not acquire pid file: %s", strerror(errno));
Signature · 1 line
2.13.3
#2 lore raw

[Qemu-devel] [PULL 3/9] kvm: workaround build break on gcc-7.1.1 / fedora26

In reply to Paolo Bonzini

From: Greg Kurz <[email protected]>

Building QEMU on fedora26 with the latest gcc package fails:

CC ppc64-softmmu/target/ppc/kvm.o
In file included from include/sysemu/hw_accel.h:16:0,

                 from target/ppc/kvm.c:31:
target/ppc/kvm.c: In function ‘kvmppc_booke_watchdog_enable’:
include/sysemu/kvm.h:449:35: error: ‘args_tmp[i]’ may be used uninitialized
 in this function [-Werror=maybe-uninitialized]
             cap.args[i] = args_tmp[i];                               \
                                   ^

target/ppc/kvm.c: In function ‘kvmppc_set_papr’:
include/sysemu/kvm.h:449:35: error: ‘args_tmp[i]’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors

$ rpm -q gcc
gcc-7.1.1-3.fc26.ppc64le

The compiler should obviously optimize this code away when no extra agument is passed to kvm_vm_enable_cap() and kvm_vcpu_enable_cap(), but it doesn't. This bug should be fixed one day in gcc, but we can also change our code pattern so that we don't hit the issue anymore. We workaround this, by using memcpy() instead of open-coding the copy.

Message-Id: <[email protected]>

---
 include/sysemu/kvm.h | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
include/sysemu/kvm.h +4 -10
index 91fc07ee9a..3a458f50e9 100644
@@ -428,11 +428,8 @@ int kvm_vm_check_extension(KVMState *s, unsigned int extension);
             .flags = cap_flags,                                      \
         };                                                           \
         uint64_t args_tmp[] = { __VA_ARGS__ };                       \
-        int i;                                                       \
-        for (i = 0; i < (int)ARRAY_SIZE(args_tmp) &&                 \
-                     i < ARRAY_SIZE(cap.args); i++) {                \
-            cap.args[i] = args_tmp[i];                               \
-        }                                                            \
+        size_t n = MIN(ARRAY_SIZE(args_tmp), ARRAY_SIZE(cap.args));  \
+        memcpy(cap.args, args_tmp, n * sizeof(cap.args[0]));         \
         kvm_vm_ioctl(s, KVM_ENABLE_CAP, &cap);                       \
     })
 
@@ -443,11 +440,8 @@ int kvm_vm_check_extension(KVMState *s, unsigned int extension);
             .flags = cap_flags,                                      \
         };                                                           \
         uint64_t args_tmp[] = { __VA_ARGS__ };                       \
-        int i;                                                       \
-        for (i = 0; i < (int)ARRAY_SIZE(args_tmp) &&                 \
-                     i < ARRAY_SIZE(cap.args); i++) {                \
-            cap.args[i] = args_tmp[i];                               \
-        }                                                            \
+        size_t n = MIN(ARRAY_SIZE(args_tmp), ARRAY_SIZE(cap.args));  \
+        memcpy(cap.args, args_tmp, n * sizeof(cap.args[0]));         \
         kvm_vcpu_ioctl(cpu, KVM_ENABLE_CAP, &cap);                   \
     })
 
Signature · 1 line
2.13.3
#3 lore raw

[Qemu-devel] [PULL 2/9] Revert "rcu: do not create thread in pthread_atfork callback"

In reply to Paolo Bonzini

This reverts commit a59629fcc6f603e19b516dc08f75334e5c480bd0. This is not needed anymore because the IOThread mutex is not "magic" anymore (need not kick the CPU thread)and also because fork callbacks are only enabled at the very beginning of QEMU's execution.

---
 include/qemu/rcu.h   |  1 -
 linux-user/syscall.c |  1 -
 os-posix.c           |  2 --
 util/rcu.c           | 10 +++++++---
 4 files changed, 7 insertions(+), 7 deletions(-)
include/qemu/rcu.h +0 -1
index c0da9907e8..f19413d649 100644
@@ -111,7 +111,6 @@ extern void rcu_unregister_thread(void);
  */
 extern void rcu_enable_atfork(void);
 extern void rcu_disable_atfork(void);
-extern void rcu_after_fork(void);
 
 struct rcu_head;
 typedef void RCUCBFunc(struct rcu_head *head);
linux-user/syscall.c +0 -1
index 54343c06be..9b6364a266 100644
@@ -6354,7 +6354,6 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
         ret = fork();
         if (ret == 0) {
             /* Child Process.  */
-            rcu_after_fork();
             cpu_clone_regs(env, newsp);
             fork_end(1);
             /* There is a race condition here.  The parent process could
os-posix.c +0 -2
index c6ddb7d830..92e9d85215 100644
@@ -34,7 +34,6 @@
 #include "sysemu/sysemu.h"
 #include "net/slirp.h"
 #include "qemu-options.h"
-#include "qemu/rcu.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
 #include "qemu/cutils.h"
@@ -249,7 +248,6 @@ void os_daemonize(void)
         signal(SIGTSTP, SIG_IGN);
         signal(SIGTTOU, SIG_IGN);
         signal(SIGTTIN, SIG_IGN);
-        rcu_after_fork();
     }
 }
 
util/rcu.c +7 -3
index 2142ddd93b..ca5a63e36a 100644
@@ -350,18 +350,22 @@ static void rcu_init_unlock(void)
     qemu_mutex_unlock(&rcu_registry_lock);
     qemu_mutex_unlock(&rcu_sync_lock);
 }
-#endif
 
-void rcu_after_fork(void)
+static void rcu_init_child(void)
 {
+    if (atfork_depth < 1) {
+        return;
+    }
+
     memset(&registry, 0, sizeof(registry));
     rcu_init_complete();
 }
+#endif
 
 static void __attribute__((__constructor__)) rcu_init(void)
 {
 #ifdef CONFIG_POSIX
-    pthread_atfork(rcu_init_lock, rcu_init_unlock, rcu_init_unlock);
+    pthread_atfork(rcu_init_lock, rcu_init_unlock, rcu_init_child);
 #endif
     rcu_init_complete();
 }
Signature · 1 line
2.13.3
#4 lore raw

[Qemu-devel] [PULL 4/9] scsi: clarify sense codes for LUN0 emulation

In reply to Paolo Bonzini

From: Hannes Reinecke <[email protected]>

The LUN0 emulation is just that, an emulation for a non-existing LUN0. So we should be returning LUN_NOT_SUPPORTED for any request coming from any other LUN.
And we should be aborting unhandled commands with INVALID OPCODE, not LUN NOT SUPPORTED.

Message-Id: <[email protected]>

---
 hw/scsi/scsi-bus.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
hw/scsi/scsi-bus.c +6 -1
index 23c51de66a..e364410a23 100644
@@ -517,6 +517,11 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
 {
     SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);
 
+    if (req->lun != 0) {
+        scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED));
+        scsi_req_complete(req, CHECK_CONDITION);
+        return 0;
+    }
     switch (buf[0]) {
     case REPORT_LUNS:
         if (!scsi_target_emulate_report_luns(r)) {
@@ -542,7 +547,7 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
     case TEST_UNIT_READY:
         break;
     default:
-        scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED));
+        scsi_req_build_sense(req, SENSE_CODE(INVALID_OPCODE));
         scsi_req_complete(req, CHECK_CONDITION);
         return 0;
     illegal_request:
Signature · 1 line
2.13.3
#5 lore raw

[Qemu-devel] [PULL 5/9] target/i386: set rip_offset for some SSE4.1 instructions

In reply to Paolo Bonzini

From: Joseph Myers <[email protected]>

When emulating various SSE4.1 instructions such as pinsrd, the address of a memory operand is computed without allowing for the 8-bit immediate operand located after the memory operand, meaning that the memory operand uses the wrong address in the case where it is rip-relative. This patch adds the required rip_offset setting for those instructions, so fixing some GCC test failures (13 in the gcc testsuite in my GCC 6-based testing) when testing with a default CPU setting enabling those instructions.

Message-Id: <[email protected]>

---
 target/i386/translate.c | 1 +
 1 file changed, 1 insertion(+)
target/i386/translate.c +1 -0
index cab9e32f91..5fdadf98cf 100644
@@ -4080,6 +4080,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
             if (sse_fn_eppi == SSE_SPECIAL) {
                 ot = mo_64_32(s->dflag);
                 rm = (modrm & 7) | REX_B(s);
+                s->rip_offset = 1;
                 if (mod != 3)
                     gen_lea_modrm(env, s, modrm);
                 reg = ((modrm >> 3) & 7) | rex_r;
Signature · 1 line
2.13.3
#6 lore raw

[Qemu-devel] [PULL 6/9] qemu-img: Sort sub-command names in --help

In reply to Paolo Bonzini

From: Eric Blake <[email protected]>

'amend' and 'create' were not listed alphabetically; hoist them earlier. Separate the @end table block to make it easier to copy-and-paste the addition of future sub-commands.

Message-Id: <[email protected]>

---
 qemu-img-cmds.hx | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
qemu-img-cmds.hx +13 -9
index 3763f13625..b47d409665 100644
@@ -1,3 +1,4 @@
+HXCOMM Keep the list of subcommands sorted by name.
 HXCOMM Use DEFHEADING() to define headings in both help text and texi
 HXCOMM Text between STEXI and ETEXI are copied to texi version and
 HXCOMM discarded from C version
@@ -9,6 +10,12 @@ STEXI
 @table @option
 ETEXI
 
+DEF("amend", img_amend,
+    "amend [--object objectdef] [--image-opts] [-p] [-q] [-f fmt] [-t cache] -o options filename")
+STEXI
+@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{fmt}] [-t @var{cache}] -o @var{options} @var{filename}
+ETEXI
+
 DEF("bench", img_bench,
     "bench [-c count] [-d depth] [-f fmt] [--flush-interval=flush_interval] [-n] [--no-drain] [-o offset] [--pattern=pattern] [-q] [-s buffer_size] [-S step_size] [-t cache] [-w] [-U] filename")
 STEXI
@@ -21,12 +28,6 @@ STEXI
 @item check [--object @var{objectdef}] [--image-opts] [-q] [-f @var{fmt}] [--output=@var{ofmt}] [-r [leaks | all]] [-T @var{src_cache}] [-U] @var{filename}
 ETEXI
 
-DEF("create", img_create,
-    "create [-q] [--object objectdef] [-f fmt] [-b backing_file] [-F backing_fmt] [-u] [-o options] filename [size]")
-STEXI
-@item create [--object @var{objectdef}] [-q] [-f @var{fmt}] [-b @var{backing_file}] [-F @var{backing_fmt}] [-u] [-o @var{options}] @var{filename} [@var{size}]
-ETEXI
-
 DEF("commit", img_commit,
     "commit [-q] [--object objectdef] [--image-opts] [-f fmt] [-t cache] [-b base] [-d] [-p] filename")
 STEXI
@@ -45,6 +46,12 @@ STEXI
 @item convert [--object @var{objectdef}] [--image-opts] [--target-image-opts] [-U] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_cache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-s @var{snapshot_id_or_name}] [-l @var{snapshot_param}] [-S @var{sparse_size}] [-m @var{num_coroutines}] [-W] @var{filename} [@var{filename2} [...]] @var{output_filename}
 ETEXI
 
+DEF("create", img_create,
+    "create [-q] [--object objectdef] [-f fmt] [-b backing_file] [-F backing_fmt] [-u] [-o options] filename [size]")
+STEXI
+@item create [--object @var{objectdef}] [-q] [-f @var{fmt}] [-b @var{backing_file}] [-F @var{backing_fmt}] [-u] [-o @var{options}] @var{filename} [@var{size}]
+ETEXI
+
 DEF("dd", img_dd,
     "dd [--image-opts] [-U] [-f fmt] [-O output_fmt] [bs=block_size] [count=blocks] [skip=blocks] if=input of=output")
 STEXI
@@ -87,9 +94,6 @@ STEXI
 @item resize [--object @var{objectdef}] [--image-opts] [-q] @var{filename} [+ | -]@var{size}
 ETEXI
 
-DEF("amend", img_amend,
-    "amend [--object objectdef] [--image-opts] [-p] [-q] [-f fmt] [-t cache] -o options filename")
 STEXI
-@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{fmt}] [-t @var{cache}] -o @var{options} @var{filename}
 @end table
 ETEXI
Signature · 1 line
2.13.3
#7 lore raw

[Qemu-devel] [PULL 7/9] qemu-io: Give more --version information

In reply to Paolo Bonzini

From: Eric Blake <[email protected]>

Include the package version information (useful for detecting builds from git or downstream backports), and the copyright notice.

Message-Id: <[email protected]>

---
 qemu-io.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
qemu-io.c +3 -1
index 4cfa41c8f9..ec175630a6 100644
@@ -26,6 +26,7 @@
 #include "block/block_int.h"
 #include "trace/control.h"
 #include "crypto/init.h"
+#include "qemu-version.h"
 
 #define CMD_NOFILE_OK   0x01
 
@@ -522,7 +523,8 @@ int main(int argc, char **argv)
             trace_file = trace_opt_parse(optarg);
             break;
         case 'V':
-            printf("%s version %s\n", progname, QEMU_VERSION);
+            printf("%s version " QEMU_VERSION QEMU_PKGVERSION "\n"
+                   QEMU_COPYRIGHT "\n", progname);
             exit(0);
         case 'h':
             usage(progname);
Signature · 1 line
2.13.3
#8 lore raw

[Qemu-devel] [PULL 8/9] qga: Give more --version information

In reply to Paolo Bonzini

From: Eric Blake <[email protected]>

Include the package version information (useful for detecting builds from git or downstream backports), and the copyright notice.

Message-Id: <[email protected]>

---
 qga/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
qga/main.c +4 -2
index 1b381d0bf3..b64c7ac2a2 100644
@@ -29,6 +29,7 @@
 #include "qemu/help_option.h"
 #include "qemu/sockets.h"
 #include "qemu/systemd.h"
+#include "qemu-version.h"
 #ifdef _WIN32
 #include "qga/service-win32.h"
 #include "qga/vss-win32.h"
@@ -213,7 +214,8 @@ static void usage(const char *cmd)
 {
     printf(
 "Usage: %s [-m <method> -p <path>] [<options>]\n"
-"QEMU Guest Agent %s\n"
+"QEMU Guest Agent " QEMU_VERSION QEMU_PKGVERSION "\n"
+QEMU_COPYRIGHT "\n"
 "\n"
 "  -m, --method      transport method: one of unix-listen, virtio-serial,\n"
 "                    isa-serial, or vsock-listen (virtio-serial is the default)\n"
@@ -248,7 +250,7 @@ static void usage(const char *cmd)
 "  -h, --help        display this help and exit\n"
 "\n"
 "Report bugs to <[email protected]>\n"
-    , cmd, QEMU_VERSION, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT,
+    , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT,
     dfl_pathnames.pidfile,
 #ifdef CONFIG_FSFREEZE
     QGA_FSFREEZE_HOOK_DEFAULT,
Signature · 1 line
2.13.3
#9 lore raw

[Qemu-devel] [PULL 9/9] maint: Include bug-reporting info in --help output

In reply to Paolo Bonzini

From: Eric Blake <[email protected]>

These days, many programs are including a bug-reporting address, or better yet, a link to the project web site, at the tail of their --help output. However, we were not very consistent at doing so: only qemu-nbd and qemu-qa mentioned anything, with the latter pointing to an individual person instead of the project.

Add a new #define that sets up a uniform string, mentioning both bug reporting instructions and overall project details, and which a downstream vendor could tweak if they want bugs to go to a downstream database. Then use it in all of our binaries which have --help output.

The canned text intentionally references http:// instead of https://
because our https website currently causes certificate errors in some browsers. That can be tweaked later once we have resolved the web site issued.

Message-Id: <[email protected]>

---
 bsd-user/main.c       | 2 ++
 include/qemu-common.h | 5 +++++
 linux-user/main.c     | 4 +++-
 qemu-img.c            | 2 +-
 qemu-io.c             | 5 +++--
 qemu-nbd.c            | 2 +-
 qga/main.c            | 2 +-
 vl.c                  | 4 +++-
 8 files changed, 19 insertions(+), 7 deletions(-)
bsd-user/main.c +2 -0
index 501e16f675..8a6706a1c8 100644
@@ -686,6 +686,8 @@ static void usage(void)
            "    -E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG\n"
            "Note that if you provide several changes to single variable\n"
            "last change will stay in effect.\n"
+           "\n"
+           QEMU_HELP_BOTTOM "\n"
            ,
            TARGET_NAME,
            interp_prefix,
include/qemu-common.h +5 -0
index b5adbfa5e9..0456c79df4 100644
@@ -22,6 +22,11 @@
 #define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \
     "Fabrice Bellard and the QEMU Project developers"
 
+/* Bug reporting information for --help arguments, About dialogs, etc */
+#define QEMU_HELP_BOTTOM \
+    "See <http://qemu.org/contribute/report-a-bug> for how to report bugs.\n" \
+    "More information on the QEMU project at <http://qemu.org>."
+
 /* main function, renamed */
 #if defined(CONFIG_COCOA)
 int qemu_main(int argc, char **argv, char **envp);
linux-user/main.c +3 -1
index 2b38d39d87..03666ef657 100644
@@ -4136,7 +4136,9 @@ static void usage(int exitcode)
            "    -E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUG\n"
            "    QEMU_SET_ENV=var1=val2,var2=val2 QEMU_UNSET_ENV=LD_PRELOAD,LD_DEBUG\n"
            "Note that if you provide several changes to a single variable\n"
-           "the last change will stay in effect.\n");
+           "the last change will stay in effect.\n"
+           "\n"
+           QEMU_HELP_BOTTOM "\n");
 
     exit(exitcode);
 }
qemu-img.c +1 -1
index f4d5f0d77d..56ef49e214 100644
@@ -201,7 +201,7 @@ static void QEMU_NORETURN help(void)
 
     printf("%s\nSupported formats:", help_msg);
     bdrv_iterate_format(format_print, NULL);
-    printf("\n");
+    printf("\n\n" QEMU_HELP_BOTTOM "\n");
     exit(EXIT_SUCCESS);
 }
 
qemu-io.c +3 -2
index ec175630a6..265445ad89 100644
@@ -262,8 +262,9 @@ static void usage(const char *name)
 "  -h, --help           display this help and exit\n"
 "  -V, --version        output version information and exit\n"
 "\n"
-"See '%s -c help' for information on available commands."
-"\n",
+"See '%s -c help' for information on available commands.\n"
+"\n"
+QEMU_HELP_BOTTOM "\n",
     name, name);
 }
 
qemu-nbd.c +1 -1
index b8666bb575..27164b8205 100644
@@ -123,7 +123,7 @@ static void usage(const char *name)
 "      --detect-zeroes=MODE  set detect-zeroes mode (off, on, unmap)\n"
 "      --image-opts          treat FILE as a full set of image options\n"
 "\n"
-"Report bugs to <[email protected]>\n"
+QEMU_HELP_BOTTOM "\n"
     , name, NBD_DEFAULT_PORT, "DEVICE");
 }
 
qga/main.c +1 -1
index b64c7ac2a2..62a62755bd 100644
@@ -249,7 +249,7 @@ QEMU_COPYRIGHT "\n"
 "                    options / command-line parameters to stdout\n"
 "  -h, --help        display this help and exit\n"
 "\n"
-"Report bugs to <[email protected]>\n"
+QEMU_HELP_BOTTOM "\n"
     , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT,
     dfl_pathnames.pidfile,
 #ifdef CONFIG_FSFREEZE
vl.c +3 -1
index 8967115514..8e247cc2a2 100644
@@ -1942,7 +1942,9 @@ static void help(int exitcode)
            "ctrl-alt-n      switch to virtual console 'n'\n"
            "ctrl-alt        toggle mouse and keyboard grab\n"
            "\n"
-           "When using -nographic, press 'ctrl-a h' to get some help.\n");
+           "When using -nographic, press 'ctrl-a h' to get some help.\n"
+           "\n"
+           QEMU_HELP_BOTTOM "\n");
 
     exit(exitcode);
 }
Signature · 1 line
2.13.3
#10 lore raw
In reply to Paolo Bonzini
Quoted 10 lines · Paolo Bonzini

The following changes since commit c233a35d3d91af666aa95a6a3ba8244d4ce728c6:

Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170803' into staging (2017-08-04 13:03:58 +0100)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to f5048cb7517348a20ba202e435e1006a8f5001cf:

Quoted 9 lines
  maint: Include bug-reporting info in --help output (2017-08-08 17:28:53 +0200)

----------------------------------------------------------------
* --help/--version improvements (Eric)
* GCC 7 workaround (Greg)
* Small SCSI fix (Hannes)
* SSE 4.1 fix (Joseph)
* RCU deadlock fix (myself)

Applied, thanks.

-- PMM