Description of problem: The kvm halt poll control support has been introduced since QEMU v4.2: commit d645e13287 Author: Marcelo Tosatti <mtosatti> Date: Mon Jun 3 20:04:08 2019 -0300 kvm: i386: halt poll control MSR support Add support for halt poll control MSR: save/restore, migration and new feature name. The purpose of this MSR is to allow the guest to disable host halt poll. Signed-off-by: Marcelo Tosatti <mtosatti> Message-Id: <20190603230408.GA7938> [Do not enable by default, as pointed out by Mark Kanda. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini> And guest kernel v5.4: commit fa86ee90eb11 Author: Marcelo Tosatti <mtosatti> Date: Wed Jul 3 20:51:25 2019 -0300 add cpuidle-haltpoll driver Add a cpuidle driver that calls the architecture default_idle routine. To be used in conjunction with the haltpoll governor. Signed-off-by: Marcelo Tosatti <mtosatti> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki> It will help improve performance for virtualized guests(See p18 of Stefan Hajnoczi's Optimizing for NVMe Drives: https://vmsplice.net/~stefan/stefanha-kvm-forum-2020.pdf) Expected cpu xml: <cpu ...> <feature policy='require' name='kvm-poll-control'/> </cpu> Current status in libvirt: ➜ ~ virsh start fedora31 error: Failed to start domain fedora31 error: unsupported configuration: unknown CPU feature: kvm-poll-control
https://www.redhat.com/archives/libvir-list/2020-November/msg00686.html
merged upstream: https://gitlab.com/libvirt/libvirt/-/commit/ea21b8b87b9ae72d0d9ebab10a1c5b1480f5a16a
Verify this bug with libvirt-daemon-6.10.0-1.module+el8.4.0+8898+a84e86e1.x86_64: S1: Start guest with cpu feature kvm-poll-control 1. enable poll-control in guest xml: # virsh dumpxml vm1 --inactive .. <features> <acpi/> <apic/> <pae/> <kvm> <poll-control state='on'/> </kvm> </features> .. 2. start guest # virsh start vm1 Domain vm1 started 3. check qemu command line: # ps uax|grep qemu ...,kvm-poll-control=on... 4. destroy guest # virsh destroy vm1 Domain vm1 destroyed 5. disable poll-control in guest xml: <features> <acpi/> <apic/> <pae/> <kvm> <poll-control state='off'/> </kvm> </features> 6. start guest # virsh start vm1 Domain vm1 started 7. check qemu command line and there is no kvm-poll-control: # ps aux|grep qemu |grep kvm-poll-control # echo $? 1
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:2098