1. 16 7月, 2013 1 次提交
  2. 11 7月, 2013 1 次提交
  3. 10 7月, 2013 1 次提交
  4. 09 5月, 2013 1 次提交
  5. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  6. 19 4月, 2013 1 次提交
  7. 13 2月, 2013 1 次提交
    • E
      util: use new virendian.h macros · 731ad692
      Eric Blake 提交于
      This makes code easier to read, by avoiding lines longer than
      80 columns and removing the repetition from the callers.
      
      * src/util/virstoragefile.c (qedGetHeaderUL, qedGetHeaderULL):
      Delete in favor of more generic macros.
      (qcow2GetBackingStoreFormat, qcowXGetBackingStore)
      (qedGetBackingStore, virStorageFileMatchesVersion)
      (virStorageFileGetMetadataInternal): Use new macros.
      * src/cpu/cpu_x86.c (x86VendorLoad): Likewise.
      731ad692
  8. 21 12月, 2012 4 次提交
  9. 19 12月, 2012 2 次提交
  10. 02 11月, 2012 1 次提交
  11. 24 10月, 2012 1 次提交
    • P
      cpu: Add recently added cpu feature flags. · 012f9b19
      Peter Krempa 提交于
      Qemu has added some new feature flags. This patch adds them to libvirt.
      
      The new features are for the cpuid function 0x7 that takes an argument
      in the ecx register. Currently only 0x0 is used as the argument so I was
      lazy and I just clear the registers to 0 before calling cpuid. In future
      when there maybe will be some other possible arguments, we will need to
      improve the cpu detection code to take this into account.
      012f9b19
  12. 21 9月, 2012 1 次提交
  13. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  14. 19 7月, 2012 1 次提交
  15. 23 4月, 2012 1 次提交
    • P
      cpu: Improve error reporting on incompatible CPUs · a2ba53cf
      Peter Krempa 提交于
      This patch modifies the CPU comparrison function to report the
      incompatibilities in more detail to ease identification of problems.
      
      * src/cpu/cpu.h:
          cpuGuestData(): Add argument to return detailed error message.
      * src/cpu/cpu.c:
          cpuGuestData(): Add passthrough for error argument.
      * src/cpu/cpu_x86.c
          x86FeatureNames(): Add function to convert a CPU definition to flag
                             names.
          x86Compute(): - Add error message parameter
                        - Add macro for reporting detailed error messages.
                        - Improve error reporting.
                        - Simplify calculation of forbidden flags.
          x86DataIteratorInit():
          x86cpuidMatchAny(): Remove functions that are no longer needed.
      * src/qemu/qemu_command.c:
          qemuBuildCpuArgStr(): - Modify for new function prototype
                                - Add detailed error reports
                                - Change error code on incompatible processors
                                  to VIR_ERR_CONFIG_UNSUPPORTED instead of
                                  internal error
      * tests/cputest.c:
          cpuTestGuestData(): Modify for new function prototype
      a2ba53cf
  16. 27 3月, 2012 1 次提交
    • M
      Cleanup for a return statement in source files · 9943276f
      Martin Kletzander 提交于
      Return statements with parameter enclosed in parentheses were modified
      and parentheses were removed. The whole change was scripted, here is how:
      
      List of files was obtained using this command:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$'
      
      Found files were modified with this command:
      sed -i -e                                                                 \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      
      Then checked for nonsense.
      
      The whole command looks like this:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      9943276f
  17. 17 1月, 2012 2 次提交
    • J
      cpu: Update guest CPU in host-* mode · 277bc0dc
      Jiri Denemark 提交于
      VIR_DOMAIN_XML_UPDATE_CPU flag for virDomainGetXMLDesc may be used to
      get updated custom mode guest CPU definition in case it depends on host
      CPU. This patch implements the same behavior for host-model and
      host-passthrough CPU modes.
      277bc0dc
    • J
      cpu: Optionally forbid fallback CPU models · a6f88cbd
      Jiri Denemark 提交于
      In case a hypervisor doesn't support the exact CPU model requested by a
      domain XML, we automatically fallback to a closest CPU model the
      hypervisor supports (and make sure we add/remove any additional features
      if needed). This patch adds 'fallback' attribute to model element, which
      can be used to disable this automatic fallback.
      a6f88cbd
  18. 12 5月, 2011 1 次提交
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4
  19. 11 1月, 2011 1 次提交
  20. 14 12月, 2010 1 次提交
    • J
      cpu: Unify CPUID data structures · 8806c0db
      Jiri Denemark 提交于
      So far, CPUID data were stored in two different data structures. First
      of them was a structure allowing direct access for CPUID data according
      to function number and the second was a plain array of struct
      cpuX86cpuid. This was a silly design which resulted in converting data
      from one type to the other and back again or implementing similar
      functionality for both data structures.
      
      The patch leaves only the direct access structure. This makes the code
      both smaller and more maintainable since operations on different objects
      can use common low-level operations.
      
      All 57 tests for cpu subsystem still pass after this rewrite.
      8806c0db
  21. 14 10月, 2010 2 次提交
    • J
      cpu: Use vendor in baseline CPU only if all hosts use it · b2de33e2
      Jiri Denemark 提交于
      When only some host CPUs given to cpuBaseline contain <vendor> element,
      baseline CPU should not contain it. Otherwise the result would not be
      compatible with the host CPUs without vendor. CPU vendors are still
      taken into account when computing baseline CPU, it's just removed from
      the result.
      b2de33e2
    • J
      cpu: Fix vendor for recent CPU models · ac7afbeb
      Jiri Denemark 提交于
      Recent CPU models were specified using invalid vendor element
      <vendor>NAME</vendor>, which was silently ignored due to a bug in the
      code which was parsing it.
      ac7afbeb
  22. 13 10月, 2010 1 次提交
    • D
      Enable support for nested SVM · f98a6cd6
      Daniel P. Berrange 提交于
      This enables support for nested SVM using the regular CPU
      model/features block. If the CPU model or features include
      'svm', then the '-enable-nesting' flag will be added to the
      QEMU command line. Latest out of tree patches for nested
      'vmx', no longer require the '-enable-nesting' flag. They
      instead just look at the cpu features. Several of the models
      already include svm support, but QEMU was just masking out
      the svm bit silently. So this will enable SVM on such
      models
      
      * src/qemu/qemu_conf.h: flag for -enable-nesting
      * src/qemu/qemu_conf.c: Use -enable-nesting if VMX or SVM are in
        the CPUID
      * src/cpu/cpu.h, src/cpu/cpu.c: API to check for a named feature
      * src/cpu/cpu_x86.c: x86 impl of feature check
      * src/libvirt_private.syms: Add cpuHasFeature
      * src/qemuhelptest.c: Add nesting flag where required
      f98a6cd6
  23. 13 8月, 2010 1 次提交
  24. 13 7月, 2010 1 次提交
    • J
      cpuCompare: Fix comparison of two host CPUs · ac3daf08
      Jiri Denemark 提交于
      When a CPU to be compared with host CPU describes a host CPU instead of
      a guest CPU, the result is incorrect. This is because instead of
      treating additional features in host CPU description as required, they
      were treated as if they were mentioned with all possible policies at the
      same time.
      ac3daf08
  25. 07 7月, 2010 3 次提交
    • J
      cpu: Add support for CPU vendor · af53714f
      Jiri Denemark 提交于
      By specifying <vendor> element in CPU requirements a guest can be
      restricted to run only on CPUs by a given vendor. Host CPU vendor is
      also specified in capabilities XML.
      
      The vendor is checked when migrating a guest but it's not forced, i.e.,
      guests configured without <vendor> element can be freely migrated.
      af53714f
    • J
      cpuBaseline: Detect empty set of common features · d9332c23
      Jiri Denemark 提交于
      In case the set of CPUs has no features in common, report incompatible
      CPUs instead of returning the simplest CPU model with all features
      disabled.
      d9332c23
    • J
      cpuBaseline: Don't mess with the CPU returned by arch driver · 4e0f648f
      Jiri Denemark 提交于
      All features in the baseline CPU definition were always created with
      policy='require' even though an arch driver returned them with different
      policy settings.
      4e0f648f
  26. 17 5月, 2010 1 次提交
  27. 22 4月, 2010 2 次提交
    • J
      Use configured CPU model if possible · b9a2552d
      Jiri Denemark 提交于
      Adds ability to provide a preferred CPU model for CPUID data decoding.
      Such model would be considered as the best possible model (if it's
      supported by hypervisor) regardless on number of features which have to
      be added or removed for describing required CPU.
      b9a2552d
    • J
      Support removing features when converting data to CPU · 53c4f9fa
      Jiri Denemark 提交于
      So far, when CPUID data were converted into CPU model and features, the
      features can only be added to the model. As a result, when a guest asked
      for something like "qemu64,-svm" it would get a qemu32 plus a bunch of
      additional features instead.
      
      This patch adds support for removing feature from the base model.
      Selection algorithm remains the same: the best CPU model is the model
      which requires lowest number of features to be added/removed from it.
      53c4f9fa
  28. 08 4月, 2010 2 次提交
    • J
      Fix CPU comparison for x86 arch · e26997f6
      Jiri Denemark 提交于
      When comparing a CPU to host CPU, the result would be
      VIR_CPU_COMPARE_SUPERSET (or even VIR_CPU_COMPARE_INCOMPATIBLE if strict
      match was required) even though the two CPUs were identical.
      e26997f6
    • J
      Cleanup x86Compute() · ce4c82f1
      Jiri Denemark 提交于
      No change in semantics.
      ce4c82f1
  29. 27 3月, 2010 1 次提交
    • J
      cpuUpdate() for updating guest CPU according to host CPU · 661ae104
      Jiri Denemark 提交于
      Useful mainly for migration. cpuUpdate changes guest CPU requirements in
      the following way:
      
      - match == "strict" || match == "exact"
          - optional features which are supported by host CPU are changed into
            required features
          - optional features which are not supported by host CPU are disabled
          - all other features remain untouched
      - match == "minimum"
          - match is changed into "exact"
          - optional features and all features not mentioned in guest CPU
            specification which are supported by host CPU become required
            features
          - other optional features are disabled
          - all other features remain untouched
      
      This ensures that no feature will suddenly disappear from the guest
      after migration.
      661ae104
  30. 10 3月, 2010 1 次提交