1. 14 6月, 2013 1 次提交
    • M
      create qemu_openpty_raw() helper function and move it to a separate file · 4efeabbb
      Michael Tokarev 提交于
      In two places qemu uses openpty() which is very system-dependent,
      and in both places the pty is switched to raw mode as well.
      Make a wrapper function which does both steps, and move all the
      system-dependent complexity into a separate file, together
      with static/local implementations of openpty() and cfmakeraw()
      from qemu-char.c.
      
      It is in a separate file, not part of oslib-posix.c, because
      openpty() often resides in -lutil which is not linked to
      every program qemu builds.
      
      This change removes #including of <pty.h>, <termios.h>
      and other rather specific system headers out of qemu-common.h,
      which isn't a place for such specific headers really.
      
      This version has been verified to build correctly on Linux,
      OpenBSD, FreeBSD and OpenIndiana.  On the latter it lets qemu
      to be built with gtk gui which were not possible there due to
      missing openpty() and cfmakeraw().
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Tested-by: NAndreas Färber <andreas.faerber@web.de>
      4efeabbb
  2. 12 6月, 2013 23 次提交
  3. 11 6月, 2013 7 次提交
    • M
      qemu-char: don't issue CHR_EVENT_OPEN in a BH · bd5c51ee
      Michael Roth 提交于
      When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET,
      and it was issued as a bottom-half:
      
      86e94dea
      
      Which we basically used to print out a greeting/prompt for the
      monitor.
      
      AFAICT the only reason this was ever done in a BH was because in
      some cases we'd modify the chr_write handler for a new chardev
      backend *after* the site where we issued the reset (see:
      86e94d:qemu_chr_open_stdio())
      
      At some point this event was renamed to CHR_EVENT_OPENED, and we've
      maintained the use of this BH ever since.
      
      However, due to 9f939df9, we schedule
      the BH via g_idle_add(), which is causing events to sometimes be
      delivered after we've already begun processing data from backends,
      leading to:
      
       known bugs:
      
        QMP:
          session negotation resets with OPENED event, in some cases this
          is causing new sessions to get sporadically reset
      
       potential bugs:
      
        hw/usb/redirect.c:
          can_read handler checks for dev->parser != NULL, which may be
          true if CLOSED BH has not been executed yet. In the past, OPENED
          quiesced outstanding CLOSED events prior to us reading client
          data. If it's delayed, our check may allow reads to occur even
          though we haven't processed the OPENED event yet, and when we
          do finally get the OPENED event, our state may get reset.
      
        qtest.c:
          can begin session before OPENED event is processed, leading to
          a spurious reset of the system and irq_levels
      
        gdbstub.c:
          may start a gdb session prior to the machine being paused
      
      To fix these, let's just drop the BH.
      
      Since the initial reasoning for using it still applies to an extent,
      work around that by deferring the delivery of CHR_EVENT_OPENED until
      after the chardevs have been fully initialized, toward the end of
      qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This
      defers delivery long enough that we can be assured a CharDriverState
      is fully initialized before CHR_EVENT_OPENED is sent.
      
      Also, rather than requiring each chardev to do an explicit open, do it
      automatically, and allow the small few who don't desire such behavior to
      suppress the OPENED-on-init behavior by setting a 'explicit_be_open'
      flag.
      
      We additionally add missing OPENED events for stdio backends on w32,
      which were previously not being issued, causing us to not recieve the
      banner and initial prompts for qmp/hmp.
      Reported-by: NStefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Message-id: 1370636393-21044-1-git-send-email-mdroth@linux.vnet.ibm.com
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      bd5c51ee
    • A
      Merge remote-tracking branch 'luiz/queue/qmp' into staging · b62cd318
      Anthony Liguori 提交于
      # By Luiz Capitulino (2) and Marcelo Tosatti (1)
      # Via Luiz Capitulino
      * luiz/queue/qmp:
        correct RTC_CHANGE_EVENT description (v2)
        MAINTAINERS: split Monitor (QMP/HMP) entry
        MAINTAINERS: new maintainers for qapi-schema.json
      
      Message-id: 1370634855-18337-1-git-send-email-lcapitulino@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b62cd318
    • A
      Merge remote-tracking branch 'stefanha/net' into staging · 97f31cbc
      Anthony Liguori 提交于
      # By Jason Wang (1) and Stefan Hajnoczi (1)
      # Via Stefan Hajnoczi
      * stefanha/net:
        tap: fix NULL dereference when passing invalid parameters to tap
        vmxnet3: fix NICState cleanup
      
      Message-id: 1370613288-14933-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      97f31cbc
    • A
      gtk: use better icon · f7da9c17
      Anthony Liguori 提交于
      The current icon looks pretty terrible rendered in Gnome.  This
      switches to a transparent SVG which looks much nicer.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f7da9c17
    • P
      softfloat: Fix shift128Right for shift counts 64..127 · 4039736e
      Peter Maydell 提交于
      shift128Right would give the wrong result for a shift count
      between 64 and 127. This was never noticed because all of
      our uses of this function are guaranteed not to use shift
      counts in this range.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1370186269-24353-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4039736e
    • P
      gdbstub: let the debugger resume from guest panicked state · bc7d0e66
      Paolo Bonzini 提交于
      While in general we forbid a "continue" from the guest panicked
      state, it makes sense to have an exception for that when continuing
      in the debugger.  Perhaps the guest entered that state due to a bug,
      for example, and we want to continue no matter what.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Message-id: 1370272015-9659-3-git-send-email-pbonzini@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      bc7d0e66
    • P
      gdbstub: fix for commit 87f25c12 · 26ac7a31
      Paolo Bonzini 提交于
      This commit used the wrong check to prevent an assertion failure.
      After this commit, you need to start a guest in the monitor, you
      cannot use anymore the "c" command in the debugger.  This is
      undesirable.  The commit's aim was to prevent a restart
      after a KVM internal error or something like that; use
      runstate_needs_reset() for that.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Message-id: 1370272015-9659-2-git-send-email-pbonzini@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      26ac7a31
  4. 10 6月, 2013 2 次提交
  5. 08 6月, 2013 3 次提交
  6. 07 6月, 2013 4 次提交
    • J
      tap: fix NULL dereference when passing invalid parameters to tap · c87826a8
      Jason Wang 提交于
      This patch forbid the following invalid parameters to tap:
      
      1) fd and vhostfds were specified but vhostfd were not specified
      2) vhostfds were specified but fds were not specified
      3) fds and vhostfd were specified
      
      For 1 and 2, net_init_tap_one() will still pass NULL as vhostfdname to
      monitor_handle_fd_param(), which may crash the qemu.
      
      Also remove the unnecessary has_fd check.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Stefan Hajnoczi <shajnocz@redhat.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c87826a8
    • A
      Merge remote-tracking branch 'stefanha/block' into staging · 7387de16
      Anthony Liguori 提交于
      # By Kevin Wolf (19) and others
      # Via Stefan Hajnoczi
      * stefanha/block: (26 commits)
        hmp: add parameters device and -v for info block
        hmp: show ImageInfo in 'info block'
        qmp: add ImageInfo in BlockDeviceInfo used by query-block
        block: add image info query function bdrv_query_image_info()
        block: add snapshot info query function bdrv_query_snapshot_info_list()
        ide-test: Add FLUSH CACHE test case
        ide: Set BSY bit during FLUSH
        ide-test: Add enum value for DEV
        blkdebug: Add BLKDBG_FLUSH_TO_OS/DISK events
        Make qemu-io commands available in HMP
        qemu-io: Use the qemu version for -V
        qemu-io: Interface cleanup
        qemu-io: Move remaining helpers from cmd.c
        qemu-io: Move command_loop() and friends
        qemu-io: Move functions for registering and running commands
        qemu-io: Move qemu_strsep() to cutils.c
        qemu-io: Move 'quit' function
        qemu-io: Move 'help' function
        qemu-io: Factor out qemuio_command
        qemu-io: Split off commands to qemu-io-cmds.c
        ...
      
      Message-id: 1370606325-10680-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7387de16
    • A
      Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging · b8a75b60
      Anthony Liguori 提交于
      # By Cornelia Huck
      # Via Cornelia Huck
      * cohuck/virtio-ccw-upstr:
        virtio-ccw: Fix unsetting of indicators.
        s390x/css: Fix concurrent sense.
      
      Message-id: 1370592676-22532-1-git-send-email-cornelia.huck@de.ibm.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b8a75b60
    • W
      hmp: add parameters device and -v for info block · e73fe2b4
      Wenchao Xia 提交于
      With these parameters, user can choose the information to be showed,
      to avoid message flood in the monitor.
      Signed-off-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e73fe2b4