[libvirt] [PATCH 1/1] Assign spapr-vio bus address to ibmvscsi controller
by Li Zhang
ibmvscsi is based on spapr-vio bus address type.
It can't work on PCI bus. Now, it is still on
pci bus.
This patch is to assign spapr-vio address type
to ibmvscsi controller.
Signed-off-by: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
---
src/qemu/qemu_command.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 117542f..3100f41 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2566,6 +2566,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
virBufferAddLit(&buf, "lsi");
break;
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI:
+ def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
virBufferAddLit(&buf, "spapr-vscsi");
break;
default:
--
1.7.9.5
13 years
[libvirt] [PATCH] build: Fix the typo in configure.ac
by Osier Yang
s/nuamd/numad/,
--
Pushed under trivial rule.
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 93cc3e8..f7e15f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1525,7 +1525,7 @@ if test "$with_numad" != "no" ; then
if test -z "$NUMAD" || test $fail = 1; then
with_numad="no"
else
- with_nuamd="yes"
+ with_numad="yes"
fi
else
test -z "$NUMAD" &&
--
1.7.7.3
13 years
[libvirt] [PATCHv2] conf: Fix memory leaks in virStoragePoolDefParseSource
by Alex Jia
Detected by valgrind. Leaks are introduced in commit 122fa379.
src/conf/storage_conf.c: fix memory leaks.
How to reproduce?
$ make && make -C tests check TESTS=storagepoolxml2xmltest
$ cd tests && valgrind -v --leak-check=full ./storagepoolxml2xmltest
actual result:
==28571== LEAK SUMMARY:
==28571== definitely lost: 40 bytes in 5 blocks
==28571== indirectly lost: 0 bytes in 0 blocks
==28571== possibly lost: 0 bytes in 0 blocks
==28571== still reachable: 1,054 bytes in 21 blocks
==28571== suppressed: 0 bytes in 0 blocks
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
src/conf/storage_conf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 0b34f28..188af6d 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -465,6 +465,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
}
}
+ VIR_FREE(nodeset);
source->initiator.iqn = virXPathString("string(./initiator/iqn/@name)", ctxt);
nsource = virXPathNodeSet("./device", ctxt, &nodeset);
--
1.7.1
13 years
[libvirt] [PATCH] qemu: fix build when !HAVE_NUMACTL
by Eric Blake
Commit 97010eb1f forgot to change the other side of an #ifdef.
* src/qemu/qemu_process.c (qemuProcessInitNumaMemoryPolicy): Add
argument.
---
Pushing under the build-breaker rule.
src/qemu/qemu_process.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e34cc6d..b7c53ea 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1751,7 +1751,8 @@ cleanup:
}
#else
static int
-qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm)
+qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm,
+ const char *nodemask ATTRIBUTE_UNUSED)
{
if (vm->def->numatune.memory.nodemask) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
--
1.7.7.6
13 years
[libvirt] [PATCH] Report error when parsing character device target type
by Jim Fehlig
No useful error was being reported when an invalid character device
target type is specified in the domainXML. E.g.
...
<console type="pty">
<source path="/dev/pts/2"/>
<target type="kvm" port="0"/>
</console>
...
resulted in
error: Failed to define domain from x.xml
error: An error occurred, but the cause is unknown
With this small patch, the error is more helpful
error: Failed to define domain from x.xml
error: XML error: unknown target type 'kvm' specified for character device
---
src/conf/domain_conf.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 976e42b..54ac1db 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4895,6 +4895,9 @@ virDomainChrDefParseTargetXML(virCapsPtr caps,
if ((def->targetType =
virDomainChrTargetTypeFromString(caps, vmdef,
def->deviceType, targetType)) < 0) {
+ virDomainReportError(VIR_ERR_XML_ERROR,
+ _("unknown target type '%s' specified for character device"),
+ targetType);
goto error;
}
--
1.7.8.3
13 years
[libvirt] [PATCHv2 0/2] a new flag VIR_DOMAIN_CPU_STATS_VCPU
by Hu Tao
From: root <root(a)KERNEL-128.(none)>
This series adds a new flag VIR_DOMAIN_CPU_STATS_VCPU to
virDomainGetCPUStats, which is for getting statistics of
physical cpu time consumed by virtual cpus.
Changes:
v2:
- added detailed documentation
- added some error checks and fix some memleaks
- the two patches rearranged slightly
Hu Tao (2):
Add a new flag VIR_DOMAIN_CPU_STATS_VCPU to virDomainGetCPUStats
Adds support to VIR_DOMAIN_CPU_STATS_VCPU in qemu_driver.
include/libvirt/libvirt.h.in | 8 ++
src/libvirt.c | 9 ++-
src/qemu/qemu_driver.c | 186 ++++++++++++++++++++++++++++++++++++++----
src/util/cgroup.c | 4 +-
tools/virsh.c | 16 +++-
5 files changed, 199 insertions(+), 24 deletions(-)
13 years
[libvirt] Entering freeze for libvirt-0.9.12
by Daniel Veillard
A bit late compared to my estimate from last week, I have just tagged
the git tree and made an rc1 snapshot for testing:
ftp://libvirt.org/libvirt/libvirt-0.9.12-rc1.tar.gz
and currently pushing along the large set of rpms.
We still have a number of pending patches as pointed out by
http://libvirt.org/pending.html
I think the patches from Wen for "cpu bandwidth for hypervisor threads"
are a new feature which should wait for after 0.9.12, maybe we should
do the same with the remaining patches from Stephan for multiple IP
learning the dhcpsnooping code, but there are others pending.
The rc1 seems to compile and work okay for me using the set of rpms
(notice the change in the set !), please raise potential portability
and stability issues,
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years
[libvirt] [PATCH] conf: Fix memory leaks in virStoragePoolDefParseSource
by Alex Jia
Detected by valgrind. Leaks are introduced in commit 122fa379.
src/conf/storage_conf.c: fix memory leaks.
How to reproduce?
$ make && make -C tests check TESTS=storagepoolxml2xmltest
$ cd tests && valgrind -v --leak-check=full ./storagepoolxml2xmltest
actual result:
==28571== LEAK SUMMARY:
==28571== definitely lost: 40 bytes in 5 blocks
==28571== indirectly lost: 0 bytes in 0 blocks
==28571== possibly lost: 0 bytes in 0 blocks
==28571== still reachable: 1,054 bytes in 21 blocks
==28571== suppressed: 0 bytes in 0 blocks
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
src/conf/storage_conf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 0b34f28..668e679 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -462,6 +462,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
goto cleanup;
}
}
+ VIR_FREE(nodeset);
}
}
--
1.7.1
13 years
[libvirt] [PATCH] netlink: Fix build with libnl-3
by Jiri Denemark
Commit 642973135c54b93242c4548ef27d591b52b0994c added three direct
references to nl_handle_* instead of using our aliases which hide
differences between libnl-3 and libnl-1.
---
Pushed as a build-breaker.
src/util/virnetlink.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index ac61ff0..e316137 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -98,7 +98,7 @@ static int nextWatch = 1;
# define NETLINK_EVENT_ALLOC_EXTENT 10
static virNetlinkEventSrvPrivatePtr server = NULL;
-static struct nl_handle *placeholder_nlhandle = NULL;
+static virNetlinkHandle *placeholder_nlhandle = NULL;
/* Function definitions */
@@ -130,7 +130,7 @@ virNetlinkStartup(void)
{
if (placeholder_nlhandle)
return 0;
- placeholder_nlhandle = nl_handle_alloc();
+ placeholder_nlhandle = virNetlinkAlloc();
if (!placeholder_nlhandle) {
virReportSystemError(errno, "%s",
_("cannot allocate placeholder nlhandle for netlink"));
@@ -149,7 +149,7 @@ void
virNetlinkShutdown(void)
{
if (placeholder_nlhandle) {
- nl_handle_destroy(placeholder_nlhandle);
+ virNetlinkFree(placeholder_nlhandle);
placeholder_nlhandle = NULL;
}
}
--
1.7.8.6
13 years