1. 21 9月, 2018 3 次提交
    • A
      qemu: Don't duplicate binary name in capabilities · b37b41f8
      Andrea Bolognani 提交于
      virCapabilitiesAddGuestDomain() takes an optional binary
      name: this is intended for cases where a certain domain
      type can't use the default one registered for the guest
      architecture, but has to use a special binary instead.
      
      The current code, however, will pass 'binary' again when
      'kvmbin' is not defined, which is unnecessary as 'binary'
      has been registered as default earlier, and will result
      in capabilities output such as
      
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
        <domain type='qemu'/>
        <domain type='kvm'>
          <emulator>/usr/bin/qemu-system-x86_64</emulator>
        </domain>
      
      with the second <emulator> element providing no additional
      information.
      
      Change it so that, when 'kvmbin' is not defined, NULL is
      passed and so the default emulator will be used instead.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      b37b41f8
    • A
      qemu: Move comments to virQEMUCapsGuestIsNative() · 99d5a516
      Andrea Bolognani 提交于
      The function performing the checks, rather than its callers,
      should contain comments explaining the rationale behind said
      checks.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      99d5a516
    • J
      Remove ignore_value or void from unlink calls · e3a42028
      John Ferlan 提交于
      There seems to be no need to add the ignore_value wrapper or
      caste with (void) to the unlink() calls, so let's just remove
      them. I assume at one point in time Coverity complained. So,
      let's just be consistent - those that care to check the return
      status can and those that don't can just have the naked unlink.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      e3a42028
  2. 17 9月, 2018 4 次提交
  3. 13 9月, 2018 1 次提交
  4. 12 9月, 2018 4 次提交
  5. 07 9月, 2018 8 次提交
  6. 28 8月, 2018 3 次提交
  7. 24 8月, 2018 5 次提交
  8. 21 8月, 2018 1 次提交
  9. 20 8月, 2018 3 次提交
    • E
      qemu: caps: Format SEV platform data into qemuCaps cache · 77f51ab5
      Erik Skultety 提交于
      Since we're not saving the platform-specific data into a cache, we're
      not going to populate the structure, which in turn will cause a crash
      upon calling virNodeGetSEVInfo because of a NULL pointer dereference.
      Ultimately, we should start caching this data along with host-specific
      capabilities like NUMA and SELinux stuff into a separate cache, but for
      the time being, this is a semi-proper fix for a potential crash.
      
      Backtrace (requires libvirtd restart to load qemu caps from cache):
          #0 qemuGetSEVInfoToParams
          #1 qemuNodeGetSEVInfo
          #2 virNodeGetSEVInfo
          #3 remoteDispatchNodeGetSevInfo
          #4 remoteDispatchNodeGetSevInfoHelper
          #5 virNetServerProgramDispatchCall
          #6 virNetServerProgramDispatch
          #7 virNetServerProcessMsg
          #8 virNetServerHandleJob
          #9 virThreadPoolWorker
          #10 virThreadHelper
      
      https: //bugzilla.redhat.com/show_bug.cgi?id=1612009
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      Tested-by: NBrijesh Singh <brijesh.singh@amd.com>
      77f51ab5
    • E
      qemu: Fix probing of AMD SEV support · 764491c9
      Erik Skultety 提交于
      So the procedure to detect SEV support works like this:
      1) we detect that sev-guest is among the QOM types and set the cap flag
      2) we probe the monitor for SEV support
          - this is tricky, because QEMU with compiled SEV support will always
          report -object sev-guest and query-sev-capabilities command, that
          however doesn't mean SEV is supported
      3) depending on what the monitor returned, we either keep or clear the
      capability flag for SEV
      
      Commit a349c6c2 added an explicit check for "GenericError" in the
      monitor reply to prevent libvirtd to spam logs about missing
      'query-sev-capabilities' command. At the same time though, it returned
      success in this case which means that we didn't clear the capability
      flag afterwards and happily formatted SEV into qemuCaps. Therefore,
      adjust all the relevant callers to handle -1 on errors, 0 on SEV being
      unsupported and 1 on SEV being supported.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      764491c9
    • E
      qemu: Define and use a auto cleanup function with virSEVCapability · d96eb28e
      Erik Skultety 提交于
      Keep with the recent effort of replacing as many explicit *Free
      functions with their automatic equivalents.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      d96eb28e
  10. 09 8月, 2018 1 次提交
  11. 07 8月, 2018 1 次提交
    • 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
  12. 19 7月, 2018 2 次提交
  13. 10 7月, 2018 1 次提交
  14. 03 7月, 2018 1 次提交
  15. 26 6月, 2018 1 次提交
  16. 14 6月, 2018 1 次提交