From nobody Tue Feb 10 17:34:43 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=1600691591; cv=none; d=zohomail.com; s=zohoarc; b=YB4Ydz4fMvXSq0BUjXHYiL2ce+DxuYAXsPKur6cGTqE9p3Q5gt7xQPbALUF3hhjEap8XLsmYcFUHYaQPvwA87FyxrJPXmeF9ommJzMaXm9JS0haof1V2r0QSK0jHo1s4Ywfur2Nl/XgqhZa+MyYkjJS4hhQFFu3gj3l9EpMWOnM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600691591; 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=Fp4Dqk5F09EHvZ8x/DZST0uz2UViw+AHL0qVru9TkZY=; b=OfijPIGJSitapDaLDVkdTs9q4MWiVlk4WGzcjjwcb+9Zo/BNxe7gk6xtzn1U8eZW6IPEi4BaFWaVaQjG5CDFDVhi1ayyUdQrTzvM25+F08SchmW+3m8fpC55XwFLC0IyGIj64PmysXkoYKi5qYCCU1ZVUig8fsR/ZI5vcro5YMI= 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 1600691591365799.5464778286591; Mon, 21 Sep 2020 05:33:11 -0700 (PDT) Received: from localhost ([::1]:52962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKL0H-0002U9-RX for importer@patchew.org; Mon, 21 Sep 2020 08:33:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKKtz-00054i-67 for qemu-devel@nongnu.org; Mon, 21 Sep 2020 08:26:39 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:25640 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kKKtv-0000Hs-CI for qemu-devel@nongnu.org; Mon, 21 Sep 2020 08:26:38 -0400 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-159-8fjNlrujPEiegtdMYlvdUw-1; Mon, 21 Sep 2020 08:26:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 67F0110BBECA; Mon, 21 Sep 2020 12:26:31 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-113-150.ams2.redhat.com [10.36.113.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0495578825; Mon, 21 Sep 2020 12:26:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600691194; 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=Fp4Dqk5F09EHvZ8x/DZST0uz2UViw+AHL0qVru9TkZY=; b=hqYBfRbJobZ4AbaAiv1Uw5VNrkDQg2EXuh7fOoceflzftQRQiIgCtqxPOihetsK7khNS3P gwStBL/3t68aB/2+8Re6Ii0PqASzlzNkBONmJ2zqpbzsKx5G499M2IQmrpCrvNSmMCNIhM kh27ukNNsBZ0R/DhcOx5Yuiz9n4Ait8= X-MC-Unique: 8fjNlrujPEiegtdMYlvdUw-1 From: Stefano Garzarella To: "Dr. David Alan Gilbert" , Cornelia Huck , "Michael S. Tsirkin" , qemu-devel@nongnu.org Subject: [PATCH v5 4/4] vhost-vsock-ccw: force virtio version 1 Date: Mon, 21 Sep 2020 14:25:06 +0200 Message-Id: <20200921122506.82515-5-sgarzare@redhat.com> In-Reply-To: <20200921122506.82515-1-sgarzare@redhat.com> References: <20200921122506.82515-1-sgarzare@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=sgarzare@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=207.211.31.81; envelope-from=sgarzare@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/21 03:43:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 , Qinghua Cheng , Eduardo Habkost , David Hildenbrand , Qian Cai , qemu-stable@nongnu.org, Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Richard Henderson 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" virtio-vsock was introduced after the release of VIRTIO 1.0 specifications, so it should be 'modern-only'. This patch forces virtio version 1 as done for vhost-vsock-pci. To avoid migration issues, we force virtio version 1 only when legacy check is enabled in the new machine types (>=3D 5.1). Cc: qemu-stable@nongnu.org Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck Signed-off-by: Stefano Garzarella --- v3: - forced virtio version 1 only with new machine types --- hw/s390x/vhost-vsock-ccw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/s390x/vhost-vsock-ccw.c b/hw/s390x/vhost-vsock-ccw.c index 0822ecca89..246416a8f9 100644 --- a/hw/s390x/vhost-vsock-ccw.c +++ b/hw/s390x/vhost-vsock-ccw.c @@ -40,9 +40,21 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klas= s, void *data) static void vhost_vsock_ccw_instance_init(Object *obj) { VHostVSockCCWState *dev =3D VHOST_VSOCK_CCW(obj); + VirtioCcwDevice *ccw_dev =3D VIRTIO_CCW_DEVICE(obj); + VirtIODevice *virtio_dev; =20 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VHOST_VSOCK); + + virtio_dev =3D VIRTIO_DEVICE(&dev->vdev); + + /* + * To avoid migration issues, we force virtio version 1 only when + * legacy check is enabled in the new machine types (>=3D 5.1). + */ + if (!virtio_legacy_check_disabled(virtio_dev)) { + ccw_dev->force_revision_1 =3D true; + } } =20 static const TypeInfo vhost_vsock_ccw_info =3D { --=20 2.26.2