Re: [PATCH 02/10] KVM: s390: add the GIB and its related life-cyle functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05.11.18 16:36, Halil Pasic wrote:
> 
> 
> On 11/05/2018 04:14 PM, Michael Mueller wrote:
>>
>>
>> On 05.11.18 15:51, Pierre Morel wrote:
>>> On 25/10/2018 14:37, Michael Mueller wrote:
> [..]
>>>> +
>>>> +void kvm_s390_gib_init(u8 nisc)
>>>> +{
>>>> +    int rc;
>>>> +
>>>> +    if (gib)
>>>> +        return;
>>>> +
>>>> +    if (!css_general_characteristics.aiv) {
>>>> +        KVM_EVENT(3, "%s", "gib not initialized, no AIV facility");
>>>> +        return;
>>>> +    }
>>>> +
>>>> +    gib = (struct kvm_s390_gib *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
>>>> +    if (!gib) {
>>>> +        KVM_EVENT(3, "%s", "gib memory allocation failed");
>>>> +        return;
>>>> +    }
>>>
>>> Why should we survive this error?
>>
>> Design question.
>>
> 
> I'm with Pierre on this one. We should fail starting the guest
> if this allocation fails.
> 

Halil, the GIB is global to KVM, we would need to fail loading/init of
KVM, which I'd like to avoid.

Neither GIB nor gisa is necessary for a VM to run, so we shouldn't stop
on an error.

>>>
>>>
>>>> +
>>>> +    gib->nisc = nisc;
>>>> +    rc = chsc_sgib((u32)(u64)gib);
>>>> +    if (rc) {
>>>> +        KVM_EVENT(3, "gib 0x%pK AIV association failed rc: %d",
>>>> +              gib, rc);
>>>> +        free_page((unsigned long)gib);
>>>> +        gib = NULL;
>>>> +        return;
>>>> +    }
>>>
>>> or this failure ?
>>>
>>> shouldn't we better return an error and abort loading KVM?
>>
>> Design question.
>>
> 
> Same here I guess. This would be only either due to a guest or
> a host bug, or?
> 
> I would prefer being fairly deterministic about whether we do have
> a gib or not.

Same as above

> 
> Regards,
> Halil
> 


Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux