[libvirt] [PATCH 0/2] libxl: some small fixes
by Jim Fehlig
I noticed a few small bugs while fixing the domain maximum
memory bugs :-). See patches for details.
Jim Fehlig (2):
libxl: honor autoballoon setting in libxl.conf
libxl: use init and dispose functions with libxl_physinfo
src/libxl/libxl_capabilities.c | 16 +++++++++++-----
src/libxl/libxl_conf.c | 7 ++++++-
src/libxl/libxl_driver.c | 2 ++
3 files changed, 19 insertions(+), 6 deletions(-)
--
2.9.2
7 years, 9 months
[libvirt] [PATCH] xenconfig: fix xml conversion convert with no graphics
by Joao Martins
If no graphics element is in XML xenFormatXLSpice will access
graphics without checking it has one in the first place, leading to a
segmentation fault.
Signed-off-by: Joao Martins <joao.m.martins(a)oracle.com>
---
src/xenconfig/xen_xl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c
index 2c9174e..74f68b3 100644
--- a/src/xenconfig/xen_xl.c
+++ b/src/xenconfig/xen_xl.c
@@ -1168,7 +1168,7 @@ xenFormatXLSpice(virConfPtr conf, virDomainDefPtr def)
virDomainGraphicsListenDefPtr glisten;
virDomainGraphicsDefPtr graphics;
- if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
+ if (def->os.type == VIR_DOMAIN_OSTYPE_HVM && def->graphics) {
graphics = def->graphics[0];
if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
--
2.1.4
7 years, 9 months
[libvirt] [PATCH] qemu_security: Introduce ImageLabel APIs
by Michal Privoznik
Just like we need wrappers over other virSecurityManager APIs, we
need one for virSecurityManagerSetImageLabel and
virSecurityManagerRestoreImageLabel. Otherwise we might end up
relabelling device in wrong namespace.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 7 +++---
src/qemu/qemu_security.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_security.h | 8 +++++++
3 files changed, 67 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index d3f765605..7c696963e 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -31,6 +31,7 @@
#include "qemu_parse_command.h"
#include "qemu_capabilities.h"
#include "qemu_migration.h"
+#include "qemu_security.h"
#include "viralloc.h"
#include "virlog.h"
#include "virerror.h"
@@ -5094,8 +5095,7 @@ qemuDomainDiskChainElementRevoke(virQEMUDriverPtr driver,
VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(elem->path));
- if (virSecurityManagerRestoreImageLabel(driver->securityManager,
- vm->def, elem) < 0)
+ if (qemuSecurityRestoreImageLabel(driver, vm, elem) < 0)
VIR_WARN("Unable to restore security label on %s", NULLSTR(elem->path));
if (qemuDomainNamespaceTeardownDisk(driver, vm, elem) < 0)
@@ -5135,8 +5135,7 @@ qemuDomainDiskChainElementPrepare(virQEMUDriverPtr driver,
if (qemuSetupImageCgroup(vm, elem) < 0)
goto cleanup;
- if (virSecurityManagerSetImageLabel(driver->securityManager, vm->def,
- elem) < 0)
+ if (qemuSecuritySetImageLabel(driver, vm, elem) < 0)
goto cleanup;
ret = 0;
diff --git a/src/qemu/qemu_security.c b/src/qemu/qemu_security.c
index ceac5bf56..f2931976b 100644
--- a/src/qemu/qemu_security.c
+++ b/src/qemu/qemu_security.c
@@ -133,6 +133,62 @@ qemuSecurityRestoreDiskLabel(virQEMUDriverPtr driver,
}
+int
+qemuSecuritySetImageLabel(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ virStorageSourcePtr src)
+{
+ int ret = -1;
+
+ if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) &&
+ virSecurityManagerTransactionStart(driver->securityManager) < 0)
+ goto cleanup;
+
+ if (virSecurityManagerSetImageLabel(driver->securityManager,
+ vm->def,
+ src) < 0)
+ goto cleanup;
+
+ if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) &&
+ virSecurityManagerTransactionCommit(driver->securityManager,
+ vm->pid) < 0)
+ goto cleanup;
+
+ ret = 0;
+ cleanup:
+ virSecurityManagerTransactionAbort(driver->securityManager);
+ return ret;
+}
+
+
+int
+qemuSecurityRestoreImageLabel(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ virStorageSourcePtr src)
+{
+ int ret = -1;
+
+ if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) &&
+ virSecurityManagerTransactionStart(driver->securityManager) < 0)
+ goto cleanup;
+
+ if (virSecurityManagerRestoreImageLabel(driver->securityManager,
+ vm->def,
+ src) < 0)
+ goto cleanup;
+
+ if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) &&
+ virSecurityManagerTransactionCommit(driver->securityManager,
+ vm->pid) < 0)
+ goto cleanup;
+
+ ret = 0;
+ cleanup:
+ virSecurityManagerTransactionAbort(driver->securityManager);
+ return ret;
+}
+
+
int
qemuSecuritySetHostdevLabel(virQEMUDriverPtr driver,
virDomainObjPtr vm,
diff --git a/src/qemu/qemu_security.h b/src/qemu/qemu_security.h
index cc373b3e1..54638908d 100644
--- a/src/qemu/qemu_security.h
+++ b/src/qemu/qemu_security.h
@@ -45,6 +45,14 @@ int qemuSecurityRestoreDiskLabel(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDiskDefPtr disk);
+int qemuSecuritySetImageLabel(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ virStorageSourcePtr src);
+
+int qemuSecurityRestoreImageLabel(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ virStorageSourcePtr src);
+
int qemuSecuritySetHostdevLabel(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainHostdevDefPtr hostdev);
--
2.11.0
7 years, 9 months
[libvirt] [resend v2 0/7] Support cache tune in libvirt
by Eli Qiao
This series patches are for supportting CAT featues, which also
called cache tune in libvirt.
First to expose cache information which could be tuned in capabilites XML.
Then add new domain xml element support to add cacahe bank which will apply
on this libvirt domain.
This series patches add a util file `resctrl.c/h`, an interface to talk with
linux kernel's sys fs.
There are still some TODOs such as expose new public interface to get free
cache information.
Some discussion about this feature support can be found from:
https://www.redhat.com/archives/libvir-list/2017-January/msg00644.html
Eli Qiao (7):
Resctrl: Add some utils functions
Resctrl: expose cache information to capabilities
Resctrl: Add new xml element to support cache tune
Resctrl: Add private interface to set cachebanks
Qemu: Set cache banks
Resctrl: enable l3code/l3data
Resctrl: Make sure l3data/l3code are pairs
docs/schemas/domaincommon.rng | 41 ++
include/libvirt/virterror.h | 1 +
src/Makefile.am | 1 +
src/conf/capabilities.c | 56 +++
src/conf/capabilities.h | 23 +
src/conf/domain_conf.c | 154 +++++++
src/conf/domain_conf.h | 18 +
src/libvirt_private.syms | 10 +
src/qemu/qemu_capabilities.c | 68 +++
src/qemu/qemu_driver.c | 4 +
src/qemu/qemu_process.c | 11 +
src/util/virerror.c | 1 +
src/util/virresctrl.c | 1019 +++++++++++++++++++++++++++++++++++++++++
src/util/virresctrl.h | 135 ++++++
14 files changed, 1542 insertions(+)
create mode 100644 src/util/virresctrl.c
create mode 100644 src/util/virresctrl.h
--
1.9.1
7 years, 9 months
[libvirt] [PATCH] conf: fix use-after-free when sending event message
by Wang King
If there is a process with a client which registers event callbacks,
and it calls libvirt's API which uses the same virConnectPtr in that
callback function. When this process exit abnormally lead to client
disconnect, there is a possibility that the main thread is refer to
virServerClient just after the virServerClient been freed by job
thread of libvirtd.
Following is the backtrace:
#0 0x00007fda223d66d8 in virClassIsDerivedFrom
(klass=0xdeadbeef,parent=0x7fda24c81b40)
#1 0x00007fda223d6a1e in virObjectIsClass
(anyobj=anyobj@entry=0x7fd9e575b400,klass=)
#2 0x00007fda223d6a44 in virObjectLock (anyobj=anyobj@entry=0x7fd9e575b400)
#3 0x00007fda22507f71 in virNetServerClientSendMessage
(client=client@entry=0x7fd9e575b400, msg=msg@entry=0x7fd9ec30de90)
#4 0x00007fda230d714d in remoteDispatchObjectEventSend
(client=0x7fd9e575b400, program=0x7fda24c844e0, procnr=procnr@entry=348,
proc=0x7fda2310e5e0 , data=data@entry=0x7ffc3857fdb0)
#5 0x00007fda230dd71b in remoteRelayDomainEventTunable (conn=,
dom=0x7fda27cd7660, params=0x7fda27f3aae0, nparams=1, opaque=0x7fd9e6c99e00)
#6 0x00007fda224484cb in virDomainEventDispatchDefaultFunc
(conn=0x7fda27cd0120, event=0x7fda2736ea00, cb=0x7fda230dd610 ,
cbopaque=0x7fd9e6c99e00)
#7 0x00007fda22446871 in virObjectEventStateDispatchCallbacks
(callbacks=, callbacks=, event=0x7fda2736ea00, state=0x7fda24ca3960)
#8 virObjectEventStateQueueDispatch (callbacks=0x7fda24c65800,
queue=0x7ffc3857fe90, state=0x7fda24ca3960)
#9 virObjectEventStateFlush (state=0x7fda24ca3960)
#10 virObjectEventTimer (timer=, opaque=0x7fda24ca3960)
#11 0x00007fda223ae8b9 in virEventPollDispatchTimeouts ()
#12 virEventPollRunOnce ()
#13 0x00007fda223ad1d2 in virEventRunDefaultImpl ()
#14 0x00007fda225046cd in virNetDaemonRun (dmn=dmn@entry=0x7fda24c775c0)
#15 0x00007fda230d6351 in main (argc=, argv=)
(gdb) p *(virNetServerClientPtr)0x7fd9e575b400
$2 = {parent = {parent = {u = {dummy_align1 = 140573849338048,
dummy_align2 = 0x7fd9e65ac0c0, s = {magic = 3864707264, refs = 32729}},
klass = 0x7fda00000078}, lock = {lock = {__data = {__lock = 0,
__count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list
= {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}}},
wantClose = false,
delayedClose = false, sock = 0x0, auth = 0, readonly = false, tlsCtxt =
0x0, tls = 0x0, sasl = 0x0, sockTimer = 0, identity = 0x0, nrequests =
0, nrequests_max = 0, rx = 0x0, tx = 0x0, filters = 0x0,
nextFilterID = 0, dispatchFunc = 0x0, dispatchOpaque = 0x0, privateData
= 0x0, privateDataFreeFunc = 0x0, privateDataPreExecRestart = 0x0,
privateDataCloseFunc = 0x0, keepalive = 0x0}
---
src/rpc/virnetserverclient.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 81da82c..562516f 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -1021,6 +1021,12 @@ void
virNetServerClientClose(virNetServerClientPtr client)
client->sock = NULL;
}
+ if (client->privateData &&
+ client->privateDataFreeFunc) {
+ client->privateDataFreeFunc(client->privateData);
+ client->privateData = NULL;
+ }
+
virObjectUnlock(client);
}
--
2.8.3
7 years, 9 months
[libvirt] [PATCH] Remove additional newline from virsh-domain-monitor.c
by Nitesh Konkar
Currently "virsh domstats domainName" result ends
with two blanklines. This shall remove the additional
blank line.
Signed-off-by: Nitesh Konkar <nitkon12(a)linux.vnet.ibm.com>
---
tools/virsh-domain-monitor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 77aa272..c558819 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -2047,7 +2047,6 @@ virshDomainStatsPrintRecord(vshControl *ctl ATTRIBUTE_UNUSED,
VIR_FREE(param);
}
- vshPrint(ctl, "\n");
return true;
}
--
1.9.3
7 years, 9 months
[libvirt] [Block Replication] Question about supporting COLO in libvirt
by Hailiang Zhang
Hi,
I'm trying to implement supporting COLO in libvirt,
But i found an annoying problem that libvirt does not
support the command line option argument syntax we used
for block replication in QEMU.
That is libvirt does not support the bellow syntax for block:
-drive driver=qcow2,file.filename=test:a.qcow2
-drive file=test.qcow2,\
backing.file.filename=/dev/fdset/1
It seems to be a new syntax that libvirt does not support
thought it has been exist in QEMU for a time.
I found some introductions from
http://www.linux-kvm.org/images/3/34/Kvm-forum-2013-block-dev-configurati...
The command line we use for COLO is just like the above syntax,
For example, for the shared disk in COLO, it is:
-drive if=none,driver=qcow2,file.filename=/mnt/ramfs/hidden_disk.img,id=hidden_disk0,\
backing.driver=raw,backing.file.filename=1.raw \
-drive if=virtio,id=active-disk0,driver=replication,mode=secondary,\
file.driver=qcow2,top-id=active-disk0,\
file.file.filename=/mnt/ramfs/active_disk.img,\
file.backing=hidden_disk0,shared-disk=on
For the none-shared disk in COLO, it is quite same with the shared-disk:
-drive if=none,driver=raw,file.filename=1.raw,id=colo1 \
-drive if=xxx,id=topxxx,driver=replication,mode=secondary,top-id=topxxx\
file.file.filename=active_disk.qcow2,\
file.driver=qcow2,\
file.backing.file.filename=hidden_disk.qcow2,\
file.backing.driver=qcow2,\
file.backing.backing=colo1
So there seems to be two ways to solve this problem.
One is to support this new option argument syntax in libvirt,
but I'm not sure if it is difficult or not to implement it,
and i don't know where to start either.
Another way is to convert these command line options in QEMU totally,
I mean hidden the descriptions of 'active_disk' and 'hidden_disk' disks.
Create/add them dynamicly by qmp commands while users want to make VM goes
into COLO state. That's just like to support live image clone in QEMU.
Any ideas ?
Thanks,
Hailiang
7 years, 9 months
[libvirt] [PATCH] libxl: fix disk detach when <driver> not specified
by Jim Fehlig
When a user does not explicitly set a <driver> in the disk config,
libvirt defers selection of a default to libxl. This approach works
fine when starting a domain with such configuration or attaching a
disk to a running domain. But when detaching such a disk, libxl
will fail with "unrecognized disk backend type: 0". libxl makes no
attempt to recalculate a default backend (driver) on detach and
simply fails when uninitialized.
This patch updates the libvirt disk config with the backend selected
by libxl when starting a domain or attaching a disk to a running
domain. Another benefit of this approach is that the live XML is
also updated with the backend driver selected by libxl.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_conf.c | 33 +++++++++++++++++++++++++++++++++
src/libxl/libxl_conf.h | 4 ++++
src/libxl/libxl_domain.c | 25 +++++++++++++++++++++++++
src/libxl/libxl_driver.c | 2 +-
4 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index b5186f2..6ef7570 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -851,6 +851,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
* xl-disk-configuration.txt in the xen documentation and let
* libxl pick a suitable backend.
*/
+ virDomainDiskSetFormat(l_disk, VIR_STORAGE_FILE_RAW);
x_disk->format = LIBXL_DISK_FORMAT_RAW;
x_disk->backend = LIBXL_DISK_BACKEND_UNKNOWN;
}
@@ -913,6 +914,38 @@ libxlMakeDiskList(virDomainDefPtr def, libxl_domain_config *d_config)
return -1;
}
+/*
+ * Update libvirt disk config with libxl disk config.
+ *
+ * This function can be used to update the libvirt disk config with default
+ * values selected by libxl. Currently only the backend type is selected by
+ * libxl when not explicitly specified by the user.
+ */
+void
+libxlUpdateDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
+{
+ const char *driver = NULL;
+
+ if (virDomainDiskGetDriver(l_disk))
+ return;
+
+ switch (x_disk->backend) {
+ case LIBXL_DISK_BACKEND_QDISK:
+ driver = "qemu";
+ break;
+ case LIBXL_DISK_BACKEND_TAP:
+ driver = "tap";
+ break;
+ case LIBXL_DISK_BACKEND_PHY:
+ driver = "phy";
+ break;
+ case LIBXL_DISK_BACKEND_UNKNOWN:
+ break;
+ }
+ if (driver)
+ ignore_value(virDomainDiskSetDriver(l_disk, driver));
+}
+
int
libxlMakeNic(virDomainDefPtr def,
virDomainNetDefPtr l_nic,
diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
index 69d7885..732a1d2 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -175,6 +175,10 @@ int libxlDriverConfigLoadFile(libxlDriverConfigPtr cfg,
int
libxlMakeDisk(virDomainDiskDefPtr l_dev, libxl_device_disk *x_dev);
+
+void
+libxlUpdateDisk(virDomainDiskDefPtr l_dev, libxl_device_disk *x_dev);
+
int
libxlMakeNic(virDomainDefPtr def,
virDomainNetDefPtr l_nic,
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index ed73cd2..0168777 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -1067,6 +1067,30 @@ libxlDomainCreateIfaceNames(virDomainDefPtr def, libxl_domain_config *d_config)
}
}
+static void
+libxlDomainUpdateDiskParams(virDomainDefPtr def, libxl_ctx *ctx)
+{
+ libxl_device_disk *disks;
+ int num_disks = 0;
+ size_t i;
+ int idx;
+
+ disks = libxl_device_disk_list(ctx, def->id, &num_disks);
+ if (!disks)
+ return;
+
+ for (i = 0; i < num_disks; i++) {
+ if ((idx = virDomainDiskIndexByName(def, disks[i].vdev, false)) < 0)
+ continue;
+
+ libxlUpdateDisk(def->disks[idx], &disks[i]);
+ }
+
+ for (i = 0; i < num_disks; i++)
+ libxl_device_disk_dispose(&disks[i]);
+ VIR_FREE(disks);
+}
+
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
static void
libxlDomainCreateChannelPTY(virDomainDefPtr def, libxl_ctx *ctx)
@@ -1310,6 +1334,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver,
goto destroy_dom;
libxlDomainCreateIfaceNames(vm->def, &d_config);
+ libxlDomainUpdateDiskParams(vm->def, cfg->ctx);
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
if (vm->def->nchannels > 0)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 3a69720..6dddf9f 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3027,7 +3027,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObjPtr vm, virDomainDeviceDefPtr dev)
}
goto cleanup;
}
-
+ libxlUpdateDisk(l_disk, &x_disk);
virDomainDiskInsertPreAlloced(vm->def, l_disk);
} else {
--
2.9.2
7 years, 9 months
[libvirt] [PATCH v3] qemu: Forbid <memoryBacking><locked> without <memtune><hard_limit>
by Andrea Bolognani
In order for memory locking to work, the hard limit on memory
locking (and usage) has to be set appropriately by the user.
The documentation mentions the requirement already: with this
patch, it's going to be enforced by runtime checks as well,
by forbidding a non-compliant guest from being defined as well
as edited and started.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1316774
---
Changes from [v2]
* Address review feedback:
- move the check from BuildCommandLine to Validate.
Changes from [v1]
* Address review feeback:
- check in BuildCommandLine rather than in PostParse,
so that non-compliant guests will merely fail to
start rather than disappear completely.
[v1] https://www.redhat.com/archives/libvir-list/2017-February/msg00180.html
[v2] https://www.redhat.com/archives/libvir-list/2017-February/msg00214.html
src/qemu/qemu_domain.c | 10 ++++++++++
tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml | 3 +++
2 files changed, 13 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c6ce090..ce3aa69 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2831,6 +2831,16 @@ qemuDomainDefValidate(const virDomainDef *def,
}
}
+ /* Memory locking can only work properly if the memory locking limit
+ * for the QEMU process has been raised appropriately: the default one
+ * is extrememly low, so there's no way the guest will fit in there */
+ if (def->mem.locked && !virMemoryLimitIsSet(def->mem.hard_limit)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Setting <memoryBacking><locked> requires "
+ "<memtune><hard_limit> to be set as well"));
+ goto cleanup;
+ }
+
if (qemuDomainDefValidateVideo(def) < 0)
goto cleanup;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml b/tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml
index 20a5eaa..2046663 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml
@@ -3,6 +3,9 @@
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
+ <memtune>
+ <hard_limit unit='KiB'>256000</hard_limit>
+ </memtune>
<memoryBacking>
<locked/>
</memoryBacking>
--
2.7.4
7 years, 9 months
[libvirt] [PATCH v2 0/4] Support setting MTU in libvirt networks
by Laine Stump
Similar to V1, but changing the XML to match Michal's patches, and
adding a patch that plumbs network MTU back through to the qemu
host_mtu option.
Laine Stump (4):
util: add MTU arg to virNetDevTapCreateInBridgePort()
conf: support configuring mtu size in a virtual network
network: honor mtu setting when creating network
qemu: propagate bridge MTU into qemu "host_mtu" option
docs/formatnetwork.html.in | 19 ++++++++++++++++++-
docs/news.xml | 5 +++--
docs/schemas/network.rng | 5 +++++
src/bhyve/bhyve_command.c | 1 +
src/conf/network_conf.c | 31 ++++++++++++++++++++++++++++++-
src/conf/network_conf.h | 1 +
src/network/bridge_driver.c | 1 +
src/qemu/qemu_command.c | 32 ++++++++++++++++++++++----------
src/qemu/qemu_command.h | 3 ++-
src/qemu/qemu_hotplug.c | 5 +++--
src/qemu/qemu_interface.c | 4 +++-
src/qemu/qemu_interface.h | 3 ++-
src/uml/uml_conf.c | 1 +
src/util/virnetdevtap.c | 32 +++++++++++++++++++++++++++-----
src/util/virnetdevtap.h | 2 ++
tests/bhyvexml2argvmock.c | 2 ++
tests/networkxml2xmlin/set-mtu.xml | 12 ++++++++++++
tests/networkxml2xmlout/set-mtu.xml | 12 ++++++++++++
tests/networkxml2xmltest.c | 1 +
19 files changed, 148 insertions(+), 24 deletions(-)
create mode 100644 tests/networkxml2xmlin/set-mtu.xml
create mode 100644 tests/networkxml2xmlout/set-mtu.xml
--
2.9.3
7 years, 9 months