Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4614481pxv; Tue, 6 Jul 2021 05:21:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsuj1OqQsbAbBSDA+JRarGxM18P0mwEyEDpxlqX/HPDlt7/lUn+NTBHI8msMEfw5dM7ozO X-Received: by 2002:a17:906:974a:: with SMTP id o10mr17756640ejy.406.1625574103405; Tue, 06 Jul 2021 05:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625574103; cv=none; d=google.com; s=arc-20160816; b=LFb7/lHYwxQBhjpRRasqDXW8aJppIsMZaImnLF+VOgfU048FWWzUJcGTt6uO1JmOln eUmwFO3LPf3QhjVfhJ43jDy1s1/WRW7QGAm3J6jxUXRgQJcrCx5WLGP2rKQGtuOuIyT1 t+jA3pU4vehqoxitmArVZxevJlt8rdlkV4jxZUX7Vat8kxXelNJUy4gdD4e9DzltRzoo R/ZafXuJd7uuxLKN5WoKi0SFYwbyz4id1ZMD/RpjTWAmDVVIVERyqTQtd+d3kd8ycjBF UDUqv9iVU+aItCzElzvTJmmZlOruZQdTfah1/LI9vf2U2KlqQvDH9fq3oPV4Lnt/u3Cd HVDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=uW+E9jScNZ5agh1jL2MsJyyJ0npRr318JrpawlDgYKM=; b=Sv135XHetk4TIfH1FzWNsF94QEfmNWHTI9svcb29aI5nlQduH3QoUuuu1bF61A8N/b 68T4ywBWUlni2IsV3ptMaXr2Ly/2SJGEqZNyX2IaqiG7DtgqGhKlGoakI1bGkao8+7Cz s4cXWm2sMJ+gd99X8kJIdfI0WQfhWsx6JvVBLEhNJjIL2ItLQbzuE6/DnkJ7gSK13yUx Ys0y+gbwFLELYbTbZG1+8aTQvwN/6Aw7sb+J3PmTnY90ZXHzLAtEbSPI4h2gxZ6E2C84 I8Wzc0K8Fe8Cik+Ny6jke7Pr2sH+fpvr88CZLvnI81XpwhAYLIYSDqVfxd8MhL2c0nnA 2nZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GF1mC7uC; 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 l20si14147806edt.377.2021.07.06.05.21.19; Tue, 06 Jul 2021 05:21:43 -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=GF1mC7uC; 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 S233745AbhGFMWH (ORCPT + 99 others); Tue, 6 Jul 2021 08:22:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27805 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242402AbhGFMCe (ORCPT ); Tue, 6 Jul 2021 08:02:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625572795; 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=uW+E9jScNZ5agh1jL2MsJyyJ0npRr318JrpawlDgYKM=; b=GF1mC7uCBZnNzh96WqufvL/F+t/2rhzn82Y2RIz0hLnxzaSO7lFYSnkL7YMziy6EWJ5PVT Y7AFqTP0ZmXGs0rxbo1ayMccKaBOjcRy39/a+eqX4PyxVo/HJG6eCpwGrR8IbeVTY8hSir FNsQB59tlOvtu7kvQ+yChFkUf8H709o= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-357-wDdpgtkON2STTvkG7kr7BA-1; Tue, 06 Jul 2021 07:59:54 -0400 X-MC-Unique: wDdpgtkON2STTvkG7kr7BA-1 Received: by mail-wm1-f69.google.com with SMTP id t12-20020a7bc3cc0000b02901f290c9c44eso824789wmj.7 for ; Tue, 06 Jul 2021 04:59:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=uW+E9jScNZ5agh1jL2MsJyyJ0npRr318JrpawlDgYKM=; b=etL/BJ8JLUbvidmV4Mn1tZpz+1maEMsSa8s539pZRO7rO/I0ZQLLA2t5eE3f7cqUXd bQDUNqIn0/65TKGaXq4Jm+oGT+60bmYw6cJL54SkXA8eVS7KUKCjE3NvprQ5Pn6c6Gsp z9v0bZh64sq9+L/ri2zuXDfLkUaNJcqLc/S8x7bw605T+0MAkwDmSwAX7oPM9eRJP1uQ TzsCZ5HA0ChmggdFIWkEv/sklbEo1vLOMBokNrwTflc8ZlBhdb1rr7eOM+W3EtBtS/7Q GXxHwaV2H0yNYJWde2hlgyS59Ee+iaExRfXMquTonKdDedCzko2oJpNUEN78vMnv7bBx BvRQ== X-Gm-Message-State: AOAM530lDuh52Zq9TrBzq8TADdRoKPGdm1xSDRa/k+T2pFRjby1eS+5L 0n5RLx7rotYdH1128F/0WwZdVOkJxUt+8uPlSqL02ZPk0zAi8c/FqOQ+xh6qowV13UVjYlkVjHq jDc6laNh9h3Xmidv6SjEVfeMl7CPUJW9My2/wROmCfcf+WM+4jFg0puZIDoc6CGDqO9Aq7VUI X-Received: by 2002:a5d:69c9:: with SMTP id s9mr21255009wrw.155.1625572793166; Tue, 06 Jul 2021 04:59:53 -0700 (PDT) X-Received: by 2002:a5d:69c9:: with SMTP id s9mr21254984wrw.155.1625572792939; Tue, 06 Jul 2021 04:59:52 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id h13sm5700227wrs.68.2021.07.06.04.59.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jul 2021 04:59:52 -0700 (PDT) Subject: Re: [PATCH] KVM: s390: Enable specification exception interpretation To: Christian Borntraeger , Cornelia Huck , Janis Schoetterl-Glausch , Janosch Frank , Heiko Carstens , Vasily Gorbik Cc: Claudio Imbrenda , "open list:KERNEL VIRTUAL MACHINE for s390 (KVM/s390)" , "open list:S390" , open list References: <20210706114714.3936825-1-scgl@linux.ibm.com> <87k0m3hd7h.fsf@redhat.com> <194128c1-8886-5b8b-2249-5ec58b8e7adb@de.ibm.com> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Tue, 6 Jul 2021 13:59:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <194128c1-8886-5b8b-2249-5ec58b8e7adb@de.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06.07.21 13:56, Christian Borntraeger wrote: > > > On 06.07.21 13:52, Cornelia Huck wrote: >> 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?) > > Not for all hardware versions, but also no indication. The architecture > says that the HW is free to do this or not. (which makes the vsie code > simpler). I remember the architecture said at some point to never set undefined bits - and this bit is undefined on older HW generations. I might be wrong, though. (I though HW learned the lesson to always use proper feature indications along with new features) -- Thanks, David / dhildenb