From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614959812; cv=none; d=zohomail.com; s=zohoarc; b=iz4mB1dfROurtisVuGr1XCuuf1A6hbOTeiOhN7hl51X+coH00ZjXJ612UZvXNEf6Kt5Bb/Y02ps65ASO4oJyaeCW65PsnGy9YR0H1gSzmnkwH56EjvLl/iIKhnUuBle8GDcOk5K+lPo3m3f5a19hxjQXA0Yks+0+KQengFlONLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614959812; h=Content-Type: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=BrXiNEnhECUFgYacW/pyoN4G9h6gNQGkgmLZyZT9kRo=; b=UdagMhj4l2VpTRlD76/U955Xey22s5Xd7LiOPKvv7PJHbeE6Qxtt5XIdvpE9OFmBTl6SVD8HQGFCpHztvWQz2FuWPLpn7OqIQcJfpp/tkY90pQyjhFyTLw69owN8pm56cB82Fp7WIN4eCnikj6W4rxada9yj20mEzwFREFabXWw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614959812043287.09831042463986; Fri, 5 Mar 2021 07:56:52 -0800 (PST) Received: from localhost ([::1]:60646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICos-00056J-Vz for importer@patchew.org; Fri, 05 Mar 2021 10:56:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnc-0003jV-0i for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:37073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICna-0003Ir-ED for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:31 -0500 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-500-2SOGEo_BNyig5Vv2S0bPhQ-1; Fri, 05 Mar 2021 10:55:27 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3FFA83DD20; Fri, 5 Mar 2021 15:55:25 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D04D6A046; Fri, 5 Mar 2021 15:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959729; 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=BrXiNEnhECUFgYacW/pyoN4G9h6gNQGkgmLZyZT9kRo=; b=C0gn+wGaVF9PSR5b4m8E3syyKnDb2jVK7mlqifmwsQLvgpboxqDw8eaIvrTGgW+3YuY+7A Wr0jf+wHwg1Hiq/OrjeBg4fLMU5emKOog1sJLYgT5SnEUZsmv41UB3uawL4ebmij8PkSKC tGoGvsbJLRNKmKUWIXLatEQNfsJGeNs= X-MC-Unique: 2SOGEo_BNyig5Vv2S0bPhQ-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 1/8] s390x/cpu_model: disallow unpack for --only-migratable Date: Fri, 5 Mar 2021 16:55:10 +0100 Message-Id: <20210305155517.1604547-2-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=63.128.21.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Hildenbrand , Cornelia Huck , qemu-devel@nongnu.org, Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Christian Borntraeger Secure execution (aka protected virtualization) guests cannot be migrated at the moment. If the unpack facility is provided in the cpu model, a guest may choose to transition to secure mode, making the guest unmigratable at that point in time. If the machine was explicitly started with --only-migratable, we would get a failure only when the guest actually tries to transition; instead, explicitly disallow the unpack facility if --only-migratable was specified to avoid late surprises. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Message-Id: <20210125135332.181324-1-borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck --- target/s390x/cpu_models.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 35179f9dc7ba..dd474c5e9ad1 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -26,6 +26,7 @@ #include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #endif #include "qapi/qapi-commands-machine-target.h" @@ -878,6 +879,15 @@ static void check_compatibility(const S390CPUModel *ma= x_model, return; } =20 +#ifndef CONFIG_USER_ONLY + if (only_migratable && test_bit(S390_FEAT_UNPACK, model->features)) { + error_setg(errp, "The unpack facility is not compatible with " + "the --only-migratable option. You must remove either " + "the 'unpack' facility or the --only-migratable option"= ); + return; + } +#endif + /* detect the missing features to properly report them */ bitmap_andnot(missing, model->features, max_model->features, S390_FEAT= _MAX); if (bitmap_empty(missing, S390_FEAT_MAX)) { --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614960104; cv=none; d=zohomail.com; s=zohoarc; b=X7M2gK6+XgyA2JFjtUx8jb4ylZpVvgF3dO4ju2PpRRyec/zL6cQ//V3MpjVqWfEbe/Q9YMb52rfwOBbvHootrbKklKKfHS/5J6wCMQpiCU4U1z0ZeohC07iB0PqAjWGrBL46z5n5g7l/VCcBSjxrdiIHNaLbyayHm9sugWETJlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614960104; h=Content-Type: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=6+KUDXS7s2v2nQ+4pIf+NkFStYfF9ZOSsr41dCIHIi0=; b=XBLEwukApv5wkf1XnZseiO9LdkftmMV6zJqtWXuBGg/u7oepTMf2vhlervSDsd/QgNP0xWHLVvxu1wcp7NNekBmGENc5gYjyRXaqzcGOWgA8pc/EdZCjgd5EA5BIMRvfM+dSX0O6e2H5sR9PLCNy31PyvSdepiOku7Xn6qLge4c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614960104050705.7759365613307; Fri, 5 Mar 2021 08:01:44 -0800 (PST) Received: from localhost ([::1]:46296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICta-0002ao-TO for importer@patchew.org; Fri, 05 Mar 2021 11:01:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnk-0003xI-0L for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:51895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICni-0003OF-Cj for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:39 -0500 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-506-TR8RReP1MLiNIGUotbGT0g-1; Fri, 05 Mar 2021 10:55:28 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EE14EC1A0; Fri, 5 Mar 2021 15:55:27 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D35B60843; Fri, 5 Mar 2021 15:55:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959737; 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=6+KUDXS7s2v2nQ+4pIf+NkFStYfF9ZOSsr41dCIHIi0=; b=eHsMJo/CGf09LDwfhGraA6IwFQkanS3vvYTMw1HBAOkVBUdsHyk8MPtBukso2BfWs4lUfu LSQ6luu+imWvAW4r3evbhLBIqCjS2xyx/dvC4tZxO1l59RO0M/aGmoVFGQOtYV6dIdR+D4 6G3/vwBZSuKvPeCOcFgFNIjjRMEVs54= X-MC-Unique: TR8RReP1MLiNIGUotbGT0g-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 2/8] target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section Date: Fri, 5 Mar 2021 16:55:11 +0100 Message-Id: <20210305155517.1604547-3-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=63.128.21.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Christian Borntraeger , qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Thomas Huth There is a compiler warning with GCC 9.3 when compiling with the -fsanitize=3Dthread compiler flag: In function 'strncpy', inlined from 's390x_write_elf64_notes' at ../target/s390x/arch_dump.c:2= 19:9: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 8 equals destination size [-Werror=3Dstringop-truncation] Since the name should always be NUL-terminated, let's use g_strlcpy() to silence this warning. And while we're at it, also add an assert() to make sure that the provided names always fit the size field (which is fine for the current callers, the function is called once with "CORE" and once with "LINUX" as a name). Signed-off-by: Thomas Huth Reviewed-by: Christian Borntraeger Message-Id: <20210205093921.848260-1-thuth@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/arch_dump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index 50fa0ae4b679..cc1330876bef 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -212,11 +212,13 @@ static int s390x_write_elf64_notes(const char *note_n= ame, int note_size; int ret =3D -1; =20 + assert(strlen(note_name) < sizeof(note.name)); + for (nf =3D funcs; nf->note_contents_func; nf++) { memset(¬e, 0, sizeof(note)); note.hdr.n_namesz =3D cpu_to_be32(strlen(note_name) + 1); note.hdr.n_descsz =3D cpu_to_be32(nf->contents_size); - strncpy(note.name, note_name, sizeof(note.name)); + g_strlcpy(note.name, note_name, sizeof(note.name)); (*nf->note_contents_func)(¬e, cpu, id); =20 note_size =3D sizeof(note) - sizeof(note.contents) + nf->contents_= size; --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614959942; cv=none; d=zohomail.com; s=zohoarc; b=nPjL15c3VVQu+BYxhRVkFlRyXXEzojFPgoZRnHoFy9W7FRY3kTobffWVB+WlkbhHQvk2u05gFDw7Y5s0TK7DBKgwDfD3vTWW/rvcEc9exEC88j3W68Q/TR1tbEhtH2yKMUFxwOgqyPWNFqLY2OwqYCWWhffTNReJj1fmLaZduSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614959942; h=Content-Type: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=z5tYMPhFZMBSi4y1aG0eRsNQP88oVaKFh1DzlawSbPU=; b=kVKe0OVVOj3y6nP7rjkGUKeQ8fmgSxxwbIKIeKRt+uI6RI8ted3KSV3omVOzcMaiDkDQpD0lxV3qJpSQs39N9bl7PveOl6zpRh3ZH2IWjw06CVuK0EfeCjVoFTk226Rjgu6D0n1jXosEkeL5dk505Nws5pv/+Le7EJPp4rkhAKQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614959942935788.5279253765615; Fri, 5 Mar 2021 07:59:02 -0800 (PST) Received: from localhost ([::1]:39696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICqz-00088j-4q for importer@patchew.org; Fri, 05 Mar 2021 10:59:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnj-0003w0-As for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:39 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICnf-0003Mm-TM for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:39 -0500 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-60-ov8eaOJzO-qAsXkc8lFoFw-1; Fri, 05 Mar 2021 10:55:31 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80F52881280; Fri, 5 Mar 2021 15:55:29 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC04360843; Fri, 5 Mar 2021 15:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959735; 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=z5tYMPhFZMBSi4y1aG0eRsNQP88oVaKFh1DzlawSbPU=; b=D6d491W57G2JmBzLZZZFUhJ5nyat0aZn7DF0vMEHLqmFgAHoZi4VlX7DrAivKX1NKbaEKW CEsXpP2ltRg/3jWHYBBCk/aDmNZf3Umkkh5HgAejyzALhhuMn7nBC/ORXITp7OMMQjqigb EaGHM/zl9n/eEaaeaagLm+TdK9bQ80A= X-MC-Unique: ov8eaOJzO-qAsXkc8lFoFw-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 3/8] hw/s390x: fix build for virtio-9p-ccw Date: Fri, 5 Mar 2021 16:55:12 +0100 Message-Id: <20210305155517.1604547-4-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Cornelia Huck , qemu-stable@nongnu.org, qemu-devel@nongnu.org, Halil Pasic , qemu-s390x@nongnu.org, Jakob Naucke Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Halil Pasic Commit 2c44220d05 ("meson: convert hw/arch*"), which migrated the old Makefile.objs to meson.build accidentally excluded virtio-ccw-9p.c and thus the virtio-9p-ccw device from the build (and potentially also included the file virtio-ccw-blk.c twice in the source set). And since CONFIG_VIRTFS can't be used the way it was used here (see commit 2c9dce0196 ("meson: do not use CONFIG_VIRTFS")), the preconditions have to be written differently. Let's fix this! Signed-off-by: Halil Pasic Fixes: 2c44220d05 ("meson: convert hw/arch*") Reported-by: Jakob Naucke Cc: qemu-stable@nongnu.org Reviewed-by: Thomas Huth Message-Id: <20210218034059.1096078-1-pasic@linux.ibm.com> Signed-off-by: Cornelia Huck --- hw/s390x/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 2a7818d94b94..91495b563146 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -40,7 +40,9 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('= virtio-ccw-net.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-ccw-rng.c'= )) virtio_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-ccw-scsi.= c')) virtio_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-ccw-ser= ial.c')) -virtio_ss.add(when: ['CONFIG_VIRTIO_9P', 'CONFIG_VIRTFS'], if_true: files(= 'virtio-ccw-blk.c')) +if have_virtfs + virtio_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-ccw-9p.c'= )) +endif virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-ccw.= c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-= ccw.c')) s390x_ss.add_all(when: 'CONFIG_VIRTIO_CCW', if_true: virtio_ss) --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614959856; cv=none; d=zohomail.com; s=zohoarc; b=cCNbe28RoaYHxIFicCVSX1uaNY4CyzjfDH3e/YhH2xNKC9d1SUM3UqI0itoqIFAo2QElE9RKE8W6uE9EmCNN2diGnr8inwhGv9snIrub33mYl13AAWWDO9MLT2LwBc9XT06rsNrNme1uYqnZdRetw4tu3C8BLRorLIAa343CmTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614959856; h=Content-Type: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=IaFiDsRsaw9F04tnYksuM1IXglGEgh73g4j2b2sSu60=; b=Azm/SbeGEP8Svcp1hGEwlXgXZKkJ30+Lc5pf+HZEJql7+JVr0iOJLYV7z5SLE6QXmuh3pi6H17nbpEmlClTIG07l6Zb4jiZU8S/M46YWUljleXcU9Iw61exc3nKaItdpZH47kdwG9GMzr7j0XxkxI0s1Ypux4R2tAtdTGbOBMf8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614959856122478.7606686727788; Fri, 5 Mar 2021 07:57:36 -0800 (PST) Received: from localhost ([::1]:33008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICpa-0005Ks-KW for importer@patchew.org; Fri, 05 Mar 2021 10:57:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnk-0003xb-1a for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:26612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICng-0003Mi-00 for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:39 -0500 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-290-FA8A0hkxMW2MtangpDBUMQ-1; Fri, 05 Mar 2021 10:55:32 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 055951966323; Fri, 5 Mar 2021 15:55:31 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD934648A2; Fri, 5 Mar 2021 15:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959735; 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=IaFiDsRsaw9F04tnYksuM1IXglGEgh73g4j2b2sSu60=; b=cLAr2/ylT5FZBTgmO6pWSfk7xFSYpxqOfloa6qG70M+PLpZNr+Rml+hUuifo6Co0h8mLgn a2BZuFSlPjBIYVH1U6Z672vDSSQbNRZL2PPY3mGjeaF5186l43GFs3CiDHWIGUt23XjtGy SzH68ea8bOWzRU2WudKF448vr7EPeQA= X-MC-Unique: FA8A0hkxMW2MtangpDBUMQ-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 4/8] s390x/pci: restore missing Query PCI Function CLP data Date: Fri, 5 Mar 2021 16:55:13 +0100 Message-Id: <20210305155517.1604547-5-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=63.128.21.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org, Matthew Rosato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Matthew Rosato Some CLP response data was accidentally dropped when fixing endianness issues with the Query PCI Function CLP response. All of these values are sent as 0s to the guest for emulated devices, so the impact is only observed on passthrough devices. Fixes: a4e2fff1b104 ("s390x/pci: fix endianness issues") Signed-off-by: Matthew Rosato Message-Id: <1613681609-9349-1-git-send-email-mjrosato@linux.ibm.com> Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-inst.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 654fac6c0a5b..4b8326afa4f2 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -284,10 +284,15 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintpt= r_t ra) stq_p(&resquery->sdma, pbdev->zpci_fn.sdma); stq_p(&resquery->edma, pbdev->zpci_fn.edma); stw_p(&resquery->pchid, pbdev->zpci_fn.pchid); + stw_p(&resquery->vfn, pbdev->zpci_fn.vfn); resquery->flags =3D pbdev->zpci_fn.flags; resquery->pfgid =3D pbdev->zpci_fn.pfgid; + resquery->pft =3D pbdev->zpci_fn.pft; + resquery->fmbl =3D pbdev->zpci_fn.fmbl; stl_p(&resquery->fid, pbdev->zpci_fn.fid); stl_p(&resquery->uid, pbdev->zpci_fn.uid); + memcpy(resquery->pfip, pbdev->zpci_fn.pfip, CLP_PFIP_NR_SEGMENTS); + memcpy(resquery->util_str, pbdev->zpci_fn.util_str, CLP_UTIL_STR_L= EN); =20 for (i =3D 0; i < PCI_BAR_COUNT; i++) { uint32_t data =3D pci_get_long(pbdev->pdev->config + --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614960203; cv=none; d=zohomail.com; s=zohoarc; b=MteTIj7SzEFJX4xbZ+RWSy8wB/He0Y+u9fXshEechJLhkzj3F/W1NpjCgr+vV8xUMRBXI+1GBKTsp3Dw5i7mIhreHtMzTkW1+gknTa0rGdNWqapICkrrgOCkrGY7HxKnkVtqU//HF1mxqT4UN942gEwPOL3xxCN8BmJhyYChcYk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614960203; h=Content-Type: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=aufj7ko5nmEu95WbZy5r3t1B+AtfaF0ZPOk5zIttzIQ=; b=ArtEfqhWbqXeh9Fyom5PVCTG6gsJzSkh2F2AGyaP45lga/7BH3oBWrrsOCgnX1vjpI1oA/KVpjIj6wak1erhjslSkrhNwXu0R662nGmDzt7xYRhSFlgSM7ujyrOhf4A40BZlq0MlsDgN0hVQ7tmujgfQLfdnPzOhO5ww1X4xio4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614960202722980.3688881596131; Fri, 5 Mar 2021 08:03:22 -0800 (PST) Received: from localhost ([::1]:52388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICv8-0005EH-5q for importer@patchew.org; Fri, 05 Mar 2021 11:03:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICno-00044W-8f for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICnm-0003Q9-K1 for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:43 -0500 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-471-2EK5Zcm8MtmGz9MqEWk6OQ-1; Fri, 05 Mar 2021 10:55:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3EF4EC1A0; Fri, 5 Mar 2021 15:55:35 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 529346B8DA; Fri, 5 Mar 2021 15:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959742; 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=aufj7ko5nmEu95WbZy5r3t1B+AtfaF0ZPOk5zIttzIQ=; b=UgX3SAkhxXeVHgR/yekVAzdj/4/t7BSXa+bCK3OADYUTIH5NOV2YzWE8CsJUU8aeMaAY8F 4Ge9wpCd9nDyRFBLW8jk9aJTDQx6Pzxj5UzcVA8Z7LNOLOiEu6HJ82HUY/tSPunuspqYXm BtHmixy6lPos9i4Y+LuBSuSc2xQj0Qs= X-MC-Unique: 2EK5Zcm8MtmGz9MqEWk6OQ-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 5/8] virtio-ccw: commands on revision-less devices Date: Fri, 5 Mar 2021 16:55:14 +0100 Message-Id: <20210305155517.1604547-6-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=216.205.24.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , "Michael S . Tsirkin" , Cornelia Huck , qemu-devel@nongnu.org, Halil Pasic , qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The virtio standard specifies that any non-transitional device must reject commands prior to revision setting (which we do). Devices that are transitional need to assume revision 0 (legacy) if the driver sends a non-revision-setting command first in order to support legacy drivers. We neglected to do the latter. Fortunately, nearly everything worked as intended anyway; the only problem was not properly rejecting revision setting after some other command had been issued. Easy to fix by setting revision to 0 if we see a non-revision command on a legacy-capable revision-less device. Found by code inspection, not observed in the wild. Signed-off-by: Cornelia Huck Reviewed-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Acked-by: Halil Pasic Message-Id: <20210216111830.1087847-1-cohuck@redhat.com> --- hw/s390x/virtio-ccw.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 4582e94ae7dc..06c06056814b 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -327,13 +327,20 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) ccw.cmd_code); check_len =3D !((ccw.flags & CCW_FLAG_SLI) && !(ccw.flags & CCW_FLAG_D= C)); =20 - if (dev->force_revision_1 && dev->revision < 0 && - ccw.cmd_code !=3D CCW_CMD_SET_VIRTIO_REV) { - /* - * virtio-1 drivers must start with negotiating to a revision >=3D= 1, - * so post a command reject for all other commands - */ - return -ENOSYS; + if (dev->revision < 0 && ccw.cmd_code !=3D CCW_CMD_SET_VIRTIO_REV) { + if (dev->force_revision_1) { + /* + * virtio-1 drivers must start with negotiating to a revision = >=3D 1, + * so post a command reject for all other commands + */ + return -ENOSYS; + } else { + /* + * If the driver issues any command that is not SET_VIRTIO_REV, + * we'll have to operate the device in legacy mode. + */ + dev->revision =3D 0; + } } =20 /* Look at the command. */ --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614960409; cv=none; d=zohomail.com; s=zohoarc; b=YYibPsycenkXm5t9IP6ubCAy1E1hiAeD3GZ4+Ur9Q9uGOdUr6GTceT7ESSX7qX+MqcpIYRXuMVavWjXurWDfW/DlcQ4I1h0r+2toWzlyjafeaMuEZrrPFmtndK4CofeaRzKx+y/cYz0jmV4yKLTezw8VfzokSlKxHOKrbdYGXes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614960409; h=Content-Type: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=0PkcxQQ27I+X6bzp8WA4kdRMdHBJ6WypDXMQPEb0lOE=; b=R8ZHftm8y+FzhTKFuHrvPpnLeuurNidU1OADmnDX7xNKLSD90kw6fIWD/5hGNcwCRqA3RrHH1ra5i/pCO+XUqehD9So0INLwv+mPLISMqBUwuOl9GO3sHsCUN60tfSj1IbayGgZrta8jWS7faXCdSODMC3o1Jn0SuUkZblKXrgY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614960409734790.8814716414197; Fri, 5 Mar 2021 08:06:49 -0800 (PST) Received: from localhost ([::1]:58316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICyW-0008K1-I9 for importer@patchew.org; Fri, 05 Mar 2021 11:06:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnr-0004B2-I3 for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:25963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICnn-0003Qp-Mw for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:47 -0500 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-256-SlYpOIiEOfaohvm-bFly8A-1; Fri, 05 Mar 2021 10:55:38 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8E5B0EC1A5; Fri, 5 Mar 2021 15:55:37 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D3D16A046; Fri, 5 Mar 2021 15:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959743; 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=0PkcxQQ27I+X6bzp8WA4kdRMdHBJ6WypDXMQPEb0lOE=; b=ITdTaGSgbIrcEySQ1MugsLvT5V2vbg5C2YgA1x2MhF9CprTHkM7e17c7TYYAlGnv07YDO1 BCFxcEVCKzMWI8eaarW09zDxub1Egeour9r5P2G11dZeuOtXoi/rqJzr53He+hkFlvjVzP YDpvTeCBXlfQBFkKWg/60bmOILwKzi4= X-MC-Unique: SlYpOIiEOfaohvm-bFly8A-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 6/8] css: SCHIB measurement block origin must be aligned Date: Fri, 5 Mar 2021 16:55:15 +0100 Message-Id: <20210305155517.1604547-7-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=63.128.21.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org, Pierre Morel Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Pierre Morel The Measurement Block Origin inside the SCHIB is used when Measurement Block format 1 is in used and must be aligned on 64 bytes otherwise an operand exception is recognized when issuing the Modify Sub CHannel (MSCH) instruction. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Message-Id: <1613741973-3711-2-git-send-email-pmorel@linux.ibm.com> Signed-off-by: Cornelia Huck --- target/s390x/ioinst.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index a412926d2780..1ee11522e150 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -121,6 +121,12 @@ static int ioinst_schib_valid(SCHIB *schib) if (be32_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_XMWME) { return 0; } + /* for MB format 1 bits 26-31 of word 11 must be 0 */ + /* MBA uses words 10 and 11, it means align on 2**6 */ + if ((be16_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_MBFC) && + (be64_to_cpu(schib->mba) & 0x03fUL)) { + return 0; + } return 1; } =20 --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614959952; cv=none; d=zohomail.com; s=zohoarc; b=fTIR5xV+vQtcCRjGfWkKWl95fjOHIggbiLr+Eh9lrUR+6+4m6sDThEdiDIGolqJZxjjDVWA4/MYkqkqK8LJElYxOIokN9pxhZq6DrZJePp8QrjnlCCAGVSB/AoQsZM1WX4PzEWItN3nwCETmwtBWH8oRsVtRxScH/t9iaoriG58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614959952; h=Content-Type: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=PFzKoHqZVN58xXzW9REjb7dVMfQ+d82D122kA9U6f7Q=; b=Mg0Pd8UWE8CCWD2pkNNOreMrcLYnhR46UeT2jMN2osuTRUR4qo+PoFpFFLV5XhutG5WbDGTyE4goXbOcXdwXLBHzbwXKWzkzX10V4dZOX0jiq32numvR53pIjOeo1A5TS8i0MX26Shk4hGZ4Dt8Qz/cqUJAjq9YkjwNzhbH4SbE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614959952272724.4012189626658; Fri, 5 Mar 2021 07:59:12 -0800 (PST) Received: from localhost ([::1]:40434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICr9-0008R6-9H for importer@patchew.org; Fri, 05 Mar 2021 10:59:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnp-00046i-Ay for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICnn-0003QX-M5 for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:45 -0500 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-529-IMHxHxCWPJK4Qr_q3Yrmzw-1; Fri, 05 Mar 2021 10:55:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B0AF1005D45; Fri, 5 Mar 2021 15:55:39 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBE576B8DA; Fri, 5 Mar 2021 15:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959742; 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=PFzKoHqZVN58xXzW9REjb7dVMfQ+d82D122kA9U6f7Q=; b=Sp+UT/PWaNf6+9k4TkPzL6XMgssqBQcR8eBOTUtiKh5JRguXas5hK/jMoPftrAU570ItE2 EO6hFecpyyUqjIbIJ4sSqvKa/grFFl4bYg/EEGjr5wUZFu1O6jySxTd7tdP9qzHijetOUE yLQrudbQsrqaNJWCmtLOnOw1S+7Qvyc= X-MC-Unique: IMHxHxCWPJK4Qr_q3Yrmzw-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 7/8] vfio-ccw: Do not read region ret_code after write Date: Fri, 5 Mar 2021 16:55:16 +0100 Message-Id: <20210305155517.1604547-8-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=216.205.24.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Farman , qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org, Matthew Rosato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Eric Farman A pwrite() call returns the number of bytes written (or -1 on error), and vfio-ccw compares this number with the size of the region to determine if an error had occurred or not. If they are not equal, this is a failure and the errno is used to determine exactly how things failed. An errno of zero is possible (though unlikely) in this situation and would be translated to a successful operation. If they ARE equal, the ret_code field is read from the region to determine how to proceed. While the kernel sets the ret_code field as necessary, the region and thus this field is not "written back" to the user. So the value can only be what it was initialized to, which is zero. So, let's convert an unexpected length with errno of zero to a return code of -EFAULT, and explicitly set an expected length to a return code of zero. This will be a little safer and clearer. Suggested-by: Matthew Rosato Signed-off-by: Eric Farman Message-Id: <20210303160739.2179378-1-farman@linux.ibm.com> Signed-off-by: Cornelia Huck --- hw/vfio/ccw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index bc78a0ad7638..b2df708e4b01 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -104,9 +104,9 @@ again: goto again; } error_report("vfio-ccw: write I/O region failed with errno=3D%d", = errno); - ret =3D -errno; + ret =3D errno ? -errno : -EFAULT; } else { - ret =3D region->ret_code; + ret =3D 0; } switch (ret) { case 0: @@ -192,9 +192,9 @@ again: goto again; } error_report("vfio-ccw: write cmd region failed with errno=3D%d", = errno); - ret =3D -errno; + ret =3D errno ? -errno : -EFAULT; } else { - ret =3D region->ret_code; + ret =3D 0; } switch (ret) { case 0: @@ -232,9 +232,9 @@ again: goto again; } error_report("vfio-ccw: write cmd region failed with errno=3D%d", = errno); - ret =3D -errno; + ret =3D errno ? -errno : -EFAULT; } else { - ret =3D region->ret_code; + ret =3D 0; } switch (ret) { case 0: --=20 2.26.2 From nobody Mon Feb 9 11:05:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614960331; cv=none; d=zohomail.com; s=zohoarc; b=HJvtafoEgr3odzALcCr7LYBZqD+rhy+nhNyk2sCfhtZDaEf+VYS/8lr7mjdI81QrfH97eaoM8XVMySI+Gb9xnLJQu6PbQFG+TVUndwou51qoKmUqPxte3ud19esUp6q9CucV97R34Xykrosi9WVUnk88L0Z0FTRzVoiI3VXL2n4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614960331; h=Content-Type: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=0UjWuAL6QWm9HvOj3wn4j1rsla72vllGc0On4mDKg+M=; b=jpoweVnaBkg7gW0rl0fa05y4CU5dyB+A8KCgXpndvhQI8HgKsgP6uv1wfcjsgP+8Ny1PxbKQgPRSoVwYCZ6QirCBzqIKVtQR0IPdwXyegDqCkEDtnBii7g91Xdo5nZ99ZLhDZopS2OeXrFpVk9T9lGSob1BCoaGv0NYWBfVkD5U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614960331183624.2214085361345; Fri, 5 Mar 2021 08:05:31 -0800 (PST) Received: from localhost ([::1]:55856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICxC-0006qG-B0 for importer@patchew.org; Fri, 05 Mar 2021 11:05:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICnq-0004AG-UY for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lICno-0003R9-TV for qemu-devel@nongnu.org; Fri, 05 Mar 2021 10:55:46 -0500 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-266-MerhvPUZPO-0lZhsqGWg7A-1; Fri, 05 Mar 2021 10:55:41 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDCD11966320; Fri, 5 Mar 2021 15:55:40 +0000 (UTC) Received: from gondolin.redhat.com (ovpn-112-55.ams2.redhat.com [10.36.112.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 882286E51D; Fri, 5 Mar 2021 15:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614959744; 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=0UjWuAL6QWm9HvOj3wn4j1rsla72vllGc0On4mDKg+M=; b=ILeViHeUCw6F8Bctn4X7HWWSDvnDsSI3r4xd4XUUod5/vlZSMaRYVuNSzPnQcrozrKCTN6 zeROl4bAGSxXCZnaedqew6kqQDT/7z+AOg7KVeH8rD6Zpso0mpRUL10IViHB+QYEfd7PL8 4V/jVpGJvk0Sbqzr782aZ2Cf3riV1GQ= X-MC-Unique: MerhvPUZPO-0lZhsqGWg7A-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 8/8] target/s390x/kvm: Simplify debug code Date: Fri, 5 Mar 2021 16:55:17 +0100 Message-Id: <20210305155517.1604547-9-cohuck@redhat.com> In-Reply-To: <20210305155517.1604547-1-cohuck@redhat.com> References: <20210305155517.1604547-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=63.128.21.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-s390x@nongnu.org, Cornelia Huck , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 We already have the 'run' variable holding 'cs->kvm_run' value. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-Id: <20210303182219.1631042-3-philmd@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 7a892d663df6..73f816a72227 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -1785,8 +1785,7 @@ static int handle_intercept(S390CPU *cpu) int icpt_code =3D run->s390_sieic.icptcode; int r =3D 0; =20 - DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code, - (long)cs->kvm_run->psw_addr); + DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code, (long)run->psw_addr= ); switch (icpt_code) { case ICPT_INSTRUCTION: case ICPT_PV_INSTR: --=20 2.26.2