1. 20 3月, 2020 3 次提交
  2. 18 3月, 2020 1 次提交
  3. 17 3月, 2020 5 次提交
  4. 16 3月, 2020 13 次提交
  5. 12 3月, 2020 1 次提交
  6. 11 3月, 2020 1 次提交
    • D
      qemu: start/stop an event loop thread for domains · e6afacb0
      Daniel P. Berrangé 提交于
      The event loop thread will be responsible for handling
      any per-domain I/O operations, most notably the QEMU
      monitor and agent sockets.
      
      We start this event loop when launching QEMU, but stopping
      the event loop is a little more complicated. The obvious
      idea is to stop it in qemuProcessStop(), but if we do that
      we risk loosing the final events from the QEMU monitor, as
      they might not have been read by the event thread at the
      time we tell the thread to stop.
      
      The solution is to delay shutdown of the event thread until
      we have seen EOF from the QEMU monitor, and thus we know
      there are no further events to process.
      
      Note that this assumes that we don't have events to process
      from the QEMU agent.
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      e6afacb0
  7. 09 3月, 2020 1 次提交
    • M
      qemu: Tell secdrivers which images are top parent · 13eb6c14
      Michal Privoznik 提交于
      When preparing images for block jobs we modify their seclabels so
      that QEMU can open them. However, as mentioned in the previous
      commit, secdrivers base some it their decisions whether the image
      they are working on is top of of the backing chain. Fortunately,
      in places where we call secdrivers we know this and the
      information can be passed to secdrivers.
      
      The problem is the following: after the first blockcommit from
      the base to one of the parents the XATTRs on the base image are
      not cleared and therefore the second attempt to do another
      blockcommit fails. This is caused by blockcommit code calling
      qemuSecuritySetImageLabel() over the base image, possibly
      multiple times (to ensure RW/RO access). A naive fix would be to
      call the restore function. But this is not possible, because that
      would deny QEMU the access to the base image.  Fortunately, we
      can use the fact that seclabels are remembered only for the top
      of the backing chain and not for the rest of the backing chain.
      And thanks to the previous commit we can tell secdrivers which
      images are top of the backing chain.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1803551Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      13eb6c14
  8. 04 3月, 2020 3 次提交
  9. 26 2月, 2020 2 次提交
  10. 25 2月, 2020 1 次提交
  11. 14 2月, 2020 7 次提交
  12. 07 2月, 2020 2 次提交
    • Z
      qemu: support Panic Crashloaded event handling · 26badd13
      zhenwei pi 提交于
      Pvpanic device supports bit 1 as crashloaded event, it means that
      guest actually panicked and run kexec to handle error by guest side.
      
      Handle crashloaded as a lifecyle event in libvirt.
      
      Test case:
      Guest side:
      before testing, we need make sure kdump is enabled,
      1, build new pvpanic driver (with commit from upstream
         e0b9a42735f2672ca2764cfbea6e55a81098d5ba
         191941692a3d1b6a9614502b279be062926b70f5)
      2, insmod new kmod
      3, enable crash_kexec_post_notifiers,
        # echo 1 > /sys/module/kernel/parameters/crash_kexec_post_notifiers
      4, trigger kernel panic
        # echo 1 > /proc/sys/kernel/sysrq
        # echo c > /proc/sysrq-trigger
      
      Host side:
      1, build new qemu with pvpanic patches (with commit from upstream
         600d7b47e8f5085919fd1d1157f25950ea8dbc11
         7dc58deea79a343ac3adc5cadb97215086054c86)
      2, build libvirt with this patch
      3, handle lifecycle event and trigger guest side panic
        # virsh event stretch --event lifecycle
        event 'lifecycle' for domain stretch: Crashed Crashloaded
        events received: 1
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: Nzhenwei pi <pizhenwei@bytedance.com>
      26badd13
    • J
      qemu: Pass machine type to virQEMUCapsIsCPUModeSupported · 80791859
      Jiri Denemark 提交于
      The usability of a specific CPU mode may depend on machine type, let's
      prepare for this by passing it to virQEMUCapsIsCPUModeSupported.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      80791859