KVM: LAPIC: Micro optimize IPI latency
authorWanpeng Li <wanpengli@tencent.com>
Thu, 5 Sep 2019 06:26:27 +0000 (14:26 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Sep 2019 16:05:29 +0000 (18:05 +0200)
commit2b0911d1311e8f3a3cda472e08df21bcc49a5e61
tree9a70d3e16544d98c19c268db7ff85e17ebce1f4d
parent1cfff4d9a5d01fa61e5768a6afffc81ae1c8ecb9
KVM: LAPIC: Micro optimize IPI latency

This patch optimizes the virtual IPI emulation sequence:

write ICR2                     write ICR2
write ICR                      read ICR2
read ICR            ==>        send virtual IPI
read ICR2                      write ICR
send virtual IPI

It can reduce kvm-unit-tests/vmexit.flat IPI testing latency(from sender
send IPI to sender receive the ACK) from 3319 cycles to 3203 cycles on
SKylake server.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c