1. 22 7月, 2011 1 次提交
    • E
      build: rename files.h to virfile.h · 8e22e089
      Eric Blake 提交于
      In preparation for a future patch adding new virFile APIs.
      
      * src/util/files.h, src/util/files.c: Move...
      * src/util/virfile.h, src/util/virfile.c: ...here, and rename
      functions to virFile prefix.  Macro names are intentionally
      left alone.
      * *.c: All '#include "files.h"' uses changed.
      * src/Makefile.am (UTIL_SOURCES): Reflect rename.
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise.
      * src/libvirt_private.syms: Likewise.
      * docs/hacking.html.in: Likewise.
      * HACKING: Regenerate.
      8e22e089
  2. 21 7月, 2011 3 次提交
    • W
      cgroup: Implement cpu.cfs_period_us and cpu.cfs_quota_us tuning API · fd7c1723
      Wen Congyang 提交于
      This patch provides 4 APIs to get and set cpu.cfs_period_us and cpu.cfs_quota_us.
      fd7c1723
    • W
      Introduce the function virCgroupForVcpu · 8e64f873
      Wen Congyang 提交于
      Introduce the function virCgroupForVcpu() to create sub directory for each vcpu.
      8e64f873
    • L
      util: add virtkeycode module · 0bbf87e9
      Lai Jiangshan 提交于
      Add virtkey lib for usage-improvment and keycode translating.
      Add 4 internal API for the aim
      
      const char *virKeycodeSetTypeToString(int codeset);
      int virKeycodeSetTypeFromString(const char *name);
      int virKeycodeValueFromString(virKeycodeSet codeset, const char *keyname);
      int virKeycodeValueTranslate(virKeycodeSet from_codeset,
                                   virKeycodeSet to_offset,
                                   int key_value);
      
      * include/libvirt/libvirt.h.in: extend virKeycodeSet enum
      * src/Makefile.am: add new virtkeycode module and rule to generate
        virkeymaps.h
      * src/util/virkeycode.c src/util/virkeycode.h: new module
      * src/util/virkeycode-mapgen.py: python generator for virkeymaps.h
        out of keymaps.csv
      * src/libvirt_private.syms: extend private symbols for new module
      * .gitignore: add generated virkeymaps.h
      0bbf87e9
  3. 15 7月, 2011 1 次提交
    • E
      command: introduce virPidWait, virPidAbort · e208c38b
      Eric Blake 提交于
      When using virCommandRunAsync and saving the pid for later, it
      is useful to be able to reap that pid in the same way that it
      would have been auto-reaped by virCommand if we had passed
      NULL for the pid argument in the first place.
      
      * src/util/command.c (virPidWait, virPidAbort): New functions,
      created from...
      (virCommandWait, virCommandAbort): ...bodies of these.
      (includes): Drop duplicate <stdlib.h>.  Ensure that our pid_t
      assumptions hold.
      (virCommandRunAsync): Improve documentation.
      * src/util/command.h (virPidWait, virPidAbort): New prototypes.
      * src/libvirt_private.syms: Export them.
      * docs/internals/command.html.in: Document them.
      e208c38b
  4. 14 7月, 2011 1 次提交
    • M
      storage: Avoid memory leak on metadata fetching · 85aa40e2
      Michal Privoznik 提交于
      Getting metadata on storage allocates a memory (path) which need to
      be freed after use otherwise it gets leaked. This means after use of
      virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one
      must call virStorageFileFreeMetadata to free it. This function frees
      structure internals and structure itself.
      85aa40e2
  5. 13 7月, 2011 2 次提交
    • D
      Add auditing of filesystems · e6e90c8d
      Daniel P. Berrange 提交于
      When passing through filesystems from the host to a guest, the
      host filesystem passed must be audited
      
      * src/conf/domain_audit.{c,h}: Add virDomainAuditFS
      e6e90c8d
    • D
      Move qemu_audit.h helpers into shared code · b43070eb
      Daniel P. Berrange 提交于
      The LXC and UML drivers can both make use of auditing. Move
      the qemu_audit.{c,h} files to src/conf/domain_audit.{c,h}
      
      * src/conf/domain_audit.c: Rename from src/qemu/qemu_audit.c
      * src/conf/domain_audit.h: Rename from src/qemu/qemu_audit.h
      * src/Makefile.am: Remove qemu_audit.{c,h}, add domain_audit.{c,h}
      * src/qemu/qemu_audit.h, src/qemu/qemu_cgroup.c,
        src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
        src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c,
        src/qemu/qemu_process.c: Update for changed audit API names
      b43070eb
  6. 12 7月, 2011 2 次提交
    • D
      Keep pidfile path in qemuDomainObjPrivate struct · accfe952
      Daniel P. Berrange 提交于
      Avoid re-formatting the pidfile path everytime we need it. Create
      it once when starting the guest, and preserve it until the guest
      is shutdown.
      
      * src/libvirt_private.syms, src/util/util.c,
        src/util/util.h: Add virFileReadPidPath
      * src/qemu/qemu_domain.h: Add pidfile field
      * src/qemu/qemu_process.c: Store pidfile path in qemuDomainObjPrivate
      accfe952
    • E
      maint: rename virtaudit to match file contents · 2ceb35e1
      Eric Blake 提交于
      * src/util/virtaudit.[ch]: Rename...
      * src/util/viraudit.[ch]: ...to match virAudit* API.
      * src/Makefile.am (UTIL_SOURCES): Reflect rename.
      * daemon/libvirtd.c: Likewise.
      * po/POTFILES.in: Likewise.
      * src/libvirt_private.syms: Likewise.
      * src/qemu/qemu_audit.c: Likewise.
      2ceb35e1
  7. 08 7月, 2011 1 次提交
  8. 07 7月, 2011 2 次提交
    • E
      util: add virTrimSpaces · 01374ec8
      Eric Blake 提交于
      The next patch wants to adjust an end pointer to trim trailing
      spaces but without modifying the underlying string, but a more
      generally useful ability to trim trailing spaces in place is
      also worth providing.
      
      * src/util/util.h (virTrimSpaces, virSkipSpacesBackwards): New
      prototypes.
      * src/util/util.c (virTrimSpaces, virSkipSpacesBackwards): New
      functions.
      * src/libvirt_private.syms (util.h): Export new functions.
      Inspired by a patch by Minoru Usui.
      01374ec8
    • E
      util: fix virSkipSpaces · 82162316
      Eric Blake 提交于
      Most clients of virSkipSpaces don't want to omit backslashes.
      Also, open-coding the list of spaces is not as nice as using
      c_isspace.
      
      * src/util/util.c (virSkipSpaces): Use c_isspace.
      (virSkipSpacesAndBackslash): New function.
      * src/util/util.h (virSkipSpacesAndBackslash): New prototype.
      * src/xen/xend_internal.c (sexpr_to_xend_topology): Update caller.
      * src/libvirt_private.syms (util.h): Export new function.
      82162316
  9. 06 7月, 2011 1 次提交
    • G
      pci: initialize state values on reattach · 416814e6
      Guannan Ren 提交于
      add a new API pciDeviceReAttachInit() in pci.c to initialize state values for nodedev reattach
      
      Initialize three state value of device driver to 1. This is just for a new call to
      qemudNodeDeviceReAttach()
      416814e6
  10. 28 6月, 2011 2 次提交
    • D
      Add a virSecurityManagerSetProcessFDLabel · 8e3c6fbb
      Daniel P. Berrange 提交于
      Add a new security driver method for labelling an FD with
      the process label, rather than the image label
      
      * src/libvirt_private.syms, src/security/security_apparmor.c,
        src/security/security_dac.c, src/security/security_driver.h,
        src/security/security_manager.c, src/security/security_manager.h,
        src/security/security_selinux.c, src/security/security_stack.c:
        Add virSecurityManagerSetProcessFDLabel & impl
      8e3c6fbb
    • D
      Rename virSecurityManagerSetFDLabel method · 4438c63e
      Daniel P. Berrange 提交于
      The virSecurityManagerSetFDLabel method is used to label
      file descriptors associated with disk images. There will
      shortly be a need to label other file descriptors in a
      different way. So the current name is ambiguous. Rename
      the method to virSecurityManagerSetImageFDLabel to clarify
      its purpose
      
      * src/libvirt_private.syms,
        src/qemu/qemu_migration.c, src/qemu/qemu_process.c,
        src/security/security_apparmor.c, src/security/security_dac.c,
        src/security/security_driver.h, src/security/security_manager.c,
        src/security/security_manager.h, src/security/security_selinux.c,
        src/security/security_stack.c: s/FDLabel/ImageFDLabel/
      4438c63e
  11. 27 6月, 2011 1 次提交
    • E
      build: rename Vcpupin to VcpuPin · 28e45afc
      Eric Blake 提交于
      We already have a public virDomainPinVcpu, which implies that
      Pin and Vcpu are treated as separate words.  Unreleased commit
      e261987c introduced virDomainGetVcpupinInfo as the first public
      API that used Vcpupin, although we had prior internal uses of
      that spelling.  For consistency, change the spelling to be two
      words everywhere, regardless of whether pin comes first or last.
      
      * daemon/remote.c: Treat vcpu and pin as separate words.
      * include/libvirt/libvirt.h.in: Likewise.
      * src/conf/domain_conf.c: Likewise.
      * src/conf/domain_conf.h: Likewise.
      * src/driver.h: Likewise.
      * src/libvirt.c: Likewise.
      * src/libvirt_private.syms: Likewise.
      * src/libvirt_public.syms: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      * src/remote/remote_protocol.x: Likewise.
      * src/remote_protocol-structs: Likewise.
      Suggested by Matthias Bolte.
      28e45afc
  12. 25 6月, 2011 3 次提交
  13. 24 6月, 2011 1 次提交
  14. 23 6月, 2011 2 次提交
    • S
      cleanup: make several interface functions commonly available · df3d8c36
      Stefan Berger 提交于
      In a second cleanup step this patch makes several interface functions from macvtap.c commonly available by moving them into interface.c and prefixing their names with 'iface'. Those functions taking Linux-specific structures as parameters are only visible on Linux.
      
      ifaceRestoreMacAddress returns the return code from the ifaceSetMacAddr call and display an error message if setting the MAC address did not work. The caller is unchanged and still ignores the return code (which is ok).
      df3d8c36
    • S
      cleanup: make nlComm commonly available · 6a597883
      Stefan Berger 提交于
      In a first cleanup step, make nlComm from macvtap.c commonly available
      for other code to use. Since nlComm uses Linux-specific structures as
      parameters it's prototype is only visible on Linux.
      6a597883
  15. 22 6月, 2011 1 次提交
    • M
      qemu: domain I/O asynchronous handling · 017abcbb
      Michal Privoznik 提交于
      For virtio disks and interfaces, qemu allows users to enable or disable
      ioeventfd feature. This means, qemu can execute domain code, while
      another thread waits for I/O event. Basically, in some cases it is win,
      in some loss. This feature is available via 'ioeventfd' attribute in disk
      and interface <driver> element. It accepts 'on' and 'off'. Leaving this
      attribute out defaults to hypervisor decision.
      017abcbb
  16. 21 6月, 2011 2 次提交
    • D
      set and restore MAC address of a NIC when using PASSTHROUGH mode · cbd8227e
      Dirk Herrendoerfer 提交于
      The following patch addresses the problem that when a PASSTHROUGH
      mode DIRECT NIC connection is made the MAC address of the NIC is
      not automatically set and reset to the configured VM MAC and
      back again.
      
      The attached patch fixes this problem by setting and resetting the MAC
      while remembering the previous setting while the VM is running.
      This also works if libvirtd is restarted while the VM is running.
      
      the patch passes make syntax-check
      cbd8227e
    • C
      Promote virEvent*Handle/Timeout to public API · 6094ad7b
      Cole Robinson 提交于
      Since we virEventRegisterDefaultImpl is now a public API, callers need
      a way to invoke the default registered Handle and Timeout functions. We
      already have general functions for these internally, so promote
      them to the public API.
      
      v2:
          Actually add APIs to libvirt.h
      6094ad7b
  17. 20 6月, 2011 2 次提交
  18. 16 6月, 2011 1 次提交
  19. 15 6月, 2011 4 次提交
    • A
      Asynchronous event for BlockPull completion · 12cd77a0
      Adam Litke 提交于
      When an operation started by virDomainBlockPullAll completes (either with
      success or with failure), raise an event to indicate the final status.  This
      allows an API user to avoid polling on virDomainBlockPullInfo if they would
      prefer to use the event mechanism.
      
      * daemon/remote.c: Dispatch events to client
      * include/libvirt/libvirt.h.in: Define event ID and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle the new event
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block_stream completion and emit a libvirt block pull event
      * src/remote/remote_driver.c: Receive and dispatch events to application
      * src/remote/remote_protocol.x: Wire protocol definition for the event
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
        from QEMU monitor
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      12cd77a0
    • M
      spice: add <clipboard copypaste='yes|no'> option · 98bfdff1
      Marc-André Lureau 提交于
      From a security pov copy and paste between the guest and the client is not
      always desirable. So we need to be able to enable/disable this. The best place
      to do this from an administration pov is on the hypervisor, so the qemu cmdline
      is getting a spice disable-copy-paste option, see bug 693645. Example qemu
      invocation:
      qemu -spice port=5932,disable-ticketing,disable-copy-paste
      
      https://bugzilla.redhat.com/show_bug.cgi?id=693661
      98bfdff1
    • M
      virNodeGetMemoryStats: Implement linux support · af35cece
      Minoru Usui 提交于
      Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
      af35cece
    • M
      virNodeGetCPUStats: Implement linux support · ce76e853
      Minoru Usui 提交于
      Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
      ce76e853
  20. 13 6月, 2011 1 次提交
  21. 08 6月, 2011 1 次提交
  22. 07 6月, 2011 1 次提交
  23. 02 6月, 2011 4 次提交
    • D
      Add a plugin for the 'sanlock' project · 9f135031
      Daniel P. Berrange 提交于
      Sanlock is a project that implements a disk-paxos locking
      algorithm. This is suitable for cluster deployments with
      shared storage.
      
      * src/Makefile.am: Add dlopen plugin for sanlock
      * src/locking/lock_driver_sanlock.c: Sanlock driver
      * configure.ac: Check for sanlock
      * libvirt.spec.in: Add a libvirt-lock-sanlock RPM
      9f135031
    • D
      Allow leases to be hotpluged with QEMU guests · 30ffe7bc
      Daniel P. Berrange 提交于
      * src/conf/domain_conf.c, src/conf/domain_conf.h: APIs for
        inserting/finding/removing virDomainLeaseDefPtr instances
      * src/qemu/qemu_driver.c: Wire up hotplug/unplug for leases
      * src/qemu/qemu_hotplug.h, src/qemu/qemu_hotplug.c: Support
        for hotplug and unplug of leases
      30ffe7bc
    • D
      Add higher level lock API for domain objects · ad73a937
      Daniel P. Berrange 提交于
      To facilitate use of the locking plugins from hypervisor drivers,
      introduce a higher level API for locking virDomainObjPtr instances.
      In includes APIs targetted to VM startup, and hotplug/unplug
      
      * src/Makefile.am: Add domain lock API
      * src/locking/domain_lock.c, src/locking/domain_lock.h: High
        level API for domain locking
      ad73a937
    • D
      Basic framework for lock manager plugins · 6a943419
      Daniel P. Berrange 提交于
      Define the basic framework lock manager plugins. The
      basic plugin API for 3rd parties to implemented is
      defined in
      
        src/locking/lock_driver.h
      
      This allows dlopen()able modules for alternative locking
      schemes, however, we do not install the header. This
      requires lock plugins to be in-tree allowing changing of
      the lock manager plugin API in future.
      
      The libvirt code for loading & calling into plugins
      is in
      
        src/locking/lock_manager.{c,h}
      
      * include/libvirt/virterror.h, src/util/virterror.c: Add
        VIR_FROM_LOCKING
      * src/locking/lock_driver.h: API for lock driver plugins
        to implement
      * src/locking/lock_manager.c, src/locking/lock_manager.h:
        Internal API for managing locking
      * src/Makefile.am: Add locking code
      6a943419