1. 16 10月, 2017 7 次提交
  2. 21 9月, 2017 1 次提交
    • J
      cpu_conf: Drop updateCPU from virCPUDefFormat · 4fd179f5
      Jiri Denemark 提交于
      In the past we updated host-model CPUs with host CPU data by adding a
      model and features, but keeping the host-model mode. And since the CPU
      model is not normally formatted for host-model CPU defs, we had to pass
      the updateCPU flag to the formatting code to be able to properly output
      updated host-model CPUs. Libvirt doesn't do this anymore, host-model
      CPUs are turned into custom mode CPUs once updated with host CPU data
      and thus there's no reason for keeping the hacks inside CPU XML
      formatters.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      4fd179f5
  3. 18 9月, 2017 1 次提交
  4. 07 9月, 2017 2 次提交
  5. 13 7月, 2017 1 次提交
  6. 07 6月, 2017 1 次提交
  7. 19 4月, 2017 1 次提交
  8. 07 4月, 2017 3 次提交
  9. 04 4月, 2017 1 次提交
  10. 30 3月, 2017 1 次提交
  11. 27 3月, 2017 3 次提交
    • J
      cputest: Add tests for virCPUUpdateLive API · 84cc51ea
      Jiri Denemark 提交于
      The test takes
      
        x86-cpuid-Something-guest.xml CPU (the CPU libvirt would use for
          host-model on a CPU described by x86_64-cpuid-Something.xml without
          talking to QEMU about what it supports on the host)
      
      and updates it according to CPUID data from QEMU:
      
        x86_64-cpuid-Something-enabled.xml (reported as "feature-words"
          property of the CPU device)
      
      and
      
        x86_64-cpuid-Something-disabled.xml (reported as "filtered-features"
          property of the CPU device).
      
      The result is compared to
      
        x86_64-cpuid-Something-json.xml (the CPU libvirt would use as
          host-model based on the reply from query-cpu-model-expansion).
      
      The comparison is a bit tricky because the *-json.xml CPU contains fewer
      disabled features. Only the features which are included in the base CPU
      model, but listed as disabled in *.json will be disabled in *-json.xml.
      The CPU computed by virCPUUpdateLive from the test data will list all
      features present in the host's CPUID data and not enabled in *.json as
      disabled. The cpuTestUpdateLiveCompare function checks that the computed
      and expected sets of enabled features match.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      84cc51ea
    • J
      cpu: Do not pass virConnectBaselineCPUFlags to cpuBaseline · c117ecec
      Jiri Denemark 提交于
      The public API flags are handled by the cpuBaselineXML wrapper. The
      internal cpuBaseline API only needs to know whether it is supposed to
      drop non-migratable features.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      c117ecec
    • J
      cpu: Move feature expansion out of cpuBaseline · d8b3dd16
      Jiri Denemark 提交于
      cpuBaseline is responsible for computing a baseline CPU while feature
      expansion is done by virCPUExpandFeatures. The cpuBaselineXML wrapper
      (used by hypervisor drivers to implement virConnectBaselineCPU API)
      calls cpuBaseline followed by virCPUExpandFeatures if requested by
      VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES flag.
      
      The features in the three changed test files had to be sorted using
      "sort -k 3" because virCPUExpandFeatures returns a sorted list of
      features.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      d8b3dd16
  12. 23 3月, 2017 1 次提交
  13. 14 3月, 2017 1 次提交
  14. 04 3月, 2017 3 次提交
  15. 24 2月, 2017 3 次提交
  16. 15 11月, 2016 8 次提交
    • J
      cpu: Introduce virCPUConvertLegacy API · d73422c1
      Jiri Denemark 提交于
      PPC driver needs to convert POWERx_v* legacy CPU model names into POWERx
      to maintain backward compatibility with existing domains. This patch
      adds a new step into the guest CPU configuration work flow which CPU
      drivers can use to convert legacy CPU definitions.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      d73422c1
    • J
      cputest: Don't test cpuGuestData · 509a4a40
      Jiri Denemark 提交于
      The API is no longer used anywhere else since it was replaced by a much
      saner work flow utilizing new APIs that work on virCPUDefPtr directly:
      virCPUCompare, virCPUUpdate, and virCPUTranslate.
      
      Not testing the new work flow caused some bugs to be hidden. This patch
      reveals them, but doesn't attempt to fix them. To make sure all test
      still pass after this patch, all affected test results are modified to
      pretend the tests succeeded. All of the bugs will be fixed in the
      following commits and the artificial modifications will be reverted.
      
      The following is the list of bugs in the new CPU model work flow:
      
      - a guest CPU with mode='custom' and missing <vendor/> gets the vendor
        copied from host's CPU (the vendor should only be copied to host-model
        CPUs):
          DO_TEST_UPDATE("x86", "host", "min", VIR_CPU_COMPARE_IDENTICAL)
          DO_TEST_UPDATE("x86", "host", "pentium3", VIR_CPU_COMPARE_IDENTICAL)
          DO_TEST_GUESTCPU("x86", "host-better", "pentium3", NULL, 0)
      
      - when a guest CPU with mode='custom' needs to be translated into
        another model because the original model is not supported by a
        hypervisor, the result will have its vendor set to the vendor of the
        original CPU model as specified in cpu_map.xml even if the original
        guest CPU XML didn't contain <vendor/>:
          DO_TEST_GUESTCPU("x86", "host", "guest", model486, 0)
          DO_TEST_GUESTCPU("x86", "host", "guest", models, 0)
          DO_TEST_GUESTCPU("x86", "host-Haswell-noTSX", "Haswell-noTSX",
                           haswell, 0)
      
      - legacy POWERx_v* model names are not recognized:
          DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy", ppc_models, 0)
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      509a4a40
    • J
      cputest: Don't use preferred CPU model at all · adf44c7b
      Jiri Denemark 提交于
      Now that all tests pass NULL as the preferred model, we can just drop
      that test parameter.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      adf44c7b
    • J
      cputest: Don't use superfluous preferred model · 63842776
      Jiri Denemark 提交于
      In some cases preferred model doesn't really do anything since the
      result remains the same even if it is removed.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      63842776
    • J
      cputest: Don't use preferred model with forbidden fallback · 797bdced
      Jiri Denemark 提交于
      Using a preferred model for guest CPUs with forbidden fallback masks a
      bug in the code. It would just happily use another CPU model supported
      by a hypervisor even though it is explicitly forbidden in the CPU XML.
      
      This patch temporarily changes the expected result to -2, which is used
      when the result XML file cannot be found (but it was supposed not to be
      found since the tested API should have failed). The result will be
      switched back to -1 few commits later when the original bug gets fixed.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      797bdced
    • J
      cputest: Don't use unsupported preferred model · f60c5e4e
      Jiri Denemark 提交于
      Using a preferred CPU model which is not in the list of CPU models
      supported by a hypervisor does not make sense.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f60c5e4e
    • J
      cputest: Don't use preferred model for minimum match CPUs · 43a94270
      Jiri Denemark 提交于
      Guest CPUs with match='minimum' should always be updated to match host
      CPU model. Trying to get different results by supplying preferred models
      does not make sense.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      43a94270
    • J
      cpu: Rename cpuDataParse · be57e689
      Jiri Denemark 提交于
      The new name is virCPUDataParse.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      be57e689
  17. 22 9月, 2016 2 次提交