[libvirt] [libvirt-python PATCHv3 0/2] Python bindings for IOThreads
by John Ferlan
v2: http://www.redhat.com/archives/libvir-list/2015-February/msg00876.html
Changes over v3 based on upstream libvirt API changes:
- Change virDomainIOThreadsInfo[Ptr] to virDomainIOThreadInfo[Ptr]
- Remove 'nresources' and 'resources'
- Less python object manipulation...
- Change virDomainSetIOThreads to virDomainPinIOThread
John Ferlan (2):
Support virDomainGetIOThreadsInfo and virDomainIOThreadsInfoFree
Support virDomainPinIOThread
generator.py | 6 ++
libvirt-override-api.xml | 14 ++++
libvirt-override.c | 162 +++++++++++++++++++++++++++++++++++++++++++++++
sanitytest.py | 5 ++
4 files changed, 187 insertions(+)
--
2.1.0
9 years, 8 months
[libvirt] [PATCH 0/6] Coverity fixes
by John Ferlan
Some Coverity patches - the first one has been showing up in my dailies
for a few days... The other 5 I don't see, but that's because I don't
generally build with xenapi in my Coverity environment. So for those,
I'm hoping someone with that environment could check them out.
John Ferlan (6):
conf: Resolve Coverity RESOURCE_LEAK
xenapi: Resolve Coverity FORWARD_NULL
xenapi: Resolve Coverity NO_EFFECT
xenapi: Resolve Coverity NULL_RETURNS
xenapi: Resolve Coverity REVERSE_INULL
xenapi: Resolve Coverity REVERSE_INULL
src/conf/node_device_conf.c | 1 +
src/xenapi/xenapi_driver.c | 13 ++++++++-----
src/xenapi/xenapi_utils.c | 33 ++++++++++++++++++---------------
3 files changed, 27 insertions(+), 20 deletions(-)
--
2.1.0
9 years, 8 months
[libvirt] [PATCH v5 0/5] Introduce display of IOThreads Information
by John Ferlan
Well technically this is the pinning API's, but keeping the subject the
same for continuity sake.
v4: http://www.redhat.com/archives/libvir-list/2015-March/msg00262.html
Specifically replacing patches 5-9
Changes over v4 - remove the virDomainGetIOThreadPin related code leaving
only the virDomainPinIOThread code.
Will address jtomko's comments from 3/9 in a separate followup patch
John Ferlan (5):
Implement public API for virDomainPinIOThread
remote: Implement the plumbing for virDomainPinIOThread
domain: Introduce virDomainIOThreadsPin{Add|Del}
qemu: Add support to pin IOThreads to specific CPU
virsh: Add iothreadpin command
include/libvirt/libvirt-domain.h | 14 +++
src/conf/domain_conf.c | 64 ++++++++++++
src/conf/domain_conf.h | 10 ++
src/driver-hypervisor.h | 8 ++
src/libvirt-domain.c | 76 ++++++++++++++
src/libvirt_private.syms | 2 +
src/libvirt_public.syms | 1 +
src/qemu/qemu_driver.c | 221 +++++++++++++++++++++++++++++++++++++++
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 17 ++-
src/remote_protocol-structs | 10 ++
src/rpc/gendispatch.pl | 1 +
tools/virsh-domain.c | 106 +++++++++++++++++++
tools/virsh.pod | 26 +++++
14 files changed, 556 insertions(+), 1 deletion(-)
--
2.1.0
9 years, 8 months
[libvirt] [PATCHv2 0/4]add support for graphics to get a IPv6 address
by Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1192318
We already support add a IPv6 address to graphics listen address
and xml like this:
<graphics type='spice' port='5900' autoport='yes' listen='2001b8:ca2:2::1' keymap='en-us'>
<listen type='address' address='2001b8:ca2:2::1'/>
</graphics>
However we do not support get a IPv6 address for the network.
add some helpers and rework networkGetNetworkAddress to make it
can get a IPv6 address when we need.
Luyao Huang (4):
util: introduce 2 new helpers for get interface IPv6 address
conf: introduce new family attribute in graphics listen for chose IP
family
network: rework networkGetNetworkAddress to make it can get IPv6
address
qemu: fix a error coverd issue in 2 place
docs/formatdomain.html.in | 10 ++-
docs/schemas/domaincommon.rng | 8 ++
src/conf/domain_conf.c | 20 +++++
src/conf/domain_conf.h | 9 ++
src/libvirt_private.syms | 1 +
src/network/bridge_driver.c | 15 ++--
src/network/bridge_driver.h | 6 +-
src/qemu/qemu_command.c | 22 +++--
src/util/virnetdev.c | 98 ++++++++++++++++++++++
src/util/virnetdev.h | 4 +
.../qemuxml2argv-graphics-listen-network-ipv6.xml | 35 ++++++++
.../qemuxml2argv-graphics-listen-network.xml | 2 +-
.../qemuxml2xmlout-graphics-listen-network2.xml | 2 +-
tests/qemuxml2xmltest.c | 1 +
14 files changed, 209 insertions(+), 24 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network-ipv6.xml
--
1.8.3.1
9 years, 8 months
[libvirt] [PATCH 00/12] qemu: Refactor block stats gathering and implement summary stats
by Peter Krempa
Peter Krempa (12):
qemu: Use macro to set block stats typed parameters
qemu: monitor: Drop parsing of 'errs' from block info
qemu: blockstats: Switch to caller allocated hash table
test: qemu: Fix qemu monitor test utils to allow testing HMP
qemu: monitor: Implement HMP version for listing all block device
stats
qemu: monitor: Convert common code to a macro
qemu: monitor: Count block stats fields in
qemuMonitorGetAllBlockStatsInfo
qemu: Split out working code qemuDomainBlockStats
qemu: blockstats: Add support for totalled block statistics
qemu: blockstats: Refactor qemuDomainBlockStatsFlags
test: qemu: json: Avoid using the now obsolete functions
qemu: monitor: Kill qemuMonitorGetBlockStats(Info,ParamsNumber)
src/qemu/qemu_driver.c | 299 ++++++++++++++++++++-----------------------
src/qemu/qemu_monitor.c | 106 ++++++---------
src/qemu/qemu_monitor.h | 15 ---
src/qemu/qemu_monitor_json.c | 233 ++++-----------------------------
src/qemu/qemu_monitor_json.h | 15 +--
src/qemu/qemu_monitor_text.c | 256 ++++++++++++++----------------------
src/qemu/qemu_monitor_text.h | 16 +--
tests/Makefile.am | 8 +-
tests/qemumonitorjsontest.c | 65 ++++------
tests/qemumonitortest.c | 89 ++++++++++++-
tests/qemumonitortestutils.c | 3 +-
tools/virsh.pod | 5 +-
12 files changed, 425 insertions(+), 685 deletions(-)
--
2.2.2
9 years, 8 months
[libvirt] [libvirt-test-API][PATCH 0/2] Add test cases for setTime and getTime
by Jincheng Miao
create some test cases for libvirt-python API setTime and getTime
Jincheng Miao (2):
Add guest setTime and getTime testing
Add test cases for linux_domain
cases/linux_domain.conf | 26 +++++++++
repos/domain/guest_time.py | 98 ++++++++++++++++++++++++++++++++
repos/domain/set_guest_time.py | 122 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 246 insertions(+), 0 deletions(-)
create mode 100644 repos/domain/guest_time.py
create mode 100644 repos/domain/set_guest_time.py
9 years, 8 months
[libvirt] [PATCH] virnetdev: fix build with old kernel
by Pavel Hrdina
Commit c9027d8f added a detection of NIC HW features, but some of them
are not available in old kernel. Very old kernels lack enum
ethtool_flags and even if this enum is present, not all values are
available for all kernels. To be sure that we have everything in kernel
that we need, we must check for existence of newest value which is
ETH_FLAG_TXVLAN. Only then we can be sure that the feature detection
can be successfully built.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
configure.ac | 6 ++++++
src/util/virnetdev.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e071813..3cffb84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -383,6 +383,12 @@ AC_CHECK_TYPE([struct ifreq],
#include <net/if.h>
]])
+AC_CHECK_DECL([ETH_FLAG_TXVLAN],
+ [AC_DEFINE([HAVE_ETH_FLAG_TXVLAN],[1],
+ [Defined if ETH_FLAG_TXVLAN exists in linux/ethtool.h])],
+ [], [[#include <linux/ethtool.h>
+ ]])
+
dnl Our only use of libtasn1.h is in the testsuite, and can be skipped
dnl if the header is not present. Assume -ltasn1 is present if the
dnl header could be found.
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 971db43..7519579 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -47,7 +47,8 @@
# undef HAVE_STRUCT_IFREQ
#endif
-#if defined(SIOCETHTOOL) && defined(HAVE_STRUCT_IFREQ)
+#if defined(SIOCETHTOOL) && defined(HAVE_STRUCT_IFREQ) && \
+ defined(HAVE_ETH_FLAG_TXVLAN)
# include <linux/ethtool.h>
#endif
@@ -2733,7 +2734,8 @@ int virNetDevGetRxFilter(const char *ifname,
return ret;
}
-#if defined(SIOCETHTOOL) && defined(HAVE_STRUCT_IFREQ)
+#if defined(SIOCETHTOOL) && defined(HAVE_STRUCT_IFREQ) && \
+ defined(HAVE_ETH_FLAG_TXVLAN)
/**
* virNetDevFeatureAvailable
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] RNG: Allow multiple parameters to be passed to an interface filter
by Michal Privoznik
Our code supports that for ages. When using a <filterref/> to an
<interface/> several parameters can be passed to the filter. Later,
when building firewall rules, parameters are substituted for their
values. However, our RNG schema allowed only one parameter to be
passed.
Reported-by: Brian Rak <brak(a)gameservers.com>
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/schemas/domaincommon.rng | 4 +-
.../domain-qemu-interface-filterref.xml | 170 +++++++++++++++++++++
2 files changed, 172 insertions(+), 2 deletions(-)
create mode 100644 tests/domainschemadata/domain-qemu-interface-filterref.xml
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 56ea6a4..b1d883f 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4530,7 +4530,7 @@
<attribute name="filter">
<data type="NCName"/>
</attribute>
- <optional>
+ <zeroOrMore>
<element name="parameter">
<attribute name="name">
<ref name="filter-param-name"/>
@@ -4539,7 +4539,7 @@
<ref name="filter-param-value"/>
</attribute>
</element>
- </optional>
+ </zeroOrMore>
</define>
<define name="deviceBoot">
diff --git a/tests/domainschemadata/domain-qemu-interface-filterref.xml b/tests/domainschemadata/domain-qemu-interface-filterref.xml
new file mode 100644
index 0000000..0aa0c99
--- /dev/null
+++ b/tests/domainschemadata/domain-qemu-interface-filterref.xml
@@ -0,0 +1,170 @@
+<domain type='kvm'>
+ <name>gentoo</name>
+ <uuid>a75aca4b-a02f-2bcb-4a91-c93cd848c34b</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <memoryBacking>
+ <hugepages>
+ <page size='1048576' unit='KiB' nodeset='0-3'/>
+ </hugepages>
+ </memoryBacking>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact'>
+ <model fallback='allow'>Haswell</model>
+ <vendor>Intel</vendor>
+ <feature policy='require' name='tm2'/>
+ <feature policy='require' name='est'/>
+ <feature policy='require' name='vmx'/>
+ <feature policy='require' name='osxsave'/>
+ <feature policy='require' name='smx'/>
+ <feature policy='require' name='ss'/>
+ <feature policy='require' name='ds'/>
+ <feature policy='require' name='vme'/>
+ <feature policy='require' name='dtes64'/>
+ <feature policy='require' name='abm'/>
+ <feature policy='require' name='ht'/>
+ <feature policy='require' name='acpi'/>
+ <feature policy='require' name='pbe'/>
+ <feature policy='require' name='tm'/>
+ <feature policy='require' name='pdcm'/>
+ <feature policy='require' name='pdpe1gb'/>
+ <feature policy='require' name='ds_cpl'/>
+ <feature policy='require' name='rdrand'/>
+ <feature policy='require' name='f16c'/>
+ <feature policy='require' name='xtpr'/>
+ <feature policy='require' name='monitor'/>
+ <numa>
+ <cell id='0' cpus='0' memory='1048576' unit='KiB'/>
+ <cell id='1' cpus='1' memory='1048576' unit='KiB'/>
+ <cell id='2' cpus='2' memory='1048576' unit='KiB'/>
+ <cell id='3' cpus='3' memory='1048576' unit='KiB'/>
+ </numa>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <pm>
+ <suspend-to-mem enabled='yes'/>
+ <suspend-to-disk enabled='yes'/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='file' device='floppy'>
+ <driver name='qemu' type='raw' cache='none'/>
+ <source file='/var/lib/libvirt/images/fd.img'/>
+ <target dev='fda' bus='fdc'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/gentoo.qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/OtherDemo.img'/>
+ <target dev='vdb' bus='virtio'/>
+ <encryption format='qcow'>
+ <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
+ </encryption>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw' cache='none'/>
+ <source file='/home/zippy/tmp/install-amd64-minimal-20140619.iso'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ <shareable/>
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+ </controller>
+ <controller type='fdc' index='0'/>
+ <interface type='network'>
+ <mac address='52:54:00:d6:c0:0b'/>
+ <source network='default'/>
+ <bandwidth>
+ <inbound average='100'/>
+ <outbound average='100'/>
+ </bandwidth>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <interface type='bridge'>
+ <mac address='52:54:00:35:82:59'/>
+ <source bridge='br0'/>
+ <model type='rtl8139'/>
+ <filterref filter='myfilter'>
+ <parameter name='CTRL_IP_LEARNING' value='none'/>
+ <parameter name='DHCPSERVER' value='104.156.226.10'/>
+ <parameter name='IP' value='104.207.129.11'/>
+ <parameter name='IP6_ADDR' value='2001:19f0:300:2102::'/>
+ <parameter name='IP6_MASK' value='64'/>
+ </filterref>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+ </interface>
+ <interface type='server'>
+ <mac address='52:54:00:22:c9:42'/>
+ <source address='127.0.0.1' port='1234'/>
+ <bandwidth>
+ <inbound average='1234'/>
+ <outbound average='5678'/>
+ </bandwidth>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+ </interface>
+ <interface type='client'>
+ <mac address='52:54:00:8c:b1:f8'/>
+ <source address='127.0.0.1' port='1234'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <serial type='pty'>
+ <target port='1'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <channel type='unix'>
+ <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/gentoo.org.qemu.guest_agent.0'/>
+ <target type='virtio' name='org.qemu.guest_agent.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes'/>
+ <sound model='ich6'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </sound>
+ <video>
+ <model type='cirrus' vram='16384' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
--
2.0.5
9 years, 8 months
[libvirt] [PATCH 0/4] parallels: fix different domain define parameters
by Maxim Nestratov
Actually our checking for unsupported parameters is too strict about
cpumask, vcpupin and NUMA parameters and in general wrong.
First of all, we do support cpumask and consequently we don't have to prevent
domain definition in case cpumask is specified. Also we should allow vcpupin
parameters if they don't contradict with common cpumask. NUMA checking was also
wrong because def->numa is always allocated. Here we check that its content is
not specified.
Maxim Nestratov (4):
parallels: cpumask support
parallels: don't forget to unlock domain in
parallelsDomainHasManagedSaveImage
parallels: prevent domain define only if NUMA is really specified
parallels: prevent domain define only if vcpupin is specified
9 years, 8 months
[libvirt] [libvirt-test-API][PATCH 0/2] Add securitylabel test case
by jiahu
The test case will check securityLabel() and securityLabelList() APIs.
jiahu (2):
Add securitylabel test case to linux_domain.conf
Add securitylabel test case
cases/linux_domain.conf | 4 +
repos/domain/securitylabel.py | 170 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 174 insertions(+)
create mode 100644 repos/domain/securitylabel.py
--
1.8.3.1
9 years, 8 months