diff mbox series

[v3,11/12] KVM: s390: start using the GIB

Message ID 20181128101943.155542-12-mimu@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series KVM: s390: make use of the GIB | expand

Commit Message

Michael Mueller Nov. 28, 2018, 10:19 a.m. UTC
By initializing the GIB, it will be used by the kvm host.

Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Cornelia Huck Nov. 28, 2018, 10:31 a.m. UTC | #1
On Wed, 28 Nov 2018 11:19:42 +0100
Michael Mueller <mimu@linux.ibm.com> wrote:

> By initializing the GIB, it will be used by the kvm host.
> 
> Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 283c51362ca8..9b20017dda29 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -428,6 +428,10 @@ int kvm_arch_init(void *opaque)
>  		goto out_unreg;
>  	}
>  
> +	rc = kvm_s390_gib_init(GAL_ISC);
> +	if (rc)
> +		goto out_unreg;
> +
>  	kvm_s390_cpu_feat_init();
>  
>  	/* Register floating interrupt controller interface. */

Aren't you missing a call to kvm_s390_gib_destroy() in the out_unreg
case (if registering the flic fails)?
Michael Mueller Nov. 28, 2018, 12:29 p.m. UTC | #2
On 28.11.18 11:31, Cornelia Huck wrote:
> On Wed, 28 Nov 2018 11:19:42 +0100
> Michael Mueller <mimu@linux.ibm.com> wrote:
> 
>> By initializing the GIB, it will be used by the kvm host.
>>
>> Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
>> ---
>>   arch/s390/kvm/kvm-s390.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>> index 283c51362ca8..9b20017dda29 100644
>> --- a/arch/s390/kvm/kvm-s390.c
>> +++ b/arch/s390/kvm/kvm-s390.c
>> @@ -428,6 +428,10 @@ int kvm_arch_init(void *opaque)
>>   		goto out_unreg;
>>   	}
>>   
>> +	rc = kvm_s390_gib_init(GAL_ISC);
>> +	if (rc)
>> +		goto out_unreg;
>> +
>>   	kvm_s390_cpu_feat_init();
>>   
>>   	/* Register floating interrupt controller interface. */
> 
> Aren't you missing a call to kvm_s390_gib_destroy() in the out_unreg
> case (if registering the flic fails)?

Details... ;)

>
diff mbox series

Patch

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 283c51362ca8..9b20017dda29 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -428,6 +428,10 @@  int kvm_arch_init(void *opaque)
 		goto out_unreg;
 	}
 
+	rc = kvm_s390_gib_init(GAL_ISC);
+	if (rc)
+		goto out_unreg;
+
 	kvm_s390_cpu_feat_init();
 
 	/* Register floating interrupt controller interface. */