]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: support kvm-pv-ipi off
authorzhenwei pi <pizhenwei@bytedance.com>
Wed, 27 Oct 2021 07:04:30 +0000 (15:04 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Nov 2021 14:44:26 +0000 (15:44 +0100)
commitb2757b697e29fa86972a4638a5879dccc8add2ad
tree5cb1fbf7141735ef0b21bac58fbc4ee457b4d98c
parentd7547dbcf3d46baad3677e6dc27d0624a7043dd3
qemu: support kvm-pv-ipi off

QEMU version 3.1 introduced PV_SEND_IPI CPUID feature bit under
commit 7f710c32bb8 (target-i386: adds PV_SEND_IPI CPUID feature bit).

This patch adds a new KVM feature 'pv-ipi' to disable this feature
(enabled by default). Newer CPU platform (Ex, AMD Zen2) supports
hardware accelation for IPI in guest, to use this feature to get
better performance in some scenarios. Detailed about the discussion:
  https://lkml.org/lkml/2021/10/20/423

To disable kvm-pv-ipi and have libvirt add "-cpu host,kvm-pv-ipi=off"
to the QEMU command line, the following XML code needs to be added to the
guest's domain description:

  <features>
    <kvm>
      <pv-ipi state='off'/>
    </kvm>
  </features>

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/formatdomain.rst
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c