1. 17 5月, 2013 2 次提交
    • O
      qemu: Move qemuSetUnprivSGIO into qemu_conf.c · 99fdd434
      Osier Yang 提交于
      unpriv_sgio setting is tight with the shared device helpers, let's
      put them together in qemu_conf.c
      99fdd434
    • O
      qemu: Refactor the helpers to track shared scsi host device · aeda1ff1
      Osier Yang 提交于
      This changes the helpers qemu{Add,Remove}SharedDisk into
      qemu{Add,Remove}SharedDevice, as most of the code in the helpers
      can be reused for scsi host device.
      
      To track the shared scsi host device, first it finds out the
      device path (e.g. /dev/s[dr]*) which is mapped to the sg device,
      and use device ID of the found device path (/dev/s[dr]*) as the
      hash key. This is because of the device ID is not unique between
      between /dev/s[dr]* and /dev/sg*, e.g.
      
      % sg_map
      /dev/sg0  /dev/sda
      /dev/sg1  /dev/sr0
      
      % ls -l /dev/sda
      brw-rw----. 1 root disk 8, 0 May  2 19:26 /dev/sda
      
      %ls -l /dev/sg0
      crw-rw----. 1 root disk 21, 0 May  2 19:26 /dev/sg0
      aeda1ff1
  2. 16 5月, 2013 1 次提交
    • O
      qemu: Rename qemu_driver->sharedDisks to qemu_driver->sharedDevices · 539d0e19
      Osier Yang 提交于
      "Shared disk" is not only the thing we should care about after "scsi
      hostdev" is introduced. A same scsi device can be used as "disk" for
      one domain, and as "scsi hostdev" for another domain at the same time.
      That's why this patch renames qemu_driver->sharedDisks. Related functions
      and structs are also renamed.
      539d0e19
  3. 15 5月, 2013 1 次提交
    • M
      qemu: Add VNC WebSocket support · 85ec7ff6
      Martin Kletzander 提交于
      Adding a VNC WebSocket support for QEMU driver.  This functionality is
      in upstream qemu from commit described as v1.3.0-982-g7536ee4, so the
      capability is being recognized based on QEMU version for now.
      85ec7ff6
  4. 13 5月, 2013 1 次提交
  5. 19 4月, 2013 1 次提交
  6. 16 4月, 2013 1 次提交
  7. 08 4月, 2013 1 次提交
    • O
      qemu: Translate the pool disk source earlier · 60b78b33
      Osier Yang 提交于
      To support "shareable" for volume type disk, we have to translate
      the source before trying to add the shared disk entry. To achieve
      the goal, this moves the helper qemuTranslateDiskSourcePool into
      src/qemu/qemu_conf.c, and introduce an internal only member (voltype)
      for struct _virDomainDiskSourcePoolDef, to record the underlying
      volume type for use when building the drive string.
      
      Later patch will support "shareable" volume type disk.
      60b78b33
  8. 05 4月, 2013 2 次提交
    • P
      virCaps: get rid of defaultDiskDriverName · 9ea249e7
      Peter Krempa 提交于
      This patch removes the defaultDiskDriverName from the virCaps
      structure. This particular default value is used only in the qemu driver
      so this patch uses the recently added callback to fill the driver name
      if it's needed instead of propagating it through virCaps.
      9ea249e7
    • P
      maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption · e84b1931
      Peter Krempa 提交于
      This patch is the result of running:
      
      for i in $(git ls-files | grep -v html | grep -v \.po$ ); do
        sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i
      done
      
      and a few manual tweaks.
      e84b1931
  9. 13 3月, 2013 1 次提交
    • 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
  10. 01 3月, 2013 1 次提交
  11. 21 2月, 2013 4 次提交
    • J
      qemu: Avoid deadlock in autodestroy · 568a6cda
      Jiri Denemark 提交于
      Since closeCallbacks were turned into virObjectLockable, we can no
      longer call virQEMUCloseCallbacks APIs from within a registered close
      callback.
      568a6cda
    • J
      qemu: Turn closeCallbacks into virObjectLockable · 3898ba7f
      Jiri Denemark 提交于
      To avoid having to hold the qemu driver lock while iterating through
      close callbacks and calling them. This fixes a real deadlock when a
      domain which is being migrated from another host gets autodestoyed as a
      result of broken connection to the other host.
      3898ba7f
    • O
      qemu: Record names of domain which uses the shared disk in hash table · a4504ac1
      Osier Yang 提交于
      The hash entry is changed from "ref" to {ref, @domains}. With this, the
      caller can simply call qemuRemoveSharedDisk, without afraid of removing
      the entry belongs to other domains. qemuProcessStart will obviously
      benifit from it on error codepath (which calls qemuProcessStop to do
      the cleanup).
      a4504ac1
    • O
      qemu: Add checking in helpers for sgio setting · dab878a8
      Osier Yang 提交于
      This moves the various checking into the helpers, to avoid the
      callers missing the checking.
      dab878a8
  12. 20 2月, 2013 1 次提交
  13. 13 2月, 2013 1 次提交
    • D
      Remove qemuDriverLock from almost everywhere · a9e97e0c
      Daniel P. Berrange 提交于
      With the majority of fields in the virQEMUDriverPtr struct
      now immutable or self-locking, there is no need for practically
      any methods to be using the QEMU driver lock. Only a handful
      of helper APIs in qemu_conf.c now need it
      a9e97e0c
  14. 11 2月, 2013 3 次提交
  15. 08 2月, 2013 3 次提交
  16. 06 2月, 2013 6 次提交
  17. 05 2月, 2013 2 次提交
    • D
      Rename all domain list APIs to have virDomainObjList prefix · 4f6ed6c3
      Daniel P. Berrange 提交于
      The APIs names for accessing the domain list object are
      very inconsistent. Rename them all to have a standard
      virDomainObjList prefix.
      4f6ed6c3
    • D
      Introduce a virQEMUDriverConfigPtr object · b090aa7d
      Daniel P. Berrange 提交于
      Currently the virQEMUDriverPtr struct contains an wide variety
      of data with varying access needs. Move all the static config
      data into a dedicated virQEMUDriverConfigPtr object. The only
      locking requirement is to hold the driver lock, while obtaining
      an instance of virQEMUDriverConfigPtr. Once a reference is held
      on the config object, it can be used completely lockless since
      it is immutable.
      
      NB, not all APIs correctly hold the driver lock while getting
      a reference to the config object in this patch. This is safe
      for now since the config is never updated on the fly. Later
      patches will address this fully.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b090aa7d
  18. 16 1月, 2013 1 次提交
  19. 07 1月, 2013 1 次提交
    • O
      qemu: Add a hash table for the shared disks · d7ead3e1
      Osier Yang 提交于
      This introduces a hash table for qemu driver, to store the shared
      disk's info as (@major:minor, @ref_count). @ref_count is the number
      of domains which shares the disk.
      
      Since we only care about if the disk support unprivileged SG_IO
      commands, and the SG_IO commands only make sense for block disk,
      this patch only manages (add/remove hash entry) the shared disk for
      block disk.
      
      * src/qemu/qemu_conf.h: (Add member 'sharedDisks' of type
                               virHashTablePtr; Declare helpers
                               qemuGetSharedDiskKey, qemuAddSharedDisk
                               and qemuRemoveSharedDisk)
      * src/qemu/qemu_conf.c (Implement the 3 helpers)
      * src/qemu/qemu_process.c (Update 'sharedDisks' when domain
                                 starting and shutdown)
      * src/qemu/qemu_driver.c (Update 'sharedDisks' when attaching
                                or detaching disk).
      d7ead3e1
  20. 21 12月, 2012 6 次提交