From patchwork Tue Sep 29 07:21:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 11805187 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E20AC618 for ; Tue, 29 Sep 2020 08:04:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9015A2075F for ; Tue, 29 Sep 2020 08:04:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AoCtnw1v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9015A2075F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNAcW-00035I-IW for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 Sep 2020 04:04:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN9za-0005qU-L5 for qemu-devel@nongnu.org; Tue, 29 Sep 2020 03:24:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kN9zY-00021j-OL for qemu-devel@nongnu.org; Tue, 29 Sep 2020 03:24:06 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601364243; 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=Ah7mc5RocJKu5k38pc3bIhhlNP7PQMywKwtP1B1qEw0=; b=AoCtnw1vEYc63i/qwNLO69tmBgTVtdhdk12dpVmI2VDhoVOfwJoViqkCunSolHsjeQG5q8 zxYjx2rKEUFuYJHHpDC7XPOXAGwcglxNpMG42AsWV69y1LydvJABiVIpigc2yRFlPpdNtF X8FyY3maSXUcnK+fTmlujVKj0TkrzdE= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-537-pg3dWQO6MTCVTZhYQNmRWA-1; Tue, 29 Sep 2020 03:21:27 -0400 X-MC-Unique: pg3dWQO6MTCVTZhYQNmRWA-1 Received: by mail-wm1-f69.google.com with SMTP id a7so1462323wmc.2 for ; Tue, 29 Sep 2020 00:21:26 -0700 (PDT) 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=Ah7mc5RocJKu5k38pc3bIhhlNP7PQMywKwtP1B1qEw0=; b=mmpmxkYFvRfkHEgRRrAAPGYOEuBTVe0LECf/EkWJ4T1ZP9AVpssfSOsnmYlEbtjT6z RhkzYP72O0JNXxRybMGIoCgdJW8iWlK9uX1Q4fbhU/ZD6my4TJQrkLbKn29IcIiHQTyk 9uGiExKid8LJuX14LbmUk/tIwO5fqAQK333v2xygPyjdym4VOn3l+oXFuEct09tugUCI joGtR9Qfuan9q9N/HXfw4wl/PBpis9b0y7FaRG1b+B2AaPimo6+kSzmoipHD5/KHYnDf 84rKWWB/oIVMdry4hwPswx5kq9nxNFIc6X4OlfMqIi/BG9Xiw/FugXuYQ/VS41EarEix R9Ug== X-Gm-Message-State: AOAM533ptW3Pg+62FKNXkIpi+7R665+DPVUfpCxlbsDHm5BddOhJh3by yxhId03AsszwatZ7rfq2yjZoYRcavZ6Qss+iMjJgw6wt5UAbr9KHTwBWQbv5/mVXFhtl4fxS5Y7 7YIX2FQbNL8grvd8= X-Received: by 2002:a5d:6a42:: with SMTP id t2mr2429767wrw.425.1601364085685; Tue, 29 Sep 2020 00:21:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRbMwRFZ9pWhOHmAUD+WFik+UvC0HK0qS4MxnIZyQjRLoVoM6g/oegQBIBIONjlXDkU8xRhw== X-Received: by 2002:a5d:6a42:: with SMTP id t2mr2429751wrw.425.1601364085536; Tue, 29 Sep 2020 00:21:25 -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 g8sm3948392wmd.12.2020.09.29.00.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 00:21:24 -0700 (PDT) Date: Tue, 29 Sep 2020 03:21:23 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v4 12/48] virtio-pmem-pci: force virtio version 1 Message-ID: <20200929071948.281157-13-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 client-ip=216.205.24.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/29 02:22:44 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: Cornelia Huck , Peter Maydell , David Hildenbrand , Pankaj Gupta Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Pankaj Gupta Qemu fails with below error when trying to run with virtio pmem: (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1: device is modern-only, use disable-legacy=on This patch fixes this by forcing virtio 1 with virtio-pmem. fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem") Signed-off-by: Pankaj Gupta Message-Id: <20200925102251.7216-1-pankaj.gupta.linux@gmail.com> Reviewed-by: David Hildenbrand Acked-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pmem-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c index 21a457d151..2b2a0b1eae 100644 --- a/hw/virtio/virtio-pmem-pci.c +++ b/hw/virtio/virtio-pmem-pci.c @@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev); DeviceState *vdev = DEVICE(&pmem_pci->vdev); + virtio_pci_force_virtio_1(vpci_dev); qdev_realize(vdev, BUS(&vpci_dev->bus), errp); }