From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35763C47254 for ; Tue, 5 May 2020 08:46:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B1A020675 for ; Tue, 5 May 2020 08:46:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Xm1+ERYk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728341AbgEEIqY (ORCPT ); Tue, 5 May 2020 04:46:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:23652 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728351AbgEEIqY (ORCPT ); Tue, 5 May 2020 04:46:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588668383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xo0QgrHWJ/5ZJxRirXqRejd7DgB0g48e4+rdKXViSlI=; b=Xm1+ERYk0nsc6SWU7DKmRmlu4EhIQu88Nj4AT6i0FHHB6KZBS9b1kJtog/6lDxKrDMMmdp ky6Gc3vrUNRgtuSS1aBUozSyNUpMzZXVkpJoItEA1bPg0FjvQxx5d199D9OP2k+1vhDjqO BmEK8phDDJ6xAwQtIxUUg453mXgu2B4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-165-5yF6fGg3PTaqid8vf2VP3A-1; Tue, 05 May 2020 04:46:18 -0400 X-MC-Unique: 5yF6fGg3PTaqid8vf2VP3A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 599CF800687; Tue, 5 May 2020 08:46:17 +0000 (UTC) Received: from gondolin (ovpn-112-219.ams2.redhat.com [10.36.112.219]) by smtp.corp.redhat.com (Postfix) with ESMTP id E79655D796; Tue, 5 May 2020 08:46:12 +0000 (UTC) Date: Tue, 5 May 2020 10:46:10 +0200 From: Cornelia Huck To: Christian Borntraeger Cc: Janosch Frank , KVM , David Hildenbrand , linux-s390 , Qian Cai , Pierre Morel , Tony Krowiak Subject: Re: [PATCH v2] KVM: s390: Remove false WARN_ON_ONCE for the PQAP instruction Message-ID: <20200505104610.469be44e.cohuck@redhat.com> In-Reply-To: <20200505083515.2720-1-borntraeger@de.ibm.com> References: <20200505083515.2720-1-borntraeger@de.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, 5 May 2020 10:35:15 +0200 Christian Borntraeger wrote: > In LPAR we will only get an intercept for FC==3 for the PQAP > instruction. Running nested under z/VM can result in other intercepts as > well as ECA_APIE is an effective bit: If one hypervisor layer has > turned this bit off, the end result will be that we will get intercepts for > all function codes. Usually the first one will be a query like PQAP(QCI). > So the WARN_ON_ONCE is not right. Let us simply remove it. Thanks, that is helpful to describe. Fixes: e5282de93105 ("s390: ap: kvm: add PQAP interception for AQIC") > Cc: Pierre Morel > Cc: Tony Krowiak > Cc: stable@vger.kernel.org > Link: https://lore.kernel.org/kvm/20200505073525.2287-1-borntraeger@de.ibm.com This links to v1, which is probably not what you want :) > Reported-by: Qian Cai > Signed-off-by: Christian Borntraeger > Reviewed-by: David Hildenbrand > Reviewed-by: Cornelia Huck > --- > arch/s390/kvm/priv.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c > index 69a824f9ef0b..893893642415 100644 > --- a/arch/s390/kvm/priv.c > +++ b/arch/s390/kvm/priv.c > @@ -626,10 +626,12 @@ static int handle_pqap(struct kvm_vcpu *vcpu) > * available for the guest are AQIC and TAPQ with the t bit set > * since we do not set IC.3 (FIII) we currently will only intercept > * the AQIC function code. > + * Note: running nested under z/VM can result in intercepts for other > + * function codes, e.g. PQAP(QCI). We do not support this and bail out. > */ > reg0 = vcpu->run->s.regs.gprs[0]; > fc = (reg0 >> 24) & 0xff; > - if (WARN_ON_ONCE(fc != 0x03)) > + if (fc != 0x03) > return -EOPNOTSUPP; > > /* PQAP instruction is allowed for guest kernel only */