1. 20 12月, 2019 2 次提交
  2. 09 12月, 2019 5 次提交
  3. 19 11月, 2019 2 次提交
  4. 15 11月, 2019 2 次提交
  5. 12 11月, 2019 1 次提交
  6. 07 11月, 2019 1 次提交
  7. 23 10月, 2019 1 次提交
  8. 21 10月, 2019 3 次提交
  9. 16 10月, 2019 2 次提交
  10. 15 10月, 2019 1 次提交
  11. 14 10月, 2019 1 次提交
  12. 27 9月, 2019 1 次提交
  13. 06 9月, 2019 1 次提交
  14. 09 8月, 2019 2 次提交
    • J
      qemu: Pass correct qemuCaps to virDomainDeviceDefPostParse · b449c270
      Jiri Denemark 提交于
      Since qemuDomainDeviceDefPostParse callback requires qemuCaps, we need
      to make sure it gets the capabilities stored in the domain's private
      data if the domain is running. Passing NULL may cause QEMU capabilities
      probing to be triggered in case QEMU binary changed in the meantime.
      When this happens while a running domain object is locked, QMP event
      delivered to the domain before QEMU capabilities probing finishes will
      deadlock the event loop.
      
      QEMU capabilities lookup (via domainPostParseDataAlloc callback) is
      hidden inside virDomainDeviceDefPostParseOne with no way to pass
      qemuCaps to virDomainDeviceDef* functions. This patch fixes all
      remaining paths leading to virDomainDeviceDefPostParse.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      b449c270
    • J
      qemu: Pass correct qemuCaps to virDomainDefParseNode · 577a1f98
      Jiri Denemark 提交于
      Since qemuDomainDefPostParse callback requires qemuCaps, we need to make
      sure it gets the capabilities stored in the domain's private data if the
      domain is running. Passing NULL may cause QEMU capabilities probing to
      be triggered in case QEMU binary changed in the meantime. When this
      happens while a running domain object is locked, QMP event delivered to
      the domain before QEMU capabilities probing finishes will deadlock the
      event loop.
      
      Several general snapshot and checkpoint APIs were lazily passing NULL as
      the parseOpaque pointer instead of letting their callers pass the right
      data. This patch fixes all paths leading to virDomainDefParseNode.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      577a1f98
  15. 07 8月, 2019 1 次提交
  16. 11 7月, 2019 1 次提交
    • E
      snapshot: Add VIR_DOMAIN_SNAPSHOT_CREATE_VALIDATE flag · 95f8e323
      Eric Blake 提交于
      We've been doing a terrible job of performing XML validation in our
      various API that parse XML with a corresponding schema (we started
      with domains back in commit dd69a14f, v1.2.12, but didn't catch all
      domain-related APIs, didn't document the use of the flag, and didn't
      cover other XML). New APIs (like checkpoints) should do the validation
      unconditionally, but it doesn't hurt to continue retrofitting existing
      APIs to at least allow the option.
      
      While there are many APIs that could be improved, this patch focuses
      on wiring up a new snapshot XML creation flag through all the
      hypervisors that support snapshots, as well as exposing it in 'virsh
      snapshot-create'.  For 'virsh snapshot-create-as', we blindly set the
      flag without a command-line option, since the XML we create from the
      command line should generally always comply (note that validation
      might cause failures where it used to succeed, such as if we tighten
      the RNG to reject a name of '../\n'); but blindly passing the flag
      means we also have to add in fallback code to disable validation if
      the server is too old to understand the flag.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      95f8e323
  17. 09 5月, 2019 4 次提交
  18. 17 4月, 2019 2 次提交
  19. 22 3月, 2019 3 次提交
    • E
      snapshot: Factor out virDomainMomentDef class · ffc0fbeb
      Eric Blake 提交于
      Pull out the common parts of virDomainSnapshotDef that will be reused
      for virDomainCheckpointDef into a new base class.  Adjust all callers
      that use the direct fields (some of it is churn that disappears when
      the next patch refactors virDomainSnapshotObj; oh well...).
      
      Someday, I hope to switch this type to be a subclass of virObject, but
      that requires a more thorough audit of cleanup paths, and besides
      minimal incremental changes are easier to review.
      
      As for the choice of naming:
      I promised my teenage daughter Evelyn that I'd give her credit for her
      contribution to this commit. I asked her "What would be a good name
      for a base class for DomainSnapshot and DomainCheckpoint". After
      explaining what a base class was (using the classic OOB Square and
      Circle inherit from Shape), she came up with "DomainMoment", which is
      way better than my initial thought of "DomainPointInTime" or
      "DomainPIT".
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      ffc0fbeb
    • E
      snapshot: Drop virDomainSnapshotDef.current · f1056279
      Eric Blake 提交于
      The only use for the 'current' member of virDomainSnapshotDef was with
      the PARSE/FORMAT_INTERNAL flag for controlling an internal-use
      <active> element marking whether a particular snapshot definition was
      current, and even then, only by the qemu driver on output, and by qemu
      and test driver on input. But this duplicates vm->snapshot_current,
      and gets in the way of potential simplifications to have qemu store a
      single file for all snapshots rather than one file per snapshot.  Get
      rid of the member by adding a bool* parameter during parse (ignored if
      the PARSE_INTERNAL flag is not set), and by adding a new flag during
      format (if FORMAT_INTERNAL is set, the value printed in <active>
      depends on the new FORMAT_CURRENT).
      
      Then update the qemu driver accordingly, which involves hoisting
      assignments to vm->current_snapshot to occur prior to any point where
      a snapshot XML file is written (although qemu kept
      vm->current_snapshot and snapshot->def_current in sync by the end of
      the function, they were not always identical in the middle of
      functions, so the shuffling gets a bit interesting). Later patches
      will clean up some of that confusing churn to vm->current_snapshot.
      
      Note: even if later patches refactor qemu to no longer use
      FORMAT_INTERNAL for output (by storing bulk snapshot XML instead), we
      will always need PARSE_INTERNAL for input (because on upgrade, a new
      libvirt still has to parse XML left from a previous libvirt).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      f1056279
    • E
      vbox: Clean up some snapshot usage · 063042c7
      Eric Blake 提交于
      An upcoming patch will be reworking virDomainSnapshotDef to have a
      base class; minimize the churn by using a local variable to reduce the
      number of dereferences required when acessing the domain definition
      associated with the snapshot.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      063042c7
  20. 14 3月, 2019 1 次提交
  21. 08 3月, 2019 2 次提交
    • E
      snapshot: Give virDomainSnapshotDefFormat its own flags · c5029559
      Eric Blake 提交于
      virDomainSnapshotDefFormat currently takes two sets of knobs:
      an 'unsigned int flags' argument that can currently just be
      VIR_DOMAIN_DEF_FORMAT_SECURE, and an 'int internal' argument used as
      a bool to determine whether to output an additional element.  It
      then reuses the 'flags' knob to call into virDomainDefFormatInternal(),
      which takes a different set of flags. In fact, prior to commit 0ecd6851
      (1.2.12), the 'flags' argument actually took the public
      VIR_DOMAIN_XML_SECURE, which was even more confusing.  Let's borrow
      from the style of that earlier commit, by introducing a function
      for translating from the public flags (VIR_DOMAIN_SNAPSHOT_XML_SECURE
      was just recently introduced) into a new enum specific to snapshot
      formatting, and adjust all callers to use snapshot-specific enum
      values when formatting, and where the formatter now uses a new
      variable 'domainflags' to make it obvious when we are translating
      from snapshot flags back to domain flags.  We don't even have to
      use the conversion function for drivers that don't accept the
      public VIR_DOMAIN_SNAPSHOT_XML_SECURE flag.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      c5029559
    • E
      snapshot: Rework virDomainSnapshotState enum · f43eb680
      Eric Blake 提交于
      The existing virDomainSnapshotState is a superset of virDomainState,
      adding one more state (disk-snapshot) on top of valid domain states.
      But as written, the enum cannot be used for gcc validation that all
      enum values are covered in a strongly-typed switch condition, because
      the enum does not explicitly include the values it is adding to.
      
      Copy the style used in qemu_blockjob.h of creating new enum names
      for every inherited value, and update most clients to use the new
      enum names anywhere snapshot state is referenced. The exception is
      two switch statements in qemu code, which instead gain a fixme
      comment about odd type usage (which will be cleaned up in the next
      patch). The rest of the patch is fairly mechanical (I actually did
      it by temporarily s/state/xstate/ in snapshot_conf.h to let the
      compiler find which spots in the code used the field, did the
      obvious search and replace in those functions, then undid the rename).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      f43eb680
  22. 05 3月, 2019 1 次提交
    • C
      qemu: Support scsi controller model=virtio-{non-}transitional · 448a0947
      Cole Robinson 提交于
      Add <controller type='scsi' model handling for virtio transitional
      devices. Ex:
      
        <controller type='scsi' model='virtio-transitional'/>
      
      * "virtio-transitional" maps to qemu "virtio-scsi-pci-transitional"
      * "virtio-non-transitional" maps to qemu "virtio-scsi-non-transitional"
      
      The naming here doesn't match the pre-existing model=virtio-scsi.
      The prescence of '-scsi' there seems kind of redundant as we have
      type='scsi' already, so I decided to follow the pattern of other
      patches and use virtio-transitional etc.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      448a0947