1. 27 6月, 2016 3 次提交
    • L
      conf: use virNetDevIPInfo in virDomainHostdevCaps · 69e04044
      Laine Stump 提交于
      a.k.a. <hostdev mode='capabilities' type='net'>.
      
      This replaces the existing nips, ips, nroutes, and routes with a
      single virNetDevIPInfo, and simplifies the code by calling that
      object's parse/format/clear functions instead of open coding.
      69e04044
    • L
      conf: single object containing list of IP addresses, list of routes · 9911562a
      Laine Stump 提交于
      There are currently two places in the domain where this combination is
      used, and there is about to be another. This patch puts them together
      for brevity and uniformity.
      
      As with the newly-renamed virNetDevIPAddr and virNetDevIPRoute
      objects, the new virNetDevIPInfo object will need to be accessed by a
      utility function that calls low level Netlink functions (so we don't
      want it to be in the conf directory) and will be called from multiple
      hypervisor drivers (so it can't be in any hypervisor directory); the
      most appropriate place is thus once again the util directory.
      
      The parse and format functions are in conf/domain_conf.c because only
      the domain XML (i.e. *not* the network XML) has this exact combination
      of IP addresses plus routes. Note that virDomainNetIPInfoFormat() will
      end up being the only caller to virDomainNetRoutesFormat() and
      virDomainNetIPsFormat(), so it will just subsume those functions in a
      later patch, but we can't do that until they are no longer called.
      
      (It would have been nice to include the interface name within the
      virNetDevIPInfo object (with a slight name change), but that can't
      be done cleanly, because in each case the interface name is provided
      in a different place in the XML relative to the routes and IP
      addresses, so putting it in this object would actually make the code
      more confused rather than simpler).
      9911562a
    • L
      conf/openvz: eliminate incorrect/undocumented use of <source dev='blah'/> · 9658e70f
      Laine Stump 提交于
      When support for <interface type='ethernet'> was added in commit
      9a4b705f back in 2010, it erroneously looked at <source dev='blah'/>
      for a user-specified guest-side interface name. This was never
      documented though. (that attribute already existed at the time in the
      data.ethernet union member of virDomainNetDef, but apparently had no
      practical use - it was only used as a storage place for a NetDef's
      bridge name during qemuDomainXMLToNative(), but even then that was
      never used for anything).
      
      When support for similar guest-side device naming was added to the lxc
      driver several years later, it was put in a new subelement <guest
      dev='blah'/>.
      
      In the intervening years, since there was no validation that
      ethernet.dev was NULL in the other drivers that didn't actually use
      it, innocent souls who were adding other features assuming they needed
      to account for non-NULL ethernet.dev when really they didn't, so
      little bits of the usual pointless cargo-cult code showed up.
      
      This patch not only switches the openvz driver to use the documented
      <guest dev='blah'/> notation for naming the guest-side device (just in
      case anyone is still using the openvz driver), and logs an error if
      anyone tries to set <source dev='blah'/> for a type='ethernet'
      interface, it also removes the cargo-cult uses of ethernet.dev and
      <source dev='blah'/>, and eliminates if from the RNG and from
      virDomainNetDef.
      
      NB: I decided on this course of action after mentioning the
      inconsistency here:
      
        https://www.redhat.com/archives/libvir-list/2016-May/msg02038.html
      
      and getting encouragement do eliminate it in a later IRC discussion
      with danpb.
      9658e70f
  2. 17 6月, 2016 1 次提交
  3. 14 6月, 2016 1 次提交
  4. 09 6月, 2016 2 次提交
    • P
      spice: introduce listen type none · c34ada09
      Pavel Hrdina 提交于
      This new listen type is currently supported only by spice graphics.
      It's introduced to make it easier and clearer specify to not listen
      anywhere in order to start a guest with OpenGL support.
      
      The old way to do this was set spice graphics autoport='no' and don't
      specify any ports.  The new way is to use <listen type='none'/>.  In
      order to be able to migrate to old libvirt the migratable XML will be
      generated without the listen element and with autoport='no'.  Also the
      old configuration will be automatically converted to the this listen
      type.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      c34ada09
    • P
      graphics: introduce new listen type 'socket' · b6465e1a
      Pavel Hrdina 提交于
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b6465e1a
  5. 26 5月, 2016 1 次提交
    • L
      conf: permit auto-assignment of controller indexes · 4d100c7a
      Laine Stump 提交于
      Hand-entering indexes for 20 PCI controllers is not as tedious as
      manually determining and entering their PCI addresses, but it's still
      annoying, and the algorithm for determining the proper index is
      incredibly simple (in all cases except one) - just pick the lowest
      unused index.
      
      The one exception is USB2 controllers because multiple controllers in
      the same group have the same index. For these we look to see if 1) the
      most recently added USB controller is also a USB2 controller, and 2)
      the group *that* controller belongs to doesn't yet have a controller
      of the exact model we're just now adding - if both are true, the new
      controller gets the same index, but in all other cases we just assign
      the lowest unused index.
      
      With this patch in place and combined with the automatic PCI address
      assignment, we can define a PCIe switch with several ports like this:
      
        <controller type='pci' model='pcie-root-port'/>
        <controller type='pci' model='pcie-switch-upstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        ...
      
      These will each get a unique index, and PCI addresses that connect
      them together appropriately with no pesky numbers required.
      4d100c7a
  6. 25 5月, 2016 1 次提交
  7. 17 5月, 2016 1 次提交
  8. 12 5月, 2016 1 次提交
  9. 04 5月, 2016 1 次提交
    • J
      conf: Add support for virtio-scsi iothreads · e0d0e530
      John Ferlan 提交于
      Add the ability to add an 'iothread' to the controller which will be how
      virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu.
      
      Describe the new functionality and add tests to parse/validate that the
      new attribute can be added.
      e0d0e530
  10. 03 5月, 2016 1 次提交
  11. 02 5月, 2016 1 次提交
  12. 30 4月, 2016 1 次提交
    • L
      Revert "libvirt domain xml allow to set peer address" · 1d14b13f
      Laine Stump 提交于
      This reverts commit 690969af, which
      added the domain config parts to support a "peer" attribute in domain
      interface <ip> elements.
      
      It's being removed temporarily for the release of libvirt 1.3.4
      because the feature doesn't work, and there are concerns that it may
      need to be modified in an externally visible manner which could create
      backward compatibility problems.
      1d14b13f
  13. 26 4月, 2016 2 次提交
  14. 15 4月, 2016 3 次提交
    • L
      conf: new pci controller model pcie-expander-bus · bc07251f
      Laine Stump 提交于
      This controller provides a single PCIe port on a new root. It is
      similar to pci-expander-bus, intended to provide a bus that can be
      associated with a guest-identifiable NUMA node, but is for
      machinetypes with PCIe rather than PCI (e.g. q35-based machinetypes).
      
      Aside from PCIe vs. PCI, the other main difference is that a
      pci-expander-bus has a companion pci-bridge that is automatically
      attached along with it, but pcie-expander-bus has only a single port,
      and that port will only connect to a pcie-root-port, or to a
      pcie-switch-upstream-port. In order for the bus to be of any use in
      the guest, it must have either a pcie-root-port or a
      pcie-switch-upstream-port attached (and one or more
      pcie-switch-downstream-ports attached to the
      pcie-switch-upstream-port).
      bc07251f
    • L
      conf: new pci controller model pci-expander-bus · 52f3d0a4
      Laine Stump 提交于
      This is a standard PCI root bus (not a bridge) that can be added to a
      440fx-based domain. Although it uses a PCI slot, this is *not* how it
      is connected into the PCI bus hierarchy, but is only used for
      control. Each pci-expander-bus provides 32 slots (0-31) that can
      accept hotplug of standard PCI devices.
      
      The usefulness of pci-expander-bus relative to a pci-bridge is that
      the NUMA node of the bus can be specified with the <node> subelement
      of <target>. This gives guest-side visibility to the NUMA node of
      attached devices (presuming that management apps only assign a device
      to a bus that has a NUMA node number matching the node number of the
      device on the host).
      
      Each pci-expander-bus also has a "busNr" attribute. The expander-bus
      itself will take the busNr specified, and all buses that are connected
      to this bus (including the pci-bridge that is automatically added to
      any expander bus of model "pxb" (see the next commit)) will use
      busNr+1, busNr+2, etc, and the pci-root (or the expander-bus with next
      lower busNr) will use bus numbers lower than busNr.
      52f3d0a4
    • L
      schema: rename uint8range/uint24range to uint8/uint24 · f97a03e7
      Laine Stump 提交于
      nwfilter.rng defines uint16range and uint32range, but in a different
      manner (it also allows a variable name as the value, rather than just
      a decimal or hex number). I wanted to add uint16range to
      basictypes.rng, but my desired definition was parallel to those for
      uint8range and uint24range which are defined in basictypes.rng - they
      *don't* allow a variable name for the value.
      
      The simplest path to make everyone happy is to make the "plain"
      versions in basictypes.rng have simpler names - "uint8", "uint16", and
      "uint24". This patch renames uint8range and uint24range to uint8 and
      uint24, while the next patch will add uint16.
      f97a03e7
  15. 08 4月, 2016 1 次提交
  16. 29 3月, 2016 2 次提交
    • Q
      perf: add new xml element · afe833e9
      Qiaowei Ren 提交于
      This patch adds new xml element, and so we can have the option of
      also having perf events enabled immediately at startup.
      Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com>
      Message-id: 1459171833-26416-6-git-send-email-qiaowei.ren@intel.com
      afe833e9
    • M
      conf: qemu: Add support for more HyperV Enlightenment features · 7068b56c
      Maxim Nestratov 提交于
      This patch adds support for "vpindex", "runtime", "synic",
      "stimer", and "vendor_id" features available in qemu 2.5+.
      
      - When Hyper-V "vpindex" is on, guest can use MSR HV_X64_MSR_VP_INDEX
      to get virtual processor ID.
      
      - Hyper-V "runtime" enlightement feature allows to use MSR
      HV_X64_MSR_VP_RUNTIME to get the time the virtual processor consumes
      running guest code, as well as the time the hypervisor spends running
      code on behalf of that guest.
      
      - Hyper-V "synic" stands for Synthetic Interrupt Controller, which is
      lapic extension controlled via MSRs.
      
      - Hyper-V "stimer" switches on Hyper-V SynIC timers MSR's support.
      Guest can setup and use fired by host events (SynIC interrupt and
      appropriate timer expiration message) as guest clock events
      
      - Hyper-V "reset" allows guest to reset VM.
      
      - Hyper-V "vendor_id" exposes hypervisor vendor id to guest.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      7068b56c
  17. 21 3月, 2016 1 次提交
    • J
      conf: add 'state' attribute to <hap> feature · 9d243e08
      Jim Fehlig 提交于
      Most hypervisors use Hardware Assisted Paging by default and don't
      require specifying the feature in domain conf. But some hypervisors
      support disabling HAP on a per-domain basis. To enable HAP by default
      yet provide a knob to disable it, extend the <hap> feature with a
      'state=on|off' attribute, similar to <pvspinlock> and <vmport> features.
      
      In the absence of <hap>, the hypervisor default (on) is used. <hap>
      without the state attribute would be the same as <hap state='on'/> for
      backwards compatibility. And of course <hap state='off'/> disables hap.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      9d243e08
  18. 14 3月, 2016 1 次提交
    • J
      schema: support 'default' cache mode · 885e34c9
      Jim Fehlig 提交于
      The docs claims the cache attribute of the disk <driver>
      element supports 'default' as one of its permissible values,
      but such configuration fails virt-xml-validate. Add 'default'
      as one of the cache attribute choices in domaincommon.rng.
      885e34c9
  19. 10 3月, 2016 1 次提交
    • D
      conf: allow use of a logfile with chardev backends · 00ce10c7
      Daniel P. Berrange 提交于
      Extend the chardev source XML so that there is a new optional
      <log/> element, which is applicable to all character device
      backend types. For example, to log output of a TCP backed
      serial port
      
          <serial type='tcp'>
            <source mode='connect' host='127.0.0.1' service='9999'/>
            <protocol type='raw'/>
            <log file='/var/log/libvirt/qemu/demo-serial0.log' append='on'/>
            <target port='0'/>
          </serial>
      
      Not all hypervisors will support use of logfiles.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      00ce10c7
  20. 01 3月, 2016 4 次提交
  21. 16 2月, 2016 1 次提交
    • A
      schema: List allowed GIC versions · 2a7b11ea
      Andrea Bolognani 提交于
      This change allows to use "host" as a GIC version in the domain XML.
      
      Since we'll need to update the virGICVersion enumeration to support
      new GIC versions anyway, it makes sense to be a bit more strict in
      the schema as well and reject values that are not in the enumeration.
      2a7b11ea
  22. 12 1月, 2016 1 次提交
    • D
      conf: introduce 'autodeflate' attribute for memballoon device · 7bf3198d
      Dmitry Andreev 提交于
      Excessive memory balloon inflation can cause invocation of OOM-killer,
      when Linux is under severe memory pressure. QEMU memballoon device
      has a feature to release some memory at the last moment before some
      process will be get killed by OOM-killer.
      
      Introduce a new optional balloon device attribute 'autodeflate' to
      enable or disable this feature.
      7bf3198d
  23. 05 1月, 2016 1 次提交
  24. 24 12月, 2015 1 次提交
  25. 04 12月, 2015 1 次提交
    • P
      schema: Allow > UINT_MAX KiB of memory for NUMA nodes · e5fac009
      Peter Krempa 提交于
      Using more than 4TiB of memory per NUMA node would not be possible to
      express in the XML without violating the schema. Not that such boxes
      would be common, but we should use a longer type at this point.
      
      The pattern is not necessary since libvirt redefines the type already in
      basictypes.rng with the same pattern.
      e5fac009
  26. 30 11月, 2015 2 次提交
  27. 27 11月, 2015 1 次提交
  28. 26 11月, 2015 1 次提交
  29. 25 11月, 2015 1 次提交
    • D
      Allow multiple panic devices · 59fc0d06
      Dmitry Andreev 提交于
      'model' attribute was added to a panic device but only one panic
      device is allowed. This patch changes panic device presence
      from 'optional' to 'zeroOrMore'.
      59fc0d06