1. 21 8月, 2018 28 次提交
  2. 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
  3. 17 8月, 2018 4 次提交
  4. 16 8月, 2018 5 次提交