diff options
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index f30be9ef2314..9057335fdc61 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -221,41 +221,18 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | |||
221 | 221 | ||
222 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | 222 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) |
223 | { | 223 | { |
224 | if (vcpu->guest_debug.enabled) | ||
225 | kvmppc_core_load_guest_debugstate(vcpu); | ||
226 | |||
227 | kvmppc_core_vcpu_load(vcpu, cpu); | 224 | kvmppc_core_vcpu_load(vcpu, cpu); |
228 | } | 225 | } |
229 | 226 | ||
230 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) | 227 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) |
231 | { | 228 | { |
232 | if (vcpu->guest_debug.enabled) | ||
233 | kvmppc_core_load_host_debugstate(vcpu); | ||
234 | |||
235 | /* Don't leave guest TLB entries resident when being de-scheduled. */ | ||
236 | /* XXX It would be nice to differentiate between heavyweight exit and | ||
237 | * sched_out here, since we could avoid the TLB flush for heavyweight | ||
238 | * exits. */ | ||
239 | _tlbil_all(); | ||
240 | kvmppc_core_vcpu_put(vcpu); | 229 | kvmppc_core_vcpu_put(vcpu); |
241 | } | 230 | } |
242 | 231 | ||
243 | int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, | 232 | int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, |
244 | struct kvm_guest_debug *dbg) | 233 | struct kvm_guest_debug *dbg) |
245 | { | 234 | { |
246 | int i; | 235 | return -EINVAL; |
247 | |||
248 | vcpu->guest_debug.enabled = dbg->enabled; | ||
249 | if (vcpu->guest_debug.enabled) { | ||
250 | for (i=0; i < ARRAY_SIZE(vcpu->guest_debug.bp); i++) { | ||
251 | if (dbg->breakpoints[i].enabled) | ||
252 | vcpu->guest_debug.bp[i] = dbg->breakpoints[i].address; | ||
253 | else | ||
254 | vcpu->guest_debug.bp[i] = 0; | ||
255 | } | ||
256 | } | ||
257 | |||
258 | return 0; | ||
259 | } | 236 | } |
260 | 237 | ||
261 | static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu, | 238 | static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu, |