KVM: s390: factor out nullify_gisa()
PATCH v2 4/12 KVM: s390: factor out nullify_gisa()
This function will be used by the GIB alert handler and during the GISA clear operation. Thus it gets factored out here.
Signed-off-by Michael Mueller <[email protected]>
Reviewed-by Pierre Morel <[email protected]>
Reviewed-by Janosch Frank <[email protected]>
Reviewed-by Cornelia Huck <[email protected]>
--- arch/s390/kvm/interrupt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/s390/kvm/interrupt.c +7 -2
@@ -2882,11 +2882,16 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len)return n; } +static void nullify_gisa (struct kvm_s390_gisa *gisa) +{ +memset (gisa,0 ,sizeof (struct kvm_s390_gisa )); + gisa->next_alert = (u32 )(u64 )gisa; +} +void kvm_s390_gisa_clear (struct kvm *kvm) {if (kvm->arch.gisa) { -memset (kvm->arch.gisa,0 ,sizeof (struct kvm_s390_gisa )); - kvm->arch.gisa->next_alert = (u32 )(u64 )kvm->arch.gisa; +nullify_gisa (kvm->arch.gisa);VM_EVENT (kvm,3 ,"gisa 0x%pK cleared" , kvm->arch.gisa); } }
Signature · 1 line
2.13.4