KVM: s390: use assignment instead of memcpy
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 2 Dec 2015 13:27:03 +0000 (14:27 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 15 Dec 2015 15:06:48 +0000 (16:06 +0100)
Replace two memcpy with proper assignment.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c

index 6857262eb7ae725aa07104bbc7b58e0a04d1cca3..6dec01d6c1c4150441d94f618fc980aa45daecf3 100644 (file)
@@ -2120,7 +2120,8 @@ static int vcpu_pre_run(struct kvm_vcpu *vcpu)
         */
        kvm_check_async_pf_completion(vcpu);
 
-       memcpy(&vcpu->arch.sie_block->gg14, &vcpu->run->s.regs.gprs[14], 16);
+       vcpu->arch.sie_block->gg14 = vcpu->run->s.regs.gprs[14];
+       vcpu->arch.sie_block->gg15 = vcpu->run->s.regs.gprs[15];
 
        if (need_resched())
                schedule();
@@ -2185,7 +2186,8 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason)
        if (guestdbg_enabled(vcpu))
                kvm_s390_restore_guest_per_regs(vcpu);
 
-       memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16);
+       vcpu->run->s.regs.gprs[14] = vcpu->arch.sie_block->gg14;
+       vcpu->run->s.regs.gprs[15] = vcpu->arch.sie_block->gg15;
 
        if (vcpu->arch.sie_block->icptcode > 0) {
                int rc = kvm_handle_sie_intercept(vcpu);