Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4607969pxv; Tue, 6 Jul 2021 05:12:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7bJTed/W75T8Z04Z3LrWKdoG/lKkN/Oe8md1L8u5g3f5093sfvnC4nrdZF5xsSJ3LfaN1 X-Received: by 2002:a17:907:3e89:: with SMTP id hs9mr9200381ejc.509.1625573533535; Tue, 06 Jul 2021 05:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625573533; cv=none; d=google.com; s=arc-20160816; b=DXXtcDB5FRk0bPb2KEy/wRtbSarrO8uMhX6N6kYGi51xzm6VFMCaoOyFI0t/MRXM7C +82uXOTP4dssur3ZQN6FjS/RTX63wrELk+bWK9jcYwV/9Y716ZzKmlXsSzzV5nrjaH0M Xonke3K0SmLJa7AKWT8yyEROYb4mdq6Al/yQejCYDc9/44zWilAOrBvSwspEdseEfvCe 19yw1Uqnl+hRg7pgMP5rK234UEP1m4ELqxkQGV7sTXsJnNjCHg5Nb6Inb1paTnzRQAiT UGOH5klMq1/PAxvDugQenmkJBZh5hKPB4bDt0zW+XXpzA6c4PNhvECuZRnD15SCFp5Ec PILQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:organization:in-reply-to:subject:cc:to:from :dkim-signature; bh=R8yqWbSkkT7lmxSqUdfVlQ3J+GUloOpHJrwGKFtDrsU=; b=jsSik0585U3wXGSD87tZxkCAwWc0C4hRFt8+98C3UW+NcNDJ/IgzPLq8UEx+2+nPpW vb4oucmI8JAQI67ZBXbkXGT2ZXBaz435p3Ytm2OMXrcESdtHuoR6v7zOIXFUQl6/7hVV ohk/VexuqBa48lMO9oUuA1jhBTt7V7f3DO24iREgeJiS871R7Tt4bX00HAg+ZKcpWboS 9aoBPyz0dRMNEIueyb2NvNBy+4zHcOu/x7RSFc9D19kxs1UVH6xo3FDMxtC/oaw6WsD/ LL0IqPjPEpJTwUnDrZ3jLYNmaCmsxB9h/OhrS9q0X3g1qMzp2IEVob5ODMWyJGdu+VmB VMdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PVtI+M4z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si14659521ejs.220.2021.07.06.05.11.50; Tue, 06 Jul 2021 05:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PVtI+M4z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242220AbhGFMJn (ORCPT + 99 others); Tue, 6 Jul 2021 08:09:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47443 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238609AbhGFLyv (ORCPT ); Tue, 6 Jul 2021 07:54:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625572332; 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: in-reply-to:in-reply-to:references:references; bh=R8yqWbSkkT7lmxSqUdfVlQ3J+GUloOpHJrwGKFtDrsU=; b=PVtI+M4zqBIWmy7rc0CI/pstbRi9nj+7byVH11x76yPJ1YsisjjJVatz78Cc8QzCX4c5q7 XFTxIxWFXnqP7RMgTigaSN4kjF9zlHxqXqVRpD3StHETGXKt3nxaPt+i1DHVzBMIglndqf xOqHuZCNPRHWHDxgo1kRv0vIqZtDyCE= 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-478-yfMc0ddEOiqjUjX5uMxPww-1; Tue, 06 Jul 2021 07:52:09 -0400 X-MC-Unique: yfMc0ddEOiqjUjX5uMxPww-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 1B5AF100C609; Tue, 6 Jul 2021 11:52:08 +0000 (UTC) Received: from localhost (ovpn-113-13.ams2.redhat.com [10.36.113.13]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 55C035D6CF; Tue, 6 Jul 2021 11:52:04 +0000 (UTC) From: Cornelia Huck To: Janis Schoetterl-Glausch , Christian Borntraeger , Janosch Frank , Heiko Carstens , Vasily Gorbik Cc: Janis Schoetterl-Glausch , David Hildenbrand , Claudio Imbrenda , "open list:KERNEL VIRTUAL MACHINE for s390 (KVM/s390)" , "open list:S390" , open list Subject: Re: [PATCH] KVM: s390: Enable specification exception interpretation In-Reply-To: <20210706114714.3936825-1-scgl@linux.ibm.com> Organization: Red Hat GmbH References: <20210706114714.3936825-1-scgl@linux.ibm.com> User-Agent: Notmuch/0.32.1 (https://notmuchmail.org) Date: Tue, 06 Jul 2021 13:52:02 +0200 Message-ID: <87k0m3hd7h.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 06 2021, Janis Schoetterl-Glausch wrote: > When this feature is enabled the hardware is free to interpret > specification exceptions generated by the guest, instead of causing > program interruption interceptions. > > This benefits (test) programs that generate a lot of specification > exceptions (roughly 4x increase in exceptions/sec). > > Interceptions will occur as before if ICTL_PINT is set, > i.e. if guest debug is enabled. > > Signed-off-by: Janis Schoetterl-Glausch > --- > I'll additionally send kvm-unit-tests for testing this feature. > > arch/s390/include/asm/kvm_host.h | 1 + > arch/s390/kvm/kvm-s390.c | 2 ++ > arch/s390/kvm/vsie.c | 2 ++ > 3 files changed, 5 insertions(+) (...) > diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c > index b655a7d82bf0..aadd589a3755 100644 > --- a/arch/s390/kvm/kvm-s390.c > +++ b/arch/s390/kvm/kvm-s390.c > @@ -3200,6 +3200,8 @@ static int kvm_s390_vcpu_setup(struct kvm_vcpu *vcpu) > vcpu->arch.sie_block->ecb |= ECB_SRSI; > if (test_kvm_facility(vcpu->kvm, 73)) > vcpu->arch.sie_block->ecb |= ECB_TE; > + if (!kvm_is_ucontrol(vcpu->kvm)) > + vcpu->arch.sie_block->ecb |= ECB_SPECI; Does this exist for any hardware version (i.e. not guarded by a cpu feature?) > > if (test_kvm_facility(vcpu->kvm, 8) && vcpu->kvm->arch.use_pfmfi) > vcpu->arch.sie_block->ecb2 |= ECB2_PFMFI;