1. 16 9月, 2014 1 次提交
  2. 10 9月, 2014 1 次提交
    • M
      conf: Extend <loader/> and introduce <nvram/> · 68bf13db
      Michal Privoznik 提交于
      Up to now, users can configure BIOS via the <loader/> element. With
      the upcoming implementation of UEFI this is not enough as BIOS and
      UEFI are conceptually different. For instance, while BIOS is ROM, UEFI
      is programmable flash (although all writes to code section are
      denied). Therefore we need new attribute @type which will
      differentiate the two. Then, new attribute @readonly is introduced to
      reflect the fact that some images are RO.
      
      Moreover, the OVMF (which is going to be used mostly), works in two
      modes:
      1) Code and UEFI variable store is mixed in one file.
      2) Code and UEFI variable store is separated in two files
      
      The latter has advantage of updating the UEFI code without losing the
      configuration. However, in order to represent the latter case we need
      yet another XML element: <nvram/>. Currently, it has no additional
      attributes, it's just a bare element containing path to the variable
      store file.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      68bf13db
  3. 05 9月, 2014 1 次提交
  4. 29 8月, 2014 2 次提交
    • J
      qemu: Allow use of iothreads for disk definitions · ef8da2ad
      John Ferlan 提交于
      For virtio-blk-pci disks with the disk iothread attribute that are
      running the correct emulator, add the "iothread=iothread#" to the
      -device command line in order to enable iothreads for the disk as
      long as the command is available, the disk iothread value provided is
      valid, and is supported for the disk device being added
      ef8da2ad
    • J
      qemu: Add support for iothreads · 72edaae7
      John Ferlan 提交于
      Add a new capability to ensure the iothreads feature exists for the qemu
      emulator being run - requires the "query-iothreads" QMP command. Using the
      domain XML add correspoding command argument in order to generate the
      threads. The iothreads will use a name space "iothread#" where, the
      future patch to add support for using an iothread to a disk definition to
      merely define which of the available threads to use.
      
      Add tests to ensure the xml/argv processing is correct.  Note that no
      change was made to qemuargv2xmltest.c as processing the -object element
      would require knowing more than just iothreads.
      72edaae7
  5. 26 8月, 2014 1 次提交
  6. 25 8月, 2014 1 次提交
  7. 12 8月, 2014 1 次提交
  8. 08 8月, 2014 1 次提交
    • J
      hostdev: Add iSCSI hostdev XML · 54ac483e
      John Ferlan 提交于
      Introduce a new structure to handle an iSCSI host device based on the
      existing virDomainHostdevSubsysSCSI by adding a "protocol='iscsi'" to
      the <source/> element. The existing scsi_host subsystem RNG was modified
      to read an optional "protocol='adapter'", although it won't be written
      out nor is it documented as an option (by choice).
      
      The new hostdev structure mimics the existing <disk/> element for an
      iSCSI device (network) device. New XML is:
      
        <hostdev mode='subsystem' type='scsi' managed='yes'>
          <source protocol='iscsi' name='iqn.1992-01.com.example'>
            <host name='example.org' port='3260'/>
            <auth username='myname'>
              <secret type='iscsi' usage='mycluster_myname'/>
            </auth>
          </source>
          <address type='drive' controller='0' bus='0' target='2' unit='5'/>
        </hostdev>
      
      The controller element will mimic the existing scsi_host code insomuch
      as when 'lsi' and 'virtio-scsi' are used.
      54ac483e
  9. 30 7月, 2014 1 次提交
    • E
      blockcommit: track job type in xml · 232a31be
      Eric Blake 提交于
      A future patch is going to wire up qemu active block commit jobs;
      but as they have similar events and are canceled/pivoted in the
      same way as block copy jobs, it is easiest to track all bookkeeping
      for the commit job by reusing the <mirror> element.  This patch
      adds domain XML to track which job was responsible for creating a
      mirroring situation, and adds a job='copy' attribute to all
      existing uses of <mirror>.  Along the way, it also massages the
      qemu monitor backend to read the new field in order to generate
      the correct type of libvirt job (even though it requires a
      future patch to actually cause a qemu event that can be reported
      as an active commit).  It also prepares to update persistent XML
      to match changes made to live XML when a copy completes.
      
      * docs/schemas/domaincommon.rng: Enhance schema.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (_virDomainDiskDef): Add a field.
      * src/conf/domain_conf.c (virDomainBlockJobType): String conversion.
      (virDomainDiskDefParseXML): Parse job type.
      (virDomainDiskDefFormat): Output job type.
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Distinguish
      active from regular commit.
      * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Set job type.
      (qemuDomainBlockPivot, qemuDomainBlockJobImpl): Clean up job type
      on completion.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml:
      Update tests.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml: New
      file.
      * tests/qemuxml2xmltest.c (mymain): Drive new test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      232a31be
  10. 29 7月, 2014 2 次提交
  11. 17 7月, 2014 5 次提交
  12. 14 7月, 2014 1 次提交
  13. 02 7月, 2014 1 次提交
  14. 27 6月, 2014 1 次提交
  15. 07 6月, 2014 1 次提交
    • E
      conf: alter disk mirror xml output · 7c6fc394
      Eric Blake 提交于
      Now that we track a disk mirror as a virStorageSource, we might
      as well update the XML to theoretically allow any type of
      mirroring destination (not just a local file).  A later patch
      will also be reusing <mirror> to track the block commit of the
      top layer of a chain, which is another case where libvirt needs
      to update the backing chain after the job is finally pivoted,
      and since backing chains can have network backing files as the
      destination to commit into, it makes more sense to display that
      in the XML.
      
      This patch changes output-only XML; it was already documented
      that <mirror> does not affect a domain definition at this point
      (because qemu doesn't provide persistent bitmaps yet).  Any
      application that was starting a block copy job with older libvirt
      and then relying on the domain XML to determine if it was
      complete will no longer be able to access the file= and format=
      attributes of mirror that were previously used.  However, this is
      not going to be a problem in practice: the only time a block copy
      job works is on a transient domain, and any app that is managing
      a transient domain probably already does enough of its own
      bookkeeping to know which file it is mirroring into without
      having to re-read it from the libvirt XML.  The one thing that
      was likely to be used in a mirroring job was the ready=
      attribute, which is unchanged.  Meanwhile, I made sure the schema
      and parser still accept the old format, even if we no longer
      output it, so that upgrading from an older version of libvirt is
      seamless.
      
      * docs/schemas/domaincommon.rng (diskMirror): Alter definition.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
      styles of mirror elements.
      (virDomainDiskDefFormat): Output new style.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
      file, copied from...
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
      before modernizing.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
      files.
      * tests/qemuxml2xmltest.c (mymain): Test both styles.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7c6fc394
  16. 19 5月, 2014 1 次提交
    • J
      conf: fix seclabels for chardevs · 5ac9b9dd
      Ján Tomko 提交于
      We allow a seclabel to be specified in the <source> element
      of a chardev:
      
      <serial type='file'>
        <source path='/tmp/serial.file'>
          <seclabel model='dac' relabel='no'/>
        </source>
      </serial>
      
      But we format it outside the source:
      
      <serial type='file'>
        <source path='/tmp/serial.file'/>
        <target port='0'/>
          <seclabel model='dac' relabel='no'/>
      </serial>
      
      Move the formatting inside the source to fix this to make the
      seclabel persistent across XML format->parse.
      
      Introduced by commit f8b08d0e 'Add <seclabel> to character devices.'
      5ac9b9dd
  17. 24 4月, 2014 2 次提交
  18. 16 4月, 2014 1 次提交
    • E
      conf: fix omission of <driver> in domain dumpxml · 8fb44675
      Eric Blake 提交于
      I noticed that depending on the <driver> attributes the user passed
      in, the output may omit the <driver> element altogether.  For example,
      the rerror_policy has had this problem since commit 4bb4109f in Oct
      2011.  But in adding testsuite coverage to expose it, I found another
      problem: the C code is just fine without a driver name, but the
      XML validator required either a name or a cache mode.
      
      * src/conf/domain_conf.c (virDomainDiskDefFormat): Update
      conditional.
      * docs/schemas/domaincommon.rng (diskDriver): Simplify.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.xml:
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.args:
      New files.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
      Enhance test.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
      Likewise.
      * tests/qemuxml2argvtest.c (mymain): New test.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      8fb44675
  19. 15 4月, 2014 1 次提交
    • E
      conf: better <disk> interleaving in schema · a9efe2d7
      Eric Blake 提交于
      In general, we try to make virt-xml-validate tolerant of input
      elements in any order when possible.  However, as written, the
      RNG grammar did not permit <source> unless there was an explicit
      type= attribute (even though the C code manages just fine by
      defaulting to type='file').  After making the attribute optional
      on the 'file' branch, I noticed that the use of diskspec was now
      redundant with the branch when no <source> was supplied.
      
      View this patch with 'git diff -b' for a better picture of the
      schema change.
      
      * docs/schemas/domaincommon.rng (disk): Hoist 'diskspec' out of
      choice, make type='file' default, and still preserve interleave.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-source-pool.xml:
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
      New files.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
      Reorder XML.
      * tests/qemuxml2xmltest.c (mymain): Cover new files.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a9efe2d7
  20. 26 3月, 2014 1 次提交
    • J
      Treat zero cpu shares as a valid value · bdffab0d
      Ján Tomko 提交于
      Currently, <cputune><shares>0</shares></cputune> is treated
      as if it were not specified.
      
      Treat is as a valid value if it was explicitly specified
      and write it to the cgroups.
      bdffab0d
  21. 25 3月, 2014 1 次提交
  22. 18 3月, 2014 1 次提交
  23. 11 2月, 2014 1 次提交
    • M
      qemu: introduce spiceport chardev backend · d27e6bc4
      Martin Kletzander 提交于
      Add a new backend for any character device.  This backend uses channel
      in spice connection.  This channel is similar to spicevmc, but
      all-purpose in contrast to spicevmc.
      
      Apart from spicevmc, spiceport-backed chardev will not be formatted
      into the command-line if there is no spice to use (with test for that
      as well).  For this I moved the def->graphics counting to the start
      of the function so its results can be used in rest of the code even in
      the future.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      d27e6bc4
  24. 10 2月, 2014 2 次提交
    • P
      qemu: hyperv: Add support for timer enlightenments · 600bca59
      Peter Krempa 提交于
      Add a new <timer> for the HyperV reference time counter enlightenment
      and the iTSC reference page for Windows guests.
      
      This feature provides a paravirtual approach to track timer events for
      the guest (similar to kvmclock) with the option to use real hardware
      clock on systems with a iTSC with compensation across various hosts.
      600bca59
    • P
      schema: Fix guest timer specification schema according to the docs · bbd392ff
      Peter Krempa 提交于
      According to the documentation describing various tunables for domain
      timers not all the fields are supported by all the driver types. Express
      these in the RNG:
      
      - rtc, platform: Only these support the "track" attribute.
      - tsc: only one to support "frequency" and "mode" attributes
      - hpet, pit: tickpolicy/catchup attribute/element
      - kvmclock: no extra attributes are supported
      
      Additionally the attributes of the <catchup> element for
      tickpolicy='catchup' are optional according to the parsing code. Express
      this in the XML and fix a spurious space added while formatting the
      <catchup> element and add tests for it.
      bbd392ff
  25. 11 1月, 2014 1 次提交
  26. 13 12月, 2013 1 次提交
  27. 10 12月, 2013 1 次提交
  28. 11 11月, 2013 1 次提交
    • M
      virSecurityLabelDefParseXML: Don't parse label on model='none' · 9fb3f957
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1027096
      
      If there's the following snippet in the domain XML, the domain will be
      lost upon the daemon restart (if the domain is started prior restart):
      
          <seclabel type='dynamic' relabel='yes'/>
      
      The problem is, the 'label', 'imagelabel' and 'baselabel' are parsed
      whenever the VIR_DOMAIN_XML_INACTIVE is *not* present or the label is
      static. The latter is not our case, obviously. So, when libvirtd starts
      up, it finds domain state xml and parse it. During parsing, many XML
      flags are enabled but VIR_DOMAIN_XML_INACTIVE. Hence, our parser tries
      to extract 'label', 'imagelabel' and 'baselabel' from the XML which
      fails for model='none'. Err, this model - even though not specified in
      XML - can be taken from qemu wide config file: /etc/libvirtd/qemu.conf.
      
      However, in order to know we are dealing with model='none' the code in
      question must be moved forward a bit. Then a new check must be
      introduced. This is what the first two chunks are doing.
      
      But this alone is not sufficient. The domain state XML won't contain the
      model attribute without slight modification. The model should be
      inserted into the XML even if equal to 'none' and the state XML is being
      generated - what if the origin (the @security_driver variable in
      qemu.conf) changes during libvirtd restarts?
      
      At the end, a test to catch this scenario is introduced.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9fb3f957
  29. 08 11月, 2013 1 次提交
  30. 08 10月, 2013 2 次提交
  31. 27 8月, 2013 1 次提交
    • J
      Add pcihole64 element to root PCI controllers · 01cda918
      Ján Tomko 提交于
      <controller type='pci' index='0' model='pci-root'>
        <pcihole64 unit='KiB'>1048576</pcihole64>
      </controller>
      
      It can be used to adjust (or disable) the size of the 64-bit
      PCI hole. The size attribute is in kilobytes (different unit
      can be specified on input), but it gets rounded up to
      the nearest GB by QEMU.
      
      Disabling it will be needed for guests that crash with the
      64-bit PCI hole (like Windows XP), see:
      https://bugzilla.redhat.com/show_bug.cgi?id=990418
      01cda918