------- Comment From steffen.ei...@ibm.com 2021-11-08 06:34 EDT------- [Impact] * unable to read partitions on virtio-block dasd (Regression)
* the problem is that verify is called before virtio_finalize_features() , so a transitional s390 virtio device still serves native endian (i.e. big endian) config space, while the driver knows that it is going to accept VERSION_1, so when reading the config space, it assumes it got little endian, and byteswaps. * as a solution for QEMU, we can work around the issue by writing out the feature bits with VIRTIO_F_VERSION_1 bit set. We (ab)use the finalize_features config op for this. This isn't enough to address all vhost devices since these do not get the features until FEATURES_OK, however it looks like the affected devices actually never handled the endianness for legacy mode correctly, so at least that's not a regression. [Test Plan] Short: try to read/write virtio-dasd partition table in a kvm guest Long: - get access to a dasd device (for this test it is best to pick a dasd that has already been formatted and partitioned in the past, but can format and partition dasd new if needed). - configure guest with the full dasd block device as a virtio block device - boot this guest - verify whether or not the guest is seeing the pre-created partition on device. [Fix] apply kernel upstream commit: 2f9a174f918e (virtio: write back F_VERSION_1 before validate) -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1950144 Title: [UBUNTU 20.04] kernel: unable to read partitions on virtio-block dasd (kvm) Status in linux package in Ubuntu: New Bug description: Description: kernel: unable to read partitions on virtio-block dasd (kvm) Symptom: unable to read partitions on virtio-block dasd (kvm) Problem: verify is called before virtio_finalize_features() , so a transitional s390 virtio device still serves native endian (i.e. big endian) config space, while the driver knows that it is going to accept VERSION_1, so when reading the config space, it assumes it got little endian, and byteswaps. Solution: For QEMU, we can work around the issue by writing out the feature bits with VIRTIO_F_VERSION_1 bit set. We (ab)use the finalize_features config op for this. This isn't enough to address all vhost devices since these do not get the features until FEATURES_OK, however it looks like the affected devices actually never handled the endianness for legacy mode correctly, so at least that's not a regression. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1950144/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp