Skip to content
Snippets Groups Projects
  1. Jun 25, 2021
  2. Jun 19, 2021
  3. Jun 18, 2021
    • Vladimir Sementsov-Ogievskiy's avatar
      qemu-sockets: introduce socket_address_parse_named_fd() · c5423704
      Vladimir Sementsov-Ogievskiy authored
      
      Add function that transforms named fd inside SocketAddress structure
      into number representation. This way it may be then used in a context
      where current monitor is not available.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20210610100802.5888-6-vsementsov@virtuozzo.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      [eblake: comment tweak]
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      c5423704
    • Paolo Bonzini's avatar
      async: the main AioContext is only "current" if under the BQL · 5f50be9b
      Paolo Bonzini authored
      
      If we want to wake up a coroutine from a worker thread, aio_co_wake()
      currently does not work.  In that scenario, aio_co_wake() calls
      aio_co_enter(), but there is no current AioContext and therefore
      qemu_get_current_aio_context() returns the main thread.  aio_co_wake()
      then attempts to call aio_context_acquire() instead of going through
      aio_co_schedule().
      
      The default case of qemu_get_current_aio_context() was added to cover
      synchronous I/O started from the vCPU thread, but the main and vCPU
      threads are quite different.  The main thread is an I/O thread itself,
      only running a more complicated event loop; the vCPU thread instead
      is essentially a worker thread that occasionally calls
      qemu_mutex_lock_iothread().  It is only in those critical sections
      that it acts as if it were the home thread of the main AioContext.
      
      Therefore, this patch detaches qemu_get_current_aio_context() from
      iothreads, which is a useless complication.  The AioContext pointer
      is stored directly in the thread-local variable, including for the
      main loop.  Worker threads (including vCPU threads) optionally behave
      as temporary home threads if they have taken the big QEMU lock,
      but if that is not the case they will always schedule coroutines
      on remote threads via aio_co_schedule().
      
      With this change, the stub qemu_mutex_iothread_locked() must be changed
      from true to false.  The previous value of true was needed because the
      main thread did not have an AioContext in the thread-local variable,
      but now it does have one.
      
      Reported-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20210609122234.544153-1-pbonzini@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Tested-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      [eblake: tweak commit message per Vladimir's review]
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      5f50be9b
  4. Jun 16, 2021
  5. Jun 15, 2021
  6. Jun 14, 2021
  7. Jun 08, 2021
  8. Jun 04, 2021
  9. Jun 02, 2021
  10. May 26, 2021
  11. May 21, 2021
  12. May 14, 2021
    • Mahmoud Mandour's avatar
      util/compatfd.c: Replaced a malloc call with g_malloc. · e0c5a18e
      Mahmoud Mandour authored
      
      Replaced a call to malloc() and its respective call to free()
      with g_malloc() and g_free().
      
      g_malloc() is preferred more than g_try_* functions, which
      return NULL on error, when the size of the requested
      allocation  is small. This is because allocating few
      bytes should not be a problem in a healthy system.
      Otherwise, the system is already in a critical state.
      
      Subsequently, removed NULL-checking after g_malloc().
      
      Signed-off-by: default avatarMahmoud Mandour <ma.mandourr@gmail.com>
      Message-Id: <20210315105814.5188-3-ma.mandourr@gmail.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      e0c5a18e
  13. May 13, 2021
  14. May 12, 2021
  15. May 11, 2021
  16. May 10, 2021
Loading