aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r--arch/powerpc/kvm/book3s_hv.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 8d43cf205d34..40e5857c4b1c 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -47,6 +47,7 @@
47 47
48#include <asm/reg.h> 48#include <asm/reg.h>
49#include <asm/ppc-opcode.h> 49#include <asm/ppc-opcode.h>
50#include <asm/asm-prototypes.h>
50#include <asm/disassemble.h> 51#include <asm/disassemble.h>
51#include <asm/cputable.h> 52#include <asm/cputable.h>
52#include <asm/cacheflush.h> 53#include <asm/cacheflush.h>
@@ -1089,9 +1090,10 @@ static int kvmppc_handle_exit_hv(struct kvm_run *run, struct kvm_vcpu *vcpu,
1089 vcpu->stat.ext_intr_exits++; 1090 vcpu->stat.ext_intr_exits++;
1090 r = RESUME_GUEST; 1091 r = RESUME_GUEST;
1091 break; 1092 break;
1092 /* HMI is hypervisor interrupt and host has handled it. Resume guest.*/ 1093 /* SR/HMI/PMI are HV interrupts that host has handled. Resume guest.*/
1093 case BOOK3S_INTERRUPT_HMI: 1094 case BOOK3S_INTERRUPT_HMI:
1094 case BOOK3S_INTERRUPT_PERFMON: 1095 case BOOK3S_INTERRUPT_PERFMON:
1096 case BOOK3S_INTERRUPT_SYSTEM_RESET:
1095 r = RESUME_GUEST; 1097 r = RESUME_GUEST;
1096 break; 1098 break;
1097 case BOOK3S_INTERRUPT_MACHINE_CHECK: 1099 case BOOK3S_INTERRUPT_MACHINE_CHECK:
@@ -2117,15 +2119,6 @@ static int kvmppc_grab_hwthread(int cpu)
2117 struct paca_struct *tpaca; 2119 struct paca_struct *tpaca;
2118 long timeout = 10000; 2120 long timeout = 10000;
2119 2121
2120 /*
2121 * ISA v3.0 idle routines do not set hwthread_state or test
2122 * hwthread_req, so they can not grab idle threads.
2123 */
2124 if (cpu_has_feature(CPU_FTR_ARCH_300)) {
2125 WARN(1, "KVM: can not control sibling threads\n");
2126 return -EBUSY;
2127 }
2128
2129 tpaca = &paca[cpu]; 2122 tpaca = &paca[cpu];
2130 2123
2131 /* Ensure the thread won't go into the kernel if it wakes */ 2124 /* Ensure the thread won't go into the kernel if it wakes */
@@ -2160,12 +2153,10 @@ static void kvmppc_release_hwthread(int cpu)
2160 struct paca_struct *tpaca; 2153 struct paca_struct *tpaca;
2161 2154
2162 tpaca = &paca[cpu]; 2155 tpaca = &paca[cpu];
2156 tpaca->kvm_hstate.hwthread_req = 0;
2163 tpaca->kvm_hstate.kvm_vcpu = NULL; 2157 tpaca->kvm_hstate.kvm_vcpu = NULL;
2164 tpaca->kvm_hstate.kvm_vcore = NULL; 2158 tpaca->kvm_hstate.kvm_vcore = NULL;
2165 tpaca->kvm_hstate.kvm_split_mode = NULL; 2159 tpaca->kvm_hstate.kvm_split_mode = NULL;
2166 if (!cpu_has_feature(CPU_FTR_ARCH_300))
2167 tpaca->kvm_hstate.hwthread_req = 0;
2168
2169} 2160}
2170 2161
2171static void radix_flush_cpu(struct kvm *kvm, int cpu, struct kvm_vcpu *vcpu) 2162static void radix_flush_cpu(struct kvm *kvm, int cpu, struct kvm_vcpu *vcpu)
@@ -2615,6 +2606,9 @@ static void set_irq_happened(int trap)
2615 case BOOK3S_INTERRUPT_HMI: 2606 case BOOK3S_INTERRUPT_HMI:
2616 local_paca->irq_happened |= PACA_IRQ_HMI; 2607 local_paca->irq_happened |= PACA_IRQ_HMI;
2617 break; 2608 break;
2609 case BOOK3S_INTERRUPT_SYSTEM_RESET:
2610 replay_system_reset();
2611 break;
2618 } 2612 }
2619} 2613}
2620 2614