1. 23 6月, 2011 2 次提交
  2. 22 6月, 2011 3 次提交
    • O
      util: Correct the error prompt string · 73b9246d
      Osier Yang 提交于
      virCommandProcessIO: It's reading from stdout or stderr of child,
      but not writing.
      73b9246d
    • O
      qemu: Fix one memory leak · 20d5e9db
      Osier Yang 提交于
      * src/qemu/qemu_domain.c: (qemuDomainAppendLog)
      
        Free "message" in "cleanup".
      20d5e9db
    • 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
  3. 21 6月, 2011 5 次提交
    • 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
      events: Correct virEventAddTimeout docs · 27e47955
      Cole Robinson 提交于
      27e47955
    • 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
    • O
      conf: Make full use of goto label · a22dbe0d
      Osier Yang 提交于
      * virDomainDefParse: There is a goto label "no_memory", which
      reports OOM error, and then fallthrough label "error". This
      patch changes things like following:
      
          virReportOOMError();
          goto error;
      
      into:
      
          goto no_memory;
      a22dbe0d
    • O
      conf: Fix one memory leak · 9a2ac25a
      Osier Yang 提交于
      Free def->numatune.memory.nodemask in virDomainDefFree.
      9a2ac25a
  4. 20 6月, 2011 12 次提交
    • M
      remote generator: Allow to annotate arrays with typecasts · 272ead55
      Matthias Bolte 提交于
      Removes special case code from the generator and handle additional
      methods.
      
      The generated version of remoteDispatchDomainPinVcpu(Flags) has no
      length check, but this check was useless anyway as it was applied to
      data that was already deserialized from its XDR form.
      272ead55
    • M
      ac77cbae
    • M
      remote: Generate virDomainGetBlockPullInfo · 6be35f5f
      Matthias Bolte 提交于
      It was already generatable but skipped.
      6be35f5f
    • T
      vcpupin: add vcpupin resetting feature to qemu driver · 7ea9778c
      Taku Izumi 提交于
      Pinning to all physical cpus means resetting, hence it is preferable to
      delete vcpupin setting of XML.
      
      This patch changes qemu driver to delete vcpupin setting by invoking
      virDomainVcpupinDel API when pinning the specified virtual cpu to
      all host physical cpus.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      7ea9778c
    • T
      vcpupin: add virDomainVcpupinDel function · 3711c0b0
      Taku Izumi 提交于
      This patch add the private API (virDomainVcpupinDel).
      This API can delete the vcpupin setting of a specified virtual cpu.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      3711c0b0
    • M
      Fix preprocessor indentation in nodeinfo.c · d967a8bf
      Matthias Bolte 提交于
      d967a8bf
    • O
      numatune: Support NUMA memory tuning in qemu driver · a6f5c9b6
      Osier Yang 提交于
      Implemented as setting NUMA policy between fork and exec as a hook,
      using libnuma. Only support memory tuning on domain process currently.
      
      For the nodemask out of range, will report soft warning instead of
      hard error in libvirt layer. (Kernel will be silent as long as one
      of set bit in the nodemask is valid on the host. E.g. For a host
      has two NUMA nodes, kernel will be silent for nodemask "01010101").
      So, soft warning is the only thing libvirt can do, as one might want
      to specify the numa policy prior to a node that doesn't exist yet,
      however, it may come as hotplug soon.
      a6f5c9b6
    • O
      numatune: Support persistent XML for numatune · d7edaf5d
      Osier Yang 提交于
      * src/conf/domain_conf.h: Introduce one new struct for representing
      NUMA tuning related stuffs.
      
      * src/conf/domain_conf.c: Parse and format numatune XML.
      d7edaf5d
    • H
      Update qemuDomainSetBlkioParameters to use flags · 8485e5a2
      Hu Tao 提交于
      8485e5a2
    • H
      update qemuDomainGetBlkioParameters to use flags · 100c39ca
      Hu Tao 提交于
      100c39ca
    • W
      build: fix building error when building without libvirtd · 34e3ec90
      Wen Congyang 提交于
      When building libvirt without libvirtd, we will receive the following error
      message:
      
      make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/tools'
        CC     virsh-virsh.o
        CC     virsh-console.o
        GEN    virt-xml-validate
        GEN    virt-pki-validate
        CCLD   virsh
      ./src/.libs/libvirt.so: undefined reference to `numa_available'
      ./src/.libs/libvirt.so: undefined reference to `numa_max_node'
      collect2: ld returned 1 exit status
      
      The reason is that: we check numactl only when building qemu driver, and qemu
      driver will not be built when bulding without libvirtd. So with_numactl's
      value is check and we will not link libnuma.so.
      
      In the other function, we call numa_available() and numa_max_node() only
      when HAVE_NUMACTL is 1. We should do the same check in the function nodeGetMemoryStats().
      34e3ec90
    • J
      apparmor: implement AppArmorSetFDLabel() · b9757fea
      Jamie Strandboge 提交于
      During a savevm operation, libvirt will now use fd migration if qemu
      supports it. When the AppArmor driver is enabled, AppArmorSetFDLabel()
      is used but since this function simply returns '0', the dynamic AppArmor
      profile is not updated and AppArmor blocks access to the save file. This
      patch implements AppArmorSetFDLabel() to get the pathname of the file by
      resolving the fd symlink in /proc, and then gives that pathname to
      reload_profile(), which fixes 'virsh save' when AppArmor is enabled.
      
      Reference: https://launchpad.net/bugs/795800
      b9757fea
  5. 17 6月, 2011 6 次提交
  6. 16 6月, 2011 4 次提交
    • M
      Fix documentation of virStreamRecv · be757a3f
      Matthias Bolte 提交于
      virStreamRecv is for reading.
      
      Also add some missing punctuation to virStreamSend's documentation.
      be757a3f
    • E
      sendkey: use consistent API convention · 1d575629
      Eric Blake 提交于
      Even though rpc uses 'unsigned int' for the _len parameter that
      passes the length of item<length>, the public libvirt APIs all
      use 'int' and filter out lengths < 0, except for virDomainSendKey.
      
      * include/libvirt/libvirt.h.in (virDomainSendKey): All other APIs
      use int for array length.
      * src/libvirt.c (virDomainSendKey): Adjust.
      * src/driver.h (virDrvDomainSendKey): Likewise.
      * daemon/remote_generator.pl: Likewise.
      1d575629
    • E
      build: export correct function names · b33cd5e3
      Eric Blake 提交于
      Detected by autobuild.sh, when targetting mingw.
      Introduced in commit 98bfdff1.
      
      * src/libvirt_private.syms: Fix typos.
      b33cd5e3
    • E
      build: avoid compiler warning on non-Linux · a1df7054
      Eric Blake 提交于
      Detected by autobuild.sh when cross-building for mingw.
      Introduced in commits ce76e853 and af35cece.
      
      * src/nodeinfo.c (nodeGetCPUStats, nodeGetMemoryStats): Mark
      parameters as potentially unused.
      a1df7054
  7. 15 6月, 2011 8 次提交
    • M
      remote generator: Handle struct returning functions better · 64000eab
      Matthias Bolte 提交于
      The position of the struct parameter in the function signature
      differs. Instead of hardcoding the handling for this add an annotation
      to the .x file to define the position.
      64000eab
    • D
      support for Xen HVM Viridian (Hyper-V) enlightenment interface · c4bd6d96
      Daniel Gollub 提交于
      Introduce libvirt support for Xen HVM Viridian (Hyper-V) enlightenment
      interface guest feature.
      
       src/conf/domain_conf.c     |    3 ++-
       src/conf/domain_conf.h     |    1 +
       src/xen/xen_hypervisor.c   |   11 +++++++++++
       src/xenapi/xenapi_driver.c |    2 ++
       src/xenapi/xenapi_utils.c  |    2 ++
       src/xenxs/xen_sxpr.c       |    4 ++++
       src/xenxs/xen_xm.c         |   12 +++++++++++-
       7 files changed, 33 insertions(+), 2 deletions(-)
      c4bd6d96
    • D
      Add support for network filter code in LXC driver · b86524e8
      Daniel P. Berrange 提交于
      The LXC driver networking uses veth device pairs. These can
      be easily hooked into the network filtering code.
      
      * src/lxc/lxc_driver.c: Add calls to setup/teardown nwfilter
      b86524e8
    • D
      Fix allocation of veth's to not skip an index · b4728dd4
      Daniel P. Berrange 提交于
      The algorithm for autoassigning vethXXX devices, was always
      skipping over the starting dev index when finding a free
      name for the guest device. This should only be done if the host
      device was autoallocated.
      
      * src/lxc/veth.c: Don't skip over veth indexes
      b4728dd4
    • J
      qemu: Translate boot config into bootindex if possible · c3068d4d
      Jiri Denemark 提交于
      Prefer bootindex=N option for -device over the old way -boot ORDER
      possibly accompanied with boot=on option for -drive. This gives us full
      control over which device will actually be used for booting guest OS.
      Moreover, if qemu doesn't support boot=on, this is the only way to boot
      of certain disks in some configurations (such as virtio disks when used
      together IDE disks) without transforming domain XML to use per device
      boot elements.
      c3068d4d
    • 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
    • A
      Implement virDomainBlockPull for the qemu driver · 784ee08d
      Adam Litke 提交于
      The virDomainBlockPull* family of commands are enabled by the
      'block_stream' and 'info block_stream' qemu monitor commands.
      
      * src/qemu/qemu_driver.c src/qemu/qemu_monitor_text.[ch]: implement disk
        streaming by using the stream and info stream text monitor commands
      * src/qemu/qemu_monitor_json.[ch]: implement commands using the qmp monitor
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      Acked-by: NDaniel P. Berrange <berrange@redhat.com>
      784ee08d
    • A
      Add virDomainBlockPull support to the remote driver · d1693bb1
      Adam Litke 提交于
      The generator can handle DomainBlockPullAll and DomainBlockPullAbort.
      DomainBlockPull and DomainBlockPullInfo must be written by hand.
      
      * src/remote/remote_protocol.x: provide defines for the new entry points
      * src/remote/remote_driver.c daemon/remote.c: implement the client and
        server side
      * src/remote_protocol-structs: structure definitions for protocol verification
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      d1693bb1