1. 22 9月, 2016 1 次提交
    • J
      domcaps: Add support for listing supported CPU models · 167280e7
      Jiri Denemark 提交于
      The patch adds <cpu> element to domain capabilities XML:
      
          <cpu>
              <mode name='host-passthrough' supported='yes'/>
              <mode name='host-model' supported='yes'/>
              <mode name='custom' supported='yes'>
                  <model>Broadwell</model>
                  <model>Broadwell-noTSX</model>
                  ...
              </mode>
          </cpu>
      
      Applications can use it to inspect what CPU configuration modes are
      supported for a specific combination of domain type, emulator binary,
      guest architecture and machine type.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      167280e7
  2. 21 9月, 2016 1 次提交
  3. 19 9月, 2016 1 次提交
  4. 16 9月, 2016 1 次提交
  5. 13 9月, 2016 1 次提交
  6. 09 9月, 2016 2 次提交
  7. 06 9月, 2016 1 次提交
  8. 03 9月, 2016 1 次提交
  9. 02 9月, 2016 1 次提交
  10. 27 8月, 2016 1 次提交
  11. 26 8月, 2016 1 次提交
  12. 25 8月, 2016 2 次提交
    • P
      qemu: command: Add support for sparse vcpu topologies · 9eb9106e
      Peter Krempa 提交于
      Add support for using the new approach to hotplug vcpus using device_add
      during startup of qemu to allow sparse vcpu topologies.
      
      There are a few limitations imposed by qemu on the supported
      configuration:
      - vcpu0 needs to be always present and not hotpluggable
      - non-hotpluggable cpus need to be ordered at the beginning
      - order of the vcpus needs to be unique for every single hotpluggable
        entity
      
      Qemu also doesn't really allow to query the information necessary to
      start a VM with the vcpus directly on the commandline. Fortunately they
      can be hotplugged during startup.
      
      The new hotplug code uses the following approach:
      - non-hotpluggable vcpus are counted and put to the -smp option
      - qemu is started
      - qemu is queried for the necessary information
      - the configuration is checked
      - the hotpluggable vcpus are hotplugged
      - vcpus are started
      
      This patch adds a lot of checking code and enables the support to
      specify the individual vcpu element with qemu.
      9eb9106e
    • 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
  13. 20 8月, 2016 3 次提交
    • L
      network: allow limiting a <forwarder> element to certain domains · 0b6336c2
      Laine Stump 提交于
      For some unknown reason the original implementation of the <forwarder>
      element only took advantage of part of the functionality in the
      dnsmasq feature it exposes - it allowed specifying the ip address of a
      DNS server which *all* DNS requests would be forwarded to, like this:
      
         <forwarder addr='192.168.123.25'/>
      
      This is a frontend for dnsmasq's "server" option, which also allows
      you to specify a domain that must be matched in order for a request to
      be forwarded to a particular server. This patch adds support for
      specifying the domain. For example:
      
         <forwarder domain='example.com' addr='192.168.1.1'/>
         <forwarder domain='www.example.com'/>
         <forwarder domain='travesty.org' addr='10.0.0.1'/>
      
      would forward requests for bob.example.com, ftp.example.com and
      joe.corp.example.com all to the DNS server at 192.168.1.1, but would
      forward requests for travesty.org and www.travesty.org to
      10.0.0.1. And due to the second line, requests for www.example.com,
      and odd.www.example.com would be resolved by the libvirt network's own
      DNS server (i.e. thery wouldn't be immediately forwarded) even though
      they also match 'example.com' - the match is given to the entry with
      the longest matching domain. DNS requests not matching any of the
      entries would be resolved by the libvirt network's own DNS server.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1331796
      0b6336c2
    • L
      network: allow disabling dnsmasq's DNS server · 9065cfaa
      Laine Stump 提交于
      If you define a libvirt virtual network with one or more IP addresses,
      it starts up an instance of dnsmasq. It's always been possible to
      avoid dnsmasq's dhcp server (simply don't include a <dhcp> element),
      but until now it wasn't possible to avoid having the DNS server
      listening; even if the network has no <dns> element, it is started
      using default settings.
      
      This patch adds a new attribute to <dns>: enable='yes|no'. For
      backward compatibility, it defaults to 'yes', but if you don't want a
      DNS server created for the network, you can simply add:
      
         <dns enable='no'/>
      
      to the network configuration, and next time the network is started
      there will be no dns server created (if there is dhcp configuration,
      dnsmasq will be started with "port=0" which disables the DNS server;
      if there is no dhcp configuration, dnsmasq won't be started at all).
      9065cfaa
    • L
      network: new network forward mode 'open' · 25e8112d
      Laine Stump 提交于
      The new forward mode 'open' is just like mode='route', except that no
      firewall rules are added to assure that any traffic does or doesn't
      pass. It is assumed that either they aren't necessary, or they will be
      setup outside the scope of libvirt.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=846810
      25e8112d
  14. 12 8月, 2016 1 次提交
    • M
      schema: Don't validate paths · c4b92f1a
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1353296
      
      On UNIX like systems there are no constraints on what characters
      can be in file/dir names (except for NULL, obviously). Moreover,
      some values that we think of as paths (e.g. disk source) are not
      necessarily paths at all. For instance, some hypervisors take
      that as an arbitrary identifier and corresponding file is then
      looked up by hypervisor in its table. Instead of trying to fix
      our regular expressions (and forgetting to include yet another
      character there), lets drop the validation completely.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c4b92f1a
  15. 10 8月, 2016 1 次提交
  16. 08 8月, 2016 1 次提交
    • M
      docs: Distribute subsite.xsl · e396de03
      Michal Privoznik 提交于
      So, I've ran into very interesting problem lately. When doing the
      following, I've encountered an error:
      
        libvirt.git $ make dist && tar -xJf libvirt-2.2.0.tar.xz && \
                      cd libvirt-2.2.0 && ./configure && \
                      rm docs/formatdomain.html && make -C docs
      
        make: Entering directory 'docs'
        make: *** No rule to make target 'formatdomain.html', needed by 'web'.  Stop.
        make: Leaving directory 'docs'
      
      I had no idea what was going on, so I've nailed down the commit
      that "broke it" via running git-bisect. It was this one:
      7659bd92. But that shed no more light until I realized
      that the commit might actually just exposed a problem we had. And
      guess what - I've nailed it down. Of course we are not
      distributing subsite.xsl that's why make prints error message.
      Very misleading one I must say.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e396de03
  17. 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
  18. 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
  19. 02 8月, 2016 3 次提交
    • C
      libxl: add hooks support · 7d3b2eb5
      Cédric Bosdonnat 提交于
      Introduce libxl hook and use it for start, prepare, started,
      stop, stopped, migrate events.
      7d3b2eb5
    • C
      extend usb controller model to support xen pvusb · be146b34
      Chunyan Liu 提交于
      According to libxl implementation, it supports pvusb
      controller of version 1.1 and version 2.0, and it
      supports two types of backend, 'pvusb' (dom0 backend)
      and 'qusb' (qemu backend). But currently pvusb backend
      is not checked in yet.
      
      To match libxl support, extend usb controller schema
      to support two more models: qusb1 (qusb, version 1.1)
      and 'qusb2' (qusb version 2.0).
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      be146b34
    • D
      Release of libvirt-2.1.0 · 1fa8fd1a
      Daniel Veillard 提交于
      * docs/news.html.in: updated for release
      * po/*.po*: regenerated
      1fa8fd1a
  20. 01 8月, 2016 2 次提交
  21. 28 7月, 2016 1 次提交
    • D
      storage: remove "luks" storage volume type · a48c7141
      Daniel P. Berrange 提交于
      The current LUKS support has a "luks" volume type which has
      a "luks" encryption format.
      
      This partially makes sense if you consider the QEMU shorthand
      syntax only requires you to specify a format=luks, and it'll
      automagically uses "raw" as the next level driver. QEMU will
      however let you override the "raw" with any other driver it
      supports (vmdk, qcow, rbd, iscsi, etc, etc)
      
      IOW the intention though is that the "luks" encryption format
      is applied to all disk formats (whether raw, qcow2, rbd, gluster
      or whatever). As such it doesn't make much sense for libvirt
      to say the volume type is "luks" - we should be saying that it
      is a "raw" file, but with "luks" encryption applied.
      
      IOW, when creating a storage volume we should use this XML
      
        <volume>
          <name>demo.raw</name>
          <capacity>5368709120</capacity>
          <target>
            <format type='raw'/>
            <encryption format='luks'>
              <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/>
            </encryption>
          </target>
        </volume>
      
      and when configuring a guest disk we should use
      
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw'/>
          <source file='/home/berrange/VirtualMachines/demo.raw'/>
          <target dev='sda' bus='scsi'/>
          <encryption format='luks'>
            <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/>
          </encryption>
        </disk>
      
      This commit thus removes the "luks" storage volume type added
      in
      
        commit 318ebb36
        Author: John Ferlan <jferlan@redhat.com>
        Date:   Tue Jun 21 12:59:54 2016 -0400
      
          util: Add 'luks' to the FileTypeInfo
      
      The storage file probing code is modified so that it can probe
      the actual encryption formats explicitly, rather than merely
      probing existance of encryption and letting the storage driver
      guess the format.
      
      The rest of the code is then adapted to deal with
      VIR_STORAGE_FILE_RAW w/ VIR_STORAGE_ENCRYPTION_FORMAT_LUKS
      instead of just VIR_STORAGE_FILE_LUKS.
      
      The commit mentioned above was included in libvirt v2.0.0.
      So when querying volume XML this will be a change in behaviour
      vs the 2.0.0 release - it'll report 'raw' instead of 'luks'
      for the volume format, but still report 'luks' for encryption
      format.  I think this change is OK because the storage driver
      did not include any support for creating volumes, nor starting
      guets with luks volumes in v2.0.0 - that only since then.
      Clearly if we change this we must do it before v2.1.0 though.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a48c7141
  22. 27 7月, 2016 3 次提交
  23. 20 7月, 2016 3 次提交
    • J
      hvsupport: skip non-matching lines early · f1bbf57c
      Ján Tomko 提交于
      Most of the lines we look at are not going to match one of the
      driver types contained in $groups_regex.
      
      Move on to the next line if it does not contain any of them early.
      This speeds up the script execution by 50%, since this simple regex
      does not have any capture groups.
      f1bbf57c
    • J
      hvsupport: construct the group regex upfront · 6dc1f103
      Ján Tomko 提交于
      The %groups hash contains all the driver types (e.g.
      virHypervisorDriver or virSecretDriver).
      
      When searching for all the APIs that are implemented by a driver
      of that specific driver type, we keep iterating over the %groups
      hash on every line we look at, then matching against the driver type.
      
      This is inefficient because it prevents perl from caching the regex
      and it executes the regex once for every driver type, even though
      one regex matching excludes all the others, since all the driver types
      are different.
      
      Construct the regex containing all the driver types upfront to save
      about 6.4s (~98%) of the script execution time.
      6dc1f103
    • J
      hvsupport: use a regex instead of XML::XPath · ad9e72f5
      Ján Tomko 提交于
      When generating the hvsupport.html.in file, we parse the -api.xml
      files generated by apibuild.py to know in which HTML file the API
      function is.
      
      Doing an XPath query for every single 'function' element in the
      file is inefficient.
      
      Since the XML file is generated by another of our build scripts
      (apibuild.py, using Python's standard 'output.write' XML library),
      just find the function name->file mapping by a regex upfront.
      
      Also add a note about this next to the line that generates it
      in apibuild.py and do not check if XML::XPath is installed in
      bootstrap since we no longer use it.
      ad9e72f5
  24. 18 7月, 2016 2 次提交
    • J
      hvsupport: Introduce parseSymsFile · fa0b00f9
      Ján Tomko 提交于
      The code for parsing the different public syms files only differs
      in the filenames and version prefix.
      
      Unify it to a single subroutine.
      fa0b00f9
    • J
      Allow omitting USB port · 4f903643
      Ján Tomko 提交于
      We were requiring a USB port path in the schema, but not enforcing it.
      Omitting the USB port would lead to libvirt formatting it as (null).
      Such domain cannot be started and will disappear after libvirtd restart
      (since it cannot parse back the XML).
      
      Only format the port if it has been specified and mark it as optional
      in the XML schema.
      4f903643
  25. 15 7月, 2016 2 次提交
  26. 12 7月, 2016 1 次提交