1. 16 1月, 2013 1 次提交
  2. 13 1月, 2013 1 次提交
  3. 04 1月, 2013 1 次提交
  4. 03 1月, 2013 1 次提交
    • M
      disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc) · ab51b1d5
      Michael Tokarev 提交于
      Curses display requires stdin/out to stay on the terminal,
      so -daemonize makes no sense in this case.  Instead of
      leaving display uninitialized like is done since 995ee2bf,
      explicitly detect this case earlier and error out.
      
      -nographic can actually be used with -daemonize, by redirecting
      everything to a null device, but the problem is that according
      to documentation and historical behavour, -nographic redirects
      guest ports to stdin/out, which, again, makes no sense in case
      of -daemonize.  Since -nographic is a legacy option, don't bother
      fixing this case (to allow -nographic and -daemonize by redirecting
      guest ports to null instead of stdin/out in this case), but disallow
      it completely instead, to stop garbling host terminal.
      
      If no display display needed and user wants to use -nographic,
      the right way to go is to use
        -serial null -parallel null -monitor none -display none -vga none
      instead of -nographic.
      
      Also prevent the same issue -- it was possible to get garbled
      host tty after
      
        -nographic -daemonize
      
      and it is still possible to have it by using
      
        -serial stdio -daemonize
      
      Fix this by disallowing opening stdio chardev when -daemonize
      is specified.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ab51b1d5
  5. 23 12月, 2012 1 次提交
    • L
      qemu-char: Inherit ptys and improve output from -serial pty · 58650218
      Lei Li 提交于
      Changes since V1:
        - Avoid crashing since qemu_opts_id() may return null on some
          systems according to Markus's suggestion.
      
      When controlling a qemu instance from another program, it's
      hard to know which serial port or monitor device is redirected
      to which pty. With more than one device using "pty" a lot of
      guesswork is involved.
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device redirected to /dev/pts/5
      char device redirected to /dev/pts/6
      char device redirected to /dev/pts/7
      
      Although we can find out what everything else is connected to
      by the "info chardev" with "-monitor stdio" in the command line,
      It'd be very useful to be able to have qemu inherit pseudo-tty
      file descriptors so they could just be specified on the command
      line like:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device compat_monitor0 redirected to /dev/pts/5
      char device serial0 redirected to /dev/pts/6
      char device serial1 redirected to /dev/pts/7
      
      Referred link: https://bugs.launchpad.net/qemu/+bug/938552Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      58650218
  6. 19 12月, 2012 6 次提交
  7. 17 12月, 2012 1 次提交
    • M
      spice-qemu-char: add spiceport chardev · 5a49d3e9
      Marc-André Lureau 提交于
      Add a new spice chardev to allow arbitrary communication between the
      host and the Spice client via the spice server.
      
      Examples:
      
      This allows the Spice client to have a special port for the qemu
      monitor:
      
      ... -chardev spiceport,name=org.qemu.monitor,id=monitorport
          -mon chardev=monitorport
      
      v2:
      - remove support for chardev to chardev linking
      - conditionnaly compile with SPICE_SERVER_VERSION
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      5a49d3e9
  8. 25 11月, 2012 1 次提交
  9. 01 11月, 2012 1 次提交
    • J
      chardev: Use timer instead of bottom-half to postpone open event · ac4119c0
      Jan Kiszka 提交于
      As the block layer may decide to flush bottom-halfs while the machine is
      still initializing (e.g. to read geometry data from the disk), our
      postponed open event may be processed before the last frontend
      registered with a muxed chardev.
      
      Until the semantics of BHs have been clarified, use an expired timer to
      achieve the same effect (suggested by Paolo Bonzini). This requires to
      perform the alarm timer initialization earlier as otherwise timer
      subsystem can be used before being ready.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      ac4119c0
  10. 23 10月, 2012 4 次提交
    • P
      qemu-sockets: add error propagation to inet_dgram_opts · 4f085c82
      Paolo Bonzini 提交于
      Before:
      
          $ qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
          inet_dgram_opts: bind(ipv4,127.0.0.1,631): OK
          inet_dgram_opts failed
          chardev: opening backend "udp" failed
      
      After:
      
          $ x86_64-softmmu/qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
          qemu-system-x86_64: -monitor udp:localhost:631@localhost:631: Failed to bind socket: Address already in use
          chardev: opening backend "udp" failed
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4f085c82
    • P
      qemu-char: ask and print error information from qemu-sockets · 87d5f24f
      Paolo Bonzini 提交于
      Before:
      
          $ qemu-system-x86_64 -monitor tcp:localhost:6000
          (starts despite error)
      
          $ qemu-system-x86_64 -monitor tcp:foo.bar:12345
          getaddrinfo(foo.bar,12345): Name or service not known
          chardev: opening backend "socket" failed
      
          $ qemu-system-x86_64 -monitor tcp:localhost:443,server=on
          inet_listen_opts: bind(ipv4,127.0.0.1,443): Permission denied
          inet_listen_opts: FAILED
          chardev: opening backend "socket" failed
      
      After:
      
          $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:localhost:6000
          x86_64-softmmu/qemu-system-x86_64: -monitor tcp:localhost:6000: Failed to connect to socket: Connection refused
          chardev: opening backend "socket" failed
      
          $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:foo.bar:12345
          qemu-system-x86_64: -monitor tcp:foo.bar:12345: address resolution failed for foo.bar:12345: Name or service not known
          chardev: opening backend "socket" failed
      
          $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:localhost:443,server=on
          qemu-system-x86_64: -monitor tcp:localhost:443,server=on: Failed to bind socket: Permission denied
          chardev: opening backend "socket" failed
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      87d5f24f
    • P
      qemu-sockets: add nonblocking connect for Unix sockets · 1fc05adf
      Paolo Bonzini 提交于
      This patch mostly mimics what was done to TCP sockets, but simpler
      because there is only one address to try.  It also includes a free EINTR
      bug fix.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1fc05adf
    • P
      qemu-sockets: add Error ** to all functions · 7fc4e63e
      Paolo Bonzini 提交于
      This lets me adjust the clients to do proper error propagation first,
      thus avoiding temporary regressions in the quality of the error messages.
      Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7fc4e63e
  11. 26 9月, 2012 2 次提交
  12. 17 9月, 2012 2 次提交
  13. 10 9月, 2012 1 次提交
  14. 17 8月, 2012 1 次提交
  15. 15 8月, 2012 1 次提交
  16. 14 8月, 2012 1 次提交
  17. 09 6月, 2012 1 次提交
    • M
      do not include <libutil.h> needlessly or if it doesn't exist · 3294ce18
      Michael Tokarev 提交于
      <libutil.h> and <util.h> on *BSD (some have one, some another)
      were #included just for openpty() declaration.  The only file
      where this function is actually used is qemu-char.c.
      
      In vl.c and net/tap-bsd.c, none of functions declared in libutil.h
      (login logout logwtmp timdomain openpty forkpty uu_lock realhostname
      fparseln and a few others depending on version) are used.
      
      Initially the code which is currently in qemu-char.c was in vl.c,
      it has been removed into separate file in commit 0e82f34d
      Fri Oct 31 18:44:40 2008, but the #includes were left in vl.c.
      So with vl.c, we just remove includes - libutil.h, util.h and
      pty.h (which declares only openpty() and forkpty()) from there.
      
      The code in net/tap-bsd.c, which come from net/tap.c, had this
      
      commit 5281d757
      Author: Mark McLoughlin <markmc@redhat.com>
      Date:   Thu Oct 22 17:49:07 2009 +0100
      
          net: split all the tap code out into net/tap.c
      
      Note this commit not only moved stuff out of net.c to net/tap.c,
      but also rewrote large portions of the tap code, and added these
      completely unnecessary #includes -- as usual, I question why such
      a misleading commit messages are allowed.
      
      Again, no functions defined in libutil.h or util.h on *BSD are
      used by neither net/tap.c nor net/tap-bsd.c.  Removing them.
      
      And finally, the only real user for these #includes, qemu-char.c,
      which actually uses openpty().  There, the #ifdef logic is wrong.
      A GLIBC-based system has <pty.h>, even if it is a variant of *BSD.
      So __GLIBC__ should be checked first, and instead of trying to
      include <libutil.h> or <util.h>, we include <pty.h>.  If it is not
      GLIBC-based, we check for variations between <*util.h> as before.
      
      This patch fixes build of qemu 1.1 on Debian/kFreebsd (well, one
      of the two problems): it is a distribution with a FreeBSD kernel,
      so it #defines at least __FreeBSD_kernel__, but since it is based
      on GLIBC, it has <pty.h>, but current version does not have neither
      <util.h> nor <libutil.h>, which the code tries to include 3 times
      but uses only once.
      Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3294ce18
  18. 05 6月, 2012 1 次提交
    • L
      qemu-option: qemu_opts_create(): use error_set() · 8be7e7e4
      Luiz Capitulino 提交于
      This commit converts qemu_opts_create() from qerror_report() to
      error_set().
      
      Currently, most calls to qemu_opts_create() can't fail, so most
      callers don't need any changes.
      
      The two cases where code checks for qemu_opts_create() erros are:
      
       1. Initialization code in vl.c. All of them print their own
          error messages directly to stderr, no need to pass the Error
          object
      
       2. The functions opts_parse(), qemu_opts_from_qdict() and
          qemu_chr_parse_compat() make use of the error information and
          they can be called from HMP or QMP. In this case, to allow for
          incremental conversion, we propagate the error up using
          qerror_report_err(), which keeps the QError semantics
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-By: NLaszlo Ersek <lersek@redhat.com>
      8be7e7e4
  19. 11 5月, 2012 2 次提交
  20. 24 4月, 2012 1 次提交
  21. 16 4月, 2012 1 次提交
    • J
      Kick io-thread on qemu_chr_accept_input · 98c8ee1d
      Jan Kiszka 提交于
      Once a chr frontend is able to receive input again, we need to inform
      the io-thread about this fact. Otherwise, main_loop_wait may continue to
      select without the related backend file descriptor in its set. This can
      cause high input latencies if only low-rate events arrive otherwise.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      98c8ee1d
  22. 24 2月, 2012 4 次提交
  23. 04 2月, 2012 1 次提交
  24. 29 11月, 2011 1 次提交
  25. 12 11月, 2011 1 次提交
  26. 23 10月, 2011 1 次提交