1. 10 8月, 2015 2 次提交
    • L
      conf: add new <target> subelement with chassisNr attribute to <controller> · 8dc88aee
      Laine Stump 提交于
      There are some configuration options to some types of pci controllers
      that are currently automatically derived from other parts of the
      controller's configuration. For example, in qemu a pci-bridge
      controller has an option that is called "chassis_nr"; up until now
      libvirt has always set chassis_nr to the index of the pci-bridge. So
      this:
      
        <controller type='pci' model='pci-bridge' index='2'/>
      
      will always result in:
      
        -device pci-bridge,chassis_nr=2,...
      
      on the qemu commandline. In the future we may decide there is a better
      way to derive that option, but even in that case we will need for
      existing domains to retain the same chassis_nr they were using in the
      past - that is something that is visible to the guest so it is part of
      the guest ABI and changing it would lead to problems for migrating
      guests (or just guests with very picky OSes).
      
      The <target> subelement has been added as a place to put the new
      "chassisNr" attribute that will be filled in by libvirt when it
      auto-generates the chassisNr; it will be saved in the config, then
      reused any time the domain is started:
      
        <controller type='pci' model='pci-bridge' index='2'>
          <model type='pci-bridge'/>
          <target chassisNr='2'/>
        </controller>
      
      The one oddity of all this is that if the controller configuration
      is changed (for example to change the index or the pci address
      where the controller is plugged in), the items in <target> will
      *not* be re-generated, which might lead to conflict. I can't
      really see any way around this, but fortunately if there is a
      material conflict qemu will let us know and we will pass that on
      to the user.
      8dc88aee
    • L
      conf: add new <model> subelement with name attribute to <controller> · bf202510
      Laine Stump 提交于
      This new subelement is used in PCI controllers: the toplevel
      *attribute* "model" of a controller denotes what kind of PCI
      controller is being described, e.g. a "dmi-to-pci-bridge",
      "pci-bridge", or "pci-root". But in the future there will be different
      implementations of some of those types of PCI controllers, which
      behave similarly from libvirt's point of view (and so should have the
      same model), but use a different device in qemu (and present
      themselves as a different piece of hardware in the guest). In an ideal
      world we (i.e. "I") would have thought of that back when the pci
      controllers were added, and used some sort of type/class/model
      notation (where class was used in the way we are now using model, and
      model was used for the actual manufacturer's model number of a
      particular family of PCI controller), but that opportunity is long
      past, so as an alternative, this patch allows selecting a particular
      implementation of a pci controller with the "name" attribute of the
      <model> subelement, e.g.:
      
        <controller type='pci' model='dmi-to-pci-bridge' index='1'>
          <model name='i82801b11-bridge'/>
        </controller>
      
      In this case, "dmi-to-pci-bridge" is the kind of controller (one that
      has a single PCIe port upstream, and 32 standard PCI ports downstream,
      which are not hotpluggable), and the qemu device to be used to
      implement this kind of controller is named "i82801b11-bridge".
      
      Implementing the above now will allow us in the future to add a new
      kind of dmi-to-pci-bridge that doesn't use qemu's i82801b11-bridge
      device, but instead uses something else (which doesn't yet exist, but
      qemu people have been discussing it), all without breaking existing
      configs.
      
      (note that for the existing "pci-bridge" type of PCI controller, both
      the model attribute and <model> name are 'pci-bridge'. This is just a
      coincidence, since it turns out that in this case the device name in
      qemu really is a generic 'pci-bridge' rather than being the name of
      some real-world chip)
      bf202510
  2. 04 8月, 2015 1 次提交
    • J
      conf: Allow error reporting in virDomainDiskSourceIsBlockType · 36025c55
      John Ferlan 提交于
      Rather than provide a somewhat generic error message when the API
      returns false, allow the caller to supply a "report = true" option
      in order to cause virReportError's to describe which of the 3 paths
      that can cause failure.
      
      Some callers don't care about what caused the failure, they just want
      to have a true/false - for those, calling with report = false should
      be sufficient.
      36025c55
  3. 20 7月, 2015 1 次提交
    • M
      qemu: Reject updating unsupported disk information · 717c99f3
      Martin Kletzander 提交于
      If one calls update-device with information that is not updatable,
      libvirt reports success even though no data were updated.  The example
      used in the bug linked below uses updating device with <boot order='2'/>
      which, in my opinion, is a valid thing to request from user's
      perspective.  Mainly since we properly error out if user wants to update
      such data on a network device for example.
      
      And since there are many things that might happen (update-device on disk
      basically knows just how to change removable media), check for what's
      changing and moreover, since the function might be usable in other
      drivers (updating only disk path is a valid possibility) let's abstract
      it for any two disks.
      
      We can't possibly check for everything since for many fields our code
      does not properly differentiate between default and unspecified values.
      Even though this could be changed, I don't feel like it's worth the
      complexity so it's not the aim of this patch.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1007228
      717c99f3
  4. 10 7月, 2015 1 次提交
  5. 08 7月, 2015 1 次提交
  6. 01 7月, 2015 1 次提交
    • P
      conf: qemu: Taint VMs using custom device tree blob · 4b48ba4a
      Peter Krempa 提交于
      Using a custom device tree image may cause unexpected behavior in
      architectures that use this approach to detect platform devices. Since
      usually the device tree is generated by qemu and thus it's not normally
      used let's taint VMs using it to make it obvious as a possible source of
      problems.
      4b48ba4a
  7. 24 6月, 2015 2 次提交
  8. 23 6月, 2015 1 次提交
  9. 19 6月, 2015 2 次提交
  10. 18 6月, 2015 2 次提交
  11. 04 6月, 2015 2 次提交
    • P
      conf: Add new helpers to resolve virDomainModificationImpact to domain defs · 3d021381
      Peter Krempa 提交于
      virDomainLiveConfigHelperMethod that is used for this job now does
      modify the flags but still requires the callers to extract the correct
      definition objects.
      
      In addition coverity and other static analyzers are usually unhappy as
      they don't grasp the fact that @flags are upadted according to the
      correct def to be present.
      
      To work this issue around and simplify the calling chain let's add a new
      helper that will work only on drivers that always copy the persistent
      def to a transient at start of a vm. This will allow to drop a few
      arguments. The new function syntax will also fill two definition
      pointers rather than modifying the @flags parameter.
      3d021381
    • P
      conf: Store cpu count as unsigned int · fbbea798
      Peter Krempa 提交于
      While we probably won't see machines with more than 65536 cpus for a
      while lets store the cpu count as an integer so that we can avoid quite
      a lot of overflow checks in our code.
      fbbea798
  12. 03 6月, 2015 3 次提交
  13. 21 5月, 2015 2 次提交
  14. 20 5月, 2015 1 次提交
  15. 18 5月, 2015 1 次提交
  16. 16 5月, 2015 1 次提交
  17. 15 5月, 2015 3 次提交
  18. 11 5月, 2015 4 次提交
    • P
      conf: Add helper to convert list of virDomains to a list of virDomainObjs · 83726a14
      Peter Krempa 提交于
      Add virDomainObjListConvert that will take a list of virDomains, apply
      filters and return a list of virDomainObjs.
      83726a14
    • P
      conf: Refactor domain list collection critical section · cbe7bbf7
      Peter Krempa 提交于
      Until now the virDomainListAllDomains API would lock the domain list and
      then every single domain object to access and filter it. This would
      potentially allow a unresponsive VM to block the whole daemon if a
      *listAllDomains call would get stuck.
      
      To avoid this problem this patch collects a list of referenced domain
      objects first from the list and then unlocks it right away. The
      expensive operation requiring locking of the domain object is executed
      after the list lock is dropped. While a single blocked domain will still
      lock up a listAllDomains call, the domain list won't be held locked and
      thus other APIs won't be blocked.
      
      Additionally this patch also fixes the lookup code, where we'd ignore
      the vm->removing flag and thus potentially return domain objects that
      would be deleted very soon so calling any API wouldn't make sense.
      
      As other clients also could benefit from operating on a list of domain
      objects rather than the public domain descriptors a new intermediate
      API - virDomainObjListCollect - is introduced by this patch.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1181074
      cbe7bbf7
    • P
      conf: Rename virDomainObjListFilter type to virDomainObjListACLFilter · 7906d5fb
      Peter Krempa 提交于
      The passed function is meant to filter domains according to ACL match.
      7906d5fb
    • P
      util: Make the virDomainListFree helper more universal · a5e89ae1
      Peter Krempa 提交于
      Extend it to a universal helper used for clearing lists of any objects.
      Note that the argument type is specifically void * to allow implicit
      typecasting.
      
      Additionally add a helper that works on non-NULL terminated arrays once
      we know the length.
      a5e89ae1
  19. 05 5月, 2015 1 次提交
    • M
      Introduce GIC feature · 921c52b0
      Michal Privoznik 提交于
      Some platforms, like aarch64, don't have APIC but GIC. So there's
      no reason to have <apic/> feature turned on. However, we are
      still missing <gic/> feature. This commit introduces the feature
      to XML parser and formatter, adds documentation and updates RNG
      schema.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      921c52b0
  20. 04 5月, 2015 1 次提交
  21. 29 4月, 2015 1 次提交
    • C
      domain: conf: Drop unused OSTYPE_AIX · 066f7c7c
      Cole Robinson 提交于
      The phyp driver stuffed it into a DomainDefPtr during its attachdevice
      routine, but the value is never advertised via capabilities so it should
      be safe to drop.
      
      Have the phyp driver use OSTYPE_LINUX, which is what it advertises via
      capabilities.
      066f7c7c
  22. 28 4月, 2015 5 次提交
    • J
      domain: Introduce virDomainIOThreadSchedDelId · c6e2dc80
      John Ferlan 提交于
      We're about to allow IOThreads to be deleted, but an iothreadid may be
      included in some domain thread sched, so add a new API to allow removing
      an iothread from some entry.
      
      Then during the writing of the threadsched data and an additional check
      to determine whether the bitmap is all clear before writing it out.
      c6e2dc80
    • J
      Move iothreadspin information into iothreadids · b266486f
      John Ferlan 提交于
      Remove the iothreadspin array from cputune and replace with a cpumask
      to be stored in the iothreadids list.
      
      Adjust the test output because our printing goes in order of the iothreadids
      list now.
      b266486f
    • J
      conf: Move virDomainPinIsDuplicate and make static · b96254d4
      John Ferlan 提交于
      Since it's only ever referenced in domain_conf.c, make the function
      static, but also will need to move it to somewhere before it's referenced
      rather than forward referencing it.
      b96254d4
    • J
      qemu: Use domain iothreadids to IOThread's 'thread_id' · 8d4614a5
      John Ferlan 提交于
      Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
      'thread_id' as returned from the live qemu monitor data.
      
      Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
      the new iothreadids 'thread_id' element.
      
      Rather than use the default numbering scheme of 1..number of iothreads
      defined for the domain, use the iothreadid's list for the iothread_id
      
      Since iothreadids list keeps track of the iothread_id's, these are
      now used in place of the many places where a for loop would "know"
      that the ID was "+ 1" from the array element.
      
      The new tests ensure usage of the <iothreadid> values for an exact number
      of iothreads and the usage of a smaller number of <iothreadid> values than
      iothreads that exist (and usage of the default numbering scheme).
      8d4614a5
    • J
      conf: Add new domain XML element 'iothreadids' · 93383c1f
      John Ferlan 提交于
      Adding a new XML element 'iothreadids' in order to allow defining
      specific IOThread ID's rather than relying on the algorithm to assign
      IOThread ID's starting at 1 and incrementing to iothreads count.
      
      This will allow future patches to be able to add new IOThreads by
      a specific iothread_id and of course delete any exisiting IOThread.
      
      Each iothreadids element will have 'n' <iothread> children elements
      which will have attribute "id".  The "id" will allow for definition
      of any "valid" (eg > 0) iothread_id value.
      
      On input, if any <iothreadids> <iothread>'s are provided, they will
      be marked so that we only print out what we read in.
      
      On input, if no <iothreadids> are provided, the PostParse code will
      self generate a list of ID's starting at 1 and going to the number
      of iothreads defined for the domain (just like the current algorithm
      numbering scheme).  A future patch will rework the existing algorithm
      to make use of the iothreadids list.
      
      On output, only print out the <iothreadids> if they were read in.
      93383c1f
  23. 24 4月, 2015 1 次提交