1. 14 3月, 2019 1 次提交
    • J
      conf: Add a new 'xenbus' controller type · 09eb1ae0
      Jim Fehlig 提交于
      xenbus is virtual controller (akin to virtio controllers) for Xen
      paravirtual devices. Although all Xen VMs have a xenbus, it has
      never been modeled in libvirt, or in Xen native VM config format
      for that matter.
      
      Recently there have been requests to support Xen's max_grant_frames
      setting in libvirt. max_grant_frames is best modeled as an attribute
      of xenbus. It describes the maximum IO buffer space (or DMA space)
      available in xenbus for use by connected paravirtual devices. This
      patch introduces a new xenbus controller type that includes a
      maxGrantFrames attribute.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      09eb1ae0
  2. 12 3月, 2019 4 次提交
  3. 11 3月, 2019 2 次提交
  4. 08 3月, 2019 3 次提交
    • E
      snapshot: Avoid latent use-after-free when cleaning snapshots · 44a9b872
      Eric Blake 提交于
      Right now, the only callers of qemuDomainSnapshotDiscardAllMetadata()
      are right before freeing the virDomainSnapshotObjList, so it did not
      matter if the list's metaroot (which points to all the defined root
      snapshots) is left inconsistent. But an upcoming patch will want to
      clear all snapshots if a bulk redefine fails partway through, in
      which case things must be reset.  Make this work by teaching the
      existing virDomainSnapshotUpdateRelations() to be safe regardless of
      the incoming state of the metaroot (since we don't want to leak that
      internal detail into qemu code), then fixing the qemu code to use
      it after deleting all snapshots. Additionally, the qemu code must
      reset vm->current_snapshot if the current snapshot was removed,
      regardless of whether the overall removal succeeded or failed later.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      44a9b872
    • 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
      qemu: Const-correct snapshot directory name · 7ff982f0
      Eric Blake 提交于
      qemuDomainSnapshotWriteMetadata does not modify the directory name,
      and making it const-correct aids in writing an upcoming patch.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      7ff982f0
  5. 07 3月, 2019 2 次提交
  6. 05 3月, 2019 3 次提交
  7. 04 3月, 2019 1 次提交
  8. 26 2月, 2019 1 次提交
  9. 25 2月, 2019 1 次提交
  10. 24 2月, 2019 1 次提交
  11. 22 2月, 2019 1 次提交
  12. 20 2月, 2019 1 次提交
    • E
      domain: Fix unknown flags diagnosis in virDomainGetXMLDesc · 27c8fd74
      Eric Blake 提交于
      Many drivers had a comment that they did not validate the incoming
      'flags' to virDomainGetXMLDesc() because they were relying on
      virDomainDefFormat() to do it instead. This used to be the case
      (at least since 461e0f1a and friends in 0.9.4 added unknown flag
      checking in general), but regressed in commit 0ecd6851 (1.2.12),
      when all of the drivers were changed to pass 'flags' through the
      new helper virDomainDefFormatConvertXMLFlags(). Since this helper
      silently ignores unknown flags, we need to implement flag checking
      in each driver instead.
      
      Annoyingly, this means that any new flag values added will silently
      be ignored when targeting an older libvirt, rather than our usual
      practice of loudly diagnosing an unsupported flag.  Add comments
      in domain_conf.[ch] to remind us to be extra vigilant about the
      impact when adding flags (a new flag to add data is safe if the
      older server omitting the requested data doesn't break things in
      the newer client; a new flag to suppress data rather than enhancing
      the existing VIR_DOMAIN_XML_SECURE may form a data leak or even a
      security hole).
      
      In the qemu driver, there are multiple callers all funnelling to
      qemuDomainDefFormatBufInternal(); many of them already validated
      flags (and often only a subset of the full set of possible flags),
      but for ease of maintenance, we can also check flags at the common
      helper function.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      27c8fd74
  13. 18 2月, 2019 3 次提交
  14. 13 2月, 2019 1 次提交
  15. 08 2月, 2019 12 次提交
  16. 06 2月, 2019 1 次提交
  17. 04 2月, 2019 2 次提交