| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Description: |
|---|
| 7 | 8 | * This file is derived from arch/powerpc/kvm/44x_emulate.c, |
|---|
| 8 | 9 | * by Hollis Blanchard <hollisb@us.ibm.com>. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License, version 2, as |
|---|
| 12 | | - * published by the Free Software Foundation. |
|---|
| 13 | 10 | */ |
|---|
| 14 | 11 | |
|---|
| 15 | 12 | #include <asm/kvm_ppc.h> |
|---|
| .. | .. |
|---|
| 86 | 83 | } |
|---|
| 87 | 84 | #endif |
|---|
| 88 | 85 | |
|---|
| 89 | | -static int kvmppc_e500_emul_ehpriv(struct kvm_run *run, struct kvm_vcpu *vcpu, |
|---|
| 86 | +static int kvmppc_e500_emul_ehpriv(struct kvm_vcpu *vcpu, |
|---|
| 90 | 87 | unsigned int inst, int *advance) |
|---|
| 91 | 88 | { |
|---|
| 92 | 89 | int emulated = EMULATE_DONE; |
|---|
| 93 | 90 | |
|---|
| 94 | 91 | switch (get_oc(inst)) { |
|---|
| 95 | 92 | case EHPRIV_OC_DEBUG: |
|---|
| 96 | | - run->exit_reason = KVM_EXIT_DEBUG; |
|---|
| 97 | | - run->debug.arch.address = vcpu->arch.regs.nip; |
|---|
| 98 | | - run->debug.arch.status = 0; |
|---|
| 93 | + vcpu->run->exit_reason = KVM_EXIT_DEBUG; |
|---|
| 94 | + vcpu->run->debug.arch.address = vcpu->arch.regs.nip; |
|---|
| 95 | + vcpu->run->debug.arch.status = 0; |
|---|
| 99 | 96 | kvmppc_account_exit(vcpu, DEBUG_EXITS); |
|---|
| 100 | 97 | emulated = EMULATE_EXIT_USER; |
|---|
| 101 | 98 | *advance = 0; |
|---|
| .. | .. |
|---|
| 128 | 125 | return EMULATE_FAIL; |
|---|
| 129 | 126 | } |
|---|
| 130 | 127 | |
|---|
| 131 | | -int kvmppc_core_emulate_op_e500(struct kvm_run *run, struct kvm_vcpu *vcpu, |
|---|
| 128 | +int kvmppc_core_emulate_op_e500(struct kvm_vcpu *vcpu, |
|---|
| 132 | 129 | unsigned int inst, int *advance) |
|---|
| 133 | 130 | { |
|---|
| 134 | 131 | int emulated = EMULATE_DONE; |
|---|
| .. | .. |
|---|
| 185 | 182 | break; |
|---|
| 186 | 183 | |
|---|
| 187 | 184 | case XOP_EHPRIV: |
|---|
| 188 | | - emulated = kvmppc_e500_emul_ehpriv(run, vcpu, inst, |
|---|
| 189 | | - advance); |
|---|
| 185 | + emulated = kvmppc_e500_emul_ehpriv(vcpu, inst, advance); |
|---|
| 190 | 186 | break; |
|---|
| 191 | 187 | |
|---|
| 192 | 188 | default: |
|---|
| .. | .. |
|---|
| 200 | 196 | } |
|---|
| 201 | 197 | |
|---|
| 202 | 198 | if (emulated == EMULATE_FAIL) |
|---|
| 203 | | - emulated = kvmppc_booke_emulate_op(run, vcpu, inst, advance); |
|---|
| 199 | + emulated = kvmppc_booke_emulate_op(vcpu, inst, advance); |
|---|
| 204 | 200 | |
|---|
| 205 | 201 | return emulated; |
|---|
| 206 | 202 | } |
|---|