From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gezSZ-0004jj-KQ for qemu-devel@nongnu.org; Thu, 03 Jan 2019 04:38:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gezST-0006Xn-Pf for qemu-devel@nongnu.org; Thu, 03 Jan 2019 04:38:36 -0500 References: <20181205195704.17605-1-ehabkost@redhat.com> <20181205195704.17605-3-ehabkost@redhat.com> From: Thomas Huth Message-ID: Date: Thu, 3 Jan 2019 10:38:18 +0100 MIME-Version: 1.0 In-Reply-To: <20181205195704.17605-3-ehabkost@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-4.0 v4 2/2] virtio: Provide version-specific variants of virtio PCI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Kevin Wolf , Fam Zheng , Amit Shah , qemu-s390x@nongnu.org, Markus Armbruster , Jason Wang , Cornelia Huck , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Caio Carrara , Gonglei , Laine Stump , Gerd Hoffmann , Stefan Hajnoczi , Cleber Rosa , Paolo Bonzini , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= On 2018-12-05 20:57, Eduardo Habkost wrote: > Many of the current virtio-*-pci device types actually represent > 3 different types of devices: > * virtio 1.0 non-transitional devices > * virtio 1.0 transitional devices > * virtio 0.9 ("legacy device" in virtio 1.0 terminology) > > That would be just an annoyance if it didn't break our device/bus > compatibility QMP interfaces. With these multi-purpose device > types, there's no way to tell management software that > transitional devices and legacy devices require a Conventional > PCI bus. > > The multi-purpose device types would also prevent us from telling > management software what's the PCI vendor/device ID for them, > because their PCI IDs change at runtime depending on the bus > where they were plugged. > > This patch adds separate device types for each of those virtio > device flavors: > > - virtio-*-pci: the existing multi-purpose device types > - Configurable using `disable-legacy` and `disable-modern` > properties > - Legacy driver support is automatically enabled/disabled > depending on the bus where it is plugged > - Supports Conventional PCI and PCI Express buses > (but Conventional PCI is incompatible with > disable-legacy=off) > - Changes PCI vendor/device IDs at runtime > - virtio-*-pci-transitional: virtio-1.0 device supporting legacy drivers > - Supports Conventional PCI buses only, because > it has a PIO BAR > - virtio-*-pci-non-transitional: modern-only > - Supports both Conventional PCI and PCI Express buses > > The existing TYPE_* macros for these types will point to an > abstract base type, so existing casts in the code will keep > working for all variants. > > A simple test script (tests/acceptance/virtio_version.py) is > included, to check if the new device types are equivalent to > using the `disable-legacy` and `disable-modern` options. > > Acked-by: Andrea Bolognani > Reviewed-by: Cornelia Huck > Signed-off-by: Eduardo Habkost Hi Eduardo, with these new devices, I can trigger an abort on s390x: $ qemu-system-s390x -M s390-ccw-virtio-2.5 -monitor stdio -no-shutdown QEMU 3.1.50 monitor - type 'help' for more information (qemu) device_add vhost-scsi-pci-non-transitional qemu-system-s390x: hw/core/qdev-properties.c:1236: qdev_prop_set_globals: Assertion `prop->user_provided' failed. Aborted (core dumped) Any ideas how to fix that? Thomas