]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Optimise mmio emulation for devices on FAST_MMIO_BUS
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Thu, 7 Feb 2019 04:56:50 +0000 (15:56 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 19 Feb 2019 05:00:15 +0000 (16:00 +1100)
commit2a544a412b8880490d530ef1a50fa4d147e93619
treed3fec71ef2c8dc2e7a2bb0b5532146e58f4003c0
parent6f101fa7d4b524bd506b460816a6c0125aea9f7d
KVM: PPC: Book3S HV: Optimise mmio emulation for devices on FAST_MMIO_BUS

Devices on the KVM_FAST_MMIO_BUS by definition have length zero and are
thus used for notification purposes rather than data transfer. For
example eventfd for virtio devices.

This means that when emulating mmio instructions which target devices on
this bus we can immediately handle them and return without needing to load
the instruction from guest memory.

For now we restrict this to stores as this is the only use case at
present.

For a normal guest the effect is negligible, however for a nested guest
we save on the order of 5us per access.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_mmu_hv.c