diff options
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ae3705816878..0d0e0add0201 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -371,55 +371,43 @@ static int kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) | |||
371 | 371 | ||
372 | int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) | 372 | int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) |
373 | { | 373 | { |
374 | vcpu_load(vcpu); | ||
375 | memcpy(&vcpu->arch.guest_gprs, ®s->gprs, sizeof(regs->gprs)); | 374 | memcpy(&vcpu->arch.guest_gprs, ®s->gprs, sizeof(regs->gprs)); |
376 | vcpu_put(vcpu); | ||
377 | return 0; | 375 | return 0; |
378 | } | 376 | } |
379 | 377 | ||
380 | int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) | 378 | int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) |
381 | { | 379 | { |
382 | vcpu_load(vcpu); | ||
383 | memcpy(®s->gprs, &vcpu->arch.guest_gprs, sizeof(regs->gprs)); | 380 | memcpy(®s->gprs, &vcpu->arch.guest_gprs, sizeof(regs->gprs)); |
384 | vcpu_put(vcpu); | ||
385 | return 0; | 381 | return 0; |
386 | } | 382 | } |
387 | 383 | ||
388 | int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | 384 | int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, |
389 | struct kvm_sregs *sregs) | 385 | struct kvm_sregs *sregs) |
390 | { | 386 | { |
391 | vcpu_load(vcpu); | ||
392 | memcpy(&vcpu->arch.guest_acrs, &sregs->acrs, sizeof(sregs->acrs)); | 387 | memcpy(&vcpu->arch.guest_acrs, &sregs->acrs, sizeof(sregs->acrs)); |
393 | memcpy(&vcpu->arch.sie_block->gcr, &sregs->crs, sizeof(sregs->crs)); | 388 | memcpy(&vcpu->arch.sie_block->gcr, &sregs->crs, sizeof(sregs->crs)); |
394 | vcpu_put(vcpu); | ||
395 | return 0; | 389 | return 0; |
396 | } | 390 | } |
397 | 391 | ||
398 | int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, | 392 | int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, |
399 | struct kvm_sregs *sregs) | 393 | struct kvm_sregs *sregs) |
400 | { | 394 | { |
401 | vcpu_load(vcpu); | ||
402 | memcpy(&sregs->acrs, &vcpu->arch.guest_acrs, sizeof(sregs->acrs)); | 395 | memcpy(&sregs->acrs, &vcpu->arch.guest_acrs, sizeof(sregs->acrs)); |
403 | memcpy(&sregs->crs, &vcpu->arch.sie_block->gcr, sizeof(sregs->crs)); | 396 | memcpy(&sregs->crs, &vcpu->arch.sie_block->gcr, sizeof(sregs->crs)); |
404 | vcpu_put(vcpu); | ||
405 | return 0; | 397 | return 0; |
406 | } | 398 | } |
407 | 399 | ||
408 | int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) | 400 | int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) |
409 | { | 401 | { |
410 | vcpu_load(vcpu); | ||
411 | memcpy(&vcpu->arch.guest_fpregs.fprs, &fpu->fprs, sizeof(fpu->fprs)); | 402 | memcpy(&vcpu->arch.guest_fpregs.fprs, &fpu->fprs, sizeof(fpu->fprs)); |
412 | vcpu->arch.guest_fpregs.fpc = fpu->fpc; | 403 | vcpu->arch.guest_fpregs.fpc = fpu->fpc; |
413 | vcpu_put(vcpu); | ||
414 | return 0; | 404 | return 0; |
415 | } | 405 | } |
416 | 406 | ||
417 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) | 407 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) |
418 | { | 408 | { |
419 | vcpu_load(vcpu); | ||
420 | memcpy(&fpu->fprs, &vcpu->arch.guest_fpregs.fprs, sizeof(fpu->fprs)); | 409 | memcpy(&fpu->fprs, &vcpu->arch.guest_fpregs.fprs, sizeof(fpu->fprs)); |
421 | fpu->fpc = vcpu->arch.guest_fpregs.fpc; | 410 | fpu->fpc = vcpu->arch.guest_fpregs.fpc; |
422 | vcpu_put(vcpu); | ||
423 | return 0; | 411 | return 0; |
424 | } | 412 | } |
425 | 413 | ||
@@ -498,8 +486,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
498 | int rc; | 486 | int rc; |
499 | sigset_t sigsaved; | 487 | sigset_t sigsaved; |
500 | 488 | ||
501 | vcpu_load(vcpu); | ||
502 | |||
503 | rerun_vcpu: | 489 | rerun_vcpu: |
504 | if (vcpu->requests) | 490 | if (vcpu->requests) |
505 | if (test_and_clear_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests)) | 491 | if (test_and_clear_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests)) |
@@ -568,8 +554,6 @@ rerun_vcpu: | |||
568 | if (vcpu->sigset_active) | 554 | if (vcpu->sigset_active) |
569 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); | 555 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); |
570 | 556 | ||
571 | vcpu_put(vcpu); | ||
572 | |||
573 | vcpu->stat.exit_userspace++; | 557 | vcpu->stat.exit_userspace++; |
574 | return rc; | 558 | return rc; |
575 | } | 559 | } |