[PATCH v6 2/6] arm: KVM: Introduce host fp/simd context switch function

2015-12-26 Thread Mario Smarduch
Add fp/simd context switch function callable from host kernel mode. Signed-off-by: Mario Smarduch --- arch/arm/kvm/Makefile| 2 +- arch/arm/kvm/fpsimd_switch.S | 47 2 files changed, 48 insertions(+), 1 deletion(-)

[PATCH v6 0/6] arm/arm64: KVM: Enhance armv7/8 fp/simd lazy switch

2015-12-26 Thread Mario Smarduch
Current lazy fp/simd implementation switches hardware context on guest access and again on exit to host, otherwise context switch is skipped. This patch set builds on that functionality and executes a hardware context switch on first time access and when vCPU is scheduled out or returns to user

[PATCH v6 1/6] arm/arm64: KVM: Introduce armv7 fp/simd vcpu fields and helpers

2015-12-26 Thread Mario Smarduch
Add helper functions to enable access to fp/smid on guest entry and save host fpexc on vcpu put, check if fp/simd registers are dirty and add new vcpu fields. Signed-off-by: Mario Smarduch --- arch/arm/include/asm/kvm_emulate.h | 42

[PATCH v6 3/6] arm/arm64: KVM: Enable armv7 fp/simd enhanced context switch

2015-12-26 Thread Mario Smarduch
Enable armv7 enhanced fp/simd context switch. Guest and host registers are only context switched on first access and vcpu put. Signed-off-by: Mario Smarduch --- arch/arm/include/asm/kvm_host.h | 2 ++ arch/arm/kernel/asm-offsets.c | 1 + arch/arm/kvm/arm.c

[PATCH v6 4/6] arm: KVM: Delete unused macros

2015-12-26 Thread Mario Smarduch
set_hcptr is no longer used so delete it. Signed-off-by: Mario Smarduch --- arch/arm/kvm/interrupts_head.S | 29 - 1 file changed, 29 deletions(-) diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S index

[PATCH v6 5/6] arm/arm64: KVM: Introduce armv8 fp/simd vcpu fields and helpers

2015-12-26 Thread Mario Smarduch
Similar to armv7 add helper functions to enable access to fp/smid registers on guest entry. Save guest fpexc32_el2 on vcpu_put, check if guest is 32 bit. Save guest and restore host registers from host kernel, and check if fp/simd registers are dirty, lastly add cptr_el2 vcpu field.

[PATCH v6 6/6] arm/arm64: KVM: Enable armv8 fp/simd enhanced context switch

2015-12-26 Thread Mario Smarduch
Enable armv8 enhanced fp/simd context switch. Guest and host registers are only context switched on first access and vcpu put. Signed-off-by: Mario Smarduch --- arch/arm/kvm/arm.c | 13 +++-- arch/arm64/kernel/asm-offsets.c | 1 +