From: Zhang Wei Date: Fri, 25 Jan 2008 07:12:56 +0000 Subject: [kvm-ppc-devel] [PATCH 2/5] Change macro definition Message-Id: <12012451791740-git-send-email-wei.zhang@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org The PPC44x_INTERRUPT_ definition is compatible with BookE interrupts. Thus we change them. Signed-off-by: Zhang Wei --- arch/powerpc/kvm/booke_interrupts.S | 18 ++++++------ arch/powerpc/kvm/emulate.c | 2 +- arch/powerpc/kvm/powerpc.c | 54 +++++++++++++++++----------------- include/asm-powerpc/kvm_asm.h | 32 ++++++++++---------- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/arch/powerpc/kvm/booke_interrupts.S b/arch/powerpc/kvm/booke_interrupts.S index ec5f071..be6970d 100644 --- a/arch/powerpc/kvm/booke_interrupts.S +++ b/arch/powerpc/kvm/booke_interrupts.S @@ -53,15 +53,15 @@ _GLOBAL(kvm_trampoline_handler) _GLOBAL(kvm_trampoline_handler_len) .long . - kvm_trampoline_handler -#define NEED_INST_MASK ((1<arch.dear = vcpu->arch.fault_dear; vcpu->arch.esr = vcpu->arch.fault_esr; #if 0 @@ -191,7 +191,7 @@ int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, r = RESUME_GUEST; break; - case PPC44x_INTERRUPT_INST_STORAGE: + case BOOKE_INTERRUPT_INST_STORAGE: vcpu->arch.esr = vcpu->arch.fault_esr; #if 0 printk("ISI @ %x / %x: pid %x esr %x\n", vcpu->arch.pc, @@ -201,7 +201,7 @@ int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, r = RESUME_GUEST; break; - case PPC44x_INTERRUPT_SYSCALL: + case BOOKE_INTERRUPT_SYSCALL: #if 0 if (vcpu->arch.guest_msr & MSR_PR) { printk("syscall %d 0x%x 0x%x 0x%x\n", @@ -213,7 +213,7 @@ int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, r = RESUME_GUEST; break; - case PPC44x_INTERRUPT_DTLB_MISS: { + case BOOKE_INTERRUPT_DTLB_MISS: { struct tlbe *gtlbe; unsigned long eaddr = vcpu->arch.fault_dear; gfn_t gfn; @@ -255,7 +255,7 @@ int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, } break; - case PPC44x_INTERRUPT_ITLB_MISS: { + case BOOKE_INTERRUPT_ITLB_MISS: { struct tlbe *gtlbe; unsigned long eaddr = vcpu->arch.pc; gfn_t gfn; @@ -285,7 +285,7 @@ int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, } else { /* Guest mapped and leaped at non-RAM! */ kvmppc_sync_interrupt(vcpu, - PPC44x_INTERRUPT_MACHINE_CHECK); + BOOKE_INTERRUPT_MACHINE_CHECK); } break; @@ -301,7 +301,7 @@ int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, /* XXX locking? */ if ((vcpu->arch.guest_msr & MSR_EE) && vcpu->arch.pending_dec && !(vcpu->arch.tsr & TSR_DIS)) { - kvmppc_sync_interrupt(vcpu, PPC44x_INTERRUPT_DECREMENTER); + kvmppc_sync_interrupt(vcpu, BOOKE_INTERRUPT_DECREMENTER); vcpu->arch.tsr |= TSR_DIS; vcpu->arch.pending_dec = 0; } diff --git a/include/asm-powerpc/kvm_asm.h b/include/asm-powerpc/kvm_asm.h index ce08e47..8ed6b0b 100644 --- a/include/asm-powerpc/kvm_asm.h +++ b/include/asm-powerpc/kvm_asm.h @@ -26,22 +26,22 @@ #define VCPU_TLB_PGSZ PPC44x_TLB_64K #define VCPU_SIZE_BYTES (1<