Skip to content
Snippets Groups Projects
  1. Feb 09, 2024
  2. Jan 22, 2024
  3. Jan 19, 2024
  4. Dec 26, 2023
  5. Dec 12, 2023
  6. Dec 01, 2023
    • Michael S. Tsirkin's avatar
      osdep: add getloadavg · dc864d3a
      Michael S. Tsirkin authored
      
      getloadavg is supported on Linux, BSDs, Solaris.
      
      Following man page:
      RETURN VALUE
             If the load average was unobtainable, -1 is returned; otherwise,
             the number of samples actually retrieved is returned.
      
      accordingly, make stub for systems which don't support this function return -1
      for consistency.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      dc864d3a
  7. Nov 28, 2023
    • Kevin Wolf's avatar
      export/vhost-user-blk: Fix consecutive drains · 411132c9
      Kevin Wolf authored
      The vhost-user-blk export implement AioContext switches in its drain
      implementation. This means that on drain_begin, it detaches the server
      from its AioContext and on drain_end, attaches it again and schedules
      the server->co_trip coroutine in the updated AioContext.
      
      However, nothing guarantees that server->co_trip is even safe to be
      scheduled. Not only is it unclear that the coroutine is actually in a
      state where it can be reentered externally without causing problems, but
      with two consecutive drains, it is possible that the scheduled coroutine
      didn't have a chance yet to run and trying to schedule an already
      scheduled coroutine a second time crashes with an assertion failure.
      
      Following the model of NBD, this commit makes the vhost-user-blk export
      shut down server->co_trip during drain so that resuming the export means
      creating and scheduling a new coroutine, which is always safe.
      
      There is one exception: If the drain call didn't poll (for example, this
      happens in the context of bdrv_graph_wrlock()), then the coroutine
      didn't have a chance to shut down. However, in this case the AioContext
      can't have changed; changing the AioContext always involves a polling
      drain. So in this case we can simply assert that the AioContext is
      unchanged and just leave the coroutine running or wake it up if it has
      yielded to wait for the AioContext to be attached again.
      
      Fixes: e1054cd4
      Fixes: https://issues.redhat.com/browse/RHEL-1708
      
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-ID: <20231127115755.22846-1-kwolf@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      411132c9
    • BALATON Zoltan's avatar
      hw/isa/vt82c686: Bring back via_isa_set_irq() · 7e01bd80
      BALATON Zoltan authored
      
      The VIA integrated south bridge chips combine several functions and
      allow routing their interrupts to any of the ISA IRQs also allowing
      multiple sources to share the same ISA IRQ. E.g. pegasos2 firmware
      configures everything to use IRQ 9 but amigaone routes them to
      separate ISA IRQs so the current simplified routing does not work.
      Bring back via_isa_set_irq() and change it to take the component that
      wants to change an IRQ and keep track of interrupt status of each
      source separately and do the mapping to ISA IRQ within the ISA bridge.
      
      This may not handle cases when an ISA IRQ is controlled by devices
      directly, not going through via_isa_set_irq() such as serial, parallel
      or keyboard but these IRQs being conventionally fixed are not likely
      to be change by guests or share with other devices so this does not
      cause a problem in practice.
      
      This reverts commit 4e5a20b6.
      
      Signed-off-by: default avatarBALATON Zoltan <balaton@eik.bme.hu>
      Message-ID: <1c3902d4166234bef0a476026441eaac3dd6cda5.1701035944.git.balaton@eik.bme.hu>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      7e01bd80
  8. Nov 27, 2023
  9. Nov 21, 2023
  10. Nov 20, 2023
  11. Nov 15, 2023
  12. Nov 14, 2023
Loading