@@ -107,6 +107,12 @@ struct kvm_vcpu_arch {
/* Interrupt related fields */
u32 irq_lines; /* IRQ and FIQ levels */
+ /* fp/simd dirty flag true if guest accessed register file */
+ bool vfp_dirty;
+
+ /* Save host FPEXC register to later restore on vcpu put */
+ u32 host_fpexc;
+
/* Exception Information */
struct kvm_vcpu_fault_info fault;
@@ -186,6 +186,8 @@ int main(void)
DEFINE(VCPU_CPSR, offsetof(struct kvm_vcpu, arch.regs.usr_regs.ARM_cpsr));
DEFINE(VCPU_HCR, offsetof(struct kvm_vcpu, arch.hcr));
DEFINE(VCPU_IRQ_LINES, offsetof(struct kvm_vcpu, arch.irq_lines));
+ DEFINE(VCPU_VFP_DIRTY, offsetof(struct kvm_vcpu, arch.vfp_dirty));
+ DEFINE(VCPU_VFP_HOST_FPEXC, offsetof(struct kvm_vcpu, arch.host_fpexc));
DEFINE(VCPU_HSR, offsetof(struct kvm_vcpu, arch.fault.hsr));
DEFINE(VCPU_HxFAR, offsetof(struct kvm_vcpu, arch.fault.hxfar));
DEFINE(VCPU_HPFAR, offsetof(struct kvm_vcpu, arch.fault.hpfar));
This patch adds vcpu fields to track lazy state, save host FPEXC, and offsets to fields. Signed-off-by: Mario Smarduch <m.smarduch@samsung.com> --- arch/arm/include/asm/kvm_host.h | 6 ++++++ arch/arm/kernel/asm-offsets.c | 2 ++ 2 files changed, 8 insertions(+)