diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2017-12-04 15:35:27 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-14 03:26:52 -0500 |
commit | 875656fe0c8473c544860d557ca1512753d6aeef (patch) | |
tree | 5f7ca232837ea02b03ff65d6fe8b27fe0711cfd4 /arch/mips/kvm | |
parent | 1fc9b76b3dd2c57ca0fe42742043a5c3cbdc41c1 (diff) |
KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_set_regs
Move vcpu_load() and vcpu_put() into the architecture specific
implementations of kvm_arch_vcpu_ioctl_set_regs().
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm')
-rw-r--r-- | arch/mips/kvm/mips.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 6023b5f808c0..dd5f463b0e72 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -1148,6 +1148,8 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) | |||
1148 | { | 1148 | { |
1149 | int i; | 1149 | int i; |
1150 | 1150 | ||
1151 | vcpu_load(vcpu); | ||
1152 | |||
1151 | for (i = 1; i < ARRAY_SIZE(vcpu->arch.gprs); i++) | 1153 | for (i = 1; i < ARRAY_SIZE(vcpu->arch.gprs); i++) |
1152 | vcpu->arch.gprs[i] = regs->gpr[i]; | 1154 | vcpu->arch.gprs[i] = regs->gpr[i]; |
1153 | vcpu->arch.gprs[0] = 0; /* zero is special, and cannot be set. */ | 1155 | vcpu->arch.gprs[0] = 0; /* zero is special, and cannot be set. */ |
@@ -1155,6 +1157,7 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) | |||
1155 | vcpu->arch.lo = regs->lo; | 1157 | vcpu->arch.lo = regs->lo; |
1156 | vcpu->arch.pc = regs->pc; | 1158 | vcpu->arch.pc = regs->pc; |
1157 | 1159 | ||
1160 | vcpu_put(vcpu); | ||
1158 | return 0; | 1161 | return 0; |
1159 | } | 1162 | } |
1160 | 1163 | ||