public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Morel <pmorel@linux.ibm.com>
To: linux-s390@vger.kernel.org
Subject: Re: [PATCH 02/10] KVM: s390: add the GIB and its related life-cyle functions
Date: Tue, 06 Nov 2018 18:46:46 +0000	[thread overview]
Message-ID: <4fd3b973-2d65-9355-84f7-47c6d188f0da@linux.ibm.com> (raw)
In-Reply-To: <142597db-3a87-9360-5463-f72275c1545f@linux.ibm.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]

On 06/11/2018 13:06, Michael Mueller wrote:
> 
> 
> On 05.11.18 16:44, Janosch Frank wrote:
>> 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.
> 
> I changed the design such that kvm_s390_gib_init() fails and thus 
> kvm_arch_init() as well
> in all error cases except facility AIV is *not* available. This is also 
> a success case but no GIB
> is initialized.

OK, seems right.

> 
>>
>>>>>
>>>>>> +
>>>>>> +��� 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
> 
> see above
> 
>>> Regards,
>>> Halil
>>>
>>
> 


-- 
Pierre Morel
Linux/KVM/QEMU in B�blingen - Germany

       reply	other threads:[~2018-11-06 18:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <142597db-3a87-9360-5463-f72275c1545f@linux.ibm.com>
2018-11-06 18:46 ` Pierre Morel [this message]
     [not found] <9461bcea-b3d2-2bd9-8408-8565d7de067e@de.ibm.com>
2018-10-31  8:56 ` [PATCH 02/10] KVM: s390: add the GIB and its related life-cyle functions Janosch Frank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fd3b973-2d65-9355-84f7-47c6d188f0da@linux.ibm.com \
    --to=pmorel@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox