Skip to content
Snippets Groups Projects
  1. Jun 29, 2021
  2. Jun 02, 2021
  3. May 21, 2021
  4. May 02, 2021
  5. Apr 01, 2021
  6. Mar 19, 2021
  7. Mar 18, 2021
  8. Mar 06, 2021
    • Paolo Bonzini's avatar
      chardev: add nodelay option · a9b1315f
      Paolo Bonzini authored
      
      The "delay" option was introduced as a way to enable Nagle's algorithm
      with ",nodelay".  Since the short form for boolean options has now been
      deprecated, introduce a more properly named "nodelay" option.  The "delay"
      option remains as an undocumented option.
      
      "delay" and "nodelay" are mutually exclusive.  Because the check is
      done at consumption time, the code also rejects them if one of the
      two is specified via -set.
      
      Based-on: <20210226080526.651705-1-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a9b1315f
  9. Feb 25, 2021
  10. Feb 04, 2021
  11. Jan 13, 2021
  12. Jan 02, 2021
  13. Dec 19, 2020
    • Eric Blake's avatar
      qapi: Use QAPI_LIST_PREPEND() where possible · 54aa3de7
      Eric Blake authored
      
      Anywhere we create a list of just one item or by prepending items
      (typically because order doesn't matter), we can use
      QAPI_LIST_PREPEND().  But places where we must keep the list in order
      by appending remain open-coded until later patches.
      
      Note that as a side effect, this also performs a cleanup of two minor
      issues in qga/commands-posix.c: the old code was performing
       new = g_malloc0(sizeof(*ret));
      which 1) is confusing because you have to verify whether 'new' and
      'ret' are variables with the same type, and 2) would conflict with C++
      compilation (not an actual problem for this file, but makes
      copy-and-paste harder).
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20201113011340.463563-5-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      [Straightforward conflicts due to commit a8aa94b5 "qga: update
      schema for guest-get-disks 'dependents' field" and commit a10b453a
      "target/mips: Move mips_cpu_add_definition() from helper.c to cpu.c"
      resolved.  Commit message tweaked.]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      54aa3de7
  14. Dec 15, 2020
    • Paolo Bonzini's avatar
      chardev: do not use machine_init_done · 5a1ee607
      Paolo Bonzini authored
      
      machine_init_done is not the right flag to check when preconfig
      is taken into account; for example "./qemu-system-x86_64 -serial
      mon:stdio -preconfig" does not print the QEMU monitor header until after
      exit_preconfig.  Add back a custom bool for mux character devices.  This
      partially undoes commit c7278b43 ("chardev: introduce chr_machine_done
      hook", 2018-03-12), but it keeps the cleaner logic using a function
      pointer in ChardevClass.
      
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5a1ee607
  15. Dec 10, 2020
  16. Nov 17, 2020
  17. Nov 03, 2020
    • Markus Armbruster's avatar
      sockets: Make abstract UnixSocketAddress depend on CONFIG_LINUX · 8acefc79
      Markus Armbruster authored
      
      The abstract socket namespace is a non-portable Linux extension.  An
      attempt to use it elsewhere should fail with ENOENT (the abstract
      address looks like a "" pathname, which does not resolve).  We report
      this failure like
      
          Failed to connect socket abc: No such file or directory
      
      Tolerable, although ENOTSUP would be better.
      
      However, introspection lies: it has @abstract regardless of host
      support.  Easy enough to fix: since Linux provides them since 2.2,
      'if': 'defined(CONFIG_LINUX)' should do.
      
      The above failure becomes
      
          Parameter 'backend.data.addr.data.abstract' is unexpected
      
      I consider this an improvement.
      
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      8acefc79
    • Markus Armbruster's avatar
      char-socket: Fix qemu_chr_socket_address() for abstract sockets · dea7cd17
      Markus Armbruster authored
      
      Commit 776b97d3 "qemu-sockets: add abstract UNIX domain socket
      support" neglected to update qemu_chr_socket_address().  It shows
      shows neither @abstract nor @tight.  Fix that.
      
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      dea7cd17
    • Markus Armbruster's avatar
      sockets: Fix default of UnixSocketAddress member @tight · b08cc97d
      Markus Armbruster authored
      
      An optional bool member of a QAPI struct can be false, true, or absent.
      The previous commit demonstrated that socket_listen() and
      socket_connect() are broken for absent @tight, and indeed QMP chardev-
      add also defaults absent member @tight to false instead of true.
      
      In C, QAPI members are represented by two fields, has_MEMBER and MEMBER.
      We have:
      
                  has_MEMBER    MEMBER
          false         true     false
          true          true      true
          absent       false  false/ignore
      
      When has_MEMBER is false, MEMBER should be set to false on write, and
      ignored on read.
      
      For QMP, the QAPI visitors handle absent @tight by setting both
      @has_tight and @tight to false.  unix_listen_saddr() and
      unix_connect_saddr() however use @tight only, disregarding @has_tight.
      This is wrong and means that absent @tight defaults to false whereas it
      should default to true.
      
      The same is true for @has_abstract, though @abstract defaults to
      false and therefore has the same behavior for all of QMP, HMP and CLI.
      Fix unix_listen_saddr() and unix_connect_saddr() to check
      @has_abstract/@has_tight, and to default absent @tight to true.
      
      However, this is only half of the story.  HMP chardev-add and CLI
      -chardev so far correctly defaulted @tight to true, but defaults to
      false again with the above fix for HMP and CLI.  In fact, the "tight"
      and "abstract" options now break completely.
      
      Digging deeper, we find that qemu_chr_parse_socket() also ignores
      @has_tight, leaving it false when it sets @tight.  That is also wrong,
      but the two wrongs cancelled out.  Fix qemu_chr_parse_socket() to set
      @has_tight and @has_abstract; writing testcases for HMP and CLI is left
      for another day.
      
      Fixes: 776b97d3
      Reported-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      b08cc97d
  18. Oct 21, 2020
  19. Oct 15, 2020
  20. Oct 12, 2020
  21. Sep 30, 2020
    • Daniel P. Berrangé's avatar
      char: fix logging when chardev write fails · d96aa5db
      Daniel P. Berrangé authored
      The qemu_chr_write_buffer() method sends data to the chardev backend for
      writing, and then also writes to the log file. In case the chardev
      backend only writes part of the data buffer, we need to make sure we
      only log the same subset. qemu_chr_write_buffer() will be invoked again
      later to write the rest of the buffer.
      
      In the case the chardev backend returns an error though, no further
      attempts to likely to be made to write the data. We must therefore write
      the entire buffer to the log immediately.
      
      An example where this is important is with the socket backend. This will
      return -1 for all writes if no client is currently connected. We still
      wish to write data to the log file when no client is present though.
      This used to work because the chardev would return "len" to pretend it
      had written all data when no client is connected, but this changed to
      return an error in
      
        commit 27109447
        Author: Dima Stepanov <dimastep@yandex-team.ru>
        Date: Thu May 28 12:11:18 2020 +0300
      
          char-socket: return -1 in case of disconnect during tcp_chr_write
      
      and this broke the logging, resulting in all data being discarded when
      no client is present.
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1893691
      
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d96aa5db
  22. Sep 16, 2020
  23. Sep 09, 2020
  24. Sep 08, 2020
    • Bruce Rogers's avatar
      meson: remove linkage of sdl to baum · fd6c986d
      Bruce Rogers authored
      
      Ever since commit 537fe2d6 there
      has been a 'linkage' to sdl for compiling baum.c. Originally it
      had to do with including sdl cflags for any file including sdl
      headers. There is no longer any such need for baum.c, but the
      association has persisted in the make system, and with the switch
      to meson it has now become a hard requirement, which now causes
      chardev-baum.so to not be produced if sdl is not configured.
      Remove this bogus linkage.
      
      Signed-off-by: default avatarBruce Rogers <brogers@suse.com>
      Message-Id: <20200903152933.97838-1-brogers@suse.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fd6c986d
  25. Sep 01, 2020
  26. Aug 27, 2020
  27. Aug 21, 2020
Loading