public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] KVM: deliver IOAPIC scan request only to the target vCPUs
@ 2019-11-06 13:36 Nitesh Narayan Lal
  2019-11-06 13:36 ` [Patch v1 1/2] KVM: remember position in kvm->vcpus array Nitesh Narayan Lal
  2019-11-06 13:36 ` [Patch v1 2/2] KVM: x86: deliver KVM IOAPIC scan request to target vCPUs Nitesh Narayan Lal
  0 siblings, 2 replies; 7+ messages in thread
From: Nitesh Narayan Lal @ 2019-11-06 13:36 UTC (permalink / raw)
  To: kvm, linux-kernel, pbonzini, mtosatti, rkrcmar, vkuznets,
	sean.j.christopherson, wanpengli, jmattson, joro

IOAPIC scan requests with fixed delivery mode should only be delivered to the vCPUs
specified by the destination ID.
The second patch in this patch-set introduces an additional
kvm_get_dest_vcpus_mask() API which retrieves a bitmap with bits set for each
target vCPUs. This bitmap is later passed on to the kvm_make_vcpus_request_mask().

I have re-used the patch sent by Radim Krčmář, which adds the support to
remember the position of each vCPUs in kvm->vcpus array.
As I needed to find out the vCPUs index in kvm->vcpus array for setting the
bits in the bitmap corresponding to the target vCPUs.

This support will enable us to reduce the latency overhead on isolated
vCPUs caused by the IPI to process due to KVM_REQ_IOAPIC_SCAN. With the current
implementation, the KVM_REQ_IOAPIC_SCAN is flushed on to all the vCPUs even
if it is meant for just one of them.

Testing:
I have added the support for testing IOAPIC logical and physical destination
mode under Fixed Delivery mode to kvm-unit-test and used it to test this patch.
https://patchwork.kernel.org/cover/11230215/

Nitesh Narayan Lal (1):
  KVM: x86: deliver KVM IOAPIC scan request to target vCPUs

Radim Krčmář (1):
  KVM: remember position in kvm->vcpus array

 arch/x86/include/asm/kvm_host.h |  2 ++
 arch/x86/kvm/ioapic.c           | 33 ++++++++++++++++++++++++++++--
 arch/x86/kvm/lapic.c            | 45 +++++++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/lapic.h            |  3 +++
 arch/x86/kvm/x86.c              |  6 ++++++
 include/linux/kvm_host.h        | 13 +++++-------
 virt/kvm/kvm_main.c             | 19 ++++++++++++++++-
 7 files changed, 110 insertions(+), 11 deletions(-)

-- 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-06 16:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-06 13:36 [PATCH v1 0/2] KVM: deliver IOAPIC scan request only to the target vCPUs Nitesh Narayan Lal
2019-11-06 13:36 ` [Patch v1 1/2] KVM: remember position in kvm->vcpus array Nitesh Narayan Lal
2019-11-06 14:43   ` Sean Christopherson
2019-11-06 15:57     ` Nitesh Narayan Lal
2019-11-06 13:36 ` [Patch v1 2/2] KVM: x86: deliver KVM IOAPIC scan request to target vCPUs Nitesh Narayan Lal
2019-11-06 15:14   ` Sean Christopherson
2019-11-06 16:20     ` Nitesh Narayan Lal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox