1. 25 3月, 2020 2 次提交
    • D
      qemu: avoid launching non-x86 guests with 'pvspinlock' setting · da7485c5
      Daniel Henrique Barboza 提交于
      The 'pvspinlock' feature is x86 only. The "<pvspinlock/>" declaration
      will always have a value 'on' or 'off', and both will break QEMU when
      launching non-x86 guests. This is the error message for
      "<pvspinlock state='on'/>" when running a ppc64 guest:
      
      qemu-kvm: Expected key=value format, found +kvm_pv_unhalt
      
      A similar error message is thrown for "<pvspinlock state='off'/>".
      
      This patch prevents non-x86 guests from launching with any
      pvspinlock setting with a more informative error message:
      
      error: unsupported configuration: The 'pvspinlock' feature is not
      supported for architecture 'ppc64' or machine type 'pseries'
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      da7485c5
    • D
      qemu: avoid launching non-x86 guests with APIC-EOI setting · dbda73ff
      Daniel Henrique Barboza 提交于
      The "<apic/>" feature, although it's available only for x86 guests,
      can be declared in the domain XML of other archs without errors.
      But setting its 'eoi' attribute will break QEMU. For "<apic eoi='on'/>",
      in a ppc64 guest:
      
      qemu-kvm: Expected key=value format, found +kvm_pv_eoi
      
      A similar error happens with eoi='off'.
      
      One can argue that it's better to simply forbid launching non-x86
      guests with "<apic/>" declared in the XML - it is a feature that
      the architecture doesn't support and this would make it clearer
      about it. This is sensible, but there are non-x86 guests that are
      running with "<apic/>" declared in the domain (and A LOT of guests
      running with "<acpi/>" for that matter, probably reminiscent of x86
      templates that were reused for other archs) that will stop working if we
      go this route.
      
      A more subtle approach is to detect if the 'eoi' element is being set
      for non-x86 guests and warn the user about it with a better error
      message than the one QEMU provides. This is the new error message
      when any value is set for the 'eoi' element in a ppc64 XML:
      
      error: unsupported configuration: The 'eoi' attribute of the 'apic'
      feature is not supported for architecture 'ppc64' or machine type
      'pseries'.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1236440Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      dbda73ff
  2. 24 3月, 2020 5 次提交
  3. 20 3月, 2020 5 次提交
  4. 18 3月, 2020 1 次提交
  5. 17 3月, 2020 5 次提交
  6. 16 3月, 2020 13 次提交
  7. 12 3月, 2020 1 次提交
  8. 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
  9. 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
  10. 04 3月, 2020 3 次提交
  11. 26 2月, 2020 2 次提交
  12. 25 2月, 2020 1 次提交