[libvirt] [PATCH 0/3] cpu: Add new Skylake-Server CPU model
by Jiri Denemark
Jiri Denemark (3):
tests: Add CPUID data for Intel(R) Xeon(R) Gold 6148 CPU
cpu: Add clwb/pcommit CPU features
cpu: Add new Skylake-Server CPU model
src/cpu/cpu_map.xml | 81 +++++++
tests/cputest.c | 1 +
.../x86_64-cpuid-Xeon-Gold-6148-disabled.xml | 7 +
.../x86_64-cpuid-Xeon-Gold-6148-enabled.xml | 9 +
.../x86_64-cpuid-Xeon-Gold-6148-guest.xml | 29 +++
.../x86_64-cpuid-Xeon-Gold-6148-host.xml | 30 +++
.../x86_64-cpuid-Xeon-Gold-6148-json.xml | 8 +
tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148.json | 235 +++++++++++++++++++++
tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148.xml | 54 +++++
.../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 2 +
10 files changed, 456 insertions(+)
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-disabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-enabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-guest.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-host.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-json.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148.json
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148.xml
--
2.14.1
7 years, 3 months
[libvirt] RFC: libvirt support for QEMU live patching
by Madhu Pavan
Hi,
QEMU live patching should be just a matter of updating the QEMU RPM package
and then live migrating the VMs to another QEMU instance on the same host
(which would point to the just installed new QEMU executable).
I think it will be useful to support it from libvirt side. After some
searching I found a
RFC patch posted in Nov 2013. Here is the link to it
https://www.redhat.com/archives/libvir-list/2013-November/msg00372.html
Approach followed in above mentioned link is as follows:
1. newDef = deep copy oldVm definition
2. newVm = create VM using newDef, start QEMU process with all vCPUs paused
3. oldVm migrate to newVm using unix socket
4. shutdown oldVm
5. newPid = newVm->pid
6. finalDef = live deep copy of newVm definition
7. Drop the newVm from qemu domain table without shutting down QEMU process
8. Assign finalDef to oldVm
9. oldVm attaches to QEMU process newPid using finalDef
10.resume all vCPUs in oldVm
I can see it didn't get communities approval for having problems in
handling UUID
of the vm's. To fix the problem we need to teach libvirt to manage two
qemu processes
at once both tied to same UUID. I would like to know if there is any
interested approach
to get this done. I would like to send patches on this.
Is there any specific reason why it is not been pursued for the last 4 year?
I plan to use postcopy along with the local migration as part of
migration, that way the
guest need not be even paused for a busy guest.
Thanks,
Madhu Pavan.
7 years, 3 months
[libvirt] [PATCH 0/7] qemu: Filter CPU features returned by qemuConnectBaselineCPU
by Jiri Denemark
The host CPU definitions reported in the capabilities XML may contain
CPU features unknown to QEMU, but the result of virConnectBaselineCPU is
supposed to be directly usable as a guest CPU definition and thus it
should only contain features QEMU knows about.
https://bugzilla.redhat.com/show_bug.cgi?id=1450317
Jiri Denemark (7):
cpu_conf: Introduce virCPUDefList{Parse,Free}
cpu: Use virCPUDefListParse in cpuBaselineXML
cpu: Don't log CPU models in cpuBaselineXML
cpu: Drop cpuBaselineXML
qemu: Pass virArch * to virQEMUCapsCPUFilterFeatures
qemu: Publish virQEMUCapsCPUFilterFeatures
qemu: Filter CPU features returned by qemuConnectBaselineCPU
src/bhyve/bhyve_driver.c | 22 +++++++--
src/conf/cpu_conf.c | 78 ++++++++++++++++++++++++++++++++
src/conf/cpu_conf.h | 7 +++
src/cpu/cpu.c | 104 -------------------------------------------
src/cpu/cpu.h | 7 ---
src/libvirt_private.syms | 3 +-
src/libxl/libxl_driver.c | 22 +++++++--
src/qemu/qemu_capabilities.c | 8 ++--
src/qemu/qemu_capabilities.h | 3 ++
src/qemu/qemu_driver.c | 32 +++++++++++--
src/test/test_driver.c | 22 +++++++--
src/vz/vz_driver.c | 22 ++++++++-
12 files changed, 201 insertions(+), 129 deletions(-)
--
2.14.1
7 years, 3 months
[libvirt] [PATCH] virsh: Enhance documentation of --rdma-pin-all option
by Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1373783
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tools/virsh.pod | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 01453be600..a03f64a262 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1767,7 +1767,13 @@ periodically increased by I<auto-converge-increment>.
I<--rdma-pin-all> can be used with RDMA migration (i.e., when I<migrateuri>
starts with rdma://) to tell the hypervisor to pin all domain's memory at once
-before migration starts rather than letting it pin memory pages as needed.
+before migration starts rather than letting it pin memory pages as needed. For
+QEMU/KVM this requires hard_limit memory tuning element (in the domain XML) to
+be used and set to the maximum memory configured for the domain plus any memory
+consumed by the QEMU process itself. Beware of setting the memory limit too
+high (and thus allowing the domain to lock most of the host's memory). Doing so
+may be dangerous to both the domain and the host itself since the host's kernel
+may run out of memory.
B<Note>: Individual hypervisors usually do not support all possible types of
migration. For example, QEMU does not support direct migration.
--
2.14.1
7 years, 3 months
[libvirt] [PATCH] util: virPCIGetNetName(): use first netdev name when phys_port_id isn't matched
by Laine Stump
The mlx4 (Mellanox) netdev driver implements the sysfs phys_port_id
file for both VFs and PFs, so you can find the VF netdev plugged into
the same physical port as any given PF netdev by comparing the
contents of phys_port_id of the respective netdevs. That's what
libvirt does when attempting to find the PF netdev for a given VF
netdev (or vice versa).
Most other netdevs drivers don't implement phys_port_id, so the file
shows up in sysfs, but attempts to read it result in ENOTSUPP. In
these cases, libvirt is unable to read phys_port_id, so it just
returns the first entry in the PF/VF's list of netdevs.
But we've found that the i40e driver is in between these two
situations - it implements phys_port_id for PF netdevs, but doesn't
implement it for VF netdevs. So libvirt would successfully read the
phys_port_id of the PF netdev, then try to find a VF netdev with
matching phys_port_id, but would fail because it is NULL for all
VFs. This would result in a message like the following:
Could not find network device with phys_port_id '3cfdfe9edc39'
under PCI device at /sys/class/net/ens4f1/device/virtfn0
To solve this problem in a way that won't break functionality for
anyone else, this patch saves the first netdev name we find for the
device, and returns that if we fail to find a netdev with the desired
phys_port_id.
---
src/util/virpci.c | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 5ded77087..402602678 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2876,6 +2876,7 @@ virPCIGetNetName(const char *device_link_sysfs_path,
int ret = -1;
DIR *dir = NULL;
struct dirent *entry = NULL;
+ char *firstEntryName = NULL;
char *thisPhysPortID = NULL;
size_t i = 0;
@@ -2902,6 +2903,15 @@ virPCIGetNetName(const char *device_link_sysfs_path,
/* if this one doesn't match, keep looking */
if (STRNEQ_NULLABLE(physPortID, thisPhysPortID)) {
VIR_FREE(thisPhysPortID);
+ /* save the first entry we find to use as a failsafe
+ * in case we don't match the phys_port_id. This is
+ * needed because some NIC drivers (e.g. i40e)
+ * implement phys_port_id for PFs, but not for VFs
+ */
+ if (!firstEntryName &&
+ VIR_STRDUP(firstEntryName, entry->d_name) < 0)
+ goto cleanup;
+
continue;
}
} else {
@@ -2918,10 +2928,21 @@ virPCIGetNetName(const char *device_link_sysfs_path,
if (ret < 0) {
if (physPortID) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not find network device with "
- "phys_port_id '%s' under PCI device at %s"),
- physPortID, device_link_sysfs_path);
+ if (firstEntryName) {
+ /* we didn't match the provided phys_port_id, but this
+ * is probably because phys_port_id isn't implemented
+ * for this NIC driver, so just return the first
+ * (probably only) netname we found.
+ */
+ *netname = firstEntryName;
+ firstEntryName = NULL;
+ ret = 0;
+ } else {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not find network device with "
+ "phys_port_id '%s' under PCI device at %s"),
+ physPortID, device_link_sysfs_path);
+ }
} else {
ret = 0; /* no netdev at the given index is *not* an error */
}
@@ -2930,6 +2951,7 @@ virPCIGetNetName(const char *device_link_sysfs_path,
VIR_DIR_CLOSE(dir);
VIR_FREE(pcidev_sysfs_net_path);
VIR_FREE(thisPhysPortID);
+ VIR_FREE(firstEntryName);
return ret;
}
--
2.13.5
7 years, 3 months
[libvirt] [PATCH 0/4] qemu: Validate guest CPU features before starting a domain
by Jiri Denemark
CPU features are usually checked by libvirt, but not if libvirt decides
it should not check the CPU at all, which happens with host-passthrough
CPUs, for example. Let's check all used CPU features are valid for all
CPU definitions.
https://bugzilla.redhat.com/show_bug.cgi?id=1460086
Jiri Denemark (4):
cpu: Introduce virCPUValidateFeatures
qemu: Validate guest CPU features before starting a domain
cpu_s390: Implement virCPUValidateFeatures
cpu_x86: Implement virCPUValidateFeatures
src/cpu/cpu.c | 29 +++++++++++++++++++++++++++++
src/cpu/cpu.h | 9 +++++++++
src/cpu/cpu_s390.c | 29 +++++++++++++++++++++--------
src/cpu/cpu_x86.c | 23 +++++++++++++++++++++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_process.c | 4 ++++
6 files changed, 87 insertions(+), 8 deletions(-)
--
2.14.1
7 years, 3 months
[libvirt] [PATCH] spec: Use %license when available
by Cole Robinson
This is required by the fedora packaging guidelines:
https://fedoraproject.org/wiki/Packaging:LicensingGuidelines
This macro isn't available on stock RHEL6 so provide a backcompat
definition
https://bugzilla.redhat.com/show_bug.cgi?id=1483293
Reported-by: Ville Skyttä <ville.skytta(a)iki.fi>
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
libvirt.spec.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 583fb0583..5f232b1ba 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -15,6 +15,8 @@
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%global enable_autotools 0}
+# RHEL6 doesn't have 'license' macro
+%{!?_licensedir:%global license %%doc}
# The hypervisor drivers that run in libvirtd
%define with_xen 0%{!?_without_xen:1}
@@ -2030,7 +2032,7 @@ exit 0
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
%files libs -f %{name}.lang
-%doc COPYING COPYING.LESSER
+%license COPYING COPYING.LESSER
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
%config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
%{_libdir}/libvirt.so.*
--
2.13.5
7 years, 3 months
[libvirt] [libvirt-sandbox PATCH 0/2] virt-sandbox-image: unbreak start from library
by Guido Günther
This is basically a V2 of "Drop library/ from template name and image path"
with Dan's comment implemented.
Guido Günther (2):
Drop library/ from image path
Sanitize domain name
libvirt-sandbox/image/cli.py | 8 ++++++--
libvirt-sandbox/image/sources/docker.py | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
--
2.11.0
7 years, 3 months
[libvirt] [PATCH] qemu: Fix return check on virHashAddEntry call
by John Ferlan
Luckily it only returns 0 or -1
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushed as trivial..
Tripped across this while working on something else.
src/qemu/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index ab5f7cc59..68c00c1e8 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1300,7 +1300,7 @@ qemuSharedDeviceEntryInsert(virQEMUDriverPtr driver,
entry->ref = 1;
- if (virHashAddEntry(driver->sharedDevices, key, entry))
+ if (virHashAddEntry(driver->sharedDevices, key, entry) < 0)
goto error;
}
--
2.13.5
7 years, 3 months
[libvirt] [PATCH 0/6] Some disk auth/encryption cleanups
by John Ferlan
Perform some cleanups with the auth and encryption processing.
This is a precursor to some other changes that will move/create
disk <source> level <auth> and <encryption> elements since they
are already in the _virStorageSource.
I'm still working on the latter, but before there's too many patches.
John Ferlan (6):
docs: Remove unnecessary <auth> example for iscsi disk type='volume'
conf: Add invalid secrettype checks
conf: Move <disk> authdef validation
conf: Add invalid domain disk encryption test
conf: Move <disk> encryption validation
conf: Use virXMLFormatElement to format disk source network
docs/formatdomain.html.in | 6 -
src/conf/domain_conf.c | 126 ++++++++++-----------
...drive-network-iscsi-auth-secrettype-invalid.xml | 33 ++++++
...k-drive-network-iscsi-auth-wrong-secrettype.xml | 33 ++++++
.../qemuxml2argv-disk-source-pool-mode.args | 3 +
.../qemuxml2argv-disk-source-pool-mode.xml | 13 +++
.../qemuxml2argv-luks-disk-invalid.xml | 37 ++++++
tests/qemuxml2argvtest.c | 3 +
.../qemuxml2xmlout-disk-source-pool-mode.xml | 13 +++
9 files changed, 198 insertions(+), 69 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-secrettype-invalid.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-wrong-secrettype.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disk-invalid.xml
--
2.13.5
7 years, 3 months