summaryrefslogtreecommitdiffstats
path: root/arch/mips/kvm
diff options
context:
space:
mode:
authorChristoffer Dall2017-12-04 21:35:26 +0100
committerPaolo Bonzini2017-12-14 09:26:51 +0100
commit1fc9b76b3dd2c57ca0fe42742043a5c3cbdc41c1 (patch)
treecd354bacf1cd3e842b7a7bea471ee84d15860b07 /arch/mips/kvm
parentKVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run (diff)
downloadkernel-qcow2-linux-1fc9b76b3dd2c57ca0fe42742043a5c3cbdc41c1.tar.gz
kernel-qcow2-linux-1fc9b76b3dd2c57ca0fe42742043a5c3cbdc41c1.tar.xz
kernel-qcow2-linux-1fc9b76b3dd2c57ca0fe42742043a5c3cbdc41c1.zip
KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_get_regs
Move vcpu_load() and vcpu_put() into the architecture specific implementations of kvm_arch_vcpu_ioctl_get_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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index ba5ecf22bb96..6023b5f808c0 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -1162,6 +1162,8 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
{
int i;
+ vcpu_load(vcpu);
+
for (i = 0; i < ARRAY_SIZE(vcpu->arch.gprs); i++)
regs->gpr[i] = vcpu->arch.gprs[i];
@@ -1169,6 +1171,7 @@ int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
regs->lo = vcpu->arch.lo;
regs->pc = vcpu->arch.pc;
+ vcpu_put(vcpu);
return 0;
}