1. 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
  2. 26 4月, 2016 2 次提交
  3. 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
  4. 08 4月, 2016 1 次提交
  5. 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
  6. 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
  7. 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
  8. 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
  9. 01 3月, 2016 4 次提交
  10. 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
  11. 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
  12. 05 1月, 2016 1 次提交
  13. 24 12月, 2015 1 次提交
  14. 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
  15. 30 11月, 2015 2 次提交
  16. 27 11月, 2015 1 次提交
  17. 26 11月, 2015 1 次提交
  18. 25 11月, 2015 2 次提交
    • 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
    • D
      conf: add 'model' attribute for panic device with values isa, pseries, hyperv · 658ec27f
      Dmitry Andreev 提交于
      Libvirt already has two types of panic devices - pvpanic and pSeries firmware.
      This patch introduces the 'model' attribute and a new type of panic device.
      
      'isa' model is for ISA pvpanic device.
      'pseries' model is a default value for pSeries guests.
      'hyperv' model is the new type. It's used for Hyper-V crash.
      
      Schema and docs are updated for the new attribute.
      658ec27f
  19. 18 11月, 2015 1 次提交
  20. 02 9月, 2015 1 次提交
    • J
      qemu: add udp interface support · 5c668a78
      Jonathan Toppins 提交于
      Adds a new interface type using UDP sockets, this seems only applicable
      to QEMU but have edited tree-wide to support the new interface type.
      
      The interface type required the addition of a "localaddr" (local
      address), this then maps into the following xml and qemu call.
      
      <interface type='udp'>
        <mac address='52:54:00:5c:67:56'/>
        <source address='127.0.0.1' port='11112'>
          <local address='127.0.0.1' port='22222'/>
        </source>
        <model type='virtio'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
      </interface>
      
      QEMU call:
      	-net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222
      
      Notice the xml "local" entry becomes the "localaddr" for the qemu call.
      
      reference:
      http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      5c668a78
  21. 26 8月, 2015 1 次提交
    • I
      lxc: Inherit namespace feature · c27553b6
      ik.nitk 提交于
      This patch adds feature for lxc containers to inherit namespaces.
      This is very similar to what lxc-tools or docker provides.  Look
      for "man lxc-start" and you will find that you can pass command
      args as [ --share-[net|ipc|uts] name|pid ]. Or check out docker
      networking option in which you can give --net=container:NAME_or_ID
      as an option for sharing +namespace.
      
      >From this patch you can add extra libvirt option to share
      namespace in following way.
      
       <lxc:namespace>
         <lxc:sharenet type='netns' value='red'/>
         <lxc:shareipc type='pid' value='12345'/>
         <lxc:shareuts type='name' value='container1'/>
       </lxc:namespace>
      
      The netns option is specific to sharenet. It can be used to
      inherit from existing network namespace.
      
      Co-authored: Daniel P. Berrange <berrange@redhat.com>
      c27553b6
  22. 25 8月, 2015 1 次提交
  23. 10 8月, 2015 6 次提交
    • M
      conf: Add ioeventfd option for controllers · 35eecdde
      Martin Kletzander 提交于
      This will be used with a virtio-scsi controller later on.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      35eecdde
    • L
      conf: new pcie-controller model "pcie-switch-downstream-port" · 76379a6e
      Laine Stump 提交于
      This controller can be connected only to a port on a
      pcie-switch-upstream-port. It provides a single hotpluggable port that
      will accept any PCI or PCIe device, as well as any device requiring a
      pcie-*-port (the only current example of such a device is the
      pcie-switch-upstream-port).
      76379a6e
    • L
      conf: new pci controller model "pcie-switch-upstream-port" · 38ea9515
      Laine Stump 提交于
      This controller can be connected only to a pcie-root-port or a
      pcie-switch-downstream-port (which will be added in a later patch),
      which is the reason for the new connect type
      VIR_PCI_CONNECT_TYPE_PCIE_PORT. A pcie-switch-upstream-port provides
      32 ports (slot=0 to slot=31) on the downstream side, which can only
      have pci controllers of model "pcie-switch-downstream-port" plugged
      into them, which is the reason for the other new connect type
      VIR_PCI_CONNECT_TYPE_PCIE_SWITCH.
      38ea9515
    • L
      conf: new pci controller model "pcie-root-port" · dce3b8be
      Laine Stump 提交于
      This controller can be connected (at domain startup time only - not
      hotpluggable) only to a port on the pcie root complex ("pcie-root" in
      libvirt config), hence the new connect type
      VIR_PCI_CONNECT_TYPE_PCIE_ROOT. It provides a hotpluggable port that
      will accept any PCI or PCIe device.
      
      New attributes must be added to the controller <target> subelement for
      this - chassis and port are guest-visible option values that will be
      set by libvirt with values derived from the controller's index and pci
      address information.
      dce3b8be
    • 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
  24. 24 6月, 2015 2 次提交
  25. 23 6月, 2015 1 次提交
    • E
      docs: Fix XML schema handling of LUN address in hostdev tag · c733e973
      Eric Farman 提交于
      Defining a domain with a SCSI disk attached via a hostdev
      tag and a source address unit value longer than two digits
      causes an error when editing the domain with virsh edit,
      even if no changes are made to the domain definition.
      The error suggests invalid XML, somewhere:
      
        # virsh edit lmb_guest
        error: XML document failed to validate against schema:
        Unable to validate doc against /usr/local/share/libvirt/schemas/domain.rng
        Extra element devices in interleave
        Element domain failed to validate content
      
      The virt-xml-validate tool fails with a similar error:
      
        # virt-xml-validate lmb_guest.xml
        Relax-NG validity error : Extra element devices in interleave
        lmb_guest.xml:17: element devices: Relax-NG validity error :
        Element domain failed to validate content
        lmb_guest.xml fails to validate
      
      The hostdev tag requires a source address to be specified,
      which includes bus, target, and unit address attributes.
      According to the SCSI Architecture Model spec (section
      4.9 of SAM-2), a LUN address is 64 bits and thus could be
      up to 20 decimal digits long.  Unfortunately, the XML
      schema limits this string to just two digits.  Similarly,
      the target field can be up to 32 bits in length, which
      would be 10 decimal digits.
      
        # lsscsi -xx
        [0:0:19:0x4022401100000000]  disk    IBM      2107900          3.44 /dev/sda
        # lsscsi
        [0:0:19:1074872354]disk    IBM      2107900          3.44  /dev/sda
        # cat lmb_guest.xml
        <domain type='kvm'>
          <name>lmb_guest</name>
          <memory unit='MiB'>1024</memory>
        ...trimmed...
          <devices>
            <controller type='scsi' model='virtio-scsi' index='0'/>
            <hostdev mode='subsystem' type='scsi'>
              <source>
                <adapter name='scsi_host0'/>
                <address bus='0' target='19' unit='1074872354'/>
              </source>
            </hostdev>
        ...trimmed...
      
      Since the reference unit and target fields are used in
      several places in the XML schema, create a separate one
      specific for SCSI Logical Units that will permit the
      greater length.  This permits both the validation utility
      and the virsh edit command to succeed when a hostdev
      tag is included.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      Reviewed-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com>
      Reviewed-by: NStefan Zimmermann <stzi@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      c733e973