mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Generate command line for dirty-ring-size
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>
This commit is contained in:
parent
5d18d740d8
commit
359e9f5cf4
@ -7213,6 +7213,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:
|
||||
|
@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-S \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc,usb=off,dump-guest-core=off \
|
||||
-accel kvm \
|
||||
-accel kvm,dirty-ring-size=4096 \
|
||||
-cpu host,kvm=off,kvm-hint-dedicated=on,kvm-poll-control=on \
|
||||
-m 214 \
|
||||
-realtime mlock=off \
|
||||
|
Loading…
Reference in New Issue
Block a user