linux/arch/powerpc/kvm
Hollis Blanchard 1b6766c7f3 KVM: ppc: optimize kvm stat handling
Currently we use an unnecessary if&switch to detect some cases.
To be honest we don't need the ligh_exits counter anyway, because we can
calculate it out of others. Sum_exits can also be calculated, so we can
remove that too.
MMIO, DCR  and INTR can be counted on other places without these
additional control structures (The INTR case was never hit anyway).

The handling of BOOKE_INTERRUPT_EXTERNAL/BOOKE_INTERRUPT_DECREMENTER is
similar, but we can avoid the additional if when copying 3 lines of code.
I thought about a goto there to prevent duplicate lines, but rewriting three
lines should be better style than a goto cross switch/case statements (its
also not enough code to justify a new inline function).

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2008-12-31 16:52:23 +02:00
..
44x.c KVM: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor 2008-12-31 16:52:22 +02:00
44x_emulate.c KVM: ppc: refactor instruction emulation into generic and core-specific pieces 2008-12-31 16:52:21 +02:00
44x_tlb.c KVM: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor 2008-12-31 16:52:22 +02:00
44x_tlb.h KVM: ppc: refactor instruction emulation into generic and core-specific pieces 2008-12-31 16:52:21 +02:00
Kconfig KVM: ppc: Refactor powerpc.c to relocate 440-specific code 2008-12-31 16:52:21 +02:00
Makefile KVM: ppc: refactor instruction emulation into generic and core-specific pieces 2008-12-31 16:52:21 +02:00
booke.c KVM: ppc: optimize kvm stat handling 2008-12-31 16:52:23 +02:00
booke.h KVM: ppc: refactor instruction emulation into generic and core-specific pieces 2008-12-31 16:52:21 +02:00
booke_interrupts.S KVM: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor 2008-12-31 16:52:22 +02:00
emulate.c KVM: ppc: adjust vcpu types to support 64-bit cores 2008-12-31 16:52:22 +02:00
powerpc.c KVM: ppc: adjust vcpu types to support 64-bit cores 2008-12-31 16:52:22 +02:00