1. 26 8月, 2016 2 次提交
  2. 25 8月, 2016 1 次提交
    • P
      conf: Add XML for individual vCPU hotplug · 5847bc5c
      Peter Krempa 提交于
      Individual vCPU hotplug requires us to track the state of any vCPU. To
      allow this add the following XML:
      
      <domain>
        ...
        <vcpu current='2'>3</vcpu>
        <vcpus>
          <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
          <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
          <vcpu id='1' enabled='no' hotpluggable='yes'/>
        </vcpus>
        ...
      
      The 'enabled' attribute allows to control the state of the vcpu.
      'hotpluggable' controls whether given vcpu can be hotplugged and 'order'
      allows to specify the order to add the vcpus.
      5847bc5c
  3. 17 8月, 2016 1 次提交
  4. 16 8月, 2016 1 次提交
    • J
      conf: Provide error on undefined iothreadsched entry · 8c6b29e7
      John Ferlan 提交于
      When commit id '6dfb4507' refactored where the iothreadsched data was
      stored, the error message for when the virDomainIOThreadIDFind failed
      to find an iothreadid ("iothreadsched attribute 'iothreads' uses
      undefined iothread ids") was lost. This led to the possibility that
      someone would try to use it, but receive the generic message "An error
      occurred, but the cause is unknown".
      
      This patch adds the error message back so that someone will know that
      they have an invalid configuration.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      8c6b29e7
  5. 05 8月, 2016 1 次提交
  6. 04 8月, 2016 2 次提交
    • M
      Introduce @secure attribute to os loader element · 64c24800
      Michal Privoznik 提交于
      This element will control secure boot implemented by some
      firmwares. If the firmware used in <loader/> does support the
      feature we must tell it to the underlying hypervisor. However, we
      can't know whether loader does support it or not just by looking
      at the file. Therefore we have to have an attribute to the
      element where users can tell us whether the firmware is secure
      boot enabled or not.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      64c24800
    • M
      Introduce SMM feature · d0e4be9d
      Michal Privoznik 提交于
      Since its release of 2.4.0 qemu is able to enable System
      Management Module in the firmware, or disable it. We should
      expose this capability in the XML. Unfortunately, there's no good
      way to determine whether the binary we are talking to supports
      it. I mean, if qemu's run with real machine type, the smm
      attribute can be seen in 'qom-list /machine' output. But it's not
      there when qemu's run with -M none. Therefore we're stuck with
      version based check.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d0e4be9d
  7. 03 8月, 2016 1 次提交
    • J
      conf: Add IOThread quota and period scheduler/cputune defs · 2197ea56
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1356937
      
      Add the definitions to allow for viewing/setting cgroup period and quota
      limits for IOThreads.
      
      This is similar to the work done for emulator quota and period by
      commit ids 'b65dafa8' and 'e051c482'.
      
      Being able to view/set the IOThread specific values is related to more
      recent changes adding global period (commmit id '4d92d58f') and global
      quota (commit id '55ecdae0') definitions and qemu support (commit id
      '4e17ff79' and 'fbcbd1b2'). With a global setting though, if somehow
      the IOThread value in the cgroup hierarchy was set "outside of libvirt"
      to a value that is incompatible with the global value.
      
      Allowing control over IOThread specific values provides the capability
      to alter the IOThread values as necessary.
      2197ea56
  8. 02 8月, 2016 4 次提交
  9. 29 7月, 2016 1 次提交
    • M
      conf: Catch invalid memory model earlier · 1e058463
      Michal Privoznik 提交于
      Consider the following XML snippet:
      
          <memory model=''>
            <target>
              <size unit='KiB'>523264</size>
              <node>0</node>
            </target>
          </memory>
      
      Whats wrong you ask? The @model attribute. This should result in
      an error thrown into users faces during virDomainDefine phase.
      Except it doesn't. The XML validation catches this error, but if
      users chose to ignore that, they will end up with invalid XML.
      Well, they won't be able to start the machine - that's when error
      is produced currently. But it would be nice if we could catch the
      error like this earlier.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1e058463
  10. 27 7月, 2016 3 次提交
    • S
      qemu: Adjust the cur_ballon on coldplug/unplug of dimms · 707063ef
      Shivaprasad G Bhat 提交于
      The cur_balloon also increases/decreases with dimm hotplug/unplug.
      To be consistent, adjust the value for coldplug too. This was inconsistently
      taken care when cur_ballon != memory to begin with. The patch fixes it
      irrespective of that.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      707063ef
    • J
      Remove unnecessary virDomainDefClearDeviceAliases · fc0378a9
      John Ferlan 提交于
      Nothing in the code path after the removed call has needs/uses the alias
      anyway (as would be the case for command line building or talking to monitor).
      The alias is VIR_FREE'd in virDomainDeviceInfoClear which is called for any
      device that needs/uses an alias via virDomainDeviceDefFree or virDomainDefFree
      as well as during virDomainDeviceInfoFree for host devices.
      
      For persistent domains, the domain definition (including aliases) gets
      freed a few screens later when it's replaced with newDef.
      
      For transient domains, the definition is freed/unref'd along with the
      virDomainObj a few moments later.
      fc0378a9
    • J
      conf: Remove CCW,PCI clear address helpers · d95f5beb
      John Ferlan 提交于
      Since commit id 'fb063500' these are no longer called, so remove them
      d95f5beb
  11. 19 7月, 2016 3 次提交
  12. 18 7月, 2016 3 次提交
  13. 14 7月, 2016 1 次提交
  14. 13 7月, 2016 1 次提交
  15. 12 7月, 2016 1 次提交
  16. 11 7月, 2016 5 次提交
  17. 07 7月, 2016 4 次提交
    • M
      virDomainHostdevDefFree: Don't leak privateData · 6fcffcb1
      Michal Privoznik 提交于
      After 27726d8c a privateData is allocated in
      virDomainHostdevDefAlloc(). However, the counter part - freeing
      them in Free() is missing which leads to the following memory
      leak:
      
      ==6489== 24 bytes in 1 blocks are definitely lost in loss record 684 of 1,003
      ==6489==    at 0x4C2C070: calloc (vg_replace_malloc.c:623)
      ==6489==    by 0x54B7C94: virAllocVar (viralloc.c:560)
      ==6489==    by 0x5517BE6: virObjectNew (virobject.c:193)
      ==6489==    by 0x1B400121: qemuDomainHostdevPrivateNew (qemu_domain.c:798)
      ==6489==    by 0x5557B24: virDomainHostdevDefAlloc (domain_conf.c:2152)
      ==6489==    by 0x5575578: virDomainHostdevDefParseXML (domain_conf.c:12709)
      ==6489==    by 0x5582292: virDomainDefParseXML (domain_conf.c:16995)
      ==6489==    by 0x5583C98: virDomainDefParseNode (domain_conf.c:17470)
      ==6489==    by 0x5583B07: virDomainDefParse (domain_conf.c:17417)
      ==6489==    by 0x5583B95: virDomainDefParseFile (domain_conf.c:17441)
      ==6489==    by 0x55A3F24: virDomainObjListLoadConfig (virdomainobjlist.c:465)
      ==6489==    by 0x55A43E6: virDomainObjListLoadAllConfigs (virdomainobjlist.c:596)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6fcffcb1
    • P
      conf: Isolate virDomainLiveConfigHelperMethod to libxl only · f3d3be3d
      Peter Krempa 提交于
      Libxl is the last user and I don't have the toolchain prepared to
      compile the libxl driver. Move it to the libxl driver to avoid having to
      refactor the code.
      f3d3be3d
    • P
      conf: Don't use virDomainLiveConfigHelperMethod in virDomainObjGetMetadata · ef881407
      Peter Krempa 提交于
      Few arguments of the function are not necessary any more which leads to
      some cleanups. The 'uri' argument had a stray ATTRIBUTE_UNUSED.
      ef881407
    • P
  18. 02 7月, 2016 4 次提交
    • L
      conf: support host-side IP/route information in <interface> · 98fa8f3e
      Laine Stump 提交于
      This is place as a sub-element of <source>, where other aspects of the
      host-side connection to the network device are located (network or
      bridge name, udp listen port, etc). It's a bit odd that the interface
      we're configuring with this info is itself named in <target dev='x'/>,
      but that ship sailed long ago:
      
          <interface type='ethernet'>
            <mac address='00:16:3e:0f:ef:8a'/>
            <source>
              <ip address='192.168.122.12' family='ipv4'
                  prefix='24' peer='192.168.122.1'/>
              <ip address='192.168.122.13' family='ipv4' prefix='24'/>
              <route family='ipv4' address='0.0.0.0'
                     gateway='192.168.122.1'/>
              <route family='ipv4' address='192.168.124.0' prefix='24'
                     gateway='192.168.124.1'/>
            </source>
          </interface>
      
      In practice, this will likely only be useful for type='ethernet', so
      its presence in any other type of interface is currently forbidden in
      the generic device Validate function (but it's been put into the
      general population of virDomainNetDef rather than the
      ethernet-specific union member so that 1) we can more easily add the
      capability to other types if needed, and 2) we can retain the info
      when set to an invalid interface type all the way through to
      validation and report a proper error, rather than just ignoring it
      (which is currently what happens for many other type-specific
      settings).
      
      (NB: The already-existing configuration of IP info for the guest-side
      of interfaces is in subelements directly under <interface>, and the
      name of the guest-side interface (when configurable) is in <guest
      dev='x'/>).
      
      (This patch had been pushed earlier in
      commit fe6a7789, but was reverted in
      commit d6584565 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      98fa8f3e
    • V
      conf: allow setting peer address in <ip> element of <interface> · b81cf13e
      Vasiliy Tolstov 提交于
      The peer attribute is used to set the property of the same name in the
      interface IP info:
      
        <interface type='ethernet'>
          ...
          <ip family='ipv4' address='192.168.122.5'
              prefix='32' peer='192.168.122.6'/>
          ...
        </interface>
      
      Note that this element is used to set the IP information on the
      *guest* side interface, not the host side interface - that will be
      supported in an upcoming patch.
      
      (This patch now has quite a history: it was originally pushed in
      commit 690969af, which was subsequently reverted in commit 1d14b13f,
      then reworked and pushed (along with a lot of other related/supporting
      patches) in commit 93135abf; however *that* commit had been
      accidentally pushed during dev. freeze for release 2.0.0, so it was
      again reverted in commit f6acf039).
      Signed-off-by: NVasiliy Tolstov <v.tolstov@selfip.ru>
      Signed-off-by: NLaine Stump <laine@laine.org>
      b81cf13e
    • J
      encryption: Add <cipher> and <ivgen> to encryption · 2552fec2
      John Ferlan 提交于
      For a luks device, allow the configuration of a specific cipher to be
      used for encrypting the volume.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2552fec2
    • L
      util: new function virXMLNodeSanitizeNamespaces() · b874f26b
      Laine Stump 提交于
      This is a generic version of virDomainDefMetadataSanitize() - the same
      functionality is now needed for network metadata.
      b874f26b
  19. 01 7月, 2016 1 次提交
    • J
      Introduce virDomainUSBDeviceDefForeach · 492b3bfd
      Ján Tomko 提交于
      A helper that will execute a callback on every USB device
      in the domain definition.
      
      With an ability to skip USB hubs, since we will want to treat
      them differently in some cases.
      492b3bfd