1. 22 3月, 2013 4 次提交
  2. 21 3月, 2013 4 次提交
  3. 20 3月, 2013 3 次提交
    • G
      NUMA: cleanup for numa related codes · 45e9d27a
      Gao feng 提交于
      Intend to reduce the redundant code,use virNumaSetupMemoryPolicy
      to replace virLXCControllerSetupNUMAPolicy and
      qemuProcessInitNumaMemoryPolicy.
      
      This patch also moves the numa related codes to the
      file virnuma.c and virnuma.h
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      45e9d27a
    • G
      rename qemuGetNumadAdvice to virNumaGetAutoPlacementAdvice · 763edb5e
      Gao feng 提交于
      qemuGetNumadAdvice will be used by LXC driver, rename
      it to virNumaGetAutoPlacementAdvice and move it to virnuma.c
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      763edb5e
    • O
      qemu: add dtb option support · 0b3509e2
      Olivia Yin 提交于
      The "dtb" option sets the filename for the device tree.
      If without this option support, "-dtb file" will be converted into
      <qemu:commandline> in domain XML file.
      For example, '-dtb /media/ram/test.dtb' will be converted into
        <qemu:commandline>
          <qemu:arg value='-dtb'/>
          <qemu:arg value='/media/ram/test.dtb'/>
        </qemu:commandline>
      
      This is not very friendly.
      This patchset add special <dtb> tag like <kernel> and <initrd>
      which is easier for user to write domain XML file.
        <os>
          <type arch='ppc' machine='ppce500v2'>hvm</type>
          <kernel>/media/ram/uImage</kernel>
          <initrd>/media/ram/ramdisk</initrd>
          <dtb>/media/ram/test.dtb</dtb>
          <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline>
        </os>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0b3509e2
  4. 18 3月, 2013 1 次提交
    • J
      qemu: Fix startupPolicy regression · ef3cd647
      Jiri Denemark 提交于
      Commit 82d5fe54
      
          qemu: check backing chains even when cgroup is omitted
      
      added backing file checks just before the code that removes optional
      disks if they are not present. However, the backing chain code fails in
      case the disk file does not exist, which makes qemuProcessStart fail
      regardless on configured startupPolicy.
      
      Note that startupPolicy implementation is still wrong after this patch
      since it only check the first file in a possible chain. It should rather
      check the complete backing chain. But this is an existing limitation
      that can be solved later. After all, startupPolicy is most useful for
      CDROM images and they won't make use of backing files in most cases.
      ef3cd647
  5. 16 3月, 2013 4 次提交
  6. 15 3月, 2013 4 次提交
  7. 14 3月, 2013 4 次提交
    • E
      qemu: detect multi-head qxl via more than version check · 5ac846e4
      Eric Blake 提交于
      Multi-head QXL support is so useful that distros have started to
      backport it to qemu earlier than 1.2.  After discussion with
      Alon Levy, we determined that the existence of the qxl-vga.surfaces
      property is a reliable indicator of whether '-device qxl-vga' works,
      or whether we have to stick to the older '-vga qxl'.  I'm leaving
      in the existing check for QEMU_CAPS_DEVICE_VIDEO_PRIMARY tied to
      qemu 1.2 and newer (in case qemu is built without qxl support),
      but for those distros that backport qxl, this additional capability
      check will allow the correct command line for both RHEL 6.3 (which
      lacks the feature) and RHEL 6.4 (where qemu still claims to be
      version 0.12.2.x, but has backported multi-head qxl).
      
      * src/qemu/qemu_capabilities.c (virQEMUCapsObjectPropsQxlVga): New
      property test.
      (virQEMUCapsExtractDeviceStr): Probe for backport of new
      capability to qemu earlier than 1.2.
      * tests/qemuhelpdata/qemu-kvm-1.2.0-device: Update test.
      * tests/qemuhelpdata/qemu-1.2.0-device: Likewise.
      * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel62-beta-device:
      Likewise.
      5ac846e4
    • P
      virtio-rng: Add rate limiting options for virtio-RNG · 32bd699f
      Peter Krempa 提交于
      Qemu's implementation of virtio RNG supports rate limiting of the
      entropy used. This patch exposes the option to tune this functionality.
      
      This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4
      
      The rate limiting is exported in the XML as:
      <devices>
        ...
        <rng model='virtio'>
          <rate bytes='123' period='1234'/>
          <backend model='random'/>
        </rng>
        ...
      32bd699f
    • J
      S390: Add hotplug support for s390 virtio devices · f946462e
      J.B. Joret 提交于
      We didn't yet expose the virtio device attach and detach functionality
      for s390 domains as the device hotplug was very limited with the old
      virtio-s390 bus. With the CCW bus there's full hotplug support for
      virtio devices in QEMU, so we are adding this to libvirt too.
      
      Since the virtio hotplug isn't limited to PCI anymore, we change the
      function names from xxxPCIyyy to xxxVirtioyyy, where we handle all
      three virtio bus types.
      Signed-off-by: NJ.B. Joret <jb@linux.vnet.ibm.com>
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      f946462e
    • V
      S390: QEMU driver support for CCW addresses · 608512b2
      Viktor Mihajlovski 提交于
      This commit adds the QEMU driver support for CCW addresses. The
      current QEMU only allows virtio devices to be attached to the
      CCW bus. We named the new capability indicating that support
      QEMU_CAPS_VIRTIO_CCW accordingly.
      
      The fact that CCW devices can only be assigned to domains with a
      machine type of s390-ccw-virtio requires a few extra checks for
      machine type in qemu_command.c on top of querying
      QEMU_CAPS_VIRTIO_{CCW|S390}.
      
      The majority of the new functions deals with CCW address generation
      and management.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      608512b2
  8. 13 3月, 2013 2 次提交
    • M
      qemu_driver: Try KVM_CAP_MAX_VCPUS only if defined · 3b94239f
      Michal Privoznik 提交于
      With our recent patch (1715c83b) we thrive to get the correct
      number of maximal VCPUs. However, we are using a constant from
      linux/kvm.h which may be not defined in every distro. Hence, we
      should guard usage of the constant with ifdef preprocessor
      directive. This was introduced in kernel:
      
          commit 8c3ba334f8588e1d5099f8602cf01897720e0eca
          Author: Sasha Levin <levinsasha928@gmail.com>
          Date:   Mon Jul 18 17:17:15 2011 +0300
      
          KVM: x86: Raise the hard VCPU count limit
      
          The patch raises the hard limit of VCPU count to 254.
      
          This will allow developers to easily work on scalability
          and will allow users to test high VCPU setups easily without
          patching the kernel.
      
          To prevent possible issues with current setups, KVM_CAP_NR_VCPUS
          now returns the recommended VCPU limit (which is still 64) - this
          should be a safe value for everybody, while a new KVM_CAP_MAX_VCPUS
          returns the hard limit which is now 254.
      
      $ git desc 8c3ba334f
      v3.1-rc7-48-g8c3ba33
      3b94239f
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  9. 12 3月, 2013 2 次提交
  10. 08 3月, 2013 2 次提交
    • M
      qemuDomainBlockStatsFlags: Guard disk lookup with a domain job · 5a791c89
      Michal Privoznik 提交于
      When there are two concurrent threads, we may dereference a NULL
      pointer, even though it has been checked before:
      
      1. Thread1: starts executing qemuDomainBlockStatsFlags() with nparams != 0.
                  It finds given disk and successfully pass check for disk->info.alias
                  not being NULL.
      2. Thread2: starts executing qemuDomainDetachDeviceFlags() on the very same
                  disk as Thread1 is working on.
      3. Thread1: gets to qemuDomainObjBeginJob() where it sets a job on a
                  domain.
      4. Thread2: also tries to set a job. However, we are not guaranteed which
                  thread wins. So assume it's Thread2 who can continue.
      5. Thread2: does the actual detach and frees disk->info.alias
      6. Thread2: quits the job
      7. Thread1: now successfully acquires the job, and accesses a NULL pointer.
      5a791c89
    • D
      Convert QEMU driver to use virLogProbablyLogMessage · 82793a2a
      Daniel P. Berrange 提交于
      The current QEMU code for skipping log messages only skips over
      'debug' message, switch to virLogProbablyLogMessage to make sure
      it skips over all of them
      82793a2a
  11. 06 3月, 2013 1 次提交
  12. 05 3月, 2013 1 次提交
  13. 04 3月, 2013 2 次提交
    • P
      qemu: Remove managed save flag from VM when starting with --force-boot · 9933a6b2
      Peter Krempa 提交于
      At the start of the guest after the image is unlinked the state wasn't
      touched up to match the state on disk.
      9933a6b2
    • C
      qemu: Use -1 as unpriviledged uid/gid · aff6942c
      Christophe Fergeau 提交于
      Commit f506a4c1 changed virSetUIDGID() to be a noop
      when uid/gid are -1, while it used to be a noop when
      they are <= 0.
      
      The changes in this commit broke creating new VMs in GNOME Boxes
      as qemuDomainCheckDiskPresence gets called during domain creation/startup,
      which in turn calls virFileAccessibleAs which fails after calling
      virSetUIDGID(0, 0) (Boxes uses session libvirtd). virSetUIDGID is called with
      (0, 0) as these are the default user/group values in virQEMUDriverConfig
      for session libvirtd.
      
      This commit changes virQEMUDriverConfigNew to use -1 as the unpriviledged
      uid/gid. I've also looked at the various places where cfg->user is used,
      and they all seem to handle -1 correctly.
      aff6942c
  14. 01 3月, 2013 5 次提交
    • D
      Revert hack for autodestroy in qemuProcessStop · 9c4ecb3e
      Daniel P. Berrange 提交于
      This reverts the hack done in
      
      commit 568a6cda
      Author: Jiri Denemark <jdenemar@redhat.com>
      Date:   Fri Feb 15 15:11:47 2013 +0100
      
          qemu: Avoid deadlock in autodestroy
      
      since we now have a fix which avoids the deadlock scenario
      entirely
      9c4ecb3e
    • D
      Fix deadlock in QEMU close callback APIs · 96b893f0
      Daniel P. Berrange 提交于
      There is a lock ordering problem in the QEMU close callback
      APIs.
      
      When starting a guest we have a lock on the VM. We then
      set a autodestroy callback, which acquires a lock on the
      close callbacks.
      
      When running auto-destroy, we obtain a lock on the close
      callbacks, then run each callbacks - which obtains a lock
      on the VM.
      
      This causes deadlock if anyone tries to start a VM, while
      autodestroy is taking place.
      
      The fix is to do autodestroy in 2 phases. First obtain
      all the callbacks and remove them from the list under
      the close callback lock. Then invoke each callback
      from outside the close callback lock.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      96b893f0
    • D
      Fix crash in QEMU auto-destroy with transient guests · 7ccad0b1
      Daniel P. Berrange 提交于
      When the auto-destroy callback runs it is supposed to return
      NULL if the virDomainObjPtr is no longer valid. It was not
      doing this for transient guests, so we tried to virObjectUnlock
      a mutex which had been freed. This often led to a crash.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7ccad0b1
    • J
      qemu: Make sure qemuProcessStart is run within a job · e4e28220
      Jiri Denemark 提交于
      qemuProcessStart expects to be run with a job already set and every
      caller except for qemuMigrationPrepareAny use it correctly. This bug can
      be observed in libvirtd logs during incoming migration as
      
          warning : qemuDomainObjEnterMonitorInternal:979 : This thread seems
          to be the async job owner; entering monitor without asking for a
          nested job is dangerous
      e4e28220
    • S
      Fix a message typo · 4f773a8c
      Serge Hallyn 提交于
      As pointed out in
      https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1034661
      The sentence
      
      "The function of PCI device addresses must less than 8"
      
      does not quite make sense.  Update that to read
      
      "The function of PCI device addresses must be less than 8"
      Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com>
      4f773a8c
  15. 28 2月, 2013 1 次提交
    • M
      qemu: Don't fail to shutdown domains with unresponsive agent · b8e25c35
      Michal Privoznik 提交于
      Currently, qemuDomainShutdownFlags() chooses the agent method of
      shutdown whenever the agent is configured. However, this
      assumption is not enough as the guest agent may be unresponsive
      at the moment. So unless guest agent method has been explicitly
      requested, we should fall back to the ACPI method.
      b8e25c35