20 #ifndef __KVM_BOOKE_H__
21 #define __KVM_BOOKE_H__
23 #include <linux/types.h>
26 #include <asm/switch_to.h>
30 #define BOOKE_IRQPRIO_DATA_STORAGE 0
31 #define BOOKE_IRQPRIO_INST_STORAGE 1
32 #define BOOKE_IRQPRIO_ALIGNMENT 2
33 #define BOOKE_IRQPRIO_PROGRAM 3
34 #define BOOKE_IRQPRIO_FP_UNAVAIL 4
35 #define BOOKE_IRQPRIO_SPE_UNAVAIL 5
36 #define BOOKE_IRQPRIO_SPE_FP_DATA 6
37 #define BOOKE_IRQPRIO_SPE_FP_ROUND 7
38 #define BOOKE_IRQPRIO_SYSCALL 8
39 #define BOOKE_IRQPRIO_AP_UNAVAIL 9
40 #define BOOKE_IRQPRIO_DTLB_MISS 10
41 #define BOOKE_IRQPRIO_ITLB_MISS 11
42 #define BOOKE_IRQPRIO_MACHINE_CHECK 12
43 #define BOOKE_IRQPRIO_DEBUG 13
44 #define BOOKE_IRQPRIO_CRITICAL 14
45 #define BOOKE_IRQPRIO_WATCHDOG 15
46 #define BOOKE_IRQPRIO_EXTERNAL 16
47 #define BOOKE_IRQPRIO_FIT 17
48 #define BOOKE_IRQPRIO_DECREMENTER 18
49 #define BOOKE_IRQPRIO_PERFORMANCE_MONITOR 19
51 #define BOOKE_IRQPRIO_EXTERNAL_LEVEL 20
52 #define BOOKE_IRQPRIO_DBELL 21
53 #define BOOKE_IRQPRIO_DBELL_CRIT 22
54 #define BOOKE_IRQPRIO_MAX 23
56 #define BOOKE_IRQMASK_EE ((1 << BOOKE_IRQPRIO_EXTERNAL_LEVEL) | \
57 (1 << BOOKE_IRQPRIO_PERFORMANCE_MONITOR) | \
58 (1 << BOOKE_IRQPRIO_DBELL) | \
59 (1 << BOOKE_IRQPRIO_DECREMENTER) | \
60 (1 << BOOKE_IRQPRIO_FIT) | \
61 (1 << BOOKE_IRQPRIO_EXTERNAL))
63 #define BOOKE_IRQMASK_CE ((1 << BOOKE_IRQPRIO_DBELL_CRIT) | \
64 (1 << BOOKE_IRQPRIO_WATCHDOG) | \
65 (1 << BOOKE_IRQPRIO_CRITICAL))
77 unsigned int inst,
int *advance);
109 static inline void kvmppc_load_guest_fp(
struct kvm_vcpu *vcpu)
111 #ifdef CONFIG_PPC_FPU
114 current->thread.regs->msr |= MSR_FP;
123 static inline void kvmppc_save_guest_fp(
struct kvm_vcpu *vcpu)
125 #ifdef CONFIG_PPC_FPU