From nobody Mon Oct 6 14:40:40 2025 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=1601364524; cv=none; d=zohomail.com; s=zohoarc; b=ju3VDgjRMMhoGaaMzaoo9vbCVqTMJ7Pux+NzoH4uvjXR8MMwOgv4Eg74VO6doztq22igrCJYpqN6FQQ3zk4oLkOhbBpfeXNUgSGDjqgheJgXVkf4+FiA6OwZdajfh5vQMLO5IWwHp2PjQz7fO5ogRibNX6ZA4ANcm29/vkHTWs0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601364524; h=Content-Type: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=/Hogw7T/QnmLtf59Wzlc7OPSCDTBdeKjm88GBrhDZBI=; b=PcP9sdUqWYiidC+uallTyW5j2q4oWqQ0NVXuC0nnoDnbmDTeR/TTQTMK85Ur9+ILxHaeILVMx825ElGcXQrpXdUNCWQE86D7+fwezOa/WTvvokBKchx+emH2GWquRh83D6N9MO2HBEAzJug2igxr8WQiD9FBKejqe/Wb36DXuOI= 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 1601364524301283.5798841586379; Tue, 29 Sep 2020 00:28:44 -0700 (PDT) Received: from localhost ([::1]:59762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNA42-0003Ws-Vg for importer@patchew.org; Tue, 29 Sep 2020 03:28:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN9xT-0003RE-5n for qemu-devel@nongnu.org; Tue, 29 Sep 2020 03:21:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kN9xO-0001ef-Ri for qemu-devel@nongnu.org; Tue, 29 Sep 2020 03:21:54 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-FGyYXFG6Om-arPU6lsoTDg-1; Tue, 29 Sep 2020 03:21:47 -0400 Received: by mail-wr1-f69.google.com with SMTP id o6so1364292wrp.1 for ; Tue, 29 Sep 2020 00:21:47 -0700 (PDT) Received: from redhat.com (bzq-79-179-71-128.red.bezeqint.net. [79.179.71.128]) by smtp.gmail.com with ESMTPSA id v204sm4360003wmg.20.2020.09.29.00.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 00:21:44 -0700 (PDT) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601364110; 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: in-reply-to:in-reply-to:references:references; bh=/Hogw7T/QnmLtf59Wzlc7OPSCDTBdeKjm88GBrhDZBI=; b=hRj8MdTUtXlmQmqF3l6vGF3/wp9TiKs9MVBQt2ent/yV8iDZSr2c1aKbDJzLwd6l7my8V9 F+TlXQdfnZAAyxUb9DBbCh8axdUQKA/tVWvKzsZ60/YuQVhMNXnlA3AA6JyO2RMtMNwX8P iVpgvNrbLdXkqtfFtNLF2D8LHgYRSRs= X-MC-Unique: FGyYXFG6Om-arPU6lsoTDg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/Hogw7T/QnmLtf59Wzlc7OPSCDTBdeKjm88GBrhDZBI=; b=ccdhgA7kjAy8nVSerdvZrvJwUGwQ9RW6KWLG3TyfeAaaAZMOxJRohuoUIQ/DbpHYfM W7oKoUuPr/xEBLHdxx7m+YzUxjOKfem/joeloMbVZ1dE17g9PXG1LilqTnax9PYEjSl4 CNQHccE4GmslJ1de2zWsTaRsCnvTglQE2Zs8BHU6672ck0J3fbNNB3j8cifhA0l8OEcB BvgOh8dwkZs30MI2lAc5LGzra1Alv83D5K3pEWba66v4mog9tw16eW9BCwjhCJ34mkjk 2RZ9EicvVKZm12zAseixO8QfhGI99fQJUBCjplmEAy99BxEPjtXPPByk4TcRJdwRDfFE Lo0A== X-Gm-Message-State: AOAM530R4+qc4qqwXq0KlntV1QCjhXGlpg0hczxpYcpl91xX9SETuHg2 YBwOB/t2VqF1oyodcdphhttDaNTu9hUU9on1P8Q23FxYrQpIcNyKGo6kfoEab28G+ItUmUlYRvj lr9Yk1mDE4DCknMI= X-Received: by 2002:a7b:c753:: with SMTP id w19mr2872216wmk.157.1601364105739; Tue, 29 Sep 2020 00:21:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzltlsRSEYdMW5aNyk4rcSHrNsrbulbMUcC6c+XIsRAqtRK4LfPWke2U/JppE4yqYen9cQMEQ== X-Received: by 2002:a7b:c753:: with SMTP id w19mr2872195wmk.157.1601364105538; Tue, 29 Sep 2020 00:21:45 -0700 (PDT) Date: Tue, 29 Sep 2020 03:21:42 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v4 19/48] vhost-vsock-ccw: force virtio version 1 Message-ID: <20200929071948.281157-20-mst@redhat.com> References: <20200929071948.281157-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200929071948.281157-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/28 22:47:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.687, 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_H5=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: Peter Maydell , Thomas Huth , David Hildenbrand , Cornelia Huck , qemu-stable@nongnu.org, Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Richard Henderson , Stefano Garzarella Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefano Garzarella 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 Message-Id: <20200921122506.82515-5-sgarzare@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 MST