[libvirt] [PATCH] docs: fix virDomainRestoreFlags description bug
by Wangyufei (A)
>From 605afa95417a4ad086570f0fb6df4a5fe68ffc7f Mon Sep 17 00:00:00 2001
From: Wang Yufei <james.wangyufei(a)huawei.com>
Date: Thu, 7 Nov 2013 16:44:04 +0800
Subject: [PATCH] docs: fix virDomainRestoreFlags description bug
In virDomainRestoreFlags with VIR_DOMAIN_SAVE_BYPASS_CACHE, it risks
slowing restores from NFS, but not saves to NFS.
Signed-off-by: Wang Yufei <james.wangyufei(a)huawei.com>
---
src/libvirt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 7d94cd7..90608ab 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -2925,7 +2925,7 @@ error:
* If @flags includes VIR_DOMAIN_SAVE_BYPASS_CACHE, then libvirt will
* attempt to bypass the file system cache while restoring the file, or
* fail if it cannot do so for the given system; this can allow less
- * pressure on file system cache, but also risks slowing saves to NFS.
+ * pressure on file system cache, but also risks slowing restores from NFS.
*
* Normally, the saved state file will remember whether the domain was
* running or paused, and restore defaults to the same state.
--
1.7.3.1.msysgit.0
Best Regards,
-WangYufei
11 years, 1 month
[libvirt] [PATCHv3 0/6] Introduce paravirtual spinlock support
by Peter Krempa
Version 3 is fixed according to the review feedback.
Please see individual patches for changelog.
Jiri Denemark (1):
qemu: Add monitor APIs to fetch CPUID data from QEMU
Peter Krempa (5):
cpu_x86: Refactor storage of CPUID data to add support for KVM
features
cpu: x86: Add internal CPUID features support and KVM feature bits
conf: Refactor storing and usage of feature flags
qemu: Add support for paravirtual spinlocks in the guest
qemu: process: Validate specific CPUID flags of a guest
docs/formatdomain.html.in | 8 +
docs/schemas/domaincommon.rng | 10 +-
src/conf/domain_conf.c | 195 +++++++++++----
src/conf/domain_conf.h | 3 +-
src/cpu/cpu_x86.c | 277 +++++++++++----------
src/cpu/cpu_x86_data.h | 20 +-
src/libxl/libxl_conf.c | 9 +-
src/lxc/lxc_container.c | 6 +-
src/qemu/qemu_command.c | 28 ++-
src/qemu/qemu_monitor.c | 31 +++
src/qemu/qemu_monitor.h | 4 +
src/qemu/qemu_monitor_json.c | 133 ++++++++++
src/qemu/qemu_monitor_json.h | 2 +
src/qemu/qemu_process.c | 46 ++++
src/vbox/vbox_tmpl.c | 45 ++--
src/xenapi/xenapi_driver.c | 10 +-
src/xenapi/xenapi_utils.c | 22 +-
src/xenxs/xen_sxpr.c | 20 +-
src/xenxs/xen_xm.c | 30 +--
tests/Makefile.am | 1 +
.../qemumonitorjson-getcpu-full.data | 5 +
.../qemumonitorjson-getcpu-full.json | 46 ++++
.../qemumonitorjson-getcpu-host.data | 6 +
.../qemumonitorjson-getcpu-host.json | 45 ++++
tests/qemumonitorjsontest.c | 75 ++++++
.../qemuxml2argv-pv-spinlock-disabled.args | 5 +
.../qemuxml2argv-pv-spinlock-disabled.xml | 26 ++
.../qemuxml2argv-pv-spinlock-enabled.args | 5 +
.../qemuxml2argv-pv-spinlock-enabled.xml | 26 ++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 2 +
31 files changed, 869 insertions(+), 274 deletions(-)
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-full.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-full.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-host.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-host.json
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-disabled.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-disabled.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-enabled.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-enabled.xml
--
1.8.4.2
11 years, 1 month
[libvirt] [PATCH] docs: grammar fixes
by Eric Blake
Fix some user-visible wording from commits 72aafe9 and 1606d89.
* src/qemu/qemu.conf (migration_address): Better wording.
* include/libvirt/libvirt.h.in (VIR_MIGRATE_PARAM_LISTEN_ADDRESS):
Likewise.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the trivial rule.
include/libvirt/libvirt.h.in | 6 +++---
src/qemu/qemu.conf | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 2802a46..d7a5e90 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1274,10 +1274,10 @@ typedef enum {
* VIR_MIGRATE_PARAM_LISTEN_ADDRESS:
*
* virDomainMigrate* params field: The listen address that hypervisor on the
- * destination side should bind to for incoming migration. Both, IPv4 and IPv6
+ * destination side should bind to for incoming migration. Both IPv4 and IPv6
* addresses are accepted as well as hostnames (the resolving is done on
- * destination). Some hypervisors do not support this feature an will return an
- * error if this field is used.
+ * destination). Some hypervisors do not support this feature and will return
+ * an error if this field is used.
*/
#define VIR_MIGRATE_PARAM_LISTEN_ADDRESS "listen_address"
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 6cfb9ea..17f1b10 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -450,7 +450,7 @@
# Override the listen address for all incoming migrations. Defaults to
-# 0.0.0.0 or :: in case if both host and qemu are capable of IPv6.
+# 0.0.0.0, or :: if both host and qemu are capable of IPv6.
#migration_address = "127.0.0.1"
--
1.8.3.1
11 years, 1 month
[libvirt] [PATCH 1/2] Assign PCI address to primary video card in pseries guests
by Vitor de Lima
From: Vitor de Lima <vitor.lima(a)eldorado.org.br>
This patch assings a PCI address to the primary video card if it
does not have any kind of address. This fixes issues with pseries
guests.
---
src/qemu/qemu_command.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e48c9c2..159d920 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2959,6 +2959,15 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
goto error;
}
+ /* Assign a PCI slot to the primary video card if there is not an
+ * assigned address. */
+ if (def->nvideos >=1 &&
+ def->videos[0]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
+ if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->videos[0]->info,
+ flags) < 0)
+ goto error;
+ }
+
/* Further non-primary video cards which have to be qxl type */
for (i = 1; i < def->nvideos; i++) {
if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
--
1.8.1.4
11 years, 1 month
[libvirt] [PATCHv3 0/2] pci: properly handle out-of-order SRIOV virtual functions
by Laine Stump
This resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1025397
It has turned from a single patch into a 2 part patch because I wanted
to use VIR_APPEND_ELEMENT on the array, and that requires the array
size to be held in a size_t rather than unsigned int.
Thanks to Martin's suggestion (and similar suggestions from both Jan
and "Niilona" (the original reporter of the problem), this version is
greatly simplified from either my previous version or even the
original code (as evidenced by the diffstat).
Laine Stump (2):
util: use size_t instead of unsigned int for num_virtual_functions
pci: properly handle out-of-order SRIOV virtual functions
src/conf/node_device_conf.h | 2 +-
src/network/bridge_driver.c | 2 +-
src/util/virnetdev.c | 4 +--
src/util/virnetdev.h | 2 +-
src/util/virpci.c | 84 +++++++++++++++------------------------------
src/util/virpci.h | 2 +-
6 files changed, 34 insertions(+), 62 deletions(-)
--
1.8.3.1
11 years, 1 month
[libvirt] [PATCHv2] pci: properly handle out-of-order SRIOV virtual functions
by Laine Stump
This resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1025397
When libvirt creates the list of an SRIOV Physical Function's (PF)
Virtual Functions (VF), it assumes that the order of "virtfn*" links
returned by readdir() from the PF's sysfs directory is already in the
correct order. Experience has shown that this is not always the case.
This results in 1) incorrect assumptions made by consumers of the
output of the virt_functions list of virsh nodedev-dumpxml, and 2)
setting MAC address and vlan tag on the wrong VF (since libvirt uses
netlink to set mac address and vlan tag, netlink requires the VF#, and
the function virPCIGetVirtualFunctionIndex() returns the wrong index
due to the improperly ordered VF list). See the bugzilla report for an
example of this improper behavior.
The solution provided by this patch is for virPCIGetVirtualFunctions
to first gather all the "virtfn*" names from the PFs sysfs directory,
then allocate a virtual_functions array large enough to hold all
entries, and finally to create a device entry for each virtfn* name
and place it into the virtual_functions array at the proper index
(based on interpreting the value following "virtfn" in the name).
Checks are introduced to ensure that 1) the virtfn list given in sysfs
is not sparse (ie, there are no indexes larger than the length of the
list), and that no two virtfn* entries decode to the same index.
---
Difference from V1: Based on jtomko's review, truncate trailing NULLs
in virtual_functions array, and actually check for NULLs in the middle
(a sparse array) and generate an error in that case, as we already
claimed to do in the commit message.
(Sorry for the lack of inter-diff, but the only changes from V1 are
the addition of the lines starting with "truncate any trailing nulls"
and continuing until the next VIR_DEBUG.)
src/util/virpci.c | 115 ++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 90 insertions(+), 25 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 148631f..f744c8b 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2379,6 +2379,8 @@ virPCIGetPhysicalFunction(const char *vf_sysfs_path,
return ret;
}
+static const char *virtfnPrefix = "virtfn";
+
/*
* Returns virtual functions of a physical function
*/
@@ -2393,6 +2395,8 @@ virPCIGetVirtualFunctions(const char *sysfs_path,
struct dirent *entry = NULL;
char *device_link = NULL;
char errbuf[64];
+ char **virtfnNames = NULL;
+ size_t nVirtfnNames = 0;
VIR_DEBUG("Attempting to get SR IOV virtual functions for device"
"with sysfs path '%s'", sysfs_path);
@@ -2411,51 +2415,112 @@ virPCIGetVirtualFunctions(const char *sysfs_path,
while ((entry = readdir(dir))) {
if (STRPREFIX(entry->d_name, "virtfn")) {
- virPCIDeviceAddress *config_addr = NULL;
+ char *tempName;
- if (virBuildPath(&device_link, sysfs_path, entry->d_name) == -1) {
- virReportOOMError();
+ /* save these to sort into virtual_functions array */
+ if (VIR_STRDUP(tempName, entry->d_name) < 0)
+ goto error;
+ if (VIR_APPEND_ELEMENT(virtfnNames, nVirtfnNames, tempName) < 0) {
+ VIR_FREE(tempName);
goto error;
}
+ }
+ }
- VIR_DEBUG("Number of virtual functions: %d",
- *num_virtual_functions);
+ /* pre-allocate because we will be filling in out of order */
+ if (nVirtfnNames && VIR_ALLOC_N(*virtual_functions, nVirtfnNames) < 0)
+ goto error;
+ *num_virtual_functions = nVirtfnNames;
- if (virPCIGetDeviceAddressFromSysfsLink(device_link,
- &config_addr) !=
- SRIOV_FOUND) {
- VIR_WARN("Failed to get SRIOV function from device "
- "link '%s'", device_link);
- VIR_FREE(device_link);
- continue;
- }
+ for (i = 0; i < nVirtfnNames; i++) {
+ virPCIDeviceAddress *config_addr = NULL;
+ unsigned int virtfnIndex;
- if (VIR_REALLOC_N(*virtual_functions,
- *num_virtual_functions + 1) < 0) {
- VIR_FREE(config_addr);
- goto error;
- }
+ if (virBuildPath(&device_link, sysfs_path, virtfnNames[i]) < 0) {
+ virReportOOMError();
+ goto error;
+ }
+
+ if (virStrToLong_ui(virtfnNames[i] + strlen(virtfnPrefix),
+ 0, 10, &virtfnIndex) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Invalid virtual function link name '%s' "
+ "in physical function directory '%s'"),
+ virtfnNames[i], sysfs_path);
+ goto error;
+ }
+
+ if (virtfnIndex >= nVirtfnNames) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Virtual function link name '%s' larger than "
+ "total count of virtual functions %zu "
+ "in physical function directory '%s'"),
+ virtfnNames[i], nVirtfnNames, sysfs_path);
+ goto error;
+ }
+
+ if ((*virtual_functions)[virtfnIndex]) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Virtual function link name '%s' "
+ "generates duplicate index %zu "
+ "in physical function directory '%s'"),
+ virtfnNames[i], nVirtfnNames, sysfs_path);
+ goto error;
+ }
- (*virtual_functions)[*num_virtual_functions] = config_addr;
- (*num_virtual_functions)++;
+ if (virPCIGetDeviceAddressFromSysfsLink(device_link, &config_addr) !=
+ SRIOV_FOUND) {
+ VIR_WARN("Failed to get SRIOV function from device link '%s'",
+ device_link);
VIR_FREE(device_link);
+ continue;
}
+
+ VIR_DEBUG("Found virtual function %d", virtfnIndex);
+ (*virtual_functions)[virtfnIndex] = config_addr;
+ VIR_FREE(device_link);
}
+ /* truncate any trailing nulls due to files having names starting
+ * with "virtfn" which weren't actually a link to a virtual
+ * function.
+ */
+ while (*num_virtual_functions &&
+ !(*virtual_functions)[(*num_virtual_functions) - 1])
+ (*num_virtual_functions)--;
+
+ /* failure of realloc when shrinking is safe */
+ ignore_value(VIR_REALLOC_N(*virtual_functions, *num_virtual_functions));
+
+ /* if there are any NULLs left in the array, fail and log an error
+ * - the virtual function array cannot be sparse.
+ */
+ for (i = 0; i < *num_virtual_functions; i++) {
+ if (!(*virtual_functions)[*num_virtual_functions]) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Missing virtual function link for VF %zu "
+ "in physical function directory '%s'"),
+ i, sysfs_path);
+ goto error;
+ }
+ }
+
+ VIR_DEBUG("Number of virtual functions: %d", *num_virtual_functions);
ret = 0;
cleanup:
+ for (i = 0; i < nVirtfnNames; i++)
+ VIR_FREE(virtfnNames[i]);
+ VIR_FREE(virtfnNames);
VIR_FREE(device_link);
if (dir)
closedir(dir);
return ret;
error:
- if (*virtual_functions) {
- for (i = 0; i < *num_virtual_functions; i++)
- VIR_FREE((*virtual_functions)[i]);
- VIR_FREE(*virtual_functions);
- }
+ for (i = 0; i < *num_virtual_functions; i++)
+ VIR_FREE((*virtual_functions)[i]);
+ VIR_FREE(*virtual_functions);
goto cleanup;
}
--
1.8.3.1
11 years, 1 month
[libvirt] [PATCH] use -w flag if supported by iptables
by Serge Hallyn
This will properly lock libvirt's usage of iptables with
others (like ufw).
(See https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1245322)
Signed-off-by: Serge Hallyn <serge.hallyn(a)ubuntu.com>
---
src/util/viriptables.c | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/util/viriptables.c b/src/util/viriptables.c
index 16f571e..30d59b6 100644
--- a/src/util/viriptables.c
+++ b/src/util/viriptables.c
@@ -50,19 +50,25 @@
#include "virstring.h"
#include "virutil.h"
+bool iptables_supports_xlock = false;
+
#if HAVE_FIREWALLD
static char *firewall_cmd_path = NULL;
+#endif
static int
virIpTablesOnceInit(void)
{
+ virCommandPtr cmd;
+ int status;
+
+#if HAVE_FIREWALLD
firewall_cmd_path = virFindFileInPath("firewall-cmd");
if (!firewall_cmd_path) {
VIR_INFO("firewall-cmd not found on system. "
"firewalld support disabled for iptables.");
} else {
- virCommandPtr cmd = virCommandNew(firewall_cmd_path);
- int status;
+ virCommandNew(firewall_cmd_path);
virCommandAddArgList(cmd, "--state", NULL);
if (virCommandRun(cmd, &status) < 0 || status != 0) {
@@ -74,13 +80,26 @@ virIpTablesOnceInit(void)
}
virCommandFree(cmd);
}
+
+ if (firewall_cmd_path)
+ return 0;
+
+#endif
+
+ cmd = virCommandNew(IPTABLES_PATH);
+ virCommandAddArgList(cmd, "-w", "-L", "-n", NULL);
+ if (virCommandRun(cmd, &status) < 0 || status != 0) {
+ VIR_INFO("xtables locking not supported by your iptables");
+ } else {
+ VIR_INFO("using xtables locking for iptables");
+ iptables_supports_xlock = true;
+ }
+ virCommandFree(cmd);
return 0;
}
VIR_ONCE_GLOBAL_INIT(virIpTables)
-#endif
-
#define VIR_FROM_THIS VIR_FROM_NONE
enum {
@@ -104,6 +123,9 @@ iptablesCommandNew(const char *table, const char *chain, int family, int action)
if (cmd == NULL) {
cmd = virCommandNew((family == AF_INET6)
? IP6TABLES_PATH : IPTABLES_PATH);
+
+ if (iptables_supports_xlock)
+ virCommandAddArgList(cmd, "-w", NULL);
}
virCommandAddArgList(cmd, "--table", table,
--
1.8.3.2
11 years, 1 month
[libvirt] [PATCH 1/1] storage: Fix a vol-clone bug for ppc64
by Li Zhang
From: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
vol-clone reports out of memory error with disk type on ppc64.
Currently, wbytes is defined as size_t type which is 8 bytes on ppc64,
but args's value in ioctl(fd, args..) in kernel is unsigned int.
So it will read more 4 bytes by ioctl() with size_t from memory which
gets a large number and causes out of memory error.
This patch changes size_t to unsigned int to synchronize with kernel.
Signed-off-by: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
---
src/storage/storage_backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 4b1b00d..f510080 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -135,7 +135,7 @@ virStorageBackendCopyToFD(virStorageVolDefPtr vol,
int amtread = -1;
int ret = 0;
size_t rbytes = READ_BLOCK_SIZE_DEFAULT;
- size_t wbytes = 0;
+ unsigned int wbytes = 0;
int interval;
char *zerobuf = NULL;
char *buf = NULL;
--
1.8.2.1
11 years, 1 month
[libvirt] [PATCH] Allow root directory in filesystem source dir schema
by Ján Tomko
Use absDirPath instead of absFilePath.
https://bugzilla.redhat.com/show_bug.cgi?id=1028107
---
docs/schemas/domaincommon.rng | 4 ++--
tests/lxcxml2xmldata/lxc-filesystem-ram.xml | 4 ++++
tests/lxcxml2xmldata/lxc-filesystem-root.xml | 25 +++++++++++++++++++++++++
tests/lxcxml2xmloutdata/lxc-filesystem-ram.xml | 4 ++++
tests/lxcxml2xmltest.c | 1 +
5 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 tests/lxcxml2xmldata/lxc-filesystem-root.xml
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 14b6700..1f30161 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1679,7 +1679,7 @@
<interleave>
<element name="source">
<attribute name="dir">
- <ref name="absFilePath"/>
+ <ref name="absDirPath"/>
</attribute>
<empty/>
</element>
@@ -1697,7 +1697,7 @@
<interleave>
<element name="source">
<attribute name="dir">
- <ref name="absFilePath"/>
+ <ref name="absDirPath"/>
</attribute>
<empty/>
</element>
diff --git a/tests/lxcxml2xmldata/lxc-filesystem-ram.xml b/tests/lxcxml2xmldata/lxc-filesystem-ram.xml
index 002fde6..58ae344 100644
--- a/tests/lxcxml2xmldata/lxc-filesystem-ram.xml
+++ b/tests/lxcxml2xmldata/lxc-filesystem-ram.xml
@@ -14,6 +14,10 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
+ <filesystem type='bind'>
+ <source dir='/'/>
+ <target dir='/'/>
+ </filesystem>
<filesystem type='ram'>
<source usage='1048576'/>
<target dir='/mnt/mississippi'/>
diff --git a/tests/lxcxml2xmldata/lxc-filesystem-root.xml b/tests/lxcxml2xmldata/lxc-filesystem-root.xml
new file mode 100644
index 0000000..1ce2b32
--- /dev/null
+++ b/tests/lxcxml2xmldata/lxc-filesystem-root.xml
@@ -0,0 +1,25 @@
+<domain type='lxc'>
+ <name>demo</name>
+ <uuid>8369f1ac-7e46-e869-4ca5-759d51478066</uuid>
+ <memory unit='KiB'>500000</memory>
+ <currentMemory unit='KiB'>500000</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64'>exe</type>
+ <init>/bin/sh</init>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/libexec/libvirt_lxc</emulator>
+ <filesystem type='mount' accessmode='passthrough'>
+ <source dir='/'/>
+ <target dir='/'/>
+ </filesystem>
+ <console type='pty'>
+ <target type='lxc' port='0'/>
+ </console>
+ </devices>
+</domain>
diff --git a/tests/lxcxml2xmloutdata/lxc-filesystem-ram.xml b/tests/lxcxml2xmloutdata/lxc-filesystem-ram.xml
index d2369a2..93162b3 100644
--- a/tests/lxcxml2xmloutdata/lxc-filesystem-ram.xml
+++ b/tests/lxcxml2xmloutdata/lxc-filesystem-ram.xml
@@ -14,6 +14,10 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
+ <filesystem type='bind' accessmode='passthrough'>
+ <source dir='/'/>
+ <target dir='/'/>
+ </filesystem>
<filesystem type='ram' accessmode='passthrough'>
<source usage='1048576' units='KiB'/>
<target dir='/mnt/mississippi'/>
diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c
index 1692e4b..a028e39 100644
--- a/tests/lxcxml2xmltest.c
+++ b/tests/lxcxml2xmltest.c
@@ -137,6 +137,7 @@ mymain(void)
DO_TEST("hostdev");
DO_TEST("disk-formats");
DO_TEST_DIFFERENT("filesystem-ram");
+ DO_TEST("filesystem-root");
virObjectUnref(caps);
virObjectUnref(xmlopt);
--
1.8.1.5
11 years, 1 month
[libvirt] [PATCH v2 0/2] Some qemu monitor crashers fix
by Michal Privoznik
An improved versions of my previous attempt.
The 1/2 was leaking the @vm.
The 2/2 had issues which Jan pointed out.
Michal Privoznik (2):
qemu: Avoid double free of VM
qemu: Don't access vm->priv on unlocked domain
src/qemu/qemu_migration.c | 8 ++++----
src/qemu/qemu_process.c | 16 +++-------------
2 files changed, 7 insertions(+), 17 deletions(-)
--
1.8.1.5
11 years, 1 month