diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-09-12 10:33:46 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-09-24 19:12:20 +0200 |
commit | ff7158b2277d2bb942e2d09dd1df9a9d8a7598ab (patch) | |
tree | a2f4bf8cbdaaa3ea9804df37b5c6a0daa3fc8062 /arch/s390 | |
parent | 800c1065c3207a1b04d4ac457a57a37ce19eeb21 (diff) | |
download | blackbird-op-linux-ff7158b2277d2bb942e2d09dd1df9a9d8a7598ab.tar.gz blackbird-op-linux-ff7158b2277d2bb942e2d09dd1df9a9d8a7598ab.zip |
KVM: s390: Allow NULL parameter for kvm_s390_get_regs_rre
We're not always interested in both registers that are specified
for an RRE instruction. So allow NULL as parameter, too, to indicate
that we do not need the corresponding value.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index a307a854a8d4..b44912a32949 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h @@ -90,8 +90,10 @@ static inline void kvm_s390_get_base_disp_sse(struct kvm_vcpu *vcpu, static inline void kvm_s390_get_regs_rre(struct kvm_vcpu *vcpu, int *r1, int *r2) { - *r1 = (vcpu->arch.sie_block->ipb & 0x00f00000) >> 20; - *r2 = (vcpu->arch.sie_block->ipb & 0x000f0000) >> 16; + if (r1) + *r1 = (vcpu->arch.sie_block->ipb & 0x00f00000) >> 20; + if (r2) + *r2 = (vcpu->arch.sie_block->ipb & 0x000f0000) >> 16; } static inline u64 kvm_s390_get_base_disp_rsy(struct kvm_vcpu *vcpu) |