[libvirt] [PATCH v3 00/36] network: refactor to decouple virt drivers from network driver
by Daniel P. Berrangé
An update to
v1: https://www.redhat.com/archives/libvir-list/2018-December/msg00681.html
v2: https://www.redhat.com/archives/libvir-list/2019-February/msg01581.html
Currently the network driver registers a set of callbacks with the virt
driver in order to handle allocating/releasing network ports associated
with guest NICs.
This series introduces a virNetworkPortPtr object and associated XML
that describes a network port. The virt drivers now call public APIs
associated with this new object to create/delete ports for guest NICs.
Changed in v3:
- Remove unused API symbol
- Fix dist of test data files
Changed in v2:
- Fix many bugs related to upgrades with running VMs
- Convert over bandwidth controls to the new APIs
- Handle reconnecting VIFs to bridges during startup
- Much much more that I can't remember
Daniel P. Berrangé (36):
network: restrict usage of port management APIs
network: pass a virNetworkPtr to port management APIs
conf: simplify link from hostdev back to network device
network: add missing bandwidth limits for bridge forward type
network: use 'bridge' as actual type instead of 'network'
util: add helper method for re-attaching a tap device to a bridge
network: use virNetDevTapReattachBridge API
virt drivers: don't handle type=network after resolving actual network
type
network: move re-attach of bridge device out of network driver
network: move fixup for domain actual net def out of network driver
network: unconditionally merge port profiles
conf: don't pass interface type into virNetDevBandwidthParse
conf: introduce virNetworkPortDefPtr struct and XML support
network: stop passing virDomainNetDefPtr into bandwidth functions
network: make networkLogAllocation independent of domain conf
util: add API for copying virtual port profile data
conf: add APIs to convert virDomainNetDef to virNetworkPortDef
network: convert networkAllocateActualDevice to virNetworkPortDef
network: convert networkNotifyActualDevice to virNetworkPortDef
network: convert networkReleaseActualDevice to virNetworkPortDef
network: convert hook script to take a network port XML
network: remove the virDomainNetBandwidthChangeAllowed callback
network: introduce networkAllocatePort
network: introduce networkNotifyPort
network: introduce networkReleasePort
network: introduce networkUpdatePortBandwidth
network: add public APIs for network port object
access: add permissions for network port objects
remote: add support for new network port APIs
virsh: add support for network port APIs
conf: support recording ports against virNetworkObjPtr
network: add implementation of network port APIs
lxc, libxl: notify network driver of NICs during reconnect
lxc, libxl: save domain status after reconnect
conf: record a portid against the domain conf
conf: switch over to use network port APIs for virt drivers
docs/formatdomain.html.in | 8 +
docs/hooks.html.in | 24 +-
docs/schemas/domaincommon.rng | 5 +
include/libvirt/libvirt-network.h | 122 ++
include/libvirt/virterror.h | 3 +
src/access/genpolkit.pl | 2 +-
src/access/viraccessdriver.h | 6 +
src/access/viraccessdrivernop.c | 11 +
src/access/viraccessdriverpolkit.c | 26 +
src/access/viraccessdriverstack.c | 25 +
src/access/viraccessmanager.c | 16 +
src/access/viraccessmanager.h | 6 +
src/access/viraccessperm.c | 6 +
src/access/viraccessperm.h | 44 +
src/conf/Makefile.inc.am | 2 +
src/conf/domain_conf.c | 557 ++++++-
src/conf/domain_conf.h | 63 +-
src/conf/netdev_bandwidth_conf.c | 22 +-
src/conf/netdev_bandwidth_conf.h | 2 +-
src/conf/network_conf.c | 4 +-
src/conf/virnetworkobj.c | 303 ++++
src/conf/virnetworkobj.h | 34 +
src/conf/virnetworkportdef.c | 514 +++++++
src/conf/virnetworkportdef.h | 112 ++
src/datatypes.c | 60 +
src/datatypes.h | 41 +
src/driver-network.h | 41 +
src/libvirt-network.c | 444 ++++++
src/libvirt_private.syms | 25 +-
src/libvirt_public.syms | 12 +
src/libxl/libxl_conf.c | 21 +-
src/libxl/libxl_domain.c | 28 +-
src/libxl/libxl_driver.c | 60 +-
src/lxc/lxc_driver.c | 37 +-
src/lxc/lxc_process.c | 56 +-
src/network/bridge_driver.c | 1364 +++++++++--------
src/qemu/qemu_command.c | 11 +-
src/qemu/qemu_domain_address.c | 4 +-
src/qemu/qemu_driver.c | 10 +-
src/qemu/qemu_hotplug.c | 84 +-
src/qemu/qemu_hotplug.h | 2 +-
src/qemu/qemu_interface.c | 12 +-
src/qemu/qemu_process.c | 32 +-
src/remote/remote_daemon_dispatch.c | 73 +
src/remote/remote_driver.c | 69 +
src/remote/remote_protocol.x | 124 +-
src/remote_protocol-structs | 69 +
src/rpc/gendispatch.pl | 18 +-
src/util/virerror.c | 9 +
src/util/virhook.c | 4 +-
src/util/virhook.h | 4 +-
src/util/virhostdev.c | 17 +-
src/util/virnetdevtap.c | 69 +
src/util/virnetdevtap.h | 12 +
src/util/virnetdevvportprofile.c | 16 +
src/util/virnetdevvportprofile.h | 2 +
tests/Makefile.am | 7 +
.../net-virtio-network-portgroup.xml | 6 +-
tests/virnetdevbandwidthtest.c | 2 +-
.../plug-bridge-mactbl.xml | 9 +
.../virnetworkportxml2xmldata/plug-bridge.xml | 12 +
.../virnetworkportxml2xmldata/plug-direct.xml | 12 +
.../plug-hostdev-pci.xml | 12 +
tests/virnetworkportxml2xmldata/plug-none.xml | 8 +
tests/virnetworkportxml2xmltest.c | 104 ++
tools/virsh-completer.c | 50 +
tools/virsh-completer.h | 4 +
tools/virsh-network.c | 399 ++++-
tools/virsh-network.h | 5 +
69 files changed, 4526 insertions(+), 851 deletions(-)
create mode 100644 src/conf/virnetworkportdef.c
create mode 100644 src/conf/virnetworkportdef.h
create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge-mactbl.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-bridge.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-direct.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-hostdev-pci.xml
create mode 100644 tests/virnetworkportxml2xmldata/plug-none.xml
create mode 100644 tests/virnetworkportxml2xmltest.c
--
2.20.1
5 years, 7 months
[libvirt] [PATCH v2 0/3] qemu: don't duplicate suspended events and state changes
by Nikolay Shirokovskiy
Patches 1 and 2 are already Reviewed-by: John. Patch 3 needs Peter comments.
Diff from v1:
============
- minor rebase changes
- minor changes according to review
[1] PATCH v1 : https://www.redhat.com/archives/libvir-list/2018-October/msg00591.html
Nikolay Shirokovskiy (3):
qemu: Pass stop reason from qemuProcessStopCPUs to stop handler
qemu: Map suspended state reason to suspended event detail
qemu: Don't duplicate suspend events and state changes
src/qemu/qemu_domain.c | 34 ++++++++++++++++++++++++++++++++++
src/qemu/qemu_domain.h | 7 +++++++
src/qemu/qemu_driver.c | 26 +++-----------------------
src/qemu/qemu_migration.c | 42 ++++++------------------------------------
src/qemu/qemu_migration.h | 4 ----
src/qemu/qemu_process.c | 38 +++++++++++++++++++++++++-------------
6 files changed, 75 insertions(+), 76 deletions(-)
--
1.8.3.1
5 years, 7 months
[libvirt] [PATCH 0/3] vir*ObjListAddLocked(): Produce better error message than 'Duplicate key'
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (3):
DO NOT APPLY: Simple reproducer for virDomainObjListRemove
virDomainObjListAddLocked: Produce better error message than
'Duplicate key'
virNWFilterBindingObjListAddLocked: Produce better error message than
'Duplicate key'
src/conf/virdomainobjlist.c | 36 +++++++++++++++++-----------
src/conf/virnwfilterbindingobjlist.c | 29 +++++++++++++---------
2 files changed, 40 insertions(+), 25 deletions(-)
--
2.19.2
5 years, 7 months
[libvirt] [PATCH 0/4] qemu: Use PCI by default on RISC-V
by Andrea Bolognani
Now that the patches necessary to enable pcie-root-port usage on
RISC-V have been merged into QEMU, we can go ahead and start using
PCI by default on such guests when appropriate.
The full series, with patch 3/4 in its unabridged form, can be
obtained from
https://github.com/andreabolognani/libvirt/tree/riscv-pci-by-default
Andrea Bolognani (4):
qemu: Require PCIe Root Port for PCI by default on ARM virt
qemu: Unify address assignment for virt guests
tests: Refresh capabilities for QEMU 4.0.0 on RISC-V
news: Document PCI by default on RISC-V
docs/news.xml | 12 +
src/qemu/qemu_domain_address.c | 45 +-
.../caps_4.0.0.riscv32.replies | 3864 ++++++++--------
.../caps_4.0.0.riscv32.xml | 19 +-
.../caps_4.0.0.riscv64.replies | 3876 +++++++++--------
.../caps_4.0.0.riscv64.xml | 19 +-
.../riscv64-virt-headless.riscv64-latest.args | 20 +-
7 files changed, 4206 insertions(+), 3649 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH] virsh.pod: Improve native configuration format doc
by Han Han
Add native guest format of BSD hypervisor and VMware/ESX. Quote native
guest format of domxml-from-native for domxml-to-native.
Signed-off-by: Han Han <hhan(a)redhat.com>
---
tools/virsh.pod | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index a0fe949c55..b3819b9414 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1607,21 +1607,17 @@ Convert the file I<config> in the native guest configuration format
named by I<format> to a domain XML format. For QEMU/KVM hypervisor,
the I<format> argument must be B<qemu-argv>. For Xen hypervisor, the
I<format> argument may be B<xen-xm>, B<xen-xl>, or B<xen-sxpr>. For
-LXC hypervisor, the I<format> argument must be B<lxc-tools>.
+LXC hypervisor, the I<format> argument must be B<lxc-tools>. For
+VMware/ESX hypervisor, the I<format> argument must be B<vmware-vmx>.
+For the BSD hypervisor, the I<format> argument must be B<bhyve-argv>.
=item B<domxml-to-native> I<format>
{ [I<--xml>] I<xml> | I<--domain> I<domain-name-or-id-or-uuid> }
Convert the file I<xml> into domain XML format or convert an existing
I<--domain> to the native guest configuration format named by I<format>.
-The I<xml> and I<--domain> arguments are mutually exclusive.
-
-For the QEMU/KVM hypervisor, the I<format> argument must be B<qemu-argv>.
-
-For the Xen hypervisor, the I<format> argument may be B<xen-xm>, B<xen-xl>,
-or B<xen-sxpr>.
-
-For the LXC hypervisor, the I<format> argument must be B<lxc-tools>.
+The I<xml> and I<--domain> arguments are mutually exclusive. For the types
+of I<format> argument, refer to B<domxml-from-native>.
=item B<dump> I<domain> I<corefilepath> [I<--bypass-cache>]
{ [I<--live>] | [I<--crash>] | [I<--reset>] } [I<--verbose>] [I<--memory-only>]
--
2.20.1
5 years, 7 months
[libvirt] [PATCH] qemu_hotplug: Remove virQEMUDriverPtr arguments
by Suyang Chen
Since commit 2e6ecba1bcac, the pointer to the qemu driver is saved in
domain object's private data and hence does not have to be passed as
yet another parameter if domain object is already one of them.
This just changed qemuDomainChangeDiskLive and
qemuDomainChangeEjectableMedia functions
Signed-off-by: Suyang Chen <dawson0xff(a)gmail.com>
---
src/qemu/qemu_driver.c | 5 ++---
src/qemu/qemu_hotplug.c | 29 ++++++++++++++---------------
src/qemu/qemu_hotplug.h | 3 +--
3 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b27c6ce98e..5d064030e9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8100,7 +8100,6 @@ qemuDomainDetachDeviceLive(virDomainObjPtr vm,
static int
qemuDomainChangeDiskLive(virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
- virQEMUDriverPtr driver,
bool force)
{
virDomainDiskDefPtr disk = dev->data.disk;
@@ -8136,7 +8135,7 @@ qemuDomainChangeDiskLive(virDomainObjPtr vm,
goto cleanup;
}
- if (qemuDomainChangeEjectableMedia(driver, vm, orig_disk,
+ if (qemuDomainChangeEjectableMedia(vm, orig_disk,
dev->data.disk->src, force) < 0)
goto cleanup;
@@ -8165,7 +8164,7 @@ qemuDomainUpdateDeviceLive(virDomainObjPtr vm,
switch ((virDomainDeviceType)dev->type) {
case VIR_DOMAIN_DEVICE_DISK:
qemuDomainObjCheckDiskTaint(driver, vm, dev->data.disk, NULL);
- ret = qemuDomainChangeDiskLive(vm, dev, driver, force);
+ ret = qemuDomainChangeDiskLive(vm, dev, force);
break;
case VIR_DOMAIN_DEVICE_GRAPHICS:
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 41d60277d1..4bcec0e982 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -844,14 +844,13 @@ qemuDomainChangeMediaBlockdev(virQEMUDriverPtr driver,
* Returns 0 on success, -1 on error and reports libvirt error
*/
int
-qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+qemuDomainChangeEjectableMedia(virDomainObjPtr vm,
virDomainDiskDefPtr disk,
virStorageSourcePtr newsrc,
bool force)
{
- virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
qemuDomainObjPrivatePtr priv = vm->privateData;
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(priv->driver);
virStorageSourcePtr oldsrc = disk->src;
bool sharedAdded = false;
int ret = -1;
@@ -862,27 +861,27 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
if (virDomainDiskTranslateSourcePool(disk) < 0)
goto cleanup;
- if (qemuAddSharedDisk(driver, disk, vm->def->name) < 0)
+ if (qemuAddSharedDisk(priv->driver, disk, vm->def->name) < 0)
goto cleanup;
sharedAdded = true;
- if (qemuDomainDetermineDiskChain(driver, vm, disk, NULL, true) < 0)
+ if (qemuDomainDetermineDiskChain(priv->driver, vm, disk, NULL, true) < 0)
goto cleanup;
if (qemuDomainPrepareDiskSource(disk, priv, cfg) < 0)
goto cleanup;
- if (qemuHotplugPrepareDiskSourceAccess(driver, vm, newsrc, false) < 0)
+ if (qemuHotplugPrepareDiskSourceAccess(priv->driver, vm, newsrc, false) < 0)
goto cleanup;
- if (qemuHotplugAttachManagedPR(driver, vm, newsrc, QEMU_ASYNC_JOB_NONE) < 0)
+ if (qemuHotplugAttachManagedPR(priv->driver, vm, newsrc, QEMU_ASYNC_JOB_NONE) < 0)
goto cleanup;
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV))
- rc = qemuDomainChangeMediaBlockdev(driver, vm, disk, oldsrc, newsrc, force);
+ rc = qemuDomainChangeMediaBlockdev(priv->driver, vm, disk, oldsrc, newsrc, force);
else
- rc = qemuDomainChangeMediaLegacy(driver, vm, disk, newsrc, force);
+ rc = qemuDomainChangeMediaLegacy(priv->driver, vm, disk, newsrc, force);
virDomainAuditDisk(vm, oldsrc, newsrc, "update", rc >= 0);
@@ -891,8 +890,8 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
/* remove the old source from shared device list */
disk->src = oldsrc;
- ignore_value(qemuRemoveSharedDisk(driver, disk, vm->def->name));
- ignore_value(qemuHotplugPrepareDiskSourceAccess(driver, vm, oldsrc, true));
+ ignore_value(qemuRemoveSharedDisk(priv->driver, disk, vm->def->name));
+ ignore_value(qemuHotplugPrepareDiskSourceAccess(priv->driver, vm, oldsrc, true));
/* media was changed, so we can remove the old media definition now */
virObjectUnref(oldsrc);
@@ -905,13 +904,13 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
/* undo changes to the new disk */
if (ret < 0) {
if (sharedAdded)
- ignore_value(qemuRemoveSharedDisk(driver, disk, vm->def->name));
+ ignore_value(qemuRemoveSharedDisk(priv->driver, disk, vm->def->name));
- ignore_value(qemuHotplugPrepareDiskSourceAccess(driver, vm, newsrc, true));
+ ignore_value(qemuHotplugPrepareDiskSourceAccess(priv->driver, vm, newsrc, true));
}
/* remove PR manager object if unneeded */
- ignore_value(qemuHotplugRemoveManagedPR(driver, vm, QEMU_ASYNC_JOB_NONE));
+ ignore_value(qemuHotplugRemoveManagedPR(priv->driver, vm, QEMU_ASYNC_JOB_NONE));
/* revert old image do the disk definition */
if (oldsrc)
@@ -1315,7 +1314,7 @@ qemuDomainAttachDeviceDiskLive(virQEMUDriverPtr driver,
if ((disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ||
disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) &&
(orig_disk = virDomainDiskFindByBusAndDst(vm->def, disk->bus, disk->dst))) {
- if (qemuDomainChangeEjectableMedia(driver, vm, orig_disk,
+ if (qemuDomainChangeEjectableMedia(vm, orig_disk,
disk->src, false) < 0)
return -1;
diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h
index 7ac03b7810..a60df36f74 100644
--- a/src/qemu/qemu_hotplug.h
+++ b/src/qemu/qemu_hotplug.h
@@ -26,8 +26,7 @@
# include "qemu_domain.h"
# include "domain_conf.h"
-int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+int qemuDomainChangeEjectableMedia(virDomainObjPtr vm,
virDomainDiskDefPtr disk,
virStorageSourcePtr newsrc,
bool force);
--
2.20.1
5 years, 7 months
[libvirt] [PATCH v3 0/6] Facilitate running libvirt builds via docker containers
by Daniel P. Berrangé
For a while QEMU has provided simple make rules for building QEMU inside
standard docker container environments. This provides an equivalent
mechanism for libvirt inspired by QEMU's.
QEMU actually builds the container images on developer's machines
locally. Libvirt already hosts pre-built images on quay.io, so that is
used directly as it is quicker to download them than to build them
locally. This also ensures the container contents match what the live
CI system is using, as opposed to building an image with newer packages.
NB, there is a currently a test failure with this change to travis
that we don't currently see. Current travis runs a privileged
docker container, but with this change we now run unprivileged
containers. This shows that the "virsh-snapshot" test is trying
to create a file under $HOME, and docker blocks this. Obviously
needs fixing before pushing.
Changed in v3:
- Lots of new variables & variable renames
- Rename to top level Makefile.ci
- Rename make targets to have @ separator for the image
- Refactor macOS travis config
Changed in v2:
- Drop cross-compilation patches temporarily. The cross-compiler
images are not yet built on quay.io and rather than creating and
bulding many more images manually, I'm working on script to
automate setup of quay.io images
- Many changes to the make rules to make it possible to use them
from Travis CI to match its currently testing setup
- Modify Travis CI config to use the new make rules for consistency
Daniel P. Berrangé (6):
tests: don't abort in fopen(/proc/mounts)
tests: add targets for building libvirt inside docker containers
travis: convert ubuntu, centos & mingw builds to use new make rules
travis: use declarative syntax for homebrew packages
travis: remove display of test-suite.log from macOS
travis: put macOS script inline in the macOS matrix entry
.gitignore | 1 +
.travis.yml | 78 +++++-----------
Makefile.am | 2 +
Makefile.ci | 206 ++++++++++++++++++++++++++++++++++++++++++
tests/vircgroupmock.c | 6 +-
5 files changed, 235 insertions(+), 58 deletions(-)
create mode 100644 Makefile.ci
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/7] qemu: Improve JSON handling in monitor interactions
by Peter Krempa
Remove a few unnecessary copies of the JSON string as well as duplicate
and unneeded debug logs.
Peter Krempa (7):
util: buffer: Remove struct member munging
util: buffer: Use 'size_t' for buffer size variables
util: json: Use virBuffer in JSON->string conversion
util: json: Don't bother logging output string in virJSONValueToString
util: json: Export virJSONValueToBuffer
qemu: monitor: Remove few debug statements
qemu: monitor: Avoid unnecessary copies of command string
src/libvirt_private.syms | 1 +
src/qemu/qemu_monitor_json.c | 19 ++++++++-----------
src/util/virbuffer.c | 14 +-------------
src/util/virbuffer.h | 18 +++++++-----------
src/util/virjson.c | 33 ++++++++++++++++++++++++---------
src/util/virjson.h | 5 +++++
tests/virbuftest.c | 4 +++-
7 files changed, 49 insertions(+), 45 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH v6 00/33] BaselineHypervisorCPU using QEMU QMP exchanges
by Chris Venteicher
Some architectures (S390) depend on QEMU to compute baseline CPU model and
expand a models feature set.
Interacting with QEMU requires starting the QEMU process and completing one or
more query-cpu-model-baseline QMP exchanges with QEMU in addition to a
query-cpu-model-expansion QMP exchange to expand all features in the model.
See "s390x CPU models: exposing features" patch set on Qemu-devel for discussion
of QEMU aspects.
This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999
-----
v6 addresses these issues from v5:
qemu_process: Move process code from qemu_capabilities to qemu_process
[x] Remove exception statement from commit message
qemu_process: Use qemuProcessQmp prefix
[x] s/ProcessQmp/ProcessQMP/ in this and all subsequent patches
qemu_process: Refer to proc not cmd in process code
[x] Back port indentation fix in qemuProcessQMPRun
qemu_capabilities: Stop QEMU process before freeing
[x] Back port !proc check in qemuProcessQmpStop
qemu_process: Use qemuProcessQmp struct for a single process
[x] Remove extra empty lines
qemu_process: All ProcessQMP errors are fatal
[x] Split into multiple patches
qemu_process: Introduce qemuProcessQmpStart
[x] Log function parameters separately in the first function debug message
[x] Removed NULLSTR check on proc-binary (would fail previously on proc activate)
[x] Back port referring to stderr rather than qmperr in comment
[ ] Combine qemuProcessQmpStop and qemuProcessQmpFree (See reply to v5 email)
emu_process: Collect monitor code in single function
[x] Back port qemuMonitorOpen indent fix to earlier patch
qemu_process: Don't open monitor if process failed
[x] Drop patch
qemu_process: Cleanup qemuProcessQmp alloc function
[x] s/Qemu/QEMU/ in comments for qemuProcessQMPNew
[x] Remove unneeded use of NULLSTR and NULL check before calling qemuProcessQmpFree
qemu_process: Cleanup qemuProcessQmpStop function
[x] Remove lines from from commit message
[x] Remove capitalization from comment
[x] Fix func def to match coding style
[x] Back port !proc check to earlier patch
qemu_process: Catch process free before process stop
[x] Remove capitalization from comment
[x] Don't do proc NULL check in VIR_DEBUG
[ ] Combine qemuProcessQmpStop and qemuProcessQmpFree (See reply to v5 email)
qemu_monitor: Make monitor callbacks optional
[x] Drop patch
qemu_process: Enter QMP command mode when starting QEMU Process
[ ] Don't call qemuMonitorSetCapabilities in qemuProcessQMPConnectMonitor (See reply to v5 email)
qemu_process: Use unique directories for QMP processes
[x] s/qemu./qmp-/ for QMP process directory name prefix
[x] Catch mkdtemp returns NULL
qemu_process: Stop locking QMP process monitor immediately
[x] Drop patch
qemu_monitor: Introduce qemuMonitorCPUModelInfoNew
[x] Use qemuMonitorCPUModelInfoNew to set model name
[x] Drop variable initialization
[x] Use qemuMonitorCPUModelInfoNew in qemuMonitorJSONGetCPUModelExpansion (Pull forward)
[ ] Remove orig NULL check (Unit tests fail if I do this)
qemu_monitor: Introduce qemuMonitorCPUModelInfo / JSON conversion
[x] Make variable initialization easier to read in PropAdd
[x] Require at least one "prop" (don't allow zero in this commit)
qemu_capabilities: Introduce virQEMuCapsMigratablePropsDiff
[x] Remove template txt in commit message
[x] Change function name
[x] Distinguish nmProp from mProp
[x] Don't set cpuData->info to NULL
[ ] Don't use tmp (defer to next patch set... out of time)
qemu_monitor: qemuMonitorGetCPUModelExpansion inputs and outputs CPUModelInfo
[x] Remove extra line from commit message
[x] Change parameter order
[x] Don't use VIR_STEAL_PTR
qemu_capabilities: Introduce CPUModelInfo to virCPUDef function
[x] Change comment
[x] Change parameter order
[x] Separate lines
[x] Move debug message before alloc
[x] Back port function spacing fix from next patch
qemu_capabilities: Introduce virCPUDef to CPUModelInfo function
[x] Change comment
[x] Move debug message before alloc
[x] Remove NULL check on feature->name
[x] Document prop value semantics
Reviewed in v5 but no changes required:
qemu_process: Limit qemuProcessQmpNew to const input strings
qemu_process: Use consistent name for stop process function
qemu_process: Persist stderr in qemuProcessQmp struct
qemu_process: Store libDir in qemuProcessQmp struct
qemu_process: Setup paths within qemuProcessQmpInit
qemu_process: Stop retaining Monitor config in qemuProcessQmp
Not reviewed in v5:
qemu_monitor: Support query-cpu-model-baseline QMP command
qemu_driver: Consolidate code to baseline using libvirt
qemu_driver: Decouple code for baseline using libvirt
qemu_driver: Identify using libvirt as a distinct way to compute baseline
qemu_driver: Support baseline calculation using QEMU
qemu_driver: Support feature expansion via QEMU when baselining cpu
qemu_driver: Remove unsupported props in expanded hypervisor baseline output
qemu_monitor: Default props to migratable when expanding cpu model
-----
v5:
Fixes all process issues identified here:
https://www.redhat.com/archives/libvir-list/2018-November/msg00349.html
- Make the process code generic (not capabilities specific) for use by
BaselineHypervisorCPU
- Many of the process patches are simple code moves with implementation
changes in other distinct patches
- A thread safe library function creates a unique directory under libDir for each QEMU
process (for QMP messaging) to decouple processes in terms of sockets and
file system footprint.
The remaining (non-process) patches in v4 address all issues in v1-v4 of
'BaselineHypervisorCPU using QEMU QMP exchanges'
Thanks,
Chris
*** BLURB HERE ***
Chris Venteicher (33):
qEmu_process: Move process code from qemu_capabilities to qemu_process
qemu_process: Use qemuProcessQMP prefix
qemu_process: Limit qemuProcessQMPNew to const input strings
qemu_process: Refer to proc not cmd in process code
qemu_process: Use consistent name for stop process function
qemu_capabilities: Stop QEMU process before freeing
qemu_process: Use qemuProcessQMP struct for a single process
qemu_process: All ProcessQMP errors are fatal
qemu_process: Expose process exit status code
qemu_process: Persist stderr in qemuProcessQMP struct
qemu_process: Introduce qemuProcessQMPStart
qemu_process: Collect monitor code in single function
qemu_process: Store libDir in qemuProcessQMP struct
qemu_process: Setup paths within qemuProcessQMPInit
qemu_process: Stop retaining Monitor config in qemuProcessQMP
qemu_process: Cleanup qemuProcessQMP alloc function
qemu_process: Cleanup qemuProcessQMPStop function
qemu_process: Catch process free before process stop
qemu_process: Enter QMP command mode when starting QEMU Process
qemu_process: Use unique directories for QMP processes
qemu_monitor: Introduce qemuMonitorCPUModelInfoNew
qemu_monitor: Introduce qemuMonitorCPUModelInfo / JSON conversion
qemu_capabilities: Introduce virQEMuCapsMigratablePropsCalc
qemu_monitor: qemuMonitorGetCPUModelExpansion inputs and outputs
CPUModelInfo
qemu_capabilities: Introduce CPUModelInfo to virCPUDef function
qemu_capabilities: Introduce virCPUDef to CPUModelInfo function
qemu_monitor: Support query-cpu-model-baseline QMP command
qemu_driver: Consolidate code to baseline using libvirt
qemu_driver: Decouple code for baseline using libvirt
qemu_driver: Identify using libvirt as a distinct way to compute
baseline
qemu_driver: Support baseline calculation using QEMU
qemu_driver: Support feature expansion via QEMU when baselining cpu
qemu_monitor: Default props to migratable when expanding cpu model
src/qemu/qemu_capabilities.c | 631 ++++++++----------
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_driver.c | 216 +++++-
src/qemu/qemu_monitor.c | 165 ++++-
src/qemu/qemu_monitor.h | 29 +-
src/qemu/qemu_monitor_json.c | 223 +++++--
src/qemu/qemu_monitor_json.h | 10 +-
src/qemu/qemu_process.c | 345 ++++++++++
src/qemu/qemu_process.h | 32 +
tests/cputest.c | 11 +-
.../caps_2.10.0.s390x.xml | 60 +-
.../caps_2.11.0.s390x.xml | 58 +-
.../caps_2.12.0.s390x.xml | 56 +-
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 32 +-
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 34 +-
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 64 +-
tests/qemucapabilitiestest.c | 7 +
17 files changed, 1375 insertions(+), 602 deletions(-)
--
2.17.1
5 years, 7 months
[libvirt] [PATCH 0/5] qemu: hotplug: Media change improvements (blockdev-add saga)
by Peter Krempa
First patch is not entirely relevant in this series.
Peter Krempa (5):
qemu: domain: Use VIR_AUTOFREE in
qemuDomainObjPrivateXMLParseBlockjobs
qemu: hotplug: Remove unused copies of virQEMUDriverConfigPtr
qemu: hotplug: Use VIR_AUTOUNREF for virQEMUDriverConfigPtr
qemu: hotplug: Disallow media change while blockjob is active
qemu: domain: Forbid copy_on_read option also for floppies
src/qemu/qemu_domain.c | 23 +++++++++++++------
src/qemu/qemu_hotplug.c | 51 ++++++++++++++++-------------------------
2 files changed, 36 insertions(+), 38 deletions(-)
--
2.20.1
5 years, 7 months