Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 10 Oct 2016 12:01:43 +0000 (13:01 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 10 Oct 2016 12:01:43 +0000 (13:01 +0100)
trivial patches for 2016-10-08

# gpg: Signature made Sat 08 Oct 2016 09:56:38 BST
# gpg:                using RSA key 0x701B4F6B1A693E59
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* remotes/mjt/tags/trivial-patches-fetch: (26 commits)
  net/filter-mirror: Fix mirror initial check typo
  virtio: rename the bar index field name in VirtIOPCIProxy
  linux-user: include <poll.h> instead of <sys/poll.h>
  char: fix missing return in error path for chardev TLS init
  CODING_STYLE: Fix a typo ("have" vs. "has")
  bitmap: refine and move BITMAP_{FIRST/LAST}_WORD_MASK
  build-sys: fix find-in-path
  m68k: change default system clock for m5208evb
  exec: remove unused compacted argument
  usb: ehci: fix memory leak in ehci_process_itd
  qapi: make the json schema files more regular.
  maint: Add module_block.h to .gitignore
  MAINTAINERS: Some updates related to the SH4 machines
  MAINTAINERS: Add some more MIPS related files
  MAINTAINERS: Add usermode related config files
  MAINTAINERS: Add some more pattern to recognize all win32 related files
  MAINTAINERS: Add some more rocker related files
  MAINTAINERS: Add header files to CRIS section
  MAINTAINERS: Add some more files to the virtio section
  MAINTAINERS: Add some SPARC machine related files
  ...

# Conflicts:
# MAINTAINERS

1  2 
.gitignore
MAINTAINERS
linux-user/syscall.c
qemu-char.c

diff --combined .gitignore
@@@ -39,7 -39,9 +39,7 @@@
  /qmp-introspect.[ch]
  /qmp-marshal.c
  /qemu-doc.html
 -/qemu-tech.html
  /qemu-doc.info
 -/qemu-tech.info
  /qemu-img
  /qemu-nbd
  /qemu-options.def
@@@ -53,6 -55,7 +53,7 @@@
  /qemu-monitor-info.texi
  /qemu-version.h
  /qemu-version.h.tmp
+ /module_block.h
  /vscclient
  /fsdev/virtfs-proxy-helper
  *.[1-9]
diff --combined MAINTAINERS
@@@ -116,6 -116,7 +116,7 @@@ M: Edgar E. Iglesias <edgar.iglesias@gm
  S: Maintained
  F: target-cris/
  F: hw/cris/
+ F: include/hw/cris/
  F: tests/tcg/cris/
  F: disas/cris.c
  
@@@ -149,6 -150,13 +150,13 @@@ M: Yongbok Kim <yongbok.kim@imgtec.com
  S: Maintained
  F: target-mips/
  F: hw/mips/
+ F: hw/misc/mips_*
+ F: hw/intc/mips_gic.c
+ F: hw/timer/mips_gictimer.c
+ F: include/hw/mips/
+ F: include/hw/misc/mips_*
+ F: include/hw/intc/mips_gic.h
+ F: include/hw/timer/mips_gictimer.h
  F: tests/tcg/mips/
  F: disas/mips.c
  
@@@ -157,6 -165,8 +165,8 @@@ M: Anthony Green <green@moxielogic.com
  S: Maintained
  F: target-moxie/
  F: disas/moxie.c
+ F: hw/moxie/
+ F: default-configs/moxie-softmmu.mak
  
  OpenRISC
  M: Jia Liu <proljc@gmail.com>
@@@ -319,6 -329,9 +329,9 @@@ L: qemu-devel@nongnu.or
  M: Stefan Weil <sw@weilnetz.de>
  S: Maintained
  F: *win32*
+ F: */*win32*
+ F: include/*/*win32*
+ X: qga/*win32*
  F: qemu.nsi
  
  ARM Machines
@@@ -662,31 -675,38 +675,38 @@@ R2
  M: Magnus Damm <magnus.damm@gmail.com>
  S: Maintained
  F: hw/sh4/r2d.c
+ F: hw/intc/sh_intc.c
+ F: hw/timer/sh_timer.c
  
  Shix
  M: Magnus Damm <magnus.damm@gmail.com>
- S: Orphan
+ S: Odd Fixes
  F: hw/sh4/shix.c
  
  SPARC Machines
  --------------
  Sun4m
- M: Blue Swirl <blauwirbel@gmail.com>
  M: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  S: Maintained
  F: hw/sparc/sun4m.c
+ F: hw/dma/sparc32_dma.c
+ F: hw/dma/sun4m_iommu.c
+ F: include/hw/sparc/sparc32_dma.h
+ F: include/hw/sparc/sun4m.h
+ F: pc-bios/openbios-sparc32
  
  Sun4u
- M: Blue Swirl <blauwirbel@gmail.com>
  M: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  S: Maintained
  F: hw/sparc64/sun4u.c
+ F: pc-bios/openbios-sparc64
  
  Leon3
  M: Fabien Chouteau <chouteau@adacore.com>
  S: Maintained
  F: hw/sparc/leon3.c
  F: hw/*/grlib*
+ F: include/hw/sparc/grlib.h
  
  S390 Machines
  -------------
@@@ -926,6 -946,8 +946,8 @@@ virti
  M: Michael S. Tsirkin <mst@redhat.com>
  S: Supported
  F: hw/*/virtio*
+ F: hw/virtio/Makefile.objs
+ F: hw/virtio/trace-events
  F: net/vhost-user.c
  F: include/hw/virtio/
  F: tests/virtio-balloon-test.c
@@@ -1013,6 -1035,8 +1035,8 @@@ Rocke
  M: Jiri Pirko <jiri@resnulli.us>
  S: Maintained
  F: hw/net/rocker/
+ F: tests/rocker/
+ F: docs/specs/rocker.txt
  
  NVDIMM
  M: Xiao Guangrong <guangrong.xiao@linux.intel.com>
@@@ -1044,6 -1068,7 +1068,7 @@@ M: Gerd Hoffmann <kraxel@redhat.com
  S: Maintained
  F: audio/
  F: hw/audio/
+ F: include/hw/audio/
  F: tests/ac97-test.c
  F: tests/es1370-test.c
  F: tests/intel-hda-test.c
@@@ -1178,11 -1203,13 +1203,12 @@@ F: qemu-timer.
  F: vl.c
  
  Human Monitor (HMP)
 -M: Luiz Capitulino <lcapitulino@redhat.com>
 +M: Dr. David Alan Gilbert <dgilbert@redhat.com>
  S: Maintained
  F: monitor.c
- F: hmp.c
- F: hmp-commands.hx
+ F: hmp.[ch]
+ F: hmp-commands*.hx
+ F: include/monitor/hmp-target.h
 -T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
  
  Network device backends
  M: Jason Wang <jasowang@redhat.com>
@@@ -1247,8 -1274,8 +1273,8 @@@ F: qapi/*.jso
  T: git git://repo.or.cz/qemu/armbru.git qapi-next
  
  QObject
 -M: Luiz Capitulino <lcapitulino@redhat.com>
 -S: Maintained
 +M: Markus Armbruster <armbru@redhat.com>
 +S: Supported
  F: qobject/
  F: include/qapi/qmp/
  X: include/qapi/qmp/dispatch.h
@@@ -1258,7 -1285,7 +1284,7 @@@ F: tests/check-qint.
  F: tests/check-qjson.c
  F: tests/check-qlist.c
  F: tests/check-qstring.c
 -T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
 +T: git git://repo.or.cz/qemu/armbru.git qapi-next
  
  QEMU Guest Agent
  M: Michael Roth <mdroth@linux.vnet.ibm.com>
@@@ -1407,11 -1434,13 +1433,13 @@@ F: user-exec.
  BSD user
  S: Orphan
  F: bsd-user/
+ F: default-configs/*-bsd-user.mak
  
  Linux user
  M: Riku Voipio <riku.voipio@iki.fi>
  S: Maintained
  F: linux-user/
+ F: default-configs/*-linux-user.mak
  
  Tiny Code Generator (TCG)
  -------------------------
diff --combined linux-user/syscall.c
@@@ -42,7 -42,7 +42,7 @@@ int __clone2(int (*fn)(void *), void *c
  #include <sys/socket.h>
  #include <sys/un.h>
  #include <sys/uio.h>
- #include <sys/poll.h>
+ #include <poll.h>
  #include <sys/times.h>
  #include <sys/shm.h>
  #include <sys/sem.h>
@@@ -7476,16 -7476,13 +7476,16 @@@ abi_long do_syscall(void *cpu_env, int 
              break;
          }
  
 +        cpu_list_lock();
 +
          if (CPU_NEXT(first_cpu)) {
              TaskState *ts;
  
 -            cpu_list_lock();
              /* Remove the CPU from the list.  */
              QTAILQ_REMOVE(&cpus, cpu, node);
 +
              cpu_list_unlock();
 +
              ts = cpu->opaque;
              if (ts->child_tidptr) {
                  put_user_u32(0, ts->child_tidptr);
              rcu_unregister_thread();
              pthread_exit(NULL);
          }
 +
 +        cpu_list_unlock();
  #ifdef TARGET_GPROF
          _mcleanup();
  #endif
diff --combined qemu-char.c
@@@ -165,7 -165,6 +165,7 @@@ CharDriverState *qemu_chr_alloc(Chardev
      CharDriverState *chr = g_malloc0(sizeof(CharDriverState));
      qemu_mutex_init(&chr->chr_write_lock);
  
 +    chr->mux_idx = -1;
      if (backend->has_logfile) {
          int flags = O_WRONLY | O_CREAT;
          if (backend->has_logappend &&
@@@ -469,7 -468,7 +469,7 @@@ void qemu_chr_add_handlers_full(CharDri
      s->chr_read = fd_read;
      s->chr_event = fd_event;
      s->handler_opaque = opaque;
 -    if (fe_open && s->chr_update_read_handler) {
 +    if (s->chr_update_read_handler) {
          s->chr_update_read_handler(s, context);
      }
  
@@@ -739,25 -738,17 +739,25 @@@ static void mux_chr_update_read_handler
                                          GMainContext *context)
  {
      MuxDriver *d = chr->opaque;
 +    int idx;
  
      if (d->mux_cnt >= MAX_MUX) {
          fprintf(stderr, "Cannot add I/O handlers, MUX array is full\n");
          return;
      }
 -    d->ext_opaque[d->mux_cnt] = chr->handler_opaque;
 -    d->chr_can_read[d->mux_cnt] = chr->chr_can_read;
 -    d->chr_read[d->mux_cnt] = chr->chr_read;
 -    d->chr_event[d->mux_cnt] = chr->chr_event;
 +
 +    if (chr->mux_idx == -1) {
 +        chr->mux_idx = d->mux_cnt++;
 +    }
 +
 +    idx = chr->mux_idx;
 +    d->ext_opaque[idx] = chr->handler_opaque;
 +    d->chr_can_read[idx] = chr->chr_can_read;
 +    d->chr_read[idx] = chr->chr_read;
 +    d->chr_event[idx] = chr->chr_event;
 +
      /* Fix up the real driver with mux routines */
 -    if (d->mux_cnt == 0) {
 +    if (d->mux_cnt == 1) {
          qemu_chr_add_handlers_full(d->drv, mux_chr_can_read,
                                     mux_chr_read,
                                     mux_chr_event,
      if (d->focus != -1) {
          mux_chr_send_event(d, d->focus, CHR_EVENT_MUX_OUT);
      }
 -    d->focus = d->mux_cnt;
 -    d->mux_cnt++;
 +    d->focus = idx;
      mux_chr_send_event(d, d->focus, CHR_EVENT_MUX_IN);
  }
  
@@@ -3140,6 -3132,7 +3140,7 @@@ static void tcp_chr_tls_init(CharDriver
      if (tioc == NULL) {
          error_free(err);
          tcp_chr_disconnect(chr);
+         return;
      }
      object_unref(OBJECT(s->ioc));
      s->ioc = QIO_CHANNEL(tioc);