1. 10 8月, 2018 14 次提交
  2. 09 8月, 2018 9 次提交
  3. 08 8月, 2018 14 次提交
  4. 07 8月, 2018 3 次提交
    • D
      qemu: ensure default machine types don't change if QEMU changes · 26cfb1a3
      Daniel P. Berrangé 提交于
      It is increasingly likely that some distro is going to change the
      default "x86" machine type in QEMU from "pc" to "q35". This will
      certainly break existing applications which write their XML on the
      assumption that it is using a "pc" machine by default. For example they'll
      lack a IDE CDROM and get PCIe instead of PCI which changes the topology
      radically.
      
      Libvirt promises to isolate applications from hypervisor changes that
      may cause incompatibilities, so we must ensure that we always use the
      "pc" machine type if it is available. Only use QEMU's own reported
      default machine type if "pc" does not exist.
      
      This issue is not x86-only, other arches are liable to change their
      default machine, while some arches don't report any default at all
      causing libvirt to pick the first machine in the list. Thus to
      guarantee stability to applications, declare a preferred default
      machine for all architectures we currently support with QEMU.
      
      Note this change assumes there will always be a "pc" alias as long as a
      versioned "pc-XXX" machine type exists. If QEMU were to ship a "pc-XXX"
      machine type but not provide the "pc" alias, it is too hard to decide
      which to default so. Versioned machine types are supposed to be
      considered opaque strings, so we can't apply any sensible ordering
      ourselves and QEMU isn't reporting the list of machines in any sensible
      ordering itself.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      26cfb1a3
    • S
      util: qemu: use VIR_AUTOPTR for aggregate types · 9d399be9
      Sukrit Bhatnagar 提交于
      By making use of GNU C's cleanup attribute handled by the
      VIR_AUTOPTR macro for declaring aggregate pointer variables,
      majority of the calls to *Free functions can be dropped, which
      in turn leads to getting rid of most of our cleanup sections.
      Signed-off-by: NSukrit Bhatnagar <skrtbhtngr@gmail.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      9d399be9
    • S
      util: qemu: use VIR_AUTOFREE instead of VIR_FREE for scalar types · 4fe2eea3
      Sukrit Bhatnagar 提交于
      By making use of GNU C's cleanup attribute handled by the
      VIR_AUTOFREE macro for declaring scalar variables, majority
      of the VIR_FREE calls can be dropped, which in turn leads to
      getting rid of most of our cleanup sections.
      Signed-off-by: NSukrit Bhatnagar <skrtbhtngr@gmail.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      4fe2eea3