Re: [kvm-unit-tests PATCH 3/7] s390x: virtio: CCW transport implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/11/2021 13.34, Pierre Morel wrote:


On 11/3/21 08:49, Thomas Huth wrote:
On 27/08/2021 12.17, Pierre Morel wrote:
This is the implementation of the virtio-ccw transport level.

We only support VIRTIO revision 0.

That means only legacy virtio? Wouldn't it be better to shoot for modern virtio instead?

Yes but can we do it in a second series?

Sure.

+int virtio_ccw_read_features(struct virtio_ccw_device *vcdev, uint64_t *features)
+{
+    struct virtio_feature_desc *f_desc = &vcdev->f_desc;
+
+    f_desc->index = 0;
+    if (ccw_send(vcdev, CCW_CMD_READ_FEAT, f_desc, sizeof(*f_desc), 0))
+        return -1;
+    *features = swap32(f_desc->features);
+
+    f_desc->index = 1;
+    if (ccw_send(vcdev, CCW_CMD_READ_FEAT, f_desc, sizeof(*f_desc), 0))
+        return -1;
+    *features |= (uint64_t)swap32(f_desc->features) << 32;

Weren't the upper feature bits only available for modern virtio anyway?

Yes.
I have the intention to upgrade to Rev. 1 when I get enough time for it.
Should I remove this? It does not induce problem does it?

No problem - maybe simply add a comment that the upper bits are for virtio 1.0 and later.

 Thomas




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux