[libvirt] [PATCH v3 RESEND] qemu: Process RDMA GID state change event
by Yuval Shaia
This event is emitted on the monitor when a GID table in pvrdma device
is modified and the change needs to be propagate to the backend RDMA
device's GID table.
The control over the RDMA device's GID table is done by updating the
device's Ethernet function addresses.
Usually the first GID entry is determine by the MAC address, the second
by the first IPv6 address and the third by the IPv4 address. Other
entries can be added by adding more IP addresses. The opposite is the
same, i.e. whenever an address is removed, the corresponding GID entry
is removed.
The process is done by the network and RDMA stacks. Whenever an address
is added the ib_core driver is notified and calls the device driver's
add_gid function which in turn update the device.
To support this in pvrdma device we need to hook into the create_bind
and destroy_bind HW commands triggered by pvrdma driver in guest.
Whenever a changed is made to the pvrdma device's GID table a special
QMP messages is sent to be processed by libvirt to update the address of
the backend Ethernet device.
Signed-off-by: Yuval Shaia <yuval.shaia(a)oracle.com>
---
(fixing mail subject from v2 to v3, rest is the same)
Hi,
Corresponding qemu commit was merged to master as part of the following
patch-set:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg583387.html
Appreciate if this patch can be reviewed and merged as well.
Thanks,
Yuval
v1 -> v2:
* Address all comments from Michal Privoznik
v2 -> v3:
* Remove static initialization in processRdmaGidStatusChangedEvent
---
src/qemu/qemu_domain.c | 3 +++
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 44 ++++++++++++++++++++++++++++++
src/qemu/qemu_monitor.c | 27 +++++++++++++++++++
src/qemu/qemu_monitor.h | 27 +++++++++++++++++++
src/qemu/qemu_monitor_json.c | 36 +++++++++++++++++++++++++
src/qemu/qemu_process.c | 52 ++++++++++++++++++++++++++++++++++++
7 files changed, 190 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ba3fff607a..8da54c7ee9 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -13479,6 +13479,9 @@ qemuProcessEventFree(struct qemuProcessEvent *event)
case QEMU_PROCESS_EVENT_GUESTPANIC:
qemuMonitorEventPanicInfoFree(event->data);
break;
+ case QEMU_PROCESS_EVENT_RDMA_GID_STATUS_CHANGED:
+ qemuMonitorEventRdmaGidStatusFree(event->data);
+ break;
case QEMU_PROCESS_EVENT_WATCHDOG:
case QEMU_PROCESS_EVENT_DEVICE_DELETED:
case QEMU_PROCESS_EVENT_NIC_RX_FILTER_CHANGED:
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 80bd4bde91..64bceb9a98 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -487,6 +487,7 @@ typedef enum {
QEMU_PROCESS_EVENT_BLOCK_JOB,
QEMU_PROCESS_EVENT_MONITOR_EOF,
QEMU_PROCESS_EVENT_PR_DISCONNECT,
+ QEMU_PROCESS_EVENT_RDMA_GID_STATUS_CHANGED,
QEMU_PROCESS_EVENT_LAST
} qemuProcessEventType;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a52e2495d5..5c6ab3c0ea 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4788,6 +4788,47 @@ processPRDisconnectEvent(virDomainObjPtr vm)
}
+static void
+processRdmaGidStatusChangedEvent(virDomainObjPtr vm,
+ qemuMonitorRdmaGidStatusChangedPrivatePtr info)
+{
+ unsigned int prefix_len;
+ virSocketAddr addr;
+ int rc;
+
+ if (!virDomainObjIsActive(vm))
+ return;
+
+ VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%llx,interface_id=0x%llx",
+ info->netdev, info->gid_status, info->subnet_prefix,
+ info->interface_id);
+
+ if (info->subnet_prefix) {
+ prefix_len = 64;
+ uint32_t ipv6[4];
+ memcpy(&ipv6[0], &info->subnet_prefix, sizeof(info->subnet_prefix));
+ memcpy(&ipv6[2], &info->interface_id, sizeof(info->interface_id));
+ virSocketAddrSetIPv6AddrNetOrder(&addr, ipv6);
+ } else {
+ prefix_len = 24;
+ virSocketAddrSetIPv4AddrNetOrder(&addr, info->interface_id >> 32);
+ }
+
+ if (info->gid_status) {
+ VIR_DEBUG("Adding %s to %s", virSocketAddrFormat(&addr), info->netdev);
+ rc = virNetDevIPAddrAdd(info->netdev, &addr, NULL, prefix_len);
+ } else {
+ VIR_DEBUG("Removing %s from %s", virSocketAddrFormat(&addr),
+ info->netdev);
+ rc = virNetDevIPAddrDel(info->netdev, &addr, prefix_len);
+ }
+
+ if (rc < 0)
+ VIR_WARN("Fail to update address %s to %s", virSocketAddrFormat(&addr),
+ info->netdev);
+}
+
+
static void qemuProcessEventHandler(void *data, void *opaque)
{
struct qemuProcessEvent *processEvent = data;
@@ -4828,6 +4869,9 @@ static void qemuProcessEventHandler(void *data, void *opaque)
case QEMU_PROCESS_EVENT_PR_DISCONNECT:
processPRDisconnectEvent(vm);
break;
+ case QEMU_PROCESS_EVENT_RDMA_GID_STATUS_CHANGED:
+ processRdmaGidStatusChangedEvent(vm, processEvent->data);
+ break;
case QEMU_PROCESS_EVENT_LAST:
break;
}
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 7f7013e115..4bf71dbf8c 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1686,6 +1686,22 @@ qemuMonitorEmitPRManagerStatusChanged(qemuMonitorPtr mon,
}
+int
+qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *netdev,
+ bool gid_status, uint64_t subnet_prefix,
+ uint64_t interface_id)
+{
+ int ret = -1;
+ VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%lx,interface_id=0x%lx",
+ netdev, gid_status, subnet_prefix, interface_id);
+
+ QEMU_MONITOR_CALLBACK(mon, ret, domainRdmaGidStatusChanged, mon->vm, netdev,
+ gid_status, subnet_prefix, interface_id);
+
+ return ret;
+}
+
+
int
qemuMonitorSetCapabilities(qemuMonitorPtr mon)
{
@@ -4298,6 +4314,17 @@ qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicInfoPtr info)
}
+void
+qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidStatusChangedPrivatePtr info)
+{
+ if (!info)
+ return;
+
+ VIR_FREE(info->netdev);
+ VIR_FREE(info);
+}
+
+
int
qemuMonitorSetWatchdogAction(qemuMonitorPtr mon,
const char *action)
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 48b142a4f4..b639a0a9d2 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -109,8 +109,22 @@ struct _qemuMonitorEventPanicInfo {
} data;
};
+
+typedef struct _qemuMonitorRdmaGidStatusChangedPrivate qemuMonitorRdmaGidStatusChangedPrivate;
+typedef qemuMonitorRdmaGidStatusChangedPrivate *qemuMonitorRdmaGidStatusChangedPrivatePtr;
+struct _qemuMonitorRdmaGidStatusChangedPrivate {
+ virObject parent;
+
+ char *netdev;
+ bool gid_status;
+ unsigned long long subnet_prefix;
+ unsigned long long interface_id;
+};
+
+
char *qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfoPtr info);
void qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicInfoPtr info);
+void qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidStatusChangedPrivatePtr info);
typedef void (*qemuMonitorDestroyCallback)(qemuMonitorPtr mon,
virDomainObjPtr vm,
@@ -281,6 +295,14 @@ typedef int (*qemuMonitorDomainPRManagerStatusChangedCallback)(qemuMonitorPtr mo
bool connected,
void *opaque);
+typedef int (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitorPtr mon,
+ virDomainObjPtr vm,
+ const char *netdev,
+ bool gid_status,
+ uint64_t subnet_prefix,
+ uint64_t interface_id,
+ void *opaque);
+
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
typedef qemuMonitorCallbacks *qemuMonitorCallbacksPtr;
struct _qemuMonitorCallbacks {
@@ -314,6 +336,7 @@ struct _qemuMonitorCallbacks {
qemuMonitorDomainBlockThresholdCallback domainBlockThreshold;
qemuMonitorDomainDumpCompletedCallback domainDumpCompleted;
qemuMonitorDomainPRManagerStatusChangedCallback domainPRManagerStatusChanged;
+ qemuMonitorDomainRdmaGidStatusChangedCallback domainRdmaGidStatusChanged;
};
char *qemuMonitorEscapeArg(const char *in);
@@ -448,6 +471,10 @@ int qemuMonitorEmitPRManagerStatusChanged(qemuMonitorPtr mon,
const char *prManager,
bool connected);
+int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *netdev,
+ bool gid_status, uint64_t subnet_prefix,
+ uint64_t interface_id);
+
int qemuMonitorStartCPUs(qemuMonitorPtr mon);
int qemuMonitorStopCPUs(qemuMonitorPtr mon);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 3de298c9e2..8df9b426ba 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -91,6 +91,7 @@ static void qemuMonitorJSONHandleAcpiOstInfo(qemuMonitorPtr mon, virJSONValuePtr
static void qemuMonitorJSONHandleBlockThreshold(qemuMonitorPtr mon, virJSONValuePtr data);
static void qemuMonitorJSONHandleDumpCompleted(qemuMonitorPtr mon, virJSONValuePtr data);
static void qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitorPtr mon, virJSONValuePtr data);
+static void qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitorPtr mon, virJSONValuePtr data);
typedef struct {
const char *type;
@@ -114,6 +115,7 @@ static qemuEventHandler eventHandlers[] = {
{ "NIC_RX_FILTER_CHANGED", qemuMonitorJSONHandleNicRxFilterChanged, },
{ "POWERDOWN", qemuMonitorJSONHandlePowerdown, },
{ "PR_MANAGER_STATUS_CHANGED", qemuMonitorJSONHandlePRManagerStatusChanged, },
+ { "RDMA_GID_STATUS_CHANGED", qemuMonitorJSONHandleRdmaGidStatusChanged, },
{ "RESET", qemuMonitorJSONHandleReset, },
{ "RESUME", qemuMonitorJSONHandleResume, },
{ "RTC_CHANGE", qemuMonitorJSONHandleRTCChange, },
@@ -1351,6 +1353,40 @@ static void qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitorPtr mon,
}
+static void qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitorPtr mon,
+ virJSONValuePtr data)
+{
+ const char *netdev;
+ bool gid_status;
+ unsigned long long subnet_prefix, interface_id;
+
+ if (!(netdev = virJSONValueObjectGetString(data, "netdev"))) {
+ VIR_WARN("missing netdev in GID_STATUS_CHANGED event");
+ return;
+ }
+
+ if (virJSONValueObjectGetBoolean(data, "gid-status", &gid_status)) {
+ VIR_WARN("missing gid-status in GID_STATUS_CHANGED event");
+ return;
+ }
+
+ if (virJSONValueObjectGetNumberUlong(data, "subnet-prefix",
+ &subnet_prefix)) {
+ VIR_WARN("missing subnet-prefix in GID_STATUS_CHANGED event");
+ return;
+ }
+
+ if (virJSONValueObjectGetNumberUlong(data, "interface-id",
+ &interface_id)) {
+ VIR_WARN("missing interface-id in GID_STATUS_CHANGED event");
+ return;
+ }
+
+ qemuMonitorEmitRdmaGidStatusChanged(mon, netdev, gid_status, subnet_prefix,
+ interface_id);
+}
+
+
int
qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
const char *cmd_str,
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 9cf971808c..6cf0ace5cf 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1703,6 +1703,57 @@ qemuProcessHandlePRManagerStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
}
+static int
+qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
+ virDomainObjPtr vm, const char *netdev,
+ bool gid_status, uint64_t subnet_prefix,
+ uint64_t interface_id, void *opaque)
+{
+ virQEMUDriverPtr driver = opaque;
+ struct qemuProcessEvent *processEvent = NULL;
+ qemuMonitorRdmaGidStatusChangedPrivatePtr rdmaGitStatusChangedPriv = NULL;
+ int ret = -1;
+
+ virObjectLock(vm);
+
+ VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%lx,interface_id=0x%lx",
+ netdev, gid_status, subnet_prefix, interface_id);
+
+ if (VIR_ALLOC(rdmaGitStatusChangedPriv) < 0)
+ goto out_unlock;
+
+ if (VIR_STRDUP(rdmaGitStatusChangedPriv->netdev, netdev) < 0)
+ goto out_free;
+
+ rdmaGitStatusChangedPriv->gid_status = gid_status;
+ rdmaGitStatusChangedPriv->subnet_prefix = subnet_prefix;
+ rdmaGitStatusChangedPriv->interface_id = interface_id;
+
+ if (VIR_ALLOC(processEvent) < 0)
+ goto out_free;
+
+ processEvent->eventType = QEMU_PROCESS_EVENT_RDMA_GID_STATUS_CHANGED;
+ processEvent->vm = virObjectRef(vm);
+ processEvent->data = rdmaGitStatusChangedPriv;
+
+ if (virThreadPoolSendJob(driver->workerPool, 0, processEvent) < 0) {
+ qemuProcessEventFree(processEvent);
+ virObjectUnref(vm);
+ goto out_free;
+ }
+
+ ret = 0;
+ goto out_unlock;
+
+ out_free:
+ qemuMonitorEventRdmaGidStatusFree(rdmaGitStatusChangedPriv);
+
+ out_unlock:
+ virObjectUnlock(vm);
+ return ret;
+}
+
+
static qemuMonitorCallbacks monitorCallbacks = {
.eofNotify = qemuProcessHandleMonitorEOF,
.errorNotify = qemuProcessHandleMonitorError,
@@ -1732,6 +1783,7 @@ static qemuMonitorCallbacks monitorCallbacks = {
.domainBlockThreshold = qemuProcessHandleBlockThreshold,
.domainDumpCompleted = qemuProcessHandleDumpCompleted,
.domainPRManagerStatusChanged = qemuProcessHandlePRManagerStatusChanged,
+ .domainRdmaGidStatusChanged = qemuProcessHandleRdmaGidStatusChanged,
};
static void
--
2.17.2
5 years, 10 months
[libvirt] [PATCH v2 0/2] Makefile.am cleanups
by Eric Blake
Since v1:
- push patch 1, 2 that had successful reviews
- new patch 1
- rewrite old patch 3 to remove all use of gnulib from examples/,
rather than being partitioned based on what uses config.h (in part
by reverting Jan's recent patch that added config.h everywhere)
Eric Blake (2):
examples: Drop event-test.c dependency on gnulib <verify.h>
examples: Avoid gnulib, have standalone examples
examples/Makefile.am | 5 ++---
examples/admin/client_close.c | 2 --
examples/admin/client_info.c | 3 +--
examples/admin/client_limits.c | 2 --
examples/admin/list_clients.c | 2 --
examples/admin/list_servers.c | 2 --
examples/admin/logging.c | 2 --
examples/admin/threadpool_params.c | 2 --
examples/dommigrate/dommigrate.c | 2 --
examples/domsuspend/suspend.c | 2 --
examples/domtop/domtop.c | 2 --
examples/hellolibvirt/hellolibvirt.c | 2 --
examples/object-events/event-test.c | 12 ++++++++----
examples/openauth/openauth.c | 2 --
examples/rename/rename.c | 2 --
15 files changed, 11 insertions(+), 33 deletions(-)
--
2.20.1
5 years, 10 months
[libvirt] [PATCH 0/2] syntax-check: Fix unmarked_diagnostics on FreeBSD
by Andrea Bolognani
... and fix some issues in the process.
Andrea Bolognani (2):
src: Fix a few unmarked_diagnostics issues
syntax-check: Simplify and fix unmarked_diagnostics
cfg.mk | 4 ++--
src/libxl/libxl_driver.c | 8 ++++----
src/openvz/openvz_driver.c | 4 ++--
src/qemu/qemu_agent.c | 2 +-
src/qemu/qemu_domain.c | 2 +-
src/vbox/vbox_snapshot_conf.c | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
--
2.20.1
5 years, 10 months
[libvirt] [dbus PATCH] util: fix virtDBusUtilDecodeUUID
by Pavel Hrdina
This function is supposed to convert ASCII character into its hex
representation, however the current implementation was wrong because
the first comparison would be false for all printable characters. In
most cases it worked but for example '$' which is 0x24 in HEX would be
incorrectly converted to 0x2[ which is obviously wrong.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1647823
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util.c b/src/util.c
index 9e11285..103bb29 100644
--- a/src/util.c
+++ b/src/util.c
@@ -182,11 +182,12 @@ virtDBusUtilDecodeUUID(const gchar *uuid)
}
static guchar
-virtDBusUtilNumToHexchar(const guchar c)
+virtDBusUtilNumToHexchar(const guchar n)
{
+ guchar c = n & 0x0f;
if (c < 10)
return '0' + c;
- return 'a' + (c & 0x0f) - 10;
+ return 'a' + c - 10;
}
static guchar
--
2.20.1
5 years, 10 months
[libvirt] [PATCH] maint: Fix build with older automake
by Eric Blake
In a VPATH build, <config.h> is in the builddir, but it includes
<config-post.h> from the top source directory; hence, we need to
keep the -I(top_srcdir) directive that was accidentally removed
from commit 7a879323 (the problem is not visible in an in-tree
build).
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing as a build-breaker fix.
gnulib/lib/Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
index 601f74073c..5669551afb 100644
--- a/gnulib/lib/Makefile.am
+++ b/gnulib/lib/Makefile.am
@@ -26,3 +26,5 @@ SUFFIXES =
noinst_LTLIBRARIES =
include gnulib.mk
+
+AM_CPPFLAGS = -I$(top_srcdir)
--
2.20.1
5 years, 10 months
[libvirt] [PATCH 0/3] Makefile.am cleanups
by Eric Blake
I noticed from IRC that Travis has been failing builds since our
Jan 1 update of gnulib. I'm not sure what changed in the gnulib
files to trip up clang, and I'm not really set up to test that
this fixes the problem seen by Travis (it works locally for me
using gcc - but gcc wasn't seeing the failure), but the ideas in
the patch make sense. So, unless there is an easy way to make
Travis run on candidate patches, I'll wait for a review rather
than pushing this as a build-breaker.
Eric Blake (3):
maint: Drop unused GETTEXT_CPPFLAGS variable
maint: Prefer AM_CPPFLAGS over INCLUDES
maint: Avoid -Ignulib on standalone examples
examples/Makefile.am | 8 +++++++-
gnulib/lib/Makefile.am | 2 --
gnulib/tests/Makefile.am | 2 --
src/Makefile.am | 6 +++---
tests/Makefile.am | 6 +++---
tools/Makefile.am | 4 ++--
6 files changed, 15 insertions(+), 13 deletions(-)
--
2.20.1
5 years, 10 months
[libvirt] [PATCH] util: Fix the default log output to 'journald' when running under systemd
by Erik Skultety
Essentially, bring back the old behaviour as of commit eba36a38 which
was later changed by commit ae06048bf5d. Even though all the stderr
messages will eventually end up in the journal, we're not making use of
the fields journald provides.
https://bugzilla.redhat.com/show_bug.cgi?id=1592644
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/util/virlog.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index cb6901d9bf..3ee58c5db6 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -223,11 +223,17 @@ virLogSetDefaultOutputToFile(const char *filename, bool privileged)
int
virLogSetDefaultOutput(const char *filename, bool godaemon, bool privileged)
{
- if (!godaemon)
+ bool have_journald = access("/run/systemd/journal/socket", W_OK) >= 0;
+
+ if (godaemon) {
+ if (have_journald)
+ return virLogSetDefaultOutputToJournald();
+ } else {
+ if (!isatty(STDIN_FILENO) && have_journald)
+ return virLogSetDefaultOutputToJournald();
+
return virLogSetDefaultOutputToStderr();
-
- if (access("/run/systemd/journal/socket", W_OK) >= 0)
- return virLogSetDefaultOutputToJournald();
+ }
return virLogSetDefaultOutputToFile(filename, privileged);
}
--
2.20.1
5 years, 10 months
[libvirt] [PATCH 00/19] implement cgroups v2 devices support
by Pavel Hrdina
In cgroups v2 there is no devices controller, BPF should be used
instead.
Patches 3 - 12 will be squashed into single commit and they need to be
compiled together, I've separated them to make review easier.
Pavel Hrdina (19):
util: introduce virbpf helpers
vircgroup: introduce virCgroupV2DevicesAvailable
vircgroup: introduce virCgroupV2DeviceLoadProg
vircgroup: introduce virCgroupV2DeviceAttachProg
vircgroup: introduce virCgroupV2DeviceDetectProg
vircgroup: introduce virCgroupV2DeviceCreateProg
vircgroup: introduce virCgroupV2DeviceReallocMap
vircgroup: introduce virCgroupV2DevicePrepareProg
vircgroup: introduce virCgroupV2DeviceRemoveProg
vircgroup: introduce virCgroupV2DeviceGetPerms
vircgroup: introduce virCgroupV2DeviceGetKey
vircgroup: introduce virCgroupV2AllowDevice
vircgroup: introduce virCgroupV2DenyDevice
vircgroup: introduce virCgroupV2AllowAllDevices
vircgroup: introduce virCgroupV2DenyAllDevices
vircgroup: workaround devices in hybrid mode
vircgroupv2: detech BPF program before removing cgroup
vircgroupv2: use dummy process to workaround kernel bug with systemd
vircgroupmock: mock virBPFQueryProg
include/libvirt/virterror.h | 1 +
src/Makefile.am | 1 +
src/libvirt_private.syms | 17 +
src/lxc/lxc_cgroup.c | 1 +
src/qemu/qemu_cgroup.c | 6 +-
src/util/Makefile.inc.am | 2 +
src/util/virbpf.c | 263 ++++++++++++
src/util/virbpf.h | 249 ++++++++++++
src/util/vircgroup.c | 18 +-
src/util/vircgroup.h | 1 +
src/util/vircgroupbackend.h | 3 +-
src/util/vircgrouppriv.h | 12 +
src/util/vircgroupv1.c | 9 +-
src/util/vircgroupv2.c | 638 +++++++++++++++++++++++++++++-
src/util/virerror.c | 1 +
src/util/virsystemd.c | 2 +-
src/util/virsystemd.h | 2 +
tests/vircgroupdata/hybrid.parsed | 2 +-
tests/vircgroupmock.c | 11 +
tests/vircgrouptest.c | 4 +-
20 files changed, 1233 insertions(+), 10 deletions(-)
create mode 100644 src/util/virbpf.c
create mode 100644 src/util/virbpf.h
--
2.20.1
5 years, 10 months
[libvirt] [PATCH 0/3] Rebase LXC network definition to support version 3.0
by Julio Faracco
The series propose a new way to define NICs inside LXC native. It is
needed because LXC version 3.X uses indexes to define NICs and the
current algorithm is not able to support them. At least, if you consider
settings defined using a random logic.
Julio Faracco (3):
lxc: refactoring LXC network definition with a sparse array.
tests: Change legacy network configs to version 3.0 with indexes.
tests: Include a random network testcase to test indexes.
src/lxc/lxc_native.c | 191 ++++++++++++------
.../lxcconf2xml-ethernet-v3.config | 16 +-
.../lxcconf2xml-fstab-v3.config | 10 +-
.../lxcconf2xml-macvlannetwork-v3.config | 10 +-
.../lxcconf2xml-miscnetwork-v3.config | 38 ++--
.../lxcconf2xml-physnetwork-v3.config | 14 +-
.../lxcconf2xml-randomnetwork-v3.config | 21 ++
.../lxcconf2xml-randomnetwork.xml | 45 +++++
.../lxcconf2xml-simple-v3.config | 18 +-
.../lxcconf2xml-vlannetwork-v3.config | 10 +-
tests/lxcconf2xmltest.c | 1 +
11 files changed, 249 insertions(+), 125 deletions(-)
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-randomnetwork-v3.config
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-randomnetwork.xml
--
2.19.1
5 years, 10 months
[libvirt] [PATCH 0/2] News update for libvirt-5.0
by Han Han
Han Han (2):
news: Add support for "stibp" x86_64 feature
news: Add support for postcopy-requests migration statistics
docs/news.xml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--
2.20.1
5 years, 10 months