From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35228 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726664AbgBXTON (ORCPT ); Mon, 24 Feb 2020 14:14:13 -0500 Subject: Re: [PATCH v4 16/36] KVM: s390: protvirt: Handle spec exception loops References: <20200224114107.4646-1-borntraeger@de.ibm.com> <20200224114107.4646-17-borntraeger@de.ibm.com> From: David Hildenbrand Message-ID: <67cd8b46-2b9a-e7a0-bf60-ca7018d3be56@redhat.com> Date: Mon, 24 Feb 2020 20:14:03 +0100 MIME-Version: 1.0 In-Reply-To: <20200224114107.4646-17-borntraeger@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-s390-owner@vger.kernel.org List-ID: To: Christian Borntraeger , Janosch Frank Cc: KVM , Cornelia Huck , Thomas Huth , Ulrich Weigand , Claudio Imbrenda , linux-s390 , Michael Mueller , Vasily Gorbik , Janosch Frank On 24.02.20 12:40, Christian Borntraeger wrote: > From: Janosch Frank > > SIE intercept code 8 is used only on exception loops for protected > guests. That means we need to stop the guest when we see it. This is > done by userspace. > > Signed-off-by: Janosch Frank > Reviewed-by: Thomas Huth > Reviewed-by: Cornelia Huck > [borntraeger@de.ibm.com: patch merging, splitting, fixing] > Signed-off-by: Christian Borntraeger > --- > arch/s390/kvm/intercept.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c > index 00a79442a428..331e620dcfdf 100644 > --- a/arch/s390/kvm/intercept.c > +++ b/arch/s390/kvm/intercept.c > @@ -231,6 +231,13 @@ static int handle_prog(struct kvm_vcpu *vcpu) > > vcpu->stat.exit_program_interruption++; > > + /* > + * Intercept 8 indicates a loop of specification exceptions > + * for protected guests. > + */ > + if (kvm_s390_pv_cpu_is_protected(vcpu)) > + return -EOPNOTSUPP; > + > if (guestdbg_enabled(vcpu) && per_event(vcpu)) { > rc = kvm_s390_handle_per_event(vcpu); > if (rc) > Acked-by: David Hildenbrand -- Thanks, David / dhildenb