1. 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
  2. 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
  3. 20 6月, 2011 4 次提交
  4. 17 6月, 2011 2 次提交
  5. 15 6月, 2011 6 次提交
    • 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
    • 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
  6. 14 6月, 2011 6 次提交
    • C
      qemu: Fix parsing 'info chardev' · c0980a3a
      Cole Robinson 提交于
      If qemu supports -chardev, our char frontend aliases are ex. 'charserial0'
      not just 'serial0'. Typically we don't use this code path because the
      pty's are scraped from stdout.
      c0980a3a
    • C
      qemu: Scrape stdout for virtio console pty · d0b1a9a0
      Cole Robinson 提交于
      Currently we forget to do this and have to fallback to info chardev (which
      also fails, see following patch)
      d0b1a9a0
    • O
      qemu: Parse current balloon value returned by query_balloon · 41514f7b
      Osier Yang 提交于
      Qemu once supported following memory stats which will returned by
      "query_balloon":
      
          stat_put(dict, "actual", actual);
          stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
          stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
          stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
          stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
          stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
          stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
      
      But it later disabled all the stats except "actual" by commit
      07b0403dfc2b2ac179ae5b48105096cc2d03375a.
      
      libvirt doesn't parse "actual", so user will always see a empty result
      with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
      we should support parsing "actual".
      41514f7b
    • T
      vcpupin: Fix cpu affinity setting bug of qemu driver · d5f3320d
      Taku Izumi 提交于
      There is the case where cpu affinites for vcpu of qemu doesn't work
      correctly. For example, if only one vcpupin setting entry is provided
      and its setting is not for vcpu0, it doesn't work.
      
         # virsh dumpxml VM
         ...
         <vcpu>4</vcpu>
         <cputune>
           <vcpupin vcpu='3' cpuset='9-11'/>
         </cputune>
         ...
      
         # virsh start VM
         Domain VM started
      
         # virsh vcpuinfo VM
         VCPU:           0
         CPU:            31
         State:          running
         CPU time:       2.5s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           1
         CPU:            12
         State:          running
         CPU time:       0.9s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           2
         CPU:            30
         State:          running
         CPU time:       1.5s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
         VCPU:           3
         CPU:            13
         State:          running
         CPU time:       1.7s
         CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
      
      This patch fixes this problem.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      d5f3320d
    • H
      Deprecate several CURRENT/LIVE/CONFIG enums · fbd7820b
      Hu Tao 提交于
      This patch deprecates following enums:
      
      VIR_DOMAIN_MEM_CURRENT
      VIR_DOMAIN_MEM_LIVE
      VIR_DOMAIN_MEM_CONFIG
      
      VIR_DOMAIN_VCPU_LIVE
      VIR_DOMAIN_VCPU_CONFIG
      
      VIR_DOMAIN_DEVICE_MODIFY_CURRENT
      VIR_DOMAIN_DEVICE_MODIFY_LIVE
      VIR_DOMAIN_DEVICE_MODIFY_CONFIG
      
      And modify internal codes to use virDomainModificationImpact.
      fbd7820b
    • S
      qemu: Faster response time to qemu startup errors · f5358fdc
      Stefan Berger 提交于
      The below patch decreases the response time of libvirt to errors reported by Qemu upon startup by checking whether the qemu process is still alive while polling for the local socket to show up.
      
      This patch also introduces a special handling of signal for the Win32 part of virKillProcess.
      f5358fdc
  7. 13 6月, 2011 9 次提交
  8. 10 6月, 2011 1 次提交
  9. 08 6月, 2011 3 次提交
    • E
      build: break some long lines · d7814b21
      Eric Blake 提交于
      As long as I was already touching the function...
      
      * src/qemu/qemu_hotplug.c (qemuDomainChangeGraphics): Line wrap.
      d7814b21
    • E
      qemu: add missing break statement · ddc5b158
      Eric Blake 提交于
      Detected by Coverity.  Bug introduced in commit 9d73efdb (v0.8.8).
      
      * src/qemu/qemu_hotplug.c (qemuDomainChangeGraphics): Don't report
      error on success.
      ddc5b158
    • E
      qemu: reorder checks for safety · 4eb17d64
      Eric Blake 提交于
      Detected by Coverity.  All existing callers happen to be in
      range, so this isn't too serious.
      
      * src/qemu/qemu_cgroup.c (qemuCgroupControllerActive): Check
      bounds before dereference.
      4eb17d64
  10. 07 6月, 2011 2 次提交
  11. 06 6月, 2011 1 次提交
    • D
      Fix QEMU p2p v2 migration when run from a v3 client · 3e87a390
      Daniel P. Berrange 提交于
      When peer-2-peer migration was invoked by a client supporting
      v3, but where the target server only supported v2, we'd not
      correctly shutdown the guest.
      
      * src/qemu/qemu_migration.c: Ensure guest is shutdown in
        v2 peer 2 peer migration
      3e87a390
  12. 04 6月, 2011 3 次提交
    • D
      Don't raise an error if the migration cookie is NULL · a50f5f6f
      Daniel P. Berrange 提交于
      The v2 migration protocol doesn't use cookies, so we should not
      be raising an error if the cookie parameters are NULL.
      
      * src/qemu/qemu_migration.c: Don't raise error if cookie is NULL
      a50f5f6f
    • D
      Fix check of virKillProcess return status · a018c0b9
      Daniel P. Berrange 提交于
      The error code for virKillProcess is returned in the errno variable
      not the return value. THis mistake caused the logs to be filled with
      errors when shutting down QEMU processes
      
      * src/qemu/qemu_process.c: Fix process kill check.
      a018c0b9
    • E
      API: consolidate common unreleased enums · 33d90baf
      Eric Blake 提交于
      This commit is safe precisely because there has been no release
      for any of the enum values being deleted (they were added post-0.9.1).
      
      After the 0.9.2 release, we can then take advantage of
      virDomainModificationImpact in more places.
      
      * include/libvirt/libvirt.h.in (virDomainModificationImpact): New
      enum.
      (virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since
      these were never released, and the new enum works fine here.
      * src/libvirt.c	(virDomainGetMemoryParameters)
      (virDomainSetMemoryParameters)
      (virDomainGetSchedulerParametersFlags)
      (virDomainSetSchedulerParametersFlags): Update documentation.
      * src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters)
      (qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags)
      (qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags)
      (qemuGetSchedulerParameters): Adjust clients.
      * tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise.
      Based on ideas by Daniel Veillard and Hu Tao.
      33d90baf