1. 09 2月, 2017 1 次提交
    • M
      cpu: fix typo: rename __kvm_hv_spinlock to __kvm_hv_spinlocks · c3ee75e5
      Maxim Nestratov 提交于
      Strings associated with virDomainHyperv values in domain_conf.c are used to
      construct HyperV CPU features names to be compared with names defined in
      cpu_x86_data.h and the names for HyperV "spinlocks" feature don't match.
      This leads to a misleading warning:
      "host doesn't support hyperv 'spinlocks' feature" even when it's supported.
      Let's fix it and rename along with it VIR_CPU_x86_KVM_HV_SPINLOCK to
      VIR_CPU_x86_KVM_HV_SPINLOCKS.
      Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
      c3ee75e5
  2. 09 6月, 2016 3 次提交
  3. 30 3月, 2016 1 次提交
    • P
      qemu_process: add check for hyperv features · 95bbe4bf
      Pavel Hrdina 提交于
      Commit 7068b56c introduced several hyperv features.  Not all hyperv
      features are supported by old enough kernels and we shouldn't allow to
      start a guest if kernel doesn't support any of the hyperv feature.
      
      There is one exception, for backward compatibility we cannot error out
      if one of the RELAXED, VAPIC or SPINLOCKS isn't supported, for the same
      reason we ignore invtsc, to not break restoring saved domains with older
      libvirt.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      95bbe4bf
  4. 08 11月, 2013 2 次提交
    • P
      cpu: x86: Add internal CPUID features support and KVM feature bits · 2e8f9080
      Peter Krempa 提交于
      Some of the emulator features are presented in the <features> element in
      the domain XML although they are virtual CPUID feature bits when
      presented to the guest. To avoid confusing the users with these
      features, as they are not configurable via the <cpu> element, this patch
      adds an internal array where those can be stored privately instead of
      exposing them in the XML.
      
      Additionaly KVM feature bits are added as example usage of this code.
      2e8f9080
    • P
      cpu_x86: Refactor storage of CPUID data to add support for KVM features · f80a11c9
      Peter Krempa 提交于
      The CPUID functions were stored in multiple arrays according to a
      specified prefix of those. This made it very hard to add another prefix
      to store KVM CPUID features (0x40000000). Instead of hardcoding a third
      array this patch changes the approach used:
      
      The code is refactored to use a single array where the CPUID functions
      are stored ordered by the cpuid function so that they don't depend on
      the specific prefix and don't waste memory. The code is also less
      complex using this approach. A trateoff to this is the change from O(N)
      complexity to O(N^2) in x86DataAdd and x86DataSubtract. The rest of the
      functions were already using O(N^2) algorithms.
      f80a11c9
  5. 15 10月, 2013 2 次提交
  6. 21 9月, 2012 1 次提交
  7. 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
  8. 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
  9. 10 3月, 2010 1 次提交
  10. 18 1月, 2010 1 次提交
  11. 18 12月, 2009 1 次提交
    • J
      Adds CPU selection infrastructure · 7286882c
      Jiri Denemark 提交于
      Each driver supporting CPU selection must fill in host CPU capabilities.
      When filling them, drivers for hypervisors running on the same node as
      libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
      such as VMware, need to implement their own way of getting such data.
      Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
      
      When implementing virConnectCompareCPU(), a hypervisor driver can just
      call cpuCompareXML() function with host CPU capabilities.
      
      For each guest for which a driver supports selecting CPU models, it must
      set the appropriate feature in guest's capabilities:
      
          virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
      
      Actions needed when a domain is being created depend on whether the
      hypervisor understands raw CPU data (currently CPUID for i686, x86_64
      architectures) or symbolic names has to be used.
      
      Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
      
      - convert guest CPU configuration from domain's XML into a set of raw
        data structures each representing one of the feature policies:
      
          cpuEncode(conn, architecture, guest_cpu_config,
                    &forced_data, &required_data, &optional_data,
                    &disabled_data, &forbidden_data)
      
      - create a mask or whatever the hypervisor expects to see and pass it
        to the hypervisor
      
      Typical use by hypervisors with symbolic model names (such as QEMU):
      
      - get raw CPU data for a computed guest CPU:
      
          cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
      
      - decode raw data into virCPUDefPtr with a possible restriction on
        allowed model names:
      
          cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
      
      - pass guest->model and guest->features to the hypervisor
      
      * src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
        src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
        src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
      * configure.in: check for CPUID instruction
      * src/Makefile.am: glue the new files in
      * src/libvirt_private.syms: add new private symbols
      * po/POTFILES.in: add new cpu files containing translatable strings
      7286882c
  12. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  13. 16 1月, 2009 1 次提交
  14. 20 11月, 2008 1 次提交
  15. 10 10月, 2008 1 次提交
  16. 21 8月, 2008 1 次提交
  17. 08 2月, 2008 1 次提交
    • M
      Fix gcc-4.3.0 "inlining failed" warning. · 3da5504e
      Mark McLoughlin 提交于
      * src/internal.h: move xstrol() variants from here ...
      
      * src/util.[ch]: ... to here and rename to virStrToLong()
      
      * src/libvirt_sym.version: export __virStrToLong_i() for
      virsh and qemud.
      
      * src/nodeinfo.c, src/stats_linux.c, src/virsh.c,
        src/xend_internal.c, qemud/qemud.c: replace xstrtol()
      calls with virStrToLong()
      
      * src/nodeinfo.h: don't include internal.h, which was only
      needed for xstrtol(), but instead include libvirt.h which
      is suffificient for the declarations in the header.
      3da5504e
  18. 26 7月, 2007 1 次提交
  19. 29 6月, 2007 1 次提交
  20. 27 6月, 2007 10 次提交
  21. 16 3月, 2007 1 次提交
  22. 23 2月, 2007 2 次提交
  23. 15 2月, 2007 1 次提交
    • M
      Tue Feb 14 16:17:51 IST 2007 Mark McLoughlin <markmc@redhat.com> · 8356c43e
      Mark McLoughlin 提交于
              * include/libvirt/libvirt.h.in, src/libvirt.c: add
              virNetworkGetBridgeName() to allow finding out what
              bridge to connect to in order to join a network.
      
              * src/driver.h: add networkGetBridgeName() to vtable.
      
              * qemud/protocol.h: add the request and reply to
              the qemud protocol.
      
              * qemud/dispatch.c, qemud/driver.[ch]: handle them
              here.
      
              * src/qemu_internal.c: implement GetBridgeName()
              in the qemu driver.
      
              * src/libvirt_sym.version: add new symbol.
      8356c43e
  24. 14 2月, 2007 2 次提交