1. 09 3月, 2018 7 次提交
  2. 08 3月, 2018 1 次提交
  3. 07 3月, 2018 1 次提交
    • M
      qemuDomainObjBeginJob: Don't account DESTROY job to maxQueuedJobs · c1766641
      Michal Privoznik 提交于
      When trying to destroy a domain (e.g. because we've seen EOF on
      the monitor) we try to acquire QEMU_JOB_DESTROY. However, if
      max_queued is set in qemu.conf this may fail and since our code
      doesn't count on that we will still report domain as active even
      though the qemu process is long gone. More specifically, if we've
      seen EOF on the monitor, qemuProcessHandleMonitorEOF() is called
      which sends MONITOR_EOF job to the event worker pool and
      unregisters monitor from the event loop. The worker pool calls
      processMonitorEOFEvent() which tries to set job which may fail
      due to the limit as described above.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c1766641
  4. 22 2月, 2018 1 次提交
  5. 20 2月, 2018 2 次提交
    • D
      Fix build with GCC 8 new switch fallthrough warnings · 75f4813c
      Daniel P. Berrangé 提交于
      GCC 8 became more fussy about detecting switch
      fallthroughs. First it doesn't like it if you have
      a fallthrough attribute that is not before a case
      statement. e.g.
      
         FOO:
         BAR:
         WIZZ:
            ATTRIBUTE_FALLTHROUGH;
      
      Is unacceptable as there's no final case statement,
      so while FOO & BAR are falling through, WIZZ is
      not falling through. IOW, GCC wants us to write
      
        FOO:
        BAR:
          ATTRIBUTE_FALLTHROUGH;
        WIZZ:
      
      Second, it will report risk of fallthrough even if you
      have a case statement for every single enum value, but
      only if the switch is nested inside another switch and
      the outer case statement has no final break. This is
      is arguably valid because despite the fact that we have
      cast from "int" to the enum typedef, nothing guarantees
      that the variable we're switching on only contains values
      that have corresponding switch labels. e.g.
      
         int domstate = 87539319;
         switch ((virDomainState)domstate) {
            ...
         }
      
      will not match enum value, but also not raise any kind
      of compiler warning. So it is right to complain about
      risk of fallthrough if no default: is present.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      75f4813c
    • D
      conf: add enum constants for default controller models · a302480d
      Daniel P. Berrangé 提交于
      The controller model is slightly unusual in that the default value is
      -1, not 0. As a result the default value is not covered by any of the
      existing enum cases. This in turn means that any switch() statements
      that think they have covered all cases, will in fact not match the
      default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags()
      method this has caused a serious mistake where we fallthrough from the
      SCSI controller case, to the VirtioSerial controller case, and from
      the USB controller case to the IDE controller case.
      
      By adding explicit enum constant starting at -1, we can ensure switches
      remember to handle the default case.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      a302480d
  6. 19 2月, 2018 1 次提交
  7. 14 2月, 2018 1 次提交
  8. 13 2月, 2018 6 次提交
  9. 10 2月, 2018 2 次提交
  10. 09 2月, 2018 2 次提交
  11. 07 2月, 2018 2 次提交
  12. 06 2月, 2018 5 次提交
  13. 05 2月, 2018 1 次提交
  14. 03 2月, 2018 8 次提交
    • J
      qemu: Introduce qemuDomainDeviceDefValidateControllerSATA · 5775089e
      John Ferlan 提交于
      Move the SATA controller check from command line building to
      controller def validation. This includes copying the SATA
      skip check found in qemuBuildSkipController.
      5775089e
    • J
      qemu: Complete PCI command checks to controller def validate · 7de841cc
      John Ferlan 提交于
      Move the qemuCaps checks over to qemuDomainControllerDefValidatePCI.
      
      This requires two test updates in order to set the correct capability
      bit for an xml2xml test as well as setting up the similar capability
      for the pseries memlocktest.
      7de841cc
    • J
      qemu: Move more PCI command checks to controller def validate · 24614760
      John Ferlan 提交于
      Excluding the qemuCaps checks, move the remainder of the checks
      that validate whether the PCI definition is valid or not into
      qemuDomainControllerDefValidatePCI.
      24614760
    • J
      qemu: Move PCI command modelName TypeToString to controller def validate · 13b2083c
      John Ferlan 提交于
      Similar to the checking the modelName vs. NAME_NONE, let's make the
      ModelNameTypeToString check more generic too within the checking done
      in controller validation (with the same ignore certain models.
      
      NB: We need to keep the ModelNameTypeToString fetch in command line
      validation since we use it, but at least we can assume it returns
      something valid now.
      13b2083c
    • J
      qemu: Move PCI command modelName check to controller def validate · 4d7f9bf0
      John Ferlan 提交于
      Move the various modelName == NAME_NONE from the command line
      generation into domain controller validation.  Also rather than
      have multiple cases with the same check, let's make the code
      more generic, but also note that it was the modelName option
      that caused the failure. We also have to be sure not to check
      the PCI models that we don't care about.
      
      For the remaining checks in command line building, we can use
      the field name in the error message to be more specific about
      what causes the failure.
      4d7f9bf0
    • J
      qemu: Introduce qemuDomainDeviceDefValidateControllerPCI · d84caf9b
      John Ferlan 提交于
      Move PCI validation checks out of qemu_command into the proper
      qemu_domain validation helper.
      
      Since there's a lot to move, we'll start slow by replicating the
      pcie-root and pci-root avoidance from qemuBuildSkipController and
      the first switch found in qemuBuildControllerDevStr.
      d84caf9b
    • J
      qemu: Introduce qemuDomainDeviceDefValidateControllerSCSI · 2d32fc81
      John Ferlan 提交于
      Move SCSI validation from qemu_command into qemu_domain.
      
      Rename/reorder the args in qemuCheckSCSIControllerIOThreads
      to match the caller as well as fixing up the comments to
      remove the previously removed qemuCaps arg.
      2d32fc81
    • J
      qemu: Add check for iothread attribute in validate controller · cd8df1e6
      John Ferlan 提交于
      Let's make sure that non SCSI virtio-scsi isn't used for any type
      other than a virtio-scsi controller.
      cd8df1e6