Commit 16415335bea79c0226f92aec82197ab07b55ba65
Committed by
Anthony Liguori
1 parent
b80a55e6
Use correct input constant
440 and desktop codes use different input constants for interrupt indication. Let's use the respective ones for KVM. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
9 additions
and
1 deletions
target-ppc/kvm.c
@@ -124,6 +124,14 @@ int kvm_arch_get_registers(CPUState *env) | @@ -124,6 +124,14 @@ int kvm_arch_get_registers(CPUState *env) | ||
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
126 | 126 | ||
127 | +#if defined(TARGET_PPCEMB) | ||
128 | +#define PPC_INPUT_INT PPC40x_INPUT_INT | ||
129 | +#elif defined(TARGET_PPC64) | ||
130 | +#define PPC_INPUT_INT PPC970_INPUT_INT | ||
131 | +#else | ||
132 | +#define PPC_INPUT_INT PPC6xx_INPUT_INT | ||
133 | +#endif | ||
134 | + | ||
127 | int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) | 135 | int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) |
128 | { | 136 | { |
129 | int r; | 137 | int r; |
@@ -133,7 +141,7 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) | @@ -133,7 +141,7 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) | ||
133 | * interrupt, reset, etc) in PPC-specific env->irq_input_state. */ | 141 | * interrupt, reset, etc) in PPC-specific env->irq_input_state. */ |
134 | if (run->ready_for_interrupt_injection && | 142 | if (run->ready_for_interrupt_injection && |
135 | (env->interrupt_request & CPU_INTERRUPT_HARD) && | 143 | (env->interrupt_request & CPU_INTERRUPT_HARD) && |
136 | - (env->irq_input_state & (1<<PPC40x_INPUT_INT))) | 144 | + (env->irq_input_state & (1<<PPC_INPUT_INT))) |
137 | { | 145 | { |
138 | /* For now KVM disregards the 'irq' argument. However, in the | 146 | /* For now KVM disregards the 'irq' argument. However, in the |
139 | * future KVM could cache it in-kernel to avoid a heavyweight exit | 147 | * future KVM could cache it in-kernel to avoid a heavyweight exit |