From nobody Tue Feb 10 06:43:38 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1666358895; cv=none; d=zohomail.com; s=zohoarc; b=UhX6PCU5Z4fhalq4ePWC834nd8GaD59QuId8Qaiz4LG9Ksb4qYYVQI2g56fuKQRFYtP2gNvNqLE5qIu2WGQ8d3rnvCzn0eODR6aymJB4sGeX9YVoUJGd/ungBOiUtuZ5+5rhkdtPjjpRT2LfRn2KeBluYqHtsJ5P/IV6wQZdG94= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666358895; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=z0YG+2NLzWyx0KRFXEpM2GjU3iasA3S4YJbO1qy9pEw=; b=F1IVIbKiMnvqYgkTdHNuGlQaiwLDyiOJq8vCUNxUxPO/UZVpAgro7BuCvf1y5ixf6iN42tBB0W0iTab0cmGZf0W28lkalwzWiGHgbeFLqy0cjmFqIbu0hbTm0bg8GgE3MML4SdqnXx2/q1XWHZcPpwnePA5WvDDTdWclJkMqEx8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666358895327907.4739836827655; Fri, 21 Oct 2022 06:28:15 -0700 (PDT) Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ols4L-0000KR-U4 for importer@patchew.org; Fri, 21 Oct 2022 09:28:14 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olrjP-0005Ti-QE for importer@patchew.org; Fri, 21 Oct 2022 09:06:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olrjI-0005GW-F7 for qemu-devel@nongnu.org; Fri, 21 Oct 2022 09:06:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olrjD-00084f-Uq for qemu-devel@nongnu.org; Fri, 21 Oct 2022 09:06:28 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-607--P__eBQlM_ybje_nYX-Xgw-1; Fri, 21 Oct 2022 09:06:21 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71ACD800B30; Fri, 21 Oct 2022 13:06:20 +0000 (UTC) Received: from localhost (unknown [10.39.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7F6C40CA41F; Fri, 21 Oct 2022 13:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666357583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z0YG+2NLzWyx0KRFXEpM2GjU3iasA3S4YJbO1qy9pEw=; b=fcLek6VkcenzgMnGcRFJv7QExMBMXj7WsQR3TKQI7C/vDBFdXI0zXtnZuMmtDSYSm+dh2o JKxlSYLiNbtaEcyl3p3aDUyUMKAV2pEL1zfkdVFaGek7D4g68J1+i5/7VUyvG0cZ1xDdGY gcXhCM1oEJPnw9eLMaQyVabOtZA9QIY= X-MC-Unique: -P__eBQlM_ybje_nYX-Xgw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Cornelia Huck , Thomas Huth , Christian Borntraeger , David Hildenbrand , Eric Farman , Halil Pasic , Richard Henderson , Janosch Frank Subject: [PULL 06/11] s390x: Add protected dump cap Date: Fri, 21 Oct 2022 17:05:44 +0400 Message-Id: <20221021130549.111864-7-marcandre.lureau@redhat.com> In-Reply-To: <20221021130549.111864-1-marcandre.lureau@redhat.com> References: <20221021130549.111864-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1666358896066100001 Content-Type: text/plain; charset="utf-8" From: Janosch Frank Add a protected dump capability for later feature checking. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden Reviewed-by: Thomas Huth Reviewed-by: Janis Schoetterl-Glausch Message-Id: <20221017083822.43118-7-frankja@linux.ibm.com> --- target/s390x/kvm/kvm_s390x.h | 1 + target/s390x/kvm/kvm.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/target/s390x/kvm/kvm_s390x.h b/target/s390x/kvm/kvm_s390x.h index aaae8570de..f9785564d0 100644 --- a/target/s390x/kvm/kvm_s390x.h +++ b/target/s390x/kvm/kvm_s390x.h @@ -26,6 +26,7 @@ int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_stat= e); void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu); int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu); int kvm_s390_get_hpage_1m(void); +int kvm_s390_get_protected_dump(void); int kvm_s390_get_ri(void); int kvm_s390_get_zpci_op(void); int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_clock); diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 508c24cfec..04cae0b999 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -158,6 +158,7 @@ static int cap_hpage_1m; static int cap_vcpu_resets; static int cap_protected; static int cap_zpci_op; +static int cap_protected_dump; =20 static bool mem_op_storage_key_support; =20 @@ -364,6 +365,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) cap_vcpu_resets =3D kvm_check_extension(s, KVM_CAP_S390_VCPU_RESETS); cap_protected =3D kvm_check_extension(s, KVM_CAP_S390_PROTECTED); cap_zpci_op =3D kvm_check_extension(s, KVM_CAP_S390_ZPCI_OP); + cap_protected_dump =3D kvm_check_extension(s, KVM_CAP_S390_PROTECTED_D= UMP); =20 kvm_vm_enable_cap(s, KVM_CAP_S390_USER_SIGP, 0); kvm_vm_enable_cap(s, KVM_CAP_S390_VECTOR_REGISTERS, 0); @@ -2045,6 +2047,11 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *n= otifier, uint32_t sch, return kvm_vm_ioctl(kvm_state, KVM_IOEVENTFD, &kick); } =20 +int kvm_s390_get_protected_dump(void) +{ + return cap_protected_dump; +} + int kvm_s390_get_ri(void) { return cap_ri; --=20 2.37.3