1. 26 4月, 2013 1 次提交
    • L
      conf: put hostdev pci address in a struct · 9f80fc1b
      Laine Stump 提交于
      There will soon be other items related to pci hostdevs that need to be
      in the same part of the hostdevsubsys union as the pci address (which
      is currently a single member called "pci". This patch replaces the
      single member named pci with a struct named pci that contains a single
      member named "addr".
      9f80fc1b
  2. 25 4月, 2013 7 次提交
    • J
      conf: reject controllers with duplicate indexes · 2bbbf0be
      Ján Tomko 提交于
      Reject multiple controllers with the same index,
      except for USB controllers.
      Multi-function USB controllers can have the same index.
      2bbbf0be
    • M
      Fix usb master startport parsing · a553dbed
      Martin Kletzander 提交于
      When all usb controllers connected to the same bus have <master
      startport='x'/> specified, none of them have 'id=usb' assigned and
      thus qemu fails due to invalid masterport specification (we use 'usb'
      for that purpose).  Adding a check that at least one of the
      controllers is specified without <master startport='x'/> and in case
      this happens, error out due to invalid configuration.
      a553dbed
    • J
      qemu: auto-add pci-root controller for pc machine types · b33eb0dc
      Ján Tomko 提交于
      <controller type='pci' index='0' model='pci-root'/>
      is auto-added to pc* machine types.
      Without this controller PCI bus 0 is not available and
      no PCI addresses are assigned by default.
      
      Since older libvirt supported PCI bus 0 even without
      this controller, it is removed from the XML when migrating.
      b33eb0dc
    • J
      conf: add PCI controllers · df0ebf6b
      Ján Tomko 提交于
      Add new controller type 'pci' with models 'pci-root' and 'pci-bridge'.
      df0ebf6b
    • J
      qemu: call post-parse callbacks when parsing command line too · 024e9af3
      Ján Tomko 提交于
      Now we set the default disk driver name when parsing
      the qemu command line too, hence all the test changes.
      
      Assume format type is 'auto' when none is specified on
      qemu command line.
      024e9af3
    • L
      Add NVRAM device · bf188873
      Li Zhang 提交于
      For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device.
      Users are allowed to specify spapr-vio devices'address.
      But NVRAM is not supported in libvirt. So this patch is to
      add NVRAM device to allow users to specify its address.
      
      In QEMU, NVRAM device's address is specified by
       "-global spapr-nvram.reg=xxxxx".
      
      In libvirt, XML file is defined as the following:
      
        <nvram>
          <address type='spapr-vio' reg='0x3000'/>
        </nvram>
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      bf188873
    • O
      Introduce a sub-element <driver> for controller · 45d6c671
      Osier Yang 提交于
      Like what we did for "disk", "filesystem" and "interface", this
      introduces sub-element <driver> for "controller", and put the "queues"
      into it.
      45d6c671
  3. 24 4月, 2013 1 次提交
    • O
      Change the tag name "num_queues" into "queues" · 18b42898
      Osier Yang 提交于
      Instead of making a choice between the underscore and camelCase, this
      simply changes "num_queues" into "queues", which is also consistent
      with Michal's multiple queue support for interface.
      18b42898
  4. 20 4月, 2013 1 次提交
  5. 19 4月, 2013 1 次提交
    • P
      conf: Reword error message to be more universal · bcefb507
      Peter Krempa 提交于
      The error message reported when attempting to change/get persistent
      configuration of a transient domain suggests that changes are being
      made. Reword it to suit getter APIs too.
      
      Before:
      $ virsh vcpucount transient-domain --config
      error: Requested operation is not valid: cannot change persistent config of a transient domain
      
      After:
      $ virsh vcpucount transient-domain --config
      error: Requested operation is not valid: transient domains do not have any persistent config
      bcefb507
  6. 18 4月, 2013 1 次提交
  7. 16 4月, 2013 1 次提交
  8. 13 4月, 2013 4 次提交
  9. 12 4月, 2013 1 次提交
    • P
      conf: Allow for non-contiguous device boot orders · 039a3283
      Peter Krempa 提交于
      This patch adds the ability to configure non-contiguous boot orders on boot
      devices. This allows unplugging devices that have boot order specified without
      breaking migration.
      
      The new code now uses a slightly less memory efficient approach to store the
      boot order fields in a hashtable instead of a bitmap.
      039a3283
  10. 11 4月, 2013 9 次提交
  11. 10 4月, 2013 1 次提交
    • P
      conf: Fix race between looking up a domain object and freeing it · b7c98329
      Peter Krempa 提交于
      This patch fixes crash of the daemon that happens due to the following race
      condition:
      
      Let's have two threads in the libvirtd daemon's qemu driver:
      A - thread executing undefine on the same domain
      B - thread executing a API call to get information about a domain
      
      Assume following serialization of operations done by the threads:
      1) A has the lock on the domain object and is executing some code prior to
         virDomainObjListRemove()
      2) B takes the lock on the domain object list, looks up the domain object
      pointer and blocks in the attempt to lock the domain object as A is holding the
      lock
      3) A reaches virDomainObjListRemove() and unlocks the lock on the domain object
      4) A blocks on the attempt to get the domain list lock
      5) B is able to lock the domain object now and unlocks the domain list
      6) A is now able to lock the domain list, and sheds the last reference on the
      domain object, this triggers the freeing function.
      6) B starts executing the code on the pointer that is being freed
      7) The libvirtd daemon crashes while attempting to access invalid pointer in
      thread B.
      
      This patch fixes the race by acquiring a reference on the domain object before
      unlocking it in virDomainObjListRemove() and re-locks the object prior to
      removing and freeing it. This ensures that no thread holds a lock on the domain
      object at the time it is removed from the list, and that doing a list lookup
      will never find a domain that is about to vanish.
      
      This is a minimal fix of the problem, but a better solution will be to switch to
      full reference counting for domain objects.
      b7c98329
  12. 09 4月, 2013 2 次提交
  13. 08 4月, 2013 4 次提交
    • O
      Support seclabels for volume type disk · 664270b8
      Osier Yang 提交于
      "seclabels" is only valid for 'file' or 'block' type storage volume.
      664270b8
    • O
      Support startupPolicy for 'volume' disk · 43404fee
      Osier Yang 提交于
      "startupPolicy" is only valid for file type storage volume, otherwise
      it fails on starting the domain.
      43404fee
    • O
      Introduce new XMLs to specify disk source using libvirt storage · 4bc331c8
      Osier Yang 提交于
      With this patch, one can specify the disk source using libvirt
      storage like:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source pool='default' volume='fc18.img'/>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      "seclabels" and "startupPolicy" are not supported for this new
      disk type ("volume"). They will be supported in later patches.
      
      docs/formatdomain.html.in:
        * Add documents for new XMLs
      docs/schemas/domaincommon.rng:
        * Add rng for new XMLs;
      src/conf/domain_conf.h:
        * New struct for 'volume' type disk source (virDomainDiskSourcePoolDef)
        * Add VIR_DOMAIN_DISK_TYPE_VOLUME for enum virDomainDiskType
      src/conf/domain_conf.c:
        * New helper virDomainDiskSourcePoolDefParse to parse the 'volume'
          type disk source.
        * New helper virDomainDiskSourcePoolDefFree to free the source def
          if 'volume' type disk.
      tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      tests/qemuxml2xmltest.c:
        * New test
      4bc331c8
    • O
      conf: New helper virDomainDiskSourceDefFormat to format the disk source · a05b0fc1
      Osier Yang 提交于
      The code to format disk source is long enough to have a helper.
      a05b0fc1
  14. 06 4月, 2013 1 次提交
    • O
      qemu: Support multiple queue virtio-scsi · d4bf0a93
      Osier Yang 提交于
      This introduce a new attribute "num_queues" (same with the good name
      QEMU uses) for virtio-scsi controller. An example of the XML:
      
      <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
      
      The corresponding QEMU command line:
      
      -device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
      d4bf0a93
  15. 05 4月, 2013 5 次提交
    • P
      virCaps: get rid of defaultConsoleTargetType callback · 482e5f15
      Peter Krempa 提交于
      This patch refactors various places to allow removing of the
      defaultConsoleTargetType callback from the virCaps structure.
      
      A new console character device target type is introduced -
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
      specified in the XML. This type is at the end converted to the standard
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
      different from this default have to be processed separately in the
      device post parse callback.
      482e5f15
    • P
      virCaps: get rid of macPrefix field · 46becc18
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data and tweak the code
      to avoid semantic change.
      
      Without configuration the KVM mac prefix is used by default. I chose it
      as it's in the privately administered segment so it should be usable for
      any purposes.
      46becc18
    • P
      virCaps: get rid of hasWideScsiBus · 8960d656
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data.
      8960d656
    • P
      virCaps: get rid of defaultDiskDriverType · b2990849
      Peter Krempa 提交于
      Use the qemu specific callback to fill this data in the qemu driver as
      it's the only place where it was used and fix tests as the qemu test
      capability object didn't configure the defaults for the tests.
      b2990849
    • P
      virCaps: get rid of emulatorRequired · b5def001
      Peter Krempa 提交于
      This patch removes the emulatorRequired field and associated
      infrastructure from the virCaps object. Instead the driver specific
      callbacks are used as this field isn't enforced by all drivers.
      
      This patch implements the appropriate callbacks in the qemu and lxc
      driver and moves to check to that location.
      b5def001