1. 24 9月, 2013 1 次提交
  2. 17 9月, 2013 4 次提交
  3. 16 9月, 2013 1 次提交
  4. 29 8月, 2013 1 次提交
    • P
      qemu: Remove hostdev entry when freeing the depending network entry · 50348e6e
      Peter Krempa 提交于
      When using a <interface type="network"> that points to a network with
      hostdev forwarding mode a hostdev alias is created for the network. This
      allias is inserted into the hostdev list, but is backed with a part of
      the network object that it is connected to.
      
      When a VM is being stopped qemuProcessStop() calls
      networkReleaseActualDevice() which eventually frees the memory for the
      hostdev object. Afterwards when the domain definition is being freed by
      virDomainDefFree() an invalid pointer is accessed by
      virDomainHostdevDefFree() and may cause a crash of the daemon.
      
      This patch removes the entry in the hostdev list before freeing the
      depending memory to avoid this issue.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1000973
      50348e6e
  5. 28 8月, 2013 1 次提交
  6. 19 8月, 2013 1 次提交
    • P
      virdbus: Add virDBusHasSystemBus() · 2398dd3d
      Peter Krempa 提交于
      Some systems may not use DBus in their system. Add a method to check if
      the system bus is available that doesn't print error messages so that
      code can later check for this condition and use an alternative approach.
      2398dd3d
  7. 01 8月, 2013 2 次提交
  8. 31 7月, 2013 2 次提交
  9. 26 7月, 2013 2 次提交
  10. 25 7月, 2013 1 次提交
  11. 24 7月, 2013 6 次提交
    • J
      Add new virAuth symbols to private.syms · cd7b969c
      Ján Tomko 提交于
      Otherwise libvirtd fails to load the lockd plugin.
      cd7b969c
    • M
      Expose ownership ID parsing · bba579b6
      Martin Kletzander 提交于
      Parsing 'user:group' is useful even outside the DAC security driver,
      so expose the most abstract function which has no DAC security driver
      bits in itself.
      bba579b6
    • L
      qemu: set/validate slot/connection type when assigning slots for PCI devices · 3ceb4c7d
      Laine Stump 提交于
      Since PCI bridges, PCIe bridges, PCIe switches, and PCIe root ports
      all share the same namespace, they are all defined as controllers of
      type='pci' in libvirt (but with a differing model attribute). Each of
      these controllers has a certain connection type upstream, allows
      certain connection types downstream, and each can either allow a
      single downstream connection at slot 0, or connections from slot 1 -
      31.
      
      Right now, we only support the pci-root and pci-bridge devices, both
      of which only allow PCI devices to connect, and both which have usable
      slots 1 - 31. In preparation for adding other types of controllers
      that have different capabilities, this patch 1) adds info to the
      qemuDomainPCIAddressBus object to indicate the capabilities, 2) sets
      those capabilities appropriately for pci-root and pci-bridge devices,
      and 3) validates that the controller being connected to is the proper
      type when allocating slots or validating that a user-selected slot is
      appropriate for a device..
      
      Having this infrastructure in place will make it much easier to add
      support for the other PCI controller types.
      
      While it would be possible to do all the necessary checking by just
      storing the controller model in the qemyuDomainPCIAddressBus, it
      greatly simplifies all the validation code to also keep a "flags",
      "minSlot" and "maxSlot" for each - that way we can just check those
      attributes rather than requiring a nearly identical switch statement
      everywhere we need to validate compatibility.
      
      You may notice many places where the flags are seemingly hard-coded to
      
        QEMU_PCI_CONNECT_HOTPLUGGABLE | QEMU_PCI_CONNECT_TYPE_PCI
      
      This is currently the correct value for all PCI devices, and in the
      future will be the default, with small bits of code added to change to
      the flags for the few devices which are the exceptions to this rule.
      
      Finally, there are a few places with "FIXME" comments. Note that these
      aren't indicating places that are broken according to the currently
      supported devices, they are places that will need fixing when support
      for new PCI controller models is added.
      
      To assure that there was no regression in the auto-allocation of PCI
      addresses or auto-creation of integrated pci-root, ide, and usb
      controllers, a new test case (pci-bridge-many-disks) has been added to
      both the qemuxml2argv and qemuxml2xml tests. This new test defines a
      domain with several dozen virtio disks but no pci-root or
      pci-bridges. The .args file of the new test case was created using
      libvirt sources from before this patch, and the test still passes
      after this patch has been applied.
      3ceb4c7d
    • D
      Remove obsolete cgroups creation apis · d64e852b
      Daniel P. Berrange 提交于
      The virCgroupNewDomainDriver and virCgroupNewDriver methods
      are obsolete now that we can auto-detect existing cgroup
      placement. Delete them to reduce code bloat.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d64e852b
    • D
      Add API for checking if a cgroup is valid for a domain · e638778e
      Daniel P. Berrange 提交于
      Add virCgroupIsValidMachine API to check whether an auto
      detected cgroup is valid for a machine. This lets us
      check if a VM has just been placed into some generic
      shared cgroup, or worse, the root cgroup
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      e638778e
    • D
      Add a virCgroupNewDetect API for finding cgroup placement · 66a7f857
      Daniel P. Berrange 提交于
      Add a virCgroupNewDetect API which is used to initialize a
      cgroup object with the placement of an arbitrary process.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      66a7f857
  12. 23 7月, 2013 1 次提交
  13. 22 7月, 2013 4 次提交
  14. 18 7月, 2013 6 次提交
  15. 16 7月, 2013 2 次提交
    • M
      qemu: Implement chardev hotplug on config level · 75f0fd51
      Michal Privoznik 提交于
      There are two levels on which a device may be hotplugged: config
      and live. The config level requires just an insert or remove from
      internal domain definition structure, which is exactly what this
      patch does. There is currently no implementation for a chardev
      update action, as there's not much to be updated. But more
      importantly, the only thing that can be updated is path or socket
      address by which chardevs are distinguished. So the update action
      is currently not supported.
      75f0fd51
    • P
      cpu: Add virCPUDefUpdateFeature() · 13cdd389
      Peter Krempa 提交于
      This new function updates or adds a feature to a existing cpu model
      definition. This function will be helpful to allow tuning of
      "host-model" features in later patches.
      13cdd389
  16. 12 7月, 2013 2 次提交
    • M
      domain_conf: Introduce chardev hotplug helpers · 8d4c3c3f
      Michal Privoznik 提交于
      For now, only these three helpers are needed:
      virDomainChrFind - to find a duplicate chardev within VM def
      virDomainChrInsert - wrapper for inserting a new chardev into VM def
      virDomainChrRemove - wrapper for removing chardev from VM def
      
      There is, however, one internal helper as well:
      virDomainChrGetDomainPtrs which sets given pointers to one of
      vmdef->{parallels,serials,consoles,channels} based on passed
      chardev type.
      8d4c3c3f
    • E
      util: add virGetGroupList · 75c12564
      Eric Blake 提交于
      Since neither getpwuid_r() nor initgroups() are safe to call in
      between fork and exec (they obtain a mutex, but if some other
      thread in the parent also held the mutex at the time of the fork,
      the child will deadlock), we have to split out the functionality
      that is unsafe.  At least glibc's initgroups() uses getgrouplist
      under the hood, so the ideal split is to expose getgrouplist for
      use before a fork.  Gnulib already gives us a nice wrapper via
      mgetgroups; we wrap it once more to look up by uid instead of name.
      
      * bootstrap.conf (gnulib_modules): Add mgetgroups.
      * src/util/virutil.h (virGetGroupList): New declaration.
      * src/util/virutil.c (virGetGroupList): New function.
      * src/libvirt_private.syms (virutil.h): Export it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      75c12564
  17. 10 7月, 2013 1 次提交
    • M
      Introduce OOM reporting to virAsprintf · dc6f2dad
      Michal Privoznik 提交于
      Actually, I'm turning this function into a macro as filename,
      function name and line number needs to be passed. The new
      function virAsprintfInternal is introduced with the extended set
      of arguments.
      dc6f2dad
  18. 04 7月, 2013 1 次提交
  19. 03 7月, 2013 1 次提交