Received: by 10.223.185.116 with SMTP id b49csp5982401wrg; Wed, 28 Feb 2018 01:51:16 -0800 (PST) X-Google-Smtp-Source: AG47ELvVMAMyC/H+OnEn5lfcRaLwdxbXBXzdhi9EztMvIvOEhWIWP5nuNLnfW4mUYB7ZSTM4j3S4 X-Received: by 10.99.173.79 with SMTP id y15mr2540093pgo.136.1519811476169; Wed, 28 Feb 2018 01:51:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519811476; cv=none; d=google.com; s=arc-20160816; b=tDPjuqb73HhngGGxDmGlrSfsLp+b9N6/olC0K3Ixca7IAOP0RcP7Jp3CJIJx/yQIFw nReQtHf8UTxbvhSp8d5fbQ+Id5qejhumpx6As0sTs3CQrhNReneBKcowis/lx2fS9Ba4 x03a1EbbBS+6FeXCZXFzaAuxevpIzVG681Fs2TBjZ0sQvollmvu8e62J3K0fTjGG7cV+ 2kPpmjSxtaaKrN7sJvydy3Nc/AhWhmgtkePi+eYWVfpWq741JtyAqCNbH0apJVlF5ZdN fYXlSeUJYBbs6sbuA/hzMGycy32GAHzPqfXy9V0DhfPf5hNjS3gexacrCn0ObTAC3N5s +R1Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=Wh5MyhS4TBbLMIVfR7Xdd2xI5HLu3N32HAD2PxugkVw=; b=xUv4p1ll51KZMR01YJCkxF5WWSzNarx1U8RF1+mKVt+Whz9JVO6YdxI9rODJTKeNSl TYWqQPwlWC7eqaqUnKPmHqgP0570lLY2IicFSNXV+oe21gwveIiLwVtLX9ceGfpWRRqe 3Cp71gnEdkkgpS7DIBDtaAqpaVCMR7XqHJfn4A7lEQ8aQ5otwSAIkg88MAm+tOUJBcfk 3rFcDkX68soIgjGlLsXDFSdScdb9rpvBd/qEEZdPqF8A4yG14JOyNO9NNHNUQ2Uodpet twXiFRJxAjWp4tlVzacFPZNLmNf+qVHTlcyb8+yiMoNOo2VeMC3wHYMSDux3Bdx4WRfk zCXA== 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 q26si989123pfh.129.2018.02.28.01.50.59; Wed, 28 Feb 2018 01:51:16 -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 S1752417AbeB1Jtm (ORCPT + 99 others); Wed, 28 Feb 2018 04:49:42 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752043AbeB1Jtk (ORCPT ); Wed, 28 Feb 2018 04:49:40 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF5AA402290A; Wed, 28 Feb 2018 09:49:39 +0000 (UTC) Received: from [10.36.118.20] (unknown [10.36.118.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98228AFD43; Wed, 28 Feb 2018 09:49:34 +0000 (UTC) Subject: Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB To: Tony Krowiak , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com References: <1519741693-17440-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1519741693-17440-14-git-send-email-akrowiak@linux.vnet.ibm.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <99b24fc7-3df9-6620-d1df-917214fbdda2@redhat.com> Date: Wed, 28 Feb 2018 10:49:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1519741693-17440-14-git-send-email-akrowiak@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Feb 2018 09:49:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Feb 2018 09:49:39 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'david@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int vfio_ap_mdev_open(struct mdev_device *mdev) > +{ > + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); > + unsigned long events; > + int ret; > + > + matrix_mdev->group_notifier.notifier_call = vfio_ap_mdev_group_notifier; > + events = VFIO_GROUP_NOTIFY_SET_KVM; > + ret = vfio_register_notifier(mdev_dev(mdev), VFIO_GROUP_NOTIFY, > + &events, &matrix_mdev->group_notifier); > + > + ret = kvm_ap_configure_matrix(matrix_mdev->kvm, > + matrix_mdev->matrix); > + if (ret) > + return ret; > + > + ret = kvm_ap_enable_ie_mode(matrix_mdev->kvm); Can't this happen while the guest is already running? Or what hinders us from doing that? > + > + return ret; > +} > + > +static void vfio_ap_mdev_release(struct mdev_device *mdev) Thanks, David / dhildenb