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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 66ED4C07E9B for ; Tue, 6 Jul 2021 12:11:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D28B621B5 for ; Tue, 6 Jul 2021 12:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242363AbhGFMJo (ORCPT ); Tue, 6 Jul 2021 08:09:44 -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;