Advertisement
jintack

fp bruteforce patch

Jun 9th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
  2. index be18e2d..5cff992 100644
  3. --- a/arch/arm64/kvm/hyp/switch.c
  4. +++ b/arch/arm64/kvm/hyp/switch.c
  5. @@ -57,7 +57,7 @@ static void __hyp_text __activate_traps_nvhe(void)
  6. u64 val;
  7.  
  8. val = CPTR_EL2_DEFAULT;
  9. - val |= CPTR_EL2_TTA | CPTR_EL2_TFP;
  10. + val |= CPTR_EL2_TTA;// | CPTR_EL2_TFP;
  11. kvm_write_sysreg(val, cptr_el2);
  12. }
  13.  
  14. @@ -253,6 +253,8 @@ static int __hyp_text __guest_run(struct kvm_vcpu *vcpu)
  15. host_ctxt = kern_hyp_va(vcpu->arch.host_cpu_context);
  16. guest_ctxt = &vcpu->arch.ctxt;
  17.  
  18. + __fpsimd_save_state(&host_ctxt->gp_regs.fp_regs);
  19. + __fpsimd_restore_state(&guest_ctxt->gp_regs.fp_regs);
  20. __sysreg_save_host_state(host_ctxt);
  21. __debug_cond_save_host_state(vcpu);
  22.  
  23. @@ -290,10 +292,10 @@ again:
  24.  
  25. __sysreg_restore_host_state(host_ctxt);
  26.  
  27. - if (fp_enabled) {
  28. + //if (fp_enabled) {
  29. __fpsimd_save_state(&guest_ctxt->gp_regs.fp_regs);
  30. __fpsimd_restore_state(&host_ctxt->gp_regs.fp_regs);
  31. - }
  32. + //}
  33.  
  34. __debug_save_state(vcpu, kern_hyp_va(vcpu->arch.debug_ptr), guest_ctxt);
  35. __debug_cond_restore_host_state(vcpu);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement