1. 17 6月, 2019 3 次提交
  2. 13 6月, 2019 1 次提交
  3. 03 6月, 2019 1 次提交
  4. 07 5月, 2019 1 次提交
    • E
      conf: Add parameter to virDomainDiskSourceFormat · 1ec3e397
      Eric Blake 提交于
      Commits 4bc42986 and 218c81ea removed virDomainStorageSourceFormat on
      the grounds that there were no external callers; however, the upcoming
      backup code wants to output a <target> (push mode) or <scratch> (pull
      mode) element that is in all other respects identical to a domain's
      <source> element, where the previous virDomainStorageSourceFormat fit
      the bill nicely. But rather than reverting the commits, it's easier to
      just add an additional parameter for the element name to use, and
      update all callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1ec3e397
  5. 18 4月, 2019 2 次提交
  6. 17 4月, 2019 9 次提交
  7. 16 4月, 2019 3 次提交
  8. 10 4月, 2019 1 次提交
  9. 03 4月, 2019 5 次提交
  10. 22 3月, 2019 1 次提交
    • E
      snapshot: Track current snapshot in virDomainSnapshotObjList · 4819f54b
      Eric Blake 提交于
      It is easier to track the current snapshot as part of the list of
      snapshots. In particular, doing so lets us guarantee that the current
      snapshot is cleared if that snapshot is removed from the list (rather
      than depending on the caller to do so, and risking a use-after-free
      problem, such as the one recently patched in 1db9d0ef).  This
      requires the addition of several new accessor functions, as well as a
      useful return type for virDomainSnapshotObjListRemove().  A few error
      handling sites that were previously setting vm->current_snapshot =
      NULL can now be dropped, because the previous function call has now
      done it already.  Also, qemuDomainRevertToSnapshot() was setting the
      current vm twice, so keep only the one used on the success path.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      4819f54b
  11. 20 3月, 2019 2 次提交
  12. 16 3月, 2019 1 次提交
    • E
      conf: Split domain forward typedefs into virconftypes.h · c555ec24
      Eric Blake 提交于
      Right now, snapshot_conf.h is rather large - it deals with three
      separate types: virDomainSnapshotDef (the snapshot definition as it
      maps to XML), virDomainSnapshotObj (an object containing a def and the
      relationship to other snapshots), and virDomainSnapshotObjList (a list
      of snapshot objects), where two of the three types are currently
      public rather than opaque.  What's more, the types are circular: a
      snapshot def includes a virDomainPtr, which contains a snapshot list,
      which includes a snapshot object, which includes a snapshot def.
      
      In order to split the three objects into separate files, while still
      allowing each header to use sane typedefs to incomplete pointers, the
      obvious solution is to lift the typedefs into yet another header, with
      no other dependencies.  Start the split by factoring out all struct
      typedefs from domain_conf.h (enum typedefs don't get used in function
      signatures, and function typedefs tend not to suffer from circular
      referencing, so those stay put).  The only other exception is
      virDomainStateReason, which is only ever used directly rather than via
      a pointer.
      
      This patch is just straight code motion (all typedefs are listed in
      the same order before and after the patch); a later patch will sort
      things for legibility.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      c555ec24
  13. 14 3月, 2019 2 次提交
  14. 12 3月, 2019 2 次提交
    • M
      conf: Introduce firmware attribute to <os/> · d947fa8a
      Michal Privoznik 提交于
      The idea is that using this attribute users enable libvirt to
      automagically select firmware image for their domain. For
      instance:
      
        <os firmware='efi'>
          <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
          <loader secure='no'/>
        </os>
      
        <os firmware='bios'>
          <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
        </os>
      
      (The automagic of selecting firmware image will be described in
      later commits.)
      
      Accepted values are 'bios' and 'efi' to let libvirt select
      corresponding type of firmware.
      
      I know it is a good sign to introduce xml2xml test case when
      changing XML config parser but that will have to come later.
      Firmware auto selection is not enabled for any driver just yet so
      any xml2xml test would fail right away.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      d947fa8a
    • M
      conf: Introduce VIR_DOMAIN_LOADER_TYPE_NONE · d21f89cc
      Michal Privoznik 提交于
      This is going to extend virDomainLoader enum. The reason is that
      once loader path is NULL its type makes no sense. However, since
      value of zero corresponds to VIR_DOMAIN_LOADER_TYPE_ROM the
      following XML would be produced:
      
        <os>
          <loader type='rom'/>
          ...
        </os>
      
      To solve this, introduce VIR_DOMAIN_LOADER_TYPE_NONE which would
      correspond to value of zero and then use post parse callback to
      set the default loader type to 'rom' if needed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      d21f89cc
  15. 05 3月, 2019 6 次提交