From: Michael Mueller <mimu@linux.ibm.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Viktor Mihajlovski <mihajlov@linux.ibm.com>
Subject: Re: [PATCH] KVM: s390: fix gisa destroy operation might lead to cpu stalls
Date: Wed, 23 Aug 2023 16:09:26 +0200 [thread overview]
Message-ID: <e144381d-4ff3-d7b6-5624-813ea22f196a@linux.ibm.com> (raw)
In-Reply-To: <ZOYIWuq3iqLjDd+q@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>
On 23.08.23 15:23, Alexander Gordeev wrote:
> On Wed, Aug 23, 2023 at 02:41:40PM +0200, Michael Mueller wrote:
> ...
>> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
>> index 9bd0a873f3b1..73153bea6c24 100644
>> --- a/arch/s390/kvm/interrupt.c
>> +++ b/arch/s390/kvm/interrupt.c
>> @@ -3205,8 +3205,10 @@ void kvm_s390_gisa_destroy(struct kvm *kvm)
>> if (gi->alert.mask)
>> KVM_EVENT(3, "vm 0x%pK has unexpected iam 0x%02x",
>> kvm, gi->alert.mask);
>> - while (gisa_in_alert_list(gi->origin))
>> - cpu_relax();
>> + while (gisa_in_alert_list(gi->origin)) {
>> + KVM_EVENT(3, "vm 0x%pK gisa in alert list during destroy", kvm);
>> + process_gib_alert_list();
>
> process_gib_alert_list() has two nested loops and neither of them
> does cpu_relax(). I guess, those are needed instead of one you remove?
Calling function process_gib_alert_list() guarantees the gisa
is taken out of the alert list immediately and thus the potential
endless loop on gisa_in_alert_list() is solved. The issue surfaced
with the following patch that accidently disabled the GAL interrupt
processing on the host that normaly handles the alert list.
The patch has been reverted from devel and will be re-applied in v2.
88a096a7a460 Revert "s390/airq: remove lsi_mask from airq_struct"
a9d17c5d8813 s390/airq: remove lsi_mask from airq_struct
Does that make sense for you?
>
>> + }
>> hrtimer_cancel(&gi->timer);
>> gi->origin = NULL;
>> VM_EVENT(kvm, 3, "gisa 0x%pK destroyed", gisa);
next prev parent reply other threads:[~2023-08-23 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 12:41 [PATCH] KVM: s390: fix gisa destroy operation might lead to cpu stalls Michael Mueller
2023-08-23 13:23 ` Alexander Gordeev
2023-08-23 14:09 ` Michael Mueller [this message]
2023-08-23 16:01 ` Alexander Gordeev
2023-08-23 16:16 ` Claudio Imbrenda
2023-08-24 10:09 ` Michael Mueller
2023-08-23 19:29 ` Heiko Carstens
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=e144381d-4ff3-d7b6-5624-813ea22f196a@linux.ibm.com \
--to=mimu@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mihajlov@linux.ibm.com \
/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