- remote: fix double free of migration params on error - qemu: avoid deadlock in qemuDomainObjStopWorker We are dropping the only reference here so that the event loop thread is going to be exited synchronously. In order to avoid deadlocks we need to unlock the VM so that any handler being called can finish execution and thus even loop thread be finished too. - virsh: add tmm main command word Add tmm command word into virsh tool to call get tmm memory info API. It makes virsh can use tmm main commmand to show tmm memory info on console. This command requires specific kernel and a kernel driver to make sure its regular function. If runnning environment missing the above reliance, this command will show error result on console. - libvirt: add get tmm memory info API and libvirtd RPC Add the get tmm memory info API into libvirt-host. Also should add the RPC calls into libvirtd for API calling. - libvirt: support the virtCCA feature Add cvm parameter into the type of LaunchSecurity which is a optional filed for libvirt xml. Its purpose is to pass the cvm parameter through to qemu. Also this patch support virsh edit to save cvm parameter into libvirt temporary xml. - qemu_driver: Add calc_mode for dirtyrate statistics - virsh: Add mode option to domdirtyrate-calc virsh api - qemu: Generate command line for dirty-ring-size - qemu: support dirty ring feature - conf: Turn virDomainDef.kvm_features into a struct - qemu_validate: Allow kvm hint-dedicated on non-passthrough VMs - virDomainFeaturesKVMDefParse: Remove tautological "if" - virDomainFeaturesKVMDefParse: Remove tautological "switch" - virxml: Add virXMLPropUInt - virxml: Add virXMLPropInt - virxml: Add virXMLPropTristateSwitch - virxml: Add virXMLPropTristateBool - virDomainFeaturesKVMDefParse: Remove ctxt - virDomainFeaturesDefParse: Factor out KVM parsing into separate function - internal.h: Introduce and use VIR_IS_POW2() - hotpatch: if hotpatch_path not in qemu.conf,the hotpatch doesn't antoload Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
57 lines
2.1 KiB
Diff
57 lines
2.1 KiB
Diff
From 03df55a833efbf60200e2617d285b54afa916325 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Hyman=20Huang=28=E9=BB=84=E5=8B=87=29?=
|
|
<huangy81@chinatelecom.cn>
|
|
Date: Tue, 23 Nov 2021 09:36:59 -0500
|
|
Subject: [PATCH] qemu: Generate command line for dirty-ring-size
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
On QEMU command line it's represented by the dirty-ring-size
|
|
attribute of KVM accelerator.
|
|
|
|
Signed-off-by: Hyman Huang(榛勫媷) <huangy81@chinatelecom.cn>
|
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Reviewed-by: Shaokun Wei <weishaokun@kylinos.cn>
|
|
---
|
|
src/qemu/qemu_command.c | 9 +++++++++
|
|
tests/qemuxml2argvdata/kvm-features.args | 2 +-
|
|
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
index b879f7f39a..9fcea9d46a 100644
|
|
--- a/src/qemu/qemu_command.c
|
|
+++ b/src/qemu/qemu_command.c
|
|
@@ -7295,6 +7295,15 @@ qemuBuildAccelCommandLine(virCommand *cmd,
|
|
|
|
case VIR_DOMAIN_VIRT_KVM:
|
|
virBufferAddLit(&buf, "kvm");
|
|
+ /*
|
|
+ * only handle the kvm case, tcg case use the legacy style
|
|
+ * not that either kvm or tcg can be specified by libvirt
|
|
+ * so do not worry about the conflict of specifying both
|
|
+ * */
|
|
+ if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON &&
|
|
+ def->kvm_features->features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON) {
|
|
+ virBufferAsprintf(&buf, ",dirty-ring-size=%d", def->kvm_features->dirty_ring_size);
|
|
+ }
|
|
break;
|
|
|
|
case VIR_DOMAIN_VIRT_KQEMU:
|
|
diff --git a/tests/qemuxml2argvdata/kvm-features.args b/tests/qemuxml2argvdata/kvm-features.args
|
|
index 07ab9d5224..d70f0d4846 100644
|
|
--- a/tests/qemuxml2argvdata/kvm-features.args
|
|
+++ b/tests/qemuxml2argvdata/kvm-features.args
|
|
@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \
|
|
-name QEMUGuest1 \
|
|
-S \
|
|
-machine pc,usb=off,dump-guest-core=off \
|
|
--accel kvm \
|
|
+-accel kvm,dirty-ring-size=4096 \
|
|
-cpu host,kvm=off,kvm-hint-dedicated=on \
|
|
-m 214 \
|
|
-realtime mlock=off \
|
|
--
|
|
2.27.0
|
|
|