- 05 12月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
These XMLs live in a separate directory, there's no need for them to have a special prefix in addition. It also doesn't play nicely with ':e' completion in Vim, finding proper file based on qemuxml2argvtest.c is also needlessly complicated. The files were renamed using the following commands. From qemuxml2argvdata: for i in qemuxml2argv-*.xml; do mv $i ${i#qemuxml2argv-}; done and then (to fix broken symlinks) from qemuxml2argvdata and qemuxml2xmloutdata: for i in $(find . -xtype l); do \ ln -sf $(readlink $i | sed 's/qemuxml2argv-//') $i; done Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 4月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
Our test data used a lot of different qemu binary paths and some of them were based on downstream systems. Note that there is one file where I had to add "accel=kvm" because the qemuargv2xml code parses "/usr/bin/kvm" as virt type="kvm". Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 14 6月, 2016 2 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This option allows or disallows detection of zero-writes if it is set to "on" or "off", respectively. It can be also set to "unmap" in which case it will try discarding that part of image based on the value of the "discard" option. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 10 2月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
We use the PreFormat callback for this. Many test cases need to be extended to pass in proper qemuCaps flags so AssignAddresses doesn't throw errors. One test case (pcie-root-port-too-many) is dropped, since it was meant only for checking an error condition in qemuxml2argv, and one we add in AssignAddresses it errors here too. Long term I think AssignAddresses should be handled in qemu's PostParse callback, but that's not entirely straightforward. Handling it here means we can get the test suite churn over with.
-
- 27 1月, 2016 1 次提交
-
-
由 Pavel Hrdina 提交于
The current code was a little bit odd. At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. This seems to me as a lot of code for nothing. This patch may look to be more complicated than original approach, but this is a preferred way to modify/add driver specific stuff only in those drivers and not deal with them in common parsing/formating functions. The update is to add those implicit input devices into config XML to follow the real HW configuration visible by guest OS. There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices for x86 architecture and they are available always, even without graphics device. This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 16 4月, 2014 1 次提交
-
-
由 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>
-
- 15 4月, 2014 1 次提交
-
-
由 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>
-
- 17 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
QEMU might support more values for "-drive discard", so using Bi-state values (on/off) for it doesn't make sense. "on" maps to "unmap", "off" maps to "ignore": <...> @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) requests are ignored or passed to the filesystem. Some machine types may not support discard requests. </...>
-
- 15 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
QEMU introduced "discard" option for drive since commit a9384aff53, <...> @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) requests are ignored or passed to the filesystem. Some machine types may not support discard requests. </...> This patch exposes the support in libvirt. QEMU supported "discard" for "-drive" since v1.5.0-rc0: % git tag --contains a9384aff53 contains v1.5.0-rc0 v1.5.0-rc1 So this only detects the capability bit using virQEMUCapsProbeQMPCommandLine.
-
- 25 4月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
<controller type='pci' index='0' model='pci-root'/> is auto-added to pc* machine types. Without this controller PCI bus 0 is not available and no PCI addresses are assigned by default. Since older libvirt supported PCI bus 0 even without this controller, it is removed from the XML when migrating.
-
- 22 10月, 2012 1 次提交
-
-
由 Doug Goldstein 提交于
Several tests assume that VNC is always available and include it in their configs and the expected command line. The tests have nothing to do with graphics display so they shouldn't rely on VNC.
-
- 09 5月, 2012 1 次提交
-
-
由 Osier Yang 提交于
<vcpu> is not an optional node. The value for its 'placement' actually always defaults to 'static' in the underlying codes. (Even no 'cpuset' and 'placement' is specified, the domain process will be pinned to all the available pCPUs).
-
- 08 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Make it obvious to 'dumpxml' readers what unit we are using, since our default of KiB for memory (1024) differs from qemu's default of MiB; and differs from our use of bytes for storage. Tests were updated via: $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/" $ find tests/*data tests/*out -name '*.xml' | \ xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/" followed by a few fixes for the stragglers. Note that with this patch, the RNG for <memory> still forbids validation of anything except unit='KiB', since the code silently ignores the attribute; a later patch will expand <memory> to allow scaled input in the code and update the RNG to match. * docs/schemas/basictypes.rng (unit): Add 'bytes'. (scaledInteger): New define. * docs/schemas/storagevol.rng (sizing): Use it. * docs/schemas/storagepool.rng (sizing): Likewise. * docs/schemas/domaincommon.rng (memoryKBElement): New define; use for memory elements. * src/conf/storage_conf.c (virStoragePoolDefFormat) (virStorageVolDefFormat): Likewise. * src/conf/domain_conf.h (_virDomainDef): Document unit used internally. * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef): Likewise. * tests/*data/*.xml: Update all tests. * tests/*out/*.xml: Likewise. * tests/define-dev-segfault: Likewise. * tests/openvzutilstest.c (testReadNetworkConf): Likewise. * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
-
- 28 2月, 2012 1 次提交
-
-
由 Osier Yang 提交于
* src/conf/domain_conf.h: Add new member "target" to struct _virDomainDeviceDriveAddress. * src/conf/domain_conf.c: Parse and format "target" * Lots of tests (.xml) in tests/domainsnapshotxml2xmlout, tests/qemuxml2argvdata, tests/qemuxml2xmloutdata, and tests/vmx2xmldata/ are modified for newly introduced attribute "target" for address of "drive" type.
-
- 10 2月, 2012 1 次提交
-
-
由 Marc-André Lureau 提交于
Some tools, such as virt-manager, prefers having the default USB controller explicit in the XML document. This patch makes sure there is one. With this patch, it is now possible to switch from USB1 to USB2 from the release 0.9.1 of virt-manager. Fix tests to pass with this change.
-
- 15 8月, 2011 1 次提交
-
-
由 Laine Stump 提交于
In some versions of qemu, both virtio-blk-pci and virtio-net-pci devices can have an event_idx setting that determines some details of event processing. When it is enabled, it "reduces the number of interrupts and exits for the guest". qemu will automatically enable this feature when it is available, but there may be cases where this new feature could actually make performance worse (NB: no such case has been found so far). As a safety switch in case such a situation is encountered in the field, this patch adds a new attribute "event_idx" to the <driver> element of both disk and interface devices. event_idx can be set to "on" (to force event_idx on in case qemu has it disabled by default) or "off" (for force event_idx off). In the case that event_idx support isn't present in qemu, the attribute is ignored (this on the advice of the qemu developer). docs/formatdomain.html.in: document the new flag (marking it as "don't mess with this!" docs/schemas/domain.rng: add event_idx in appropriate places src/conf/domain_conf.[ch]: add event_idx to parser and formatter src/libvirt_private.syms: export virDomainVirtioEventIdx(From|To)String src/qemu/qemu_capabilities.[ch]: detect and report event_idx in disk/net src/qemu/qemu_command.c: add event_idx parameter to qemu commandline when appropriate. tests/qemuxml2argvdata/qemuxml2argv-event_idx.args, tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml, tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: test cases for event_idx.
-
- 22 6月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
For virtio disks and interfaces, qemu allows users to enable or disable ioeventfd feature. This means, qemu can execute domain code, while another thread waits for I/O event. Basically, in some cases it is win, in some loss. This feature is available via 'ioeventfd' attribute in disk and interface <driver> element. It accepts 'on' and 'off'. Leaving this attribute out defaults to hypervisor decision.
-