1. 22 6月, 2011 3 次提交
    • 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
    • E
      build: require newer netcf when it is available · 1486099c
      Eric Blake 提交于
      When building rpms for newer Fedora or RHEL, take advantage of the
      newer netcf packaging to guarantee interface snapshot support.
      
      * libvirt.spec.in (BuildRequires): Bump minimum version on
      platforms that support netcf 0.1.8.
      1486099c
    • E
      virsh: avoid bogus description · 491858bf
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=682121
      
      Gettext reserves the empty string for internal use, and it must
      not be passed through _().  We were violating this for commands
      that (for whatever reason) used "" for their description.
      
      * tools/virsh.c (vshCmddefHelp): Don't translate empty string.
      Reported by Tatsuo Kawasaki.
      491858bf
  2. 21 6月, 2011 16 次提交
    • 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
      python: Mark event callback wrappers as private · 7268cb92
      Cole Robinson 提交于
      These functions aren't intended to be called directly by users, so mark
      them as private.
      
      While we're at it, remove unneeded exception handling, and break some
      long lines.
      7268cb92
    • C
      python: events: Fix C->Python handle callback prototype · f2fb235b
      Cole Robinson 提交于
      If registering our own event loop implementation written in python,
      any handles or timeouts callbacks registered by libvirt C code must
      be wrapped in a python function. There is some argument trickery that
      makes this all work, by wrapping the user passed opaque value in
      a tuple, along with the callback function.
      
      Problem is, the current setup requires the user's event loop to know
      about this trickery, rather than just treating the opaque value
      as truly opaque.
      
      Fix this in a backwards compatible manner, and adjust the example
      python event loop to do things the proper way.
      f2fb235b
    • C
      python: Add bindings for virEvent*Handle/Timeout · d0e3f3d6
      Cole Robinson 提交于
      d0e3f3d6
    • 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
    • C
      python: Implement virStreamSend/RecvAll helpers · 3b04871e
      Cole Robinson 提交于
      Pure python implementation. The handler callbacks have been altered
      a bit compared to the C API: RecvAll doesn't pass length of the data read
      since that can be trivially obtained from python string objects, and SendAll
      requires the handler to return the string data to send rather than
      store the data in a string pointer.
      3b04871e
    • C
      python: Implement virStreamSend/Recv · ca55dc59
      Cole Robinson 提交于
      The return values for the python version are different that the C version
      of virStreamSend: on success we return a string, an error raises an exception,
      and if the stream would block we return int(-2). We need to do this
      since strings aren't passed by reference in python.
      ca55dc59
    • 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
    • C
      python: Implement bindings for virStreamEventAddCallback · b1ede4cf
      Cole Robinson 提交于
      v2:
          Don't generate virStreamFree
      b1ede4cf
    • C
      eb3151b4
    • C
      python: libvirt-override: use simpler debug · e8c8fc14
      Cole Robinson 提交于
      In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED
      to avoid warnings.
      
      v2:
          Use #if 0 to comment out debug define
      e8c8fc14
    • E
      virsh: enhance snapshot-create-as · 9256ad84
      Eric Blake 提交于
      Similar to pool-create-as.
      
      * tools/virsh.c (cmdSnapshotCreateAs): Add --print-xml.
      * tools/virsh.pod: Document it.
      9256ad84
    • E
      virsh: add snapshot-create-as command · 1546dcf8
      Eric Blake 提交于
      Producing an xml file just for name and description fields is
      overkill; this makes life easier from virsh.
      
      * tools/virsh.c (cmdSnapshotCreateAs): New command.
      (snapshotCmds): Install it.
      * tools/virsh.pod: Document it.
      1546dcf8
    • E
      virsh: clarify snapshot vs. save · ea71d828
      Eric Blake 提交于
      * tools/virsh.c (info_snapshot_create, info_save): Clarify
      description.
      * tools/virsh.pod (save): Likewise.
      ea71d828
  3. 20 6月, 2011 20 次提交
    • D
      Fix compile warnings in virsh vcpupin · b3257680
      Daniel P. Berrange 提交于
      The 'char *cur' variable was being assigned from a
      'const char *' string, thus discarding constness.
      As well as causing a compile warning, it masked a
      piece of code which attempts to assign to the
      previously const string.
      
      * tools/virsh.c: Fix const-ness of 'cur' variable in vcpupin
      b3257680
    • 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
    • T
      vcpupin: add reset option to virsh vcpupin command · c4a8ca71
      Taku Izumi 提交于
      When resetting vcpupin setting, we have to specify all host physical
      cpus as a cpulist parameter of virsh vcpupin command. It's a little
      tedious.
      
      This patch changes to allow to receive the special keyword 'r' as a cpulist
      parameter of virsh vcpupin command when resetting vcpupin setting.
      
      If you set the following:
      
       # virsh vcpupin VM 0 r
      
      the vcpu0 will be pinned to all physical cpus.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      c4a8ca71
    • T
      vcpupin: improve vcpupin definition of virsh vcpupin · 2903534a
      Taku Izumi 提交于
      When using vcpupin command, we have to speficy comma-separated list as cpulist,
      but this is tedious in case the number of phsycal cpus is large.
      This patch improves this by introducing special markup "-" and "^" which are
      similar to XML schema of "cpuset" attribute.
      
      The example:
      
       # virsh vcpupin Guest 0 0-15,^8
      
       is identical to
      
       # virsh vcpupin Guest 0 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15
      
      NOTE: The expression is sequentially evaluated, so "0-15,^8" is not identical
      to "^8,0-15".
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      2903534a
    • M
      Fix preprocessor indentation in nodeinfo.c · d967a8bf
      Matthias Bolte 提交于
      d967a8bf
    • M
      Move XenAPI driver to correct spec file section · 7e3205cd
      Matthias Bolte 提交于
      The XenAPI driver works like the ESX and PHyp driver by using its
      own HTTPS based remote protocol.
      7e3205cd
    • O
      numatune: Add tests for numatune XML · b369114d
      Osier Yang 提交于
      Only add tests for qemuxmlargvtest.c, as there is no qemu command line
      for numatune XML, just want to make sure the XML could be validated
      well.
      b369114d
    • 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
    • O
      numatune: Add doc for new numatune XML · e6ea48c3
      Osier Yang 提交于
      e6ea48c3
    • O
      numatune: Define XML schema · e68b9ab0
      Osier Yang 提交于
      Example XML:
      
      <numatune>
        <memory mode="strict" nodeset="0-10,^4"/>
      </numatune>
      
      Please enter the commit message for your changes. Lines starting
      e68b9ab0
    • H
      Update qemuDomainSetBlkioParameters to use flags · 8485e5a2
      Hu Tao 提交于
      8485e5a2
    • H
      update qemuDomainGetBlkioParameters to use flags · 100c39ca
      Hu Tao 提交于
      100c39ca
    • H
      Add new parameters for blkiotune · 1bb414af
      Hu Tao 提交于
      Add --config, --live and --current for command blkiotune
      1bb414af
    • 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
  4. 17 6月, 2011 1 次提交