Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp947560imu; Thu, 20 Dec 2018 07:47:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/UFOy07ynInkWjOMuPsCil4O5CFcDu6s6RN3iJq9+nbyDAeGGtQ4tp9HHhdGTbZtarmDQvW X-Received: by 2002:a63:a41:: with SMTP id z1mr10564153pgk.117.1545320879039; Thu, 20 Dec 2018 07:47:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545320879; cv=none; d=google.com; s=arc-20160816; b=UQ+J57LFjIYtkk8AA0qFwMtQw7z6t6h/SWbuqkx92AraNhDARHbfm9gIL2mnlTC+y0 LqrtqM2UPFxljt+X10SxxfOLG6Gaq1O8WqF3Y9PKlJhCfQLff0Czdm0S44uvn892Rl/P NJcQnuKW+AKhWVNUcicEF5LbO67AgIWD2BATqICwfosagFvKRxqwfELd4L7B0Inh14sS 5gK70ShRoqmQEFpM7HdUdG48tKoOTAVzgEr0facSr1ggMwyHT7pa/+byz0OfZ3T0D/jn A08WrtaaFbOk5X5U0knvBKbJIVRmspHGJ5yxnZ8z7Cuhk0noe2j1U9TvU5zIMz3fZH7/ 38og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=QoJaVmztD5BJjeRrczuC1ZbbVA6UCPl6HsqYIXV4oyI=; b=Z0+NccBuz6LDhmR1n9jU66+1Jnly6IFtj+djveW+t5cHYPbgE369nfdpadCwhBXcnr QEMbeF5KKEGQKk0qLSwo3N3m6lMZJA+pIPWWcQJ7dkJQNqH4SDaxjuReD+o+DrAn+TtT h5ltHNnYQBenadU7r/0mF9DXL+2ygbFe4DRsbH1YdEtLFeMSJxIOvs5NGv0Y1j3v/U0B ERa/bqUqlmKN6efdgO55D6jyPa3iyFk7BgEOvBpESUsMMLl61YmzcTVcUCj0wjcA71zG zgMn2j+v8ghsLMvYfHr5aj6MZm1ZUOA9XmONcMYRZDLVH5I5/tFqOJvXKzyB5npBblYW CPIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si18611174pgu.421.2018.12.20.07.47.43; Thu, 20 Dec 2018 07:47:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732089AbeLTM27 (ORCPT + 99 others); Thu, 20 Dec 2018 07:28:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45212 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731181AbeLTM27 (ORCPT ); Thu, 20 Dec 2018 07:28:59 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C726C05B02A; Thu, 20 Dec 2018 12:28:59 +0000 (UTC) Received: from gondolin (dhcp-192-187.str.redhat.com [10.33.192.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 411C5100034B; Thu, 20 Dec 2018 12:28:51 +0000 (UTC) Date: Thu, 20 Dec 2018 13:28:49 +0100 From: Cornelia Huck To: Michael Mueller Cc: KVM Mailing List , Linux-S390 Mailing List , linux-kernel@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , Christian Borntraeger , Janosch Frank , David Hildenbrand , Halil Pasic , Pierre Morel Subject: Re: [PATCH v5 08/15] KVM: s390: add the GIB and its related life-cyle functions Message-ID: <20181220132849.2b7cf473.cohuck@redhat.com> In-Reply-To: <20181219191756.57973-9-mimu@linux.ibm.com> References: <20181219191756.57973-1-mimu@linux.ibm.com> <20181219191756.57973-9-mimu@linux.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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 20 Dec 2018 12:28:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Dec 2018 20:17:49 +0100 Michael Mueller wrote: > The Guest Information Block (GIB) links the GISA of all guests > that have adapter interrupts pending. These interrupts cannot be > delivered because no vcpu of these guests is currently running in > SIE context. Instead, a GIB alert is issued on the host to schedule > these guests to run. > > This mechanism allows to process adapter interrupts for currently > not running guests. > > The GIB is created during host initialization and associated with > the Adapter Interruption Facility in case an Adapter Interruption > Virtualization Facility is available. > > The GIB initialization and thus the activation of the related code > will be done in an upcoming patch of this series. > > Signed-off-by: Michael Mueller > Reviewed-by: Janosch Frank > Reviewed-by: Christian Borntraeger > --- > arch/s390/include/asm/kvm_host.h | 10 +++++++++ > arch/s390/kvm/interrupt.c | 44 ++++++++++++++++++++++++++++++++++++++++ > arch/s390/kvm/kvm-s390.c | 1 + > arch/s390/kvm/kvm-s390.h | 2 ++ > 4 files changed, 57 insertions(+) > +int kvm_s390_gib_init(u8 nisc) > +{ > + int rc = 0; > + > + if (!css_general_characteristics.aiv) { > + KVM_EVENT(3, "%s", "gib not initialized, no AIV facility"); > + goto out; > + } > + > + gib = (struct kvm_s390_gib *)get_zeroed_page(GFP_KERNEL | GFP_DMA); > + if (!gib) { > + rc = -ENOMEM; > + goto out; > + } > + > + gib->nisc = nisc; > + if (chsc_sgib((u32)(u64)gib)) { > + pr_err("Associating the GIB with the AIV facility failed\n"); I presume that logging the chsc response code (or returning it instead of -EIO) would not give any interesting information? > + free_page((unsigned long)gib); > + gib = NULL; > + rc = -EIO; > + goto out; > + } > + > + KVM_EVENT(3, "gib 0x%pK (nisc=%d) initialized", gib, gib->nisc); > +out: > + return rc; > +} Anyhow, Reviewed-by: Cornelia Huck