[libvirt] [dbus PATCH] connect: remove unused domain variables
by Ján Tomko
Neither virDomainRestoreFlags nor virDomainSaveImageDefineXML take a
virDomain argument.
Remove the unused domain variables.
Introduced by commits 1ce556b and 2597d41 respectively.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/connect.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/connect.c b/src/connect.c
index 8faaeaf..3a563bb 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -357,7 +357,6 @@ virtDBusConnectDomainRestoreFlags(GVariant *inArgs,
GError **error)
{
virtDBusConnect *connect = userData;
- g_autoptr(virDomain) domain = NULL;
const gchar *from;
const gchar *xml;
guint flags;
@@ -383,7 +382,6 @@ virtDBusConnectDomainSaveImageDefineXML(GVariant *inArgs,
GError **error)
{
virtDBusConnect *connect = userData;
- g_autoptr(virDomain) domain = NULL;
const gchar *file;
const gchar *xml;
guint flags;
--
2.16.1
6 years, 6 months
[libvirt] [PATCH 0/6] Various disk-related fixes/cleanups
by Peter Krempa
noticed while doing blockdev work but didn't turn out to be relevant.
Peter Krempa (6):
conf: Make argument of virDomainDiskGetDriver const
qemu: Move disk driver name validation into disk validation callback
conf, qemu: Replace access to disk driver name with accessors
conf: Punt 'driverName' back to disk definition structure
conf: Disk 'shared' state is not guest ABI
qemu: driver: Fix error message in qemuDomainBlockCommit
src/conf/domain_conf.c | 20 ++++++++++----------
src/conf/domain_conf.h | 4 +++-
src/qemu/qemu_command.c | 12 ------------
src/qemu/qemu_domain.c | 9 +++++++++
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 7 -------
src/qemu/qemu_parse_command.c | 2 +-
src/util/virstoragefile.c | 6 ------
src/util/virstoragefile.h | 1 -
9 files changed, 24 insertions(+), 39 deletions(-)
--
2.16.2
6 years, 6 months
[libvirt] [PATCH] conf: Reindent virDomainObjCheckActive
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Pushed as trivial.
src/conf/domain_conf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ae2135263e..5f1af911b7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6001,9 +6001,9 @@ int
virDomainObjCheckActive(virDomainObjPtr dom)
{
if (!virDomainObjIsActive(dom)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("domain is not running"));
- return -1;
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ return -1;
}
return 0;
}
--
2.17.0
6 years, 6 months
[libvirt] [PATCH v2 0/2] qemu: cpu: fix "full" CPU to include all "reported" CPU features
by Nikolay Shirokovskiy
diff from v1:
- add test data for CPU for which issue was triggered
Patch 1 adds tests for CPU on which problem was detected. However we
don't test <cpu mode='host-model' check='partial'> case which have
issue.
Patch 2 is actual fix.
Nikolay Shirokovskiy (2):
cputest: New test for Intel Core i5-650
qemu: cpu: fix "full" CPU to include all "reported" CPU features
src/qemu/qemu_capabilities.c | 12 +-
tests/cputest.c | 1 +
.../x86_64-cpuid-Core-i5-650-disabled.xml | 5 +
.../x86_64-cpuid-Core-i5-650-enabled.xml | 7 +
.../cputestdata/x86_64-cpuid-Core-i5-650-guest.xml | 24 +
.../cputestdata/x86_64-cpuid-Core-i5-650-host.xml | 25 +
.../cputestdata/x86_64-cpuid-Core-i5-650-json.xml | 12 +
tests/cputestdata/x86_64-cpuid-Core-i5-650.json | 1068 ++++++++++++++++++++
tests/cputestdata/x86_64-cpuid-Core-i5-650.xml | 30 +
9 files changed, 1181 insertions(+), 3 deletions(-)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650-disabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650-enabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650-guest.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650-host.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650-json.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650.json
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-650.xml
--
1.8.3.1
6 years, 6 months
[libvirt] [PATCH] qemuDomainObjPrivateDataClear: Don't leak @migParams
by Michal Privoznik
Allocated in qemuMigrationParamsNew() we need to free
priv->job.migParams when no longer needed.
==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost in loss record 112 of 123
==8061== at 0x4C2CF26: calloc (vg_replace_malloc.c:711)
==8061== by 0x5325D05: virAlloc (viralloc.c:144)
==8061== by 0x1984F9: qemuMigrationParamsNew (qemu_migration_params.c:218)
==8061== by 0x19A352: qemuMigrationParamsParse (qemu_migration_params.c:1185)
==8061== by 0x1604D8: qemuDomainObjPrivateXMLParseJob (qemu_domain.c:2390)
==8061== by 0x160AE9: qemuDomainObjPrivateXMLParse (qemu_domain.c:2517)
==8061== by 0x5419EAE: virDomainObjParseXML (domain_conf.c:20442)
==8061== by 0x541A25E: virDomainObjParseNode (domain_conf.c:20555)
==8061== by 0x541A2FC: virDomainObjParseFile (domain_conf.c:20574)
==8061== by 0x13607D: testCompareStatusXMLToXMLFiles (qemuxml2xmltest.c:75)
==8061== by 0x14F3E8: virTestRun (testutils.c:180)
==8061== by 0x14DCD0: mymain (qemuxml2xmltest.c:1200)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 672f08b442..47595e244a 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1895,6 +1895,8 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivatePtr priv)
virBitmapFree(priv->migrationCaps);
priv->migrationCaps = NULL;
+
+ qemuMigrationParamsFree(priv->job.migParams);
}
--
2.16.1
6 years, 6 months
[libvirt] [PATCH] news: Xen: announce support for setting CPU features
by Jim Fehlig
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
docs/news.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index a5c489151..dec3f134c 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,18 @@
add this controller when traditional PCI devices are in use.
</description>
</change>
+ <change>
+ <summary>
+ Xen: Support setting CPU features for host-passthrough model
+ </summary>
+ <description>
+ The CPU model presented to Xen HVM domains is equivalent to libvirt's
+ host-passthrough model, although individual features can be enabled
+ and disabled via the cpuid setting. The libvirt libxl driver now
+ supports enabling and disabling individual features of the
+ host-passthrough CPU model.
+ </description>
+ </change>
</section>
<section title="Removed features">
<change>
--
2.16.3
6 years, 6 months
[libvirt] [PATCH v2 0/9] Add function that raises error if domain is not active
by Clementine Hayat
This is my GSOC patch contribution.
This change was suggested on BiteSizedTasks in the libvirt wiki[1].
in libvirt there is lots of occurences of this same pattern:
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("domain is not running"));
goto out;
}
This series replace these calls with a new function that check if the
domain is active and log directly the error. This allows to remove
almost 300 lines of code in the code base.
[1] https://wiki.libvirt.org/page/BiteSizedTasks#Add_function_that_raises_err...
Changes since v2:
* renamed virDomainObjCheckIsActive into virDomainObjCheckActive
* add the remaining occurences
Clementine Hayat (9):
Add function that raises error if domain is not active
qemu: start using virDomainObjCheckActive
test: start using virDomainObjCheckActive
libxl: start using virDomainObjCheckActive
bhyve: start using virDomainObjCheckActive
lxc: start using virDomainObjCheckActive
openvz: start using virDomainObjCheckActive
uml: start using virDomainObjCheckActive
vz: start using virDomainObjCheckActive
src/bhyve/bhyve_driver.c | 20 +--
src/conf/domain_conf.c | 11 ++
src/conf/domain_conf.h | 2 +
src/libvirt_private.syms | 1 +
src/libxl/libxl_driver.c | 97 +++----------
src/lxc/lxc_driver.c | 60 ++------
src/openvz/openvz_driver.c | 20 +--
src/qemu/qemu_domain.c | 5 +-
src/qemu/qemu_driver.c | 271 ++++++++-----------------------------
src/test/test_driver.c | 35 +----
src/uml/uml_driver.c | 5 +-
src/vz/vz_driver.c | 5 +-
12 files changed, 120 insertions(+), 412 deletions(-)
--
2.17.0
6 years, 6 months
[libvirt] [PATCH v3 0/5] virClassNew rework
by Michal Privoznik
*** Some BLURB HERE. Too tired to write something useful. ***
Michal Privoznik (5):
datatypes: Rename @parent to @parentName in virNodeDevice
src: Unify virObject member name
virobject: Introduce VIR_CLASS_NEW() macro
virobject: Check if @parent is the first member in class
cfg.mk: Introduce syntax-check rule to prefer VIR_CLASS_NEW
cfg.mk | 8 ++
src/access/viraccessmanager.c | 5 +-
src/bhyve/bhyve_conf.c | 5 +-
src/conf/capabilities.c | 5 +-
src/conf/domain_capabilities.c | 11 +--
src/conf/domain_conf.c | 20 +---
src/conf/domain_event.c | 166 ++++++++------------------------
src/conf/network_event.c | 14 +--
src/conf/node_device_event.c | 21 ++--
src/conf/object_event.c | 12 +--
src/conf/secret_event.c | 21 ++--
src/conf/storage_event.c | 21 ++--
src/conf/virdomainobjlist.c | 5 +-
src/conf/virinterfaceobj.c | 10 +-
src/conf/virnetworkobj.c | 11 +--
src/conf/virnodedeviceobj.c | 12 +--
src/conf/virsecretobj.c | 10 +-
src/conf/virstorageobj.c | 20 +---
src/datatypes.c | 7 +-
src/datatypes.h | 30 +++---
src/interface/interface_backend_netcf.c | 6 +-
src/libvirt-admin.c | 7 +-
src/libvirt-domain-snapshot.c | 2 +-
src/libvirt-domain.c | 2 +-
src/libvirt-host.c | 2 +-
src/libvirt-interface.c | 2 +-
src/libvirt-network.c | 2 +-
src/libvirt-nodedev.c | 8 +-
src/libvirt-nwfilter.c | 2 +-
src/libvirt-secret.c | 2 +-
src/libvirt-storage.c | 4 +-
src/libvirt-stream.c | 2 +-
src/libxl/libxl_conf.c | 5 +-
src/libxl/libxl_domain.c | 5 +-
src/libxl/libxl_migration.c | 5 +-
src/logging/log_handler.c | 5 +-
src/lxc/lxc_conf.c | 5 +-
src/lxc/lxc_monitor.c | 5 +-
src/node_device/node_device_driver.c | 4 +-
src/node_device/node_device_udev.c | 5 +-
src/qemu/qemu_agent.c | 5 +-
src/qemu/qemu_capabilities.c | 7 +-
src/qemu/qemu_conf.c | 11 +--
src/qemu/qemu_domain.c | 51 +++-------
src/qemu/qemu_monitor.c | 5 +-
src/remote/remote_daemon_dispatch.c | 4 +-
src/remote/remote_protocol.x | 2 +-
src/remote_protocol-structs | 2 +-
src/rpc/virkeepalive.c | 5 +-
src/rpc/virnetclient.c | 5 +-
src/rpc/virnetclientprogram.c | 7 +-
src/rpc/virnetclientstream.c | 5 +-
src/rpc/virnetdaemon.c | 5 +-
src/rpc/virnetlibsshsession.c | 5 +-
src/rpc/virnetsaslcontext.c | 10 +-
src/rpc/virnetserver.c | 5 +-
src/rpc/virnetserverclient.c | 5 +-
src/rpc/virnetserverprogram.c | 7 +-
src/rpc/virnetserverservice.c | 7 +-
src/rpc/virnetsocket.c | 5 +-
src/rpc/virnetsshsession.c | 5 +-
src/rpc/virnettlscontext.c | 10 +-
src/security/security_manager.c | 5 +-
src/test/test_driver.c | 6 +-
src/util/virclosecallbacks.c | 11 +--
src/util/virdnsmasq.c | 8 +-
src/util/virfdstream.c | 5 +-
src/util/virfilecache.c | 7 +-
src/util/virhash.c | 11 +--
src/util/virhostdev.c | 5 +-
src/util/viridentity.c | 5 +-
src/util/virmacmap.c | 5 +-
src/util/virmdev.c | 5 +-
src/util/virobject.c | 10 +-
src/util/virobject.h | 5 +
src/util/virpci.c | 5 +-
src/util/virportallocator.c | 5 +-
src/util/virresctrl.c | 10 +-
src/util/virscsi.c | 5 +-
src/util/virscsivhost.c | 5 +-
src/util/virusb.c | 5 +-
src/vbox/vbox_common.c | 5 +-
src/vz/vz_driver.c | 5 +-
tests/virfilecachetest.c | 7 +-
84 files changed, 224 insertions(+), 583 deletions(-)
--
2.16.1
6 years, 6 months
[libvirt] [PATCH 0/2] Two patches to fix the build
by Michal Privoznik
After 446d09149802677 the build was broken. I've pushed these under
build breaker rule. And they're trivial too.
Michal Privoznik (2):
virmocklibxl.c: Fix include of virfile.h
tests: Compile and link virmocklibxl with libxml
tests/Makefile.am | 2 +-
tests/virmocklibxl.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
--
2.16.1
6 years, 6 months
[libvirt] [PATCH 0/7] Addressing some Coverity complaints...
by John Ferlan
My current pile is 48 patches - most of those are known false
positives or have been posted before and either rejected or
ignored. In any case, the following is a list of more recent
adjustments from my coverity tree. Seems we've largely moved
away from resource leaks and into return value checking issues.
Some good, some not so good.
John Ferlan (7):
conf: Add error checking to virDomainSnapshotDiskDefFormat
remote: Fix usage of ATTRIBUTE_FALLTHROUGH
tests: Return failure if log not fopen'd
tests: Don't call virNetServerClientClose without valid client
tests: Add checks for possible errors
qemu: Fix possible memory leak in migration param processing
qemu: Check for missing 'return' in qemuMonitorJSONCheckReply
src/conf/snapshot_conf.c | 16 ++++++++++------
src/qemu/qemu_migration_params.c | 1 +
src/qemu/qemu_monitor_json.c | 7 ++++++-
src/remote/remote_driver.c | 2 +-
tests/commandhelper.c | 2 +-
tests/testutilsqemuschema.c | 40 +++++++++++++++++++++++++++++-----------
tests/virnetserverclienttest.c | 3 ++-
7 files changed, 50 insertions(+), 21 deletions(-)
--
2.13.6
6 years, 6 months