[libvirt] [PATCH v2 0/6] Couple of PR fixes and improvements
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2018-July/msg00243.html
Diff to v1:
- Dropped 4/7 from the original series, as it's no longer needed
- Reworked alias matching, instead of iterating through all disks trying
to find a matching alias, retval of qemuDomainGetManagedPRAlias() is
compared directly
- The PR_MANAGER_STATUS_CHANGED event handling is done from worker pool
rather than event loop.
Patches 1 and 3 were ACKed already.
Michal Privoznik (6):
qemuProcessStartPRDaemonHook: Try to set NS iff domain was started
with one
qemuDomainValidateStorageSource: Relax PR validation
virStoragePRDefFormat: Suppress path formatting for migratable XML
qemu: Wire up PR_MANAGER_STATUS_CHANGED event
qemu_monitor: Introduce qemuMonitorJSONGetPRManagerInfo
qemu: Fetch pr-helper process info on reconnect
src/conf/domain_conf.c | 3 +-
src/qemu/qemu_domain.c | 20 +++----
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 17 ++++++
src/qemu/qemu_monitor.c | 40 ++++++++++++++
src/qemu/qemu_monitor.h | 20 +++++++
src/qemu/qemu_monitor_json.c | 106 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_monitor_json.h | 4 ++
src/qemu/qemu_process.c | 128 +++++++++++++++++++++++++++++++++++++++++--
src/util/virstoragefile.c | 6 +-
src/util/virstoragefile.h | 3 +-
11 files changed, 326 insertions(+), 22 deletions(-)
--
2.16.4
6 years, 4 months
[libvirt] [PATCH 0/9] qemu: Disk-related cleanups a refactors
by Peter Krempa
Collection of patches which make sense without the rest of the -blockdev
series.
Peter Krempa (9):
qemu: domain: Remove code assuming disk format probing
qemu: domain: Reject copy_on_read for read-only disks
tests: Remove disk from 'serial-unix-chardev' test
qemu: command: Rename and export qemuDiskBusNeedsDeviceArg
qemu: hotplug: Add warning regarding SD hotplug
qemu: command: Split out formatting of disk source commandline
qemu: command: Don't generate disk drive alias manually for floppies
qemu: command: Refactor floppy controller command formatting
qemu: command: Rename qemuBuildDriveDevStr to qemuBuildDiskDeviceStr
src/qemu/qemu_command.c | 139 ++++++++++++---------
src/qemu/qemu_command.h | 11 +-
src/qemu/qemu_domain.c | 25 ++--
src/qemu/qemu_hotplug.c | 5 +-
tests/qemuxml2argvdata/serial-unix-chardev.args | 2 -
.../serial-unix-chardev.x86_64-latest.args | 2 -
tests/qemuxml2argvdata/serial-unix-chardev.xml | 5 -
7 files changed, 104 insertions(+), 85 deletions(-)
--
2.16.2
6 years, 4 months
[libvirt] [dbus PATCH 00/15] Implement Interface APIs
by Anya Harter
https://libvirt.org/html/libvirt-libvirt-interface.html
The following functions have been implemented:
- virConnectListAllInterfaces (connect method)
- virInterfaceChangeBegin (connect method)
- virInterfaceChangeCommit (connect method)
- virInterfaceChangeRollback (connect method)
- virInterfaceCreate (interface method)
- virInterfaceDefineXML (connect method)
- virInterfaceDestroy (interface method)
- virInterfaceGetMACString (property)
- virInterfaceGetName (property)
- virInterfaceGetXMLDesc (interface method)
- virInterfaceIsActive (property)
- virInterfaceLookupByMACString (connect method)
- virInterfaceLookupByName (connect method)
- virInterfaceUndefine (interface method)
Anya Harter (15):
Introduce Interface Interface
Implement Name property for Interface Interface
Implement MACString property for Interface Interface
Implement Active property for Interface Interface
Implement ListInterfaces method for Connect Interface
Implement InterfaceDefineXML method for Connect Interface
Implement InterfaceChangeBegin method for Connect Interface
Implement InterfaceChangeCommit method for Connect Interface
Implement InterfaceChangeRollback method for Connect Interface
Implement InterfaceLookupByName method for Connect Interface
Implement InterfaceLookupByMACString method for Connect Interface
Implement Create method for Interface Interface
Implement Destroy method for Interface Interface
Implement Undefine method for Interface Interface
Implement GetXMLDesc method for Interface Interface
data/Makefile.am | 1 +
data/org.libvirt.Connect.xml | 40 ++++++
data/org.libvirt.Interface.xml | 41 ++++++
src/Makefile.am | 2 +
src/connect.c | 198 ++++++++++++++++++++++++++
src/connect.h | 1 +
src/interface.c | 249 +++++++++++++++++++++++++++++++++
src/interface.h | 9 ++
src/util.c | 35 +++++
src/util.h | 15 ++
10 files changed, 591 insertions(+)
create mode 100644 data/org.libvirt.Interface.xml
create mode 100644 src/interface.c
create mode 100644 src/interface.h
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] storage_util: Prefer generic FICLONE over btrfs/xfs defines
by Michal Privoznik
After my change to the original patch that resulted in commit
8ed874b39b3 it was brought to my attention that all three defines
are the same: FICLONE = BTRFS_IOC_CLONE = XFS_IOC_CLONE.
Therefore we should prefer generic FICLONE over 'specific'
defines for btrfs/xfs.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/storage/storage_util.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index da99043e0a..715d5c2f88 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -46,14 +46,14 @@
# include <selinux/selinux.h>
#endif
-#if HAVE_LINUX_BTRFS_H
+#ifdef FICLONE
+# define REFLINK_IOC_CLONE FICLONE
+#elif HAVE_LINUX_BTRFS_H
# include <linux/btrfs.h>
# define REFLINK_IOC_CLONE BTRFS_IOC_CLONE
#elif HAVE_XFS_XFS_H
# include <xfs/xfs.h>
# define REFLINK_IOC_CLONE XFS_IOC_CLONE
-#elif defined(FICLONE)
-# define REFLINK_IOC_CLONE FICLONE
#endif
#include "datatypes.h"
--
2.16.4
6 years, 4 months
[libvirt] [dbus PATCH] test_connect: fix methods to follow naming conventions
by Anya Harter
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
tests/test_connect.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_connect.py b/tests/test_connect.py
index 7084397..2299b8a 100755
--- a/tests/test_connect.py
+++ b/tests/test_connect.py
@@ -22,7 +22,7 @@ class TestConnect(libvirttest.BaseTestClass):
self.main_loop()
- def test_comnect_domain_define_xml(self):
+ def test_connect_domain_define_xml(self):
def domain_defined(path, event, detail):
if event != libvirttest.DomainEvent.DEFINED:
return
@@ -84,7 +84,7 @@ class TestConnect(libvirttest.BaseTestClass):
sysinfo = self.connect.GetSysinfo(0)
assert isinstance(sysinfo, dbus.String)
- def test_list_networks(self):
+ def test_connect_list_networks(self):
networks = self.connect.ListNetworks(0)
assert isinstance(networks, dbus.Array)
assert len(networks) == 1
--
2.17.1
6 years, 4 months
[libvirt] [dbus PATCH] connect: fix gchar declaration in connect.h
by Anya Harter
so that gchar *nodeDevPath; line appears in alphabetical order with the
rest of the lines
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
src/connect.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/connect.h b/src/connect.h
index b81b6a8..0b9ae10 100644
--- a/src/connect.h
+++ b/src/connect.h
@@ -12,9 +12,9 @@ struct virtDBusConnect {
GDBusConnection *bus;
const gchar *uri;
const gchar *connectPath;
- gchar *nodeDevPath;
gchar *domainPath;
gchar *networkPath;
+ gchar *nodeDevPath;
gchar *nwfilterPath;
gchar *secretPath;
gchar *storagePoolPath;
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] news: Update for 4.5.0 release
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
I've CC'd all those who introduced the changes mentioned below,
both to give them a chance to point out any mistake I might have
made and to possibly annoy them into updating the release notes
themselves next time :)
docs/news.xml | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 468d34093a..65c23e51b6 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -61,6 +61,16 @@
Support specifying extended TSEG size for SMM in QEMU.
</description>
</change>
+ <change>
+ <summary>
+ qemu: Add support for SEV guests
+ </summary>
+ <description>
+ SEV (Secure Encrypted Virtualization) is a feature available on AMD
+ CPUs that encrypts the guest memory and makes it inaccessible even
+ to the host OS.
+ </description>
+ </change>
</section>
<section title="Removed features">
<change>
@@ -76,6 +86,24 @@
secret objects, but that support was never added to libvirt.
</description>
</change>
+ <change>
+ <summary>
+ Make GnuTLS mandatory
+ </summary>
+ <description>
+ Building without GnuTLS is no longer possible.
+ </description>
+ </change>
+ <change>
+ <summary>
+ qemu: Remove allow_disk_format_probing configuration option
+ </summary>
+ <description>
+ The option represented a security risk when used with malicious
+ disk images, so users were recommended against enabling it; with
+ this release, it's been removed altogether.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
@@ -130,6 +158,41 @@
or virStorageVolCreateXMLFrom.
</description>
</change>
+ <change>
+ <summary>
+ qemu: Add support for vsock hot (un)plug and cold (un)plug
+ </summary>
+ </change>
+ <change>
+ <summary>
+ qemu: Add support for NBD over TLS
+ </summary>
+ <description>
+ Securely accessing NBD volumes no longer requires tunnelling over
+ SSH or another secure protocol: the native TLS support can now be
+ used instead.
+ </description>
+ </change>
+ <change>
+ <summary>
+ qemu: Implement FD passing for Unix sockets
+ </summary>
+ <description>
+ Instead of having QEMU open the socket and then connecting to it,
+ which is inherently racy, starting with QEMU 2.12 we can open the
+ socket ourselves and pass it to QEMU, avoiding race conditions.
+ </description>
+ </change>
+ <change>
+ <summary>
+ virsh: Introduce --nowait option for domstat command
+ </summary>
+ <description>
+ When this option is specified, virsh will try to fetch the guest
+ stats but abort instead of stalling if they can't be retrieved right
+ away.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
<change>
@@ -143,6 +206,26 @@
us getting to the worker pool initialization.
</description>
</change>
+ <change>
+ <summary>
+ qemu: Fix domain resume after failed migration
+ </summary>
+ <description>
+ Recent versions of QEMU activate block devices before the guest CPU
+ has been started, which makes it impossible to roll back a failed
+ migration. Use the <code>late-block-activate</code> migration
+ capability if supported to avoid the issue.
+ </description>
+ </change>
+ <change>
+ <summary>
+ vmx: Permit guests to have an odd number of vCPUs
+ </summary>
+ <description>
+ This was forbidden in the past, but current versions of ESX can
+ deal with a guest configured as such.
+ </description>
+ </change>
</section>
</release>
<release version="v4.4.0" date="2018-06-04">
--
2.17.1
6 years, 4 months
[libvirt] [PATCH 0/5] Making libvirt aware of a server need
by Marcos Paulo de Souza
Hi guys,
this is basically a second version of [1], but I rewrote the patch following
Matthias ideas [2]. It really seems a cleaner change, but, feel free to suggest
any other change that could make the code better.
I did a lot of tests using virsh tool, so when using the ESX driver without a
proper server, it returns a error. I could not test hyperv and phyp.
Thanks,
[1]: https://www.redhat.com/archives/libvir-list/2018-July/msg00393.html
[2]: https://www.redhat.com/archives/libvir-list/2018-July/msg00400.html
Marcos Paulo de Souza (5):
driver.h: Add remoteOnly member to virConnectDriver struct
libvirt.c: Return error when remoteOnly is set but server is empty
esx_driver: Set remoteOnly member of virConnectDriver
hyperv_driver: Set remoteOnly member of virConnectDriver
phyp_driver: Set remoteOnly member of virConnectDriver
src/driver.h | 2 ++
src/esx/esx_driver.c | 8 +-------
src/hyperv/hyperv_driver.c | 8 +-------
src/libvirt.c | 5 +++++
src/phyp/phyp_driver.c | 7 +------
5 files changed, 10 insertions(+), 20 deletions(-)
--
2.17.1
6 years, 4 months
[libvirt] [PATCH 0/5] Introduce new video model type 'none'
by Erik Skultety
Historically, we've always been adding a default video device onto the cmdline
whenever a graphical framebuffer was requested but a video device was missing.
With the appearance of mdev vgpus, having an emulated video device is
suboptimal, especially with spice where the streaming client will by default
open multiple windows, one for each video device (or 'head' in this case).
Therefore, we should have a mechanism to disable the 'default video device
addition' and this series does that by introducing a new video model 'none'.
This can be applied and tried independently, however, it truly only makes sense
on top of [1].
[1] https://www.redhat.com/archives/libvir-list/2018-June/msg01740.html
Erik Skultety (5):
qemu: address: Handle all the video devices within a single loop
conf: Introduce virDomainVideoDefClear helper
conf: Introduce virDomainDefPostParseVideo helper
qemu: validate: Enforce compile time switch type checking for videos
conf: Introduce new video type 'none'
docs/formatdomain.html.in | 10 ++-
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 86 +++++++++++++++++-----
src/conf/domain_conf.h | 4 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 13 +++-
src/qemu/qemu_domain.c | 6 +-
src/qemu/qemu_domain_address.c | 20 +++--
tests/domaincapsschemadata/full.xml | 1 +
.../video-invalid-multiple-devices.xml | 33 +++++++++
tests/qemuxml2argvdata/video-none-device.args | 27 +++++++
tests/qemuxml2argvdata/video-none-device.xml | 39 ++++++++++
tests/qemuxml2argvtest.c | 4 +-
tests/qemuxml2xmloutdata/video-none-device.xml | 42 +++++++++++
tests/qemuxml2xmltest.c | 1 +
15 files changed, 255 insertions(+), 33 deletions(-)
create mode 100644 tests/qemuxml2argvdata/video-invalid-multiple-devices.xml
create mode 100644 tests/qemuxml2argvdata/video-none-device.args
create mode 100644 tests/qemuxml2argvdata/video-none-device.xml
create mode 100644 tests/qemuxml2xmloutdata/video-none-device.xml
--
2.14.4
6 years, 4 months
[libvirt] [PATCH v1 00/11] Enable vfio-pci 'property' for mediated device
by Erik Skultety
See the RFC here:
https://www.redhat.com/archives/libvir-list/2018-May/msg02218.html
Since RFC:
- split graphics 'gl' to a standalone structure since it's now SPICE, SDL,
*and* VNC that will support it
- egl-headless support for VNC, since VNC doesn't support OpenGL natively like
SPICE does
- added a new attribute 'native' for spice which will instruct libvirt to use
'-display egl-headless' instead of libvirt trying to figure this on out by
itself, since egl-headless might have other uses besides mdev with VNC
- dropped formatting of the 'display' attribute to the domain XML if it had the
default value, so it will only be formatted if user explicitly set it
(previously patch 6)
- minor adjustments like splitting the second patch into 2 (now 2 and 3)
- more cleanup
Erik Skultety (11):
conf: Remove a redundant model/address-type check in mdev post parse
qemu: command: Move graphics iteration to its own function
qemu: command: Add virReportEnumRangeError to BuildHostdevCommandline
conf: Replace error label with cleanup in
virDomainGraphicsDefParseVNCXML
qemu: command: Fix building of the SDL display command line
conf: Make graphics's GL a standalone structure
conf: Allow usage of the <gl> element with VNC graphics
conf: Introduce new <gl> attribute 'native' for SPICE
qemu: caps: Add vfio-pci.display capability
conf: Introduce new <hostdev> attribute 'display'
qemu: command: Enable formatting vfio-pci.display option onto cmdline
docs/formatdomain.html.in | 33 ++-
docs/schemas/domaincommon.rng | 28 ++-
src/conf/domain_conf.c | 230 ++++++++++++++-------
src/conf/domain_conf.h | 14 +-
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 10 +-
src/qemu/qemu_command.c | 189 +++++++++++------
src/qemu/qemu_domain.c | 79 ++++++-
src/security/security_dac.c | 7 +-
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../qemuxml2argvdata/graphics-sdl-fullscreen.args | 2 +-
tests/qemuxml2argvdata/graphics-sdl.args | 2 +-
.../qemuxml2argvdata/graphics-spice-gl-native.args | 26 +++
.../qemuxml2argvdata/graphics-spice-gl-native.xml | 25 +++
.../graphics-spice-gl-non-native.args | 27 +++
.../graphics-spice-gl-non-native.xml | 24 +++
tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml | 37 ++++
tests/qemuxml2argvdata/graphics-vnc-gl.args | 28 +++
tests/qemuxml2argvdata/graphics-vnc-gl.xml | 37 ++++
.../hostdev-mdev-display-missing-graphics.xml | 35 ++++
.../hostdev-mdev-display-spice-egl-headless.args | 32 +++
.../hostdev-mdev-display-spice-egl-headless.xml | 41 ++++
.../hostdev-mdev-display-spice-opengl.args | 31 +++
.../hostdev-mdev-display-spice-opengl.xml | 41 ++++
.../hostdev-mdev-display-vnc-egl-headless.args | 32 +++
.../hostdev-mdev-display-vnc-egl-headless.xml | 41 ++++
.../qemuxml2argvdata/hostdev-mdev-display-vnc.args | 31 +++
.../qemuxml2argvdata/hostdev-mdev-display-vnc.xml | 39 ++++
tests/qemuxml2argvdata/hostdev-mdev-display.xml | 39 ++++
.../qemuxml2argvdata/video-virtio-gpu-sdl-gl.args | 2 +-
tests/qemuxml2argvtest.c | 38 ++++
.../hostdev-mdev-display-active.xml | 47 +++++
.../hostdev-mdev-display-inactive.xml | 47 +++++
.../video-virtio-gpu-spice-gl.xml | 2 +-
tests/qemuxml2xmltest.c | 2 +
40 files changed, 1143 insertions(+), 163 deletions(-)
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-native.args
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-native.xml
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-non-native.args
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-non-native.xml
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.args
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-missing-graphics.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc.args
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display-vnc.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-active.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display-inactive.xml
--
2.14.4
6 years, 4 months