[libvirt] [PATCH] spec: Update version check for maint Source URL
by Cole Robinson
New maint release version numbers of just A.B.C format, not the old
A.B.C.D format. Adjust the check that dynamically changes the Source
URL for maint releases
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index b249224..734b187 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -233,7 +233,7 @@ Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://libvirt.org/
-%if %(echo %{version} | grep -o \\. | wc -l) == 3
+%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
%define mainturl stable_updates/
%endif
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
--
2.9.3
7 years, 6 months
[libvirt] [PATCH] conf: Check CPU cache for ABI stability
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/cpu_conf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 1b098c476..194f03faf 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -915,6 +915,16 @@ virCPUDefIsEqual(virCPUDefPtr src,
}
}
+ if ((src->cache && !dst->cache) ||
+ (!src->cache && dst->cache) ||
+ (src->cache && dst->cache &&
+ (src->cache->level != dst->cache->level ||
+ src->cache->mode != dst->cache->mode))) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ "Target CPU cache does not match source");
+ goto cleanup;
+ }
+
identical = true;
cleanup:
--
2.12.2
7 years, 6 months
[libvirt] [PATCH 0/3] Add support for CPU cache specification
by Jiri Denemark
Apparently setting a guest CPU cache (even faked) can dramatically
increase performance in some use cases [1]. This series adds support for
specifying the guest CPU cache in domain XML. See patch 2/3 for more
details and documentation.
[1] https://patchwork.kernel.org/patch/9308401/
Jiri Denemark (3):
conf: Rename mode parameter in virCPUDefParseXML
Add support for CPU cache specification
qemu: Add support for guest CPU cache
docs/formatdomain.html.in | 35 +++++++++++
docs/schemas/cputypes.rng | 21 +++++++
docs/schemas/domaincommon.rng | 3 +
src/conf/cpu_conf.c | 68 +++++++++++++++++++++-
src/conf/cpu_conf.h | 19 ++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 8 +++
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 37 ++++++++++++
src/qemu/qemu_domain.c | 54 +++++++++++++++++
.../generic-cpu-cache-disable.xml | 20 +++++++
.../generic-cpu-cache-emulate.xml | 20 +++++++
.../generic-cpu-cache-passthrough.xml | 20 +++++++
.../generic-cpu-cache-disable.xml | 20 +++++++
.../generic-cpu-cache-emulate.xml | 20 +++++++
.../generic-cpu-cache-passthrough.xml | 20 +++++++
tests/genericxml2xmltest.c | 4 ++
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 2 +
.../qemuxml2argv-cpu-cache-disable.args | 21 +++++++
.../qemuxml2argv-cpu-cache-disable.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-disable2.args | 21 +++++++
.../qemuxml2argv-cpu-cache-disable2.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-disable3.args | 22 +++++++
.../qemuxml2argv-cpu-cache-disable3.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-emulate-l2.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-emulate-l3.args | 21 +++++++
.../qemuxml2argv-cpu-cache-emulate-l3.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough-l3.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough.args | 21 +++++++
.../qemuxml2argv-cpu-cache-passthrough.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough2.args | 21 +++++++
.../qemuxml2argv-cpu-cache-passthrough2.xml | 20 +++++++
.../qemuxml2argv-cpu-cache-passthrough3.xml | 20 +++++++
tests/qemuxml2argvtest.c | 16 +++++
34 files changed, 695 insertions(+), 3 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-cpu-cache-disable.xml
create mode 100644 tests/genericxml2xmlindata/generic-cpu-cache-emulate.xml
create mode 100644 tests/genericxml2xmlindata/generic-cpu-cache-passthrough.xml
create mode 100644 tests/genericxml2xmloutdata/generic-cpu-cache-disable.xml
create mode 100644 tests/genericxml2xmloutdata/generic-cpu-cache-emulate.xml
create mode 100644 tests/genericxml2xmloutdata/generic-cpu-cache-passthrough.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-disable3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-emulate-l2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-emulate-l3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-emulate-l3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough-l3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-cache-passthrough3.xml
--
2.12.2
7 years, 6 months
[libvirt] [PATCH] Adding POWER9 cpu model to cpu_map.xml
by Kothapally Madhu Pavan
As POWER9 model is not available in cpu_map.xml virsh capabilities
donot display the cpu model and vendor details. This patch
provides those details
---
src/cpu/cpu_map.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 7d5540a..29b5b59 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -1571,6 +1571,11 @@
<pvr value='0x004d0000' mask='0xffff0000'/>
</model>
+ <model name='POWER9'>
+ <vendor name='IBM'/>
+ <pvr value='0x004e0000' mask='0xffff0000'/>
+ </model>
+
<!-- Freescale-based CPU models -->
<model name='POWERPC_e5500'>
<vendor name='Freescale'/>
7 years, 6 months
[libvirt] [PATCH v3 0/6] Add mdev reporting capability to the nodedev driver
by Erik Skultety
since v1:
- dropped the <description> element from the parent device nested capability
- added missing RNG schema and tests
- updated the documentation to describe the MDEV elements in both the parent
and the child
since v2:
- I further split our PCI sub-capability parser into more blocks as suggested
- instead of one capability 'mdev' for both mdev device and physical parent I
introduced 2, so we can do virsh nodedev-list --cap 'mdev_types' | 'mdev' to
see either parent devices or the mediated devices themselves
- other minor adjustments pointed out during review.
Erik
Erik Skultety (6):
mdev: Pass a uuidstr rather than an mdev object to some util functions
nodedev: conf: Split PCI sub-capability parsing to separate methods
nodedev: Introduce new mdev_types and mdev nodedev capabilities
nodedev: Introduce the mdev capability to a PCI parent device
nodedev: Introduce mdev capability for mediated devices
docs: Document the mediated devices within the nodedev driver
docs/drvnodedev.html.in | 164 +++++++++++-
docs/schemas/nodedev.rng | 43 ++++
include/libvirt/libvirt-nodedev.h | 2 +
src/conf/node_device_conf.c | 279 +++++++++++++++++----
src/conf/node_device_conf.h | 29 ++-
src/conf/virnodedeviceobj.c | 11 +-
src/libvirt-nodedev.c | 2 +
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 2 +
src/node_device/node_device_udev.c | 165 +++++++++++-
src/qemu/qemu_domain.c | 8 +-
src/security/security_apparmor.c | 10 +-
src/security/security_dac.c | 20 +-
src/security/security_selinux.c | 20 +-
src/util/virmdev.c | 21 +-
src/util/virmdev.h | 4 +-
.../mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 8 +
.../pci_0000_02_10_7_mdev_types.xml | 32 +++
tests/nodedevxml2xmltest.c | 2 +
tools/virsh-nodedev.c | 6 +
20 files changed, 712 insertions(+), 117 deletions(-)
create mode 100644 tests/nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_mdev_types.xml
--
2.12.2
7 years, 6 months
[libvirt] [PATCH] tests: fix virfilewrapper
by Roman Bogorodskiy
If __lxstat() and __xstat() functions are not available, build fails with:
CC virfilewrapper.o
virfilewrapper.c:180:5: error: no previous prototype for function '__lxstat' [-Werror,-Wmissing-prototypes]
int __lxstat(int ver, const char *path, struct stat *sb)
^
virfilewrapper.c:208:5: error: no previous prototype for function '__xstat' [-Werror,-Wmissing-prototypes]
int __xstat(int ver, const char *path, struct stat *sb)
Luckily, we already check presence of these functions in configure
using AC_CHECK_FUNCS, so just don't wrap these if they're not available.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
Pushed under build-breaker fix.
tests/virfilewrapper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c
index 75c32bfca..5ea70b34d 100644
--- a/tests/virfilewrapper.c
+++ b/tests/virfilewrapper.c
@@ -177,6 +177,7 @@ int access(const char *path, int mode)
return ret;
}
+#ifdef HAVE___LXSTAT
int __lxstat(int ver, const char *path, struct stat *sb)
{
int ret = -1;
@@ -190,6 +191,7 @@ int __lxstat(int ver, const char *path, struct stat *sb)
return ret;
}
+#endif /* HAVE___LXSTAT */
int lstat(const char *path, struct stat *sb)
{
@@ -205,6 +207,7 @@ int lstat(const char *path, struct stat *sb)
return ret;
}
+#ifdef HAVE___XSTAT
int __xstat(int ver, const char *path, struct stat *sb)
{
int ret = -1;
@@ -218,6 +221,7 @@ int __xstat(int ver, const char *path, struct stat *sb)
return ret;
}
+#endif /* HAVE___XSTAT */
int stat(const char *path, struct stat *sb)
{
--
2.12.1
7 years, 6 months
[libvirt] [PATCH] util: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu
by Martin Kletzander
The code is already prepared to handle the non-existence of it.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed under the build-breaker rule.
src/util/virhostcpu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 317c52410a0b..aa9cfeac203c 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -188,10 +188,15 @@ virHostCPUGetStatsFreeBSD(int cpuNum,
#endif /* __FreeBSD__ */
+/*
+ * Even though it doesn't exist on some platforms, the code is adjusted for
+ * graceful handling of that so that we don't have too many stub functions.
+ */
+#define SYSFS_SYSTEM_PATH "/sys/devices/system"
+
#ifdef __linux__
# define CPUINFO_PATH "/proc/cpuinfo"
# define PROCSTAT_PATH "/proc/stat"
-# define SYSFS_SYSTEM_PATH "/sys/devices/system"
# define VIR_HOST_CPU_MASK_LEN 1024
# define LINUX_NB_CPU_STATS 4
--
2.12.2
7 years, 6 months
[libvirt] [PATCH] Don't use ceph-devel on Fedora
by Daniel P. Berrange
A previous commit changed the spec to use librbd1-devel on
RHEL-7, since this replaces ceph-devel from RHEL-6:
commit 6cfc8834c858849cc74c3082078dc91fb1cbae38
Author: Peter Krempa <pkrempa(a)redhat.com>
Date: Thu Mar 5 11:40:54 2015 +0100
spec: Enable RBD storage driver in RHEL-7
Use correct package names too as they differ.
RHEL-7 inherited this split from Fedora though, so it should
have also made Fedora use the new names.
This was missed, because Fedora still provides a (deprecated)
back-compat RPM for ceph-devel that just pulls in librbd1-devel
(and others).
Fixing this stops libvirt pulling Java into the build root in
Fedora.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index b249224..4c7b658 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -359,7 +359,7 @@ BuildRequires: parted-devel
# For Multipath support
BuildRequires: device-mapper-devel
%if %{with_storage_rbd}
- %if 0%{?rhel} >= 7
+ %if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: librados2-devel
BuildRequires: librbd1-devel
%else
--
2.9.3
7 years, 6 months
[libvirt] [PATCH] qemu: change the name of tap device for a tap and bridge network
by ZhiPeng Lu
Creating tap device and adding the device to bridge are not atomic operation.
Similarly deleting tap device and removing it from bridge are not atomic operation.
The Problem occurs when two vms start and shutdown. When one vm with the nic
named "vnet0" stopping, it deleted tap device but not removing port from bridge.
At this time, another vm created the tap device named "vnet0" and added port to the
same bridge. Then, the first vm deleted the tap device from the same bridge.
Finally, the tap device of the second vm don't attached to the bridge.
So, we can add domid to vm's nic name. For example, the vm's domid is 1 and vnet0
is renamed to vnet1.0.
Signed-off-by: ZhiPeng Lu <lu.zhipeng(a)zte.com.cn>
---
src/qemu/qemu_interface.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c
index d0850c0..17d40a7 100644
--- a/src/qemu/qemu_interface.c
+++ b/src/qemu/qemu_interface.c
@@ -512,6 +512,7 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
bool template_ifname = false;
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
const char *tunpath = "/dev/net/tun";
+ char *domIdPlusIndex = NULL;
if (net->backend.tap) {
tunpath = net->backend.tap;
@@ -531,8 +532,13 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
STRPREFIX(net->ifname, VIR_NET_GENERATED_PREFIX) ||
strchr(net->ifname, '%')) {
VIR_FREE(net->ifname);
- if (VIR_STRDUP(net->ifname, VIR_NET_GENERATED_PREFIX "%d") < 0)
+ if (virAsprintf(&domIdPlusIndex, "%s%d.%s",
+ VIR_NET_GENERATED_PREFIX, def->id, "%d") < 0) {
+ goto cleanup;
+ }
+ if (VIR_STRDUP(net->ifname, domIdPlusIndex) < 0) {
goto cleanup;
+ }
/* avoid exposing vnet%d in getXMLDesc or error outputs */
template_ifname = true;
}
@@ -594,6 +600,7 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
ret = 0;
cleanup:
+ VIR_FREE(domIdPlusIndex);
if (ret < 0) {
size_t i;
for (i = 0; i < *tapfdSize && tapfd[i] >= 0; i++)
--
1.8.3.1
7 years, 6 months