[libvirt] [RFC 0/3] update NVDIMM support
by Luyao Zhong
Hi libvirt experts,
This is the RFC for updating NVDIMM support in libvirt.
QEMU has supported four more properties which libvirt has not introduced
yet, including 'align', 'pmem', 'nvdimm-persistences' and 'unarmed'.
The 'align' property allows users to specify the proper alignment. The
previous alignment can only be 4K because QEMU use pagesize as alignment.
But some backends may require alignments different from the pagesize.
The 'pmem' property allows users to specify whether the backend storage of
memory-backend-file is a real persistent memory. Then QEMU will know if
it needs to guarrantee the write persistence to the vNVDIMM backend.
The 'nvdimm-persistence' property allows users to set platform-supported
features about NVDIMM data persistence of a guest.
The 'unarmed' property allows users to mark vNVDIMM read-only. Only the
device DAX on the real NVDIMM can guarantee the guest write persistence,
so it's suggested to set 'unarmed' option to 'on' and then vNVDIMM device
will be marked as read-only.
Libvirt introduces 'alignsize', 'pmem', 'persistence' and 'unarmed' config
elements into xml corresponding to 'align', 'pmem', 'nvdimm-persistence'
and 'unarmed' properties in QEMU, and update xml parsing, formating and
qemu command-line generating process for NVDIMM.
Thanks,
Zhong, Luyao
Luyao Zhong (3):
xml: introduce more config elements for NVDIMM memory
xml: update xml parsing and formating about NVDIMM memory
qemu: update qemu command-line generating for NVDIMM memory
docs/formatdomain.html.in | 98 +++++++++++++++---
docs/schemas/domaincommon.rng | 31 +++++-
src/conf/domain_conf.c | 115 +++++++++++++++++++--
src/conf/domain_conf.h | 14 +++
src/libvirt_private.syms | 2 +
src/qemu/qemu_command.c | 25 +++++
.../memory-hotplug-nvdimm-align.args | 31 ++++++
.../memory-hotplug-nvdimm-align.xml | 58 +++++++++++
.../memory-hotplug-nvdimm-persistence.args | 31 ++++++
.../memory-hotplug-nvdimm-persistence.xml | 58 +++++++++++
.../memory-hotplug-nvdimm-pmem.args | 31 ++++++
.../memory-hotplug-nvdimm-pmem.xml | 58 +++++++++++
.../memory-hotplug-nvdimm-unarmed.args | 31 ++++++
.../memory-hotplug-nvdimm-unarmed.xml | 58 +++++++++++
tests/qemuxml2argvtest.c | 12 +++
.../memory-hotplug-nvdimm-align.xml | 1 +
.../memory-hotplug-nvdimm-persistence.xml | 1 +
.../memory-hotplug-nvdimm-pmem.xml | 1 +
.../memory-hotplug-nvdimm-unarmed.xml | 1 +
tests/qemuxml2xmltest.c | 4 +
20 files changed, 636 insertions(+), 25 deletions(-)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-persistence.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-persistence.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-unarmed.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-align.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-persistence.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-unarmed.xml
--
2.7.4
6 years
[libvirt] [PATCH v3] qemu: agent: Avoid agentError when closing the QEMU agent
by Wang Yechao
The commit 89563efc0209b854d2b2e554423423d7602acdbd fix the
monitor error when closing the QEMU monitor. The QEMU agent
has a problem similar to QEMU monitor. So fix the QEMU agent
with the same method.
Signed-off-by: Wang Yechao <wang.yechao255(a)zte.com.cn>
---
Changes in v3:
- change the commit messages
---
src/qemu/qemu_agent.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 97ad0e7..d842b0e 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -530,6 +530,9 @@ static void qemuAgentUpdateWatch(qemuAgentPtr mon)
VIR_EVENT_HANDLE_HANGUP |
VIR_EVENT_HANDLE_ERROR;
+ if (!mon->watch)
+ return;
+
if (mon->lastError.code == VIR_ERR_OK) {
events |= VIR_EVENT_HANDLE_READABLE;
@@ -555,6 +558,12 @@ qemuAgentIO(int watch, int fd, int events, void *opaque)
VIR_DEBUG("Agent %p I/O on watch %d fd %d events %d", mon, watch, fd, events);
#endif
+ if (mon->fd == -1 || mon->watch == 0) {
+ virObjectUnlock(mon);
+ virObjectUnref(mon);
+ return;
+ }
+
if (mon->fd != fd || mon->watch != watch) {
if (events & (VIR_EVENT_HANDLE_HANGUP | VIR_EVENT_HANDLE_ERROR))
eof = true;
@@ -788,8 +797,10 @@ void qemuAgentClose(qemuAgentPtr mon)
virObjectLock(mon);
if (mon->fd >= 0) {
- if (mon->watch)
+ if (mon->watch) {
virEventRemoveHandle(mon->watch);
+ mon->watch = 0;
+ }
VIR_FORCE_CLOSE(mon->fd);
}
--
1.8.3.1
6 years
[libvirt] [PATCH v3 0/6] Add authorization support to all network services
by Daniel P. Berrangé
v1: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg04482.html
v2: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg05727.html
This series builds on the core authorization framework:
v5: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg01613.html
enabling its use with the VNC, chardev, NBD and migration network servers.
In combination with TLS x509 client certificates, this allows these
services to whitelist specific clients, which avoids the need to setup
restricted child certificate authorities.
In VNC it also allows whitelisting based on SASL user names.
Changed in v3:
- Rebased to latest git master
Changed in v2:
- Document that authz objects are resolved at time of use, not
time of network service activation
- Improve docs for tls-authz parameters on services
- Fix 2.13 -> 3.0 version tags
- Remove redundant conditionals around g_strdup
- Fix arg syntax for qemu-nbd s/-/--/
- Remove QAPI (optional) annotation
- Fix some outdated usage example
Based-on: <20181009130442.26296-1-berrange(a)redhat.com>
Daniel P. Berrangé (6):
qemu-nbd: add support for authorization of TLS clients
nbd: allow authorization with nbd-server-start QMP command
migration: add support for a "tls-authz" migration parameter
chardev: add support for authorization for TLS clients
vnc: allow specifying a custom authorization object name
monitor: deprecate acl_show, acl_reset, acl_policy, acl_add,
acl_remove
blockdev-nbd.c | 11 +++++---
chardev/char-socket.c | 11 +++++++-
chardev/char.c | 3 +++
hmp.c | 11 +++++++-
include/block/nbd.h | 4 +--
migration/migration.c | 8 ++++++
migration/tls.c | 2 +-
monitor.c | 23 +++++++++++++++++
nbd/server.c | 10 ++++----
qapi/block.json | 8 +++++-
qapi/char.json | 6 +++++
qapi/migration.json | 14 ++++++++++-
qemu-deprecated.texi | 11 ++++++++
qemu-nbd.c | 13 +++++++++-
qemu-nbd.texi | 4 +++
qemu-options.hx | 44 +++++++++++++++++++++++---------
ui/vnc.c | 58 ++++++++++++++++++++++++++++++++++++-------
17 files changed, 204 insertions(+), 37 deletions(-)
--
2.17.1
6 years
[libvirt] [PATCH] libvirt: add daemon itself as shutdown reason
by Nikolay Shirokovskiy
Let's introduce shutdown reason "daemon" which means we have to
kill running domain ourselves as the best action we can take at
that moment. Failure to pick up domain on daemon restart is
one example of such case. Using reason "crashed" is a bit misleading
as it is used when qemu is actually crashed or qemu destroyed on
guest panic as result of user choice that is the problem was
in qemu/guest itself. So I propose to use "crashed" only for
qemu side issues and introduce "daemon" when we have to kill the qemu
for good.
There is another example where "daemon" will be useful. If we can
not reboot domain we kill it and got "crashed" reason now. Looks
like good candidate for "daemon" reason.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
include/libvirt/libvirt-domain.h | 1 +
src/conf/domain_conf.c | 3 ++-
src/qemu/qemu_process.c | 11 ++++-------
tools/virsh-domain-monitor.c | 3 ++-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index fdd2d6b..11fdab5 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -145,6 +145,7 @@ typedef enum {
VIR_DOMAIN_SHUTOFF_FAILED = 6, /* domain failed to start */
VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT = 7, /* restored from a snapshot which was
* taken while domain was shutoff */
+ VIR_DOMAIN_SHUTOFF_DAEMON = 8, /* daemon have to kill domain */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_SHUTOFF_LAST
# endif
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9911d56..e441723 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -779,7 +779,8 @@ VIR_ENUM_IMPL(virDomainShutoffReason, VIR_DOMAIN_SHUTOFF_LAST,
"migrated",
"saved",
"failed",
- "from snapshot")
+ "from snapshot",
+ "daemon")
VIR_ENUM_IMPL(virDomainCrashedReason, VIR_DOMAIN_CRASHED_LAST,
"unknown",
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e9c7618..c4bc9ca 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7988,15 +7988,12 @@ qemuProcessReconnect(void *opaque)
/* We can't get the monitor back, so must kill the VM
* to remove danger of it ending up running twice if
* user tries to start it again later
- * If we couldn't get the monitor since QEMU supports
- * no-shutdown, we can safely say that the domain
- * crashed ... */
- state = VIR_DOMAIN_SHUTOFF_CRASHED;
- /* If BeginJob failed, we jumped here without a job, let's hope another
+ * If BeginJob failed, we jumped here without a job, let's hope another
* thread didn't have a chance to start playing with the domain yet
* (it's all we can do anyway).
*/
- qemuProcessStop(driver, obj, state, QEMU_ASYNC_JOB_NONE, stopFlags);
+ qemuProcessStop(driver, obj, VIR_DOMAIN_SHUTOFF_DAEMON,
+ QEMU_ASYNC_JOB_NONE, stopFlags);
}
goto cleanup;
}
@@ -8035,7 +8032,7 @@ qemuProcessReconnectHelper(virDomainObjPtr obj,
* is no thread that could be doing anything else with the same domain
* object.
*/
- qemuProcessStop(src->driver, obj, VIR_DOMAIN_SHUTOFF_FAILED,
+ qemuProcessStop(src->driver, obj, VIR_DOMAIN_SHUTOFF_DAEMON,
QEMU_ASYNC_JOB_NONE, 0);
qemuDomainRemoveInactiveJobLocked(src->driver, obj);
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 3a26363..f0ad558 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -212,7 +212,8 @@ VIR_ENUM_IMPL(virshDomainShutoffReason,
N_("migrated"),
N_("saved"),
N_("failed"),
- N_("from snapshot"))
+ N_("from snapshot"),
+ N_("daemon"))
VIR_ENUM_DECL(virshDomainCrashedReason)
VIR_ENUM_IMPL(virshDomainCrashedReason,
--
1.8.3.1
6 years
[libvirt] [PATCH v3 00/13] Implement alternative metadata locking
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2018-October/msg00667.html
diff to v2:
- Introduced two new patches (1/13 and 2/13) so that even non-Linux
platforms are covered
- In 4/13 I switched from indefinite wait for lock to a lock with
timeout (of 10 seconds). This is basically to prevent us stalling if
some app misbehaves and holds the file locked for eternity.
Michal Prívozník (13):
virprocess: Introduce virProcessRunInFork
virprocess: Make virProcessRunInMountNamespace use virProcessRunInFork
security: Always spawn process for transactions
security_manager: Rework metadata locking
Revert "security_manager: Load lock plugin on init"
Revert "qemu_conf: Introduce metadata_lock_manager"
Revert "lock_manager: Allow disabling configFile for
virLockManagerPluginNew"
Revert "lock_driver: Introduce VIR_LOCK_MANAGER_ACQUIRE_ROLLBACK"
Revert "lock_driver: Introduce
VIR_LOCK_MANAGER_RESOURCE_TYPE_METADATA"
Revert "_virLockManagerLockDaemonPrivate: Move @hasRWDisks into dom
union"
Revert "lock_driver: Introduce new
VIR_LOCK_MANAGER_OBJECT_TYPE_DAEMON"
Revert "lock_driver_lockd: Introduce
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_METADATA flag"
Revert "virlockspace: Allow caller to specify start and length offset
in virLockSpaceAcquireResource"
cfg.mk | 4 +-
src/libvirt_private.syms | 1 +
src/locking/lock_daemon_dispatch.c | 11 +-
src/locking/lock_driver.h | 12 -
src/locking/lock_driver_lockd.c | 421 ++++++++++-------------------
src/locking/lock_driver_lockd.h | 1 -
src/locking/lock_driver_sanlock.c | 44 +--
src/locking/lock_manager.c | 10 +-
src/lxc/lxc_controller.c | 3 +-
src/lxc/lxc_driver.c | 2 +-
src/qemu/qemu_conf.c | 1 -
src/qemu/qemu_conf.h | 1 -
src/qemu/qemu_driver.c | 3 -
src/security/security_dac.c | 12 +-
src/security/security_manager.c | 250 +++++++++--------
src/security/security_manager.h | 19 +-
src/security/security_selinux.c | 11 +-
src/util/virlockspace.c | 15 +-
src/util/virlockspace.h | 4 -
src/util/virprocess.c | 69 ++++-
src/util/virprocess.h | 16 ++
tests/seclabeltest.c | 2 +-
tests/securityselinuxlabeltest.c | 2 +-
tests/securityselinuxtest.c | 2 +-
tests/testutilsqemu.c | 2 +-
tests/virlockspacetest.c | 29 +-
26 files changed, 387 insertions(+), 560 deletions(-)
--
2.18.1
6 years
[libvirt] [PATCHv7 00/18] Introduce x86 Cache Monitoring Technology (CMT)
by Wang Huaqiang
This series of patches and the series already been merged introduce
the x86 Cache Monitoring Technology (CMT) to libvirt by interacting
with kernel resource control (resctrl) interface. CMT is one of the
Intel(R) x86 CPU feature which belongs to the Resource Director
Technology (RDT). CMT reports the occupancy of the last level cache,
which is shared by all CPU cores.
In the v1 series, an original and complete feature for CMT was introduced
The v2 and v3 patches address the feature for the host capability of CMT.
v4 is addressing the feature for monitoring VM vcpu thread set cache
occupancy and reporting it through a virsh command.
We have serval discussion about the enabling of CMT, please refer to
following links for the RFCs.
RFCv3
https://www.redhat.com/archives/libvir-list/2018-August/msg01213.html
RFCv2
https://www.redhat.com/archives/libvir-list/2018-July/msg00409.html
https://www.redhat.com/archives/libvir-list/2018-July/msg01241.html
RFCv1
https://www.redhat.com/archives/libvir-list/2018-June/msg00674.html
And the merged commits are list as below, for host capability of CMT.
6af8417415508c31f8ce71234b573b4999f35980
8f6887998bf63594ae26e3db18d4d5896c5f2cb4
58fcee6f3a2b7e89c21c1fb4ec21429c31a0c5b8
12093f1feaf8f5023dcd9d65dff111022842183d
a5d293c18831dcf69ec6195798387fbb70c9f461
1. About reason why CMT is necessary in libvirt?
The perf events of 'CMT, MBML, MBMT' have been phased out since Linux
kernel commit c39a0e2c8850f08249383f2425dbd8dbe4baad69, in libvirt
the perf based cmt,mbm will not work with the latest linux kernel. These
patches add CMT feature to libvirt through kernel resctrlfs interface.
2 Create cache monitoring group (cache monitor).
The main interface for creating monitoring group is through XML file. The
proposed configuration is like:
<cputune>
<cachetune vcpus='1'>
<cache id='0' level='3' type='code' size='7680' unit='KiB'/>
<cache id='1' level='3' type='data' size='3840' unit='KiB'/>
+ <monitor level='3' vcpus='1'/>
</cachetune>
<cachetune vcpus='4-7'>
+ <monitor level='3' vcpus='4-6'/>
</cachetune>
</cputune>
In above XML, created 2 cache resctrl allocation groups and 2 resctrl
monitoring groups.
The changes of cache monitor will be effective in next booting of VM.
2 Show CMT result through command 'domstats'
Adding the interface in qemu to report this information for resource
monitor group through command 'virsh domstats --cpu-total'.
Below is a typical output:
# virsh domstats 1 --cpu-total
Domain: 'ubuntu16.04-base'
...
cpu.cache.monitor.count=2
cpu.cache.monitor.0.name=vcpus_1
cpu.cache.monitor.0.vcpus=1
cpu.cache.monitor.0.bank.count=2
cpu.cache.monitor.0.bank.0.id=0
cpu.cache.monitor.0.bank.0.bytes=4505600
cpu.cache.monitor.0.bank.1.id=1
cpu.cache.monitor.0.bank.1.bytes=5586944
cpu.cache.monitor.1.name=vcpus_4-6
cpu.cache.monitor.1.vcpus=4,5,6
cpu.cache.monitor.1.bank.count=2
cpu.cache.monitor.1.bank.0.id=0
cpu.cache.monitor.1.bank.0.bytes=17571840
cpu.cache.monitor.1.bank.1.id=1
cpu.cache.monitor.1.bank.1.bytes=29106176
Changes in v7:
- Add several lines removed by mistake.
Changes in v6:
- Addressing John's review comments for v5.
- Removed and cleaned the concepts of 'default allocation' and
'default monitor'.
- qemu: virsh domstats --cpu-total output for CMT, add identifier
'monitor' for each itm.
Changes in v5:
- qemu: Setting up vcpu and adding pids to resctrl monitor groups during
re-connection.
- Add the document for domain configuration related to resctrl monitor.
Changes in v4:
v4 is addressing the feature for monitoring VM vcpu
thread set cache occupancy and reporting it through a
virsh command.
- Introduced resctrl default allocation
- Introduced resctrl monitor and default monitor
Changes in v3:
- Addressed John Ferlan's review.
- Typo fixed.
- Removed VIR_ENUM_DECL(virMonitor);
Changes in v2:
- Introduced MBM capability.
- Capability layout changed
* Moved <monitor> from cahe <bank> to <cache>
* Renamed <Threshold> to <reuseThreshold>
- Document for 'reuseThreshold' changed.
- Introduced API virResctrlInfoGetMonitorPrefix
- Added more tests, covering standalone CMT, fake new
feature.
- Creating CMT resource control group will be
subsequent job.
Wang Huaqiang (18):
docs,util: Refactor schemas and virresctrl to support optional cache
util: Introduce resctrl monitor for CMT
util: Refactor code for determining allocation path
util: Add interface to determine monitor path
util: Refactor code for adding PID to the resource group
util: Add interface for adding PID to the monitor
util: Refactor code for creating resctrl group
util: Add interface for creating monitor group
util: Add more interfaces for resctrl monitor
conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew
conf: move virResctrlAllocIsEmpty to a place a litter lower
conf: Introduce cache monitor element in cachetune
qemu: enable resctrl monitor in qemu
util: Add function for checking if monitor is running
conf: Add 'id' to virDomainResctrlDef
qemu: refactor qemuDomainGetStatsCpu
qemu: Report cache occupancy (CMT) with domstats
qemu: Setting up vcpu and adding pids to resctrl monitor groups during
reconnection
docs/formatdomain.html.in | 30 +-
docs/schemas/domaincommon.rng | 14 +-
src/conf/domain_conf.c | 310 ++++++++++--
src/conf/domain_conf.h | 12 +
src/libvirt-domain.c | 9 +
src/libvirt_private.syms | 11 +
src/qemu/qemu_driver.c | 270 +++++++++-
src/qemu/qemu_process.c | 69 ++-
src/util/virresctrl.c | 560 +++++++++++++++++++--
src/util/virresctrl.h | 49 ++
tests/genericxml2xmlindata/cachetune-cdp.xml | 3 +
.../cachetune-colliding-monitor.xml | 30 ++
tests/genericxml2xmlindata/cachetune-small.xml | 7 +
tests/genericxml2xmltest.c | 2 +
14 files changed, 1283 insertions(+), 93 deletions(-)
create mode 100644 tests/genericxml2xmlindata/cachetune-colliding-monitor.xml
--
2.7.4
6 years
[libvirt] [PATCH v2 0/3] Add "memfd" memory backing type
by marcandre.lureau@redhat.com
From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Hi,
This is an alternative series from "[PATCH 0/5] Use memfd if
possible". Instead of automatically using memfd for anonymous memory
when available (as suggested by Daniel), it introduces the "memfd"
memory backing type.
Although using memfd transparently when possible is a good idea, it is
a source of various complications for migration & save/restore. This
could eventually be challenged in a different series.
The first two patches have been modified and reviewed by John
Ferlan. Hopefully they can be merged early, regardless of the last
patch outcome, to avoid the painful rebase conflicts due to
capabilities checks introduction.
Thanks
Marc-André Lureau (3):
qemu: add memory-backend-memfd capability check
qemu: check memory-backend-memfd.hugetlb capability
qemu: add memfd source type
docs/formatdomain.html.in | 9 +-
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 10 ++
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 69 +++++++----
src/qemu/qemu_domain.c | 12 +-
.../caps_2.12.0.aarch64.replies | 94 ++++++++++++---
.../caps_2.12.0.aarch64.xml | 4 +-
.../caps_2.12.0.ppc64.replies | 90 +++++++++++---
.../caps_2.12.0.ppc64.xml | 4 +-
.../caps_2.12.0.s390x.replies | 98 ++++++++++++----
.../caps_2.12.0.s390x.xml | 4 +-
.../caps_2.12.0.x86_64.replies | 110 +++++++++++++-----
.../caps_2.12.0.x86_64.xml | 4 +-
.../caps_3.0.0.ppc64.replies | 90 +++++++++++---
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 4 +-
.../caps_3.0.0.riscv32.replies | 86 +++++++++++---
.../caps_3.0.0.riscv32.xml | 2 +
.../caps_3.0.0.riscv64.replies | 86 +++++++++++---
.../caps_3.0.0.riscv64.xml | 2 +
.../caps_3.0.0.x86_64.replies | 110 +++++++++++++-----
.../caps_3.0.0.x86_64.xml | 4 +-
.../memfd-memory-numa.x86_64-latest.args | 34 ++++++
tests/qemuxml2argvdata/memfd-memory-numa.xml | 36 ++++++
tests/qemuxml2argvtest.c | 2 +
27 files changed, 788 insertions(+), 183 deletions(-)
create mode 100644 tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/memfd-memory-numa.xml
--
2.19.0
6 years
[libvirt] [PATCH 0/3] qemu: don't duplicate suspended events and state changes
by Nikolay Shirokovskiy
This patch series is similar in implementation to [1] but the motivation
is simply to avoid suspended event duplication.
[1] https://www.redhat.com/archives/libvir-list/2018-September/msg01304.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 suspended 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 | 37 +++++++++++++++++++++++++------------
6 files changed, 75 insertions(+), 75 deletions(-)
--
1.8.3.1
6 years
[libvirt] [PATCH] qemu: snapshot: better error for active external readonly disk
by Nikolay Shirokovskiy
External snapshot of readonly disk of active domain is impossible but error
message [1] is cryptic (it's source is qemu). Let's make error message more
user friendly.
The problem is libvirtd precreates snapshot image with no write permission which
is not expected by qemu.
[1] current error message
error: internal error: unable to execute QEMU command 'transaction':
Could not create file: Permission denied
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
By the way if domain is not active then snapshot is possible. However top image
will have write permissions after snapshot. We can make snapshot work for
active domain I guess if we precreate writable snapshot image, but then we end
up running readonly disk on writable image. Also making snapshot of readonly
disk is not that practical so let's just fix error message for now.
src/qemu/qemu_driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a52e249..e75931e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14683,6 +14683,14 @@ qemuDomainSnapshotPrepare(virDomainObjPtr vm,
active, reuse) < 0)
goto cleanup;
+ if (dom_disk->src->readonly && active) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("external snapshot for readonly disk %s "
+ "of active domain is not supported"),
+ disk->name);
+ goto cleanup;
+ }
+
external++;
break;
--
1.8.3.1
6 years