booke.c (5d43889c07bb38694742936aa70d1187c012e198) | booke.c (f5f972102d5c12729f0a35fce266b580aaa03f66) |
---|---|
1/* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License, version 2, as 4 * published by the Free Software Foundation. 5 * 6 * This program is distributed in the hope that it will be useful, 7 * but WITHOUT ANY WARRANTY; without even the implied warranty of 8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- 667 unchanged lines hidden (view full) --- 676 } 677 678 return r; 679} 680 681int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) 682{ 683 int ret, s; | 1/* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License, version 2, as 4 * published by the Free Software Foundation. 5 * 6 * This program is distributed in the hope that it will be useful, 7 * but WITHOUT ANY WARRANTY; without even the implied warranty of 8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- 667 unchanged lines hidden (view full) --- 676 } 677 678 return r; 679} 680 681int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) 682{ 683 int ret, s; |
684 struct thread_struct thread; | 684 struct debug_reg debug; |
685#ifdef CONFIG_PPC_FPU 686 struct thread_fp_state fp; 687 int fpexc_mode; 688#endif 689 690 if (!vcpu->arch.sane) { 691 kvm_run->exit_reason = KVM_EXIT_INTERNAL_ERROR; 692 return -EINVAL; --- 25 unchanged lines hidden (view full) --- 718 * vcpu->fpu_active is set. 719 */ 720 vcpu->fpu_active = 1; 721 722 kvmppc_load_guest_fp(vcpu); 723#endif 724 725 /* Switch to guest debug context */ | 685#ifdef CONFIG_PPC_FPU 686 struct thread_fp_state fp; 687 int fpexc_mode; 688#endif 689 690 if (!vcpu->arch.sane) { 691 kvm_run->exit_reason = KVM_EXIT_INTERNAL_ERROR; 692 return -EINVAL; --- 25 unchanged lines hidden (view full) --- 718 * vcpu->fpu_active is set. 719 */ 720 vcpu->fpu_active = 1; 721 722 kvmppc_load_guest_fp(vcpu); 723#endif 724 725 /* Switch to guest debug context */ |
726 thread.debug = vcpu->arch.shadow_dbg_reg; 727 switch_booke_debug_regs(&thread); 728 thread.debug = current->thread.debug; | 726 debug = vcpu->arch.shadow_dbg_reg; 727 switch_booke_debug_regs(&debug); 728 debug = current->thread.debug; |
729 current->thread.debug = vcpu->arch.shadow_dbg_reg; 730 731 kvmppc_fix_ee_before_entry(); 732 733 ret = __kvmppc_vcpu_run(kvm_run, vcpu); 734 735 /* No need for kvm_guest_exit. It's done in handle_exit. 736 We also get here with interrupts enabled. */ 737 738 /* Switch back to user space debug context */ | 729 current->thread.debug = vcpu->arch.shadow_dbg_reg; 730 731 kvmppc_fix_ee_before_entry(); 732 733 ret = __kvmppc_vcpu_run(kvm_run, vcpu); 734 735 /* No need for kvm_guest_exit. It's done in handle_exit. 736 We also get here with interrupts enabled. */ 737 738 /* Switch back to user space debug context */ |
739 switch_booke_debug_regs(&thread); 740 current->thread.debug = thread.debug; | 739 switch_booke_debug_regs(&debug); 740 current->thread.debug = debug; |
741 742#ifdef CONFIG_PPC_FPU 743 kvmppc_save_guest_fp(vcpu); 744 745 vcpu->fpu_active = 0; 746 747 /* Save guest FPU state from thread */ 748 memcpy(vcpu->arch.fpr, current->thread.fp_state.fpr, --- 1255 unchanged lines hidden --- | 741 742#ifdef CONFIG_PPC_FPU 743 kvmppc_save_guest_fp(vcpu); 744 745 vcpu->fpu_active = 0; 746 747 /* Save guest FPU state from thread */ 748 memcpy(vcpu->arch.fpr, current->thread.fp_state.fpr, --- 1255 unchanged lines hidden --- |