blob: 5a1845dc7fda77cd98f0fa7ee2122c4409a3a656 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
id = 1342
title = "Default machine setting of force-legacy=true causes problems for any modern VirtIO device using MMIO"
state = "opened"
created_at = "2022-11-25T16:31:04.271Z"
closed_at = "n/a"
labels = ["Documentation", "device:virtio", "kind::Bug"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/1342"
host-os = "Linux"
host-arch = "All"
qemu-version = "7.2-rc2 and before"
guest-os = "Linux"
guest-arch = "All"
description = """The default causes problems if you enable any non-legacy VirtIO device which has the VIRTIO_F_VERSION_1 feature bit will not properly read all feature bits. This is because reading VIRTIO_MMIO_VERSION returns VIRT_VERSION_LEGACY which in turn results in the driver not reading all feature bits, e.g. the qtest access:
```
static uint64_t qvirtio_mmio_get_features(QVirtioDevice *d)
{
QVirtioMMIODevice *dev = container_of(d, QVirtioMMIODevice, vdev);
uint64_t lo;
uint64_t hi = 0;
qtest_writel(dev->qts, dev->addr + QVIRTIO_MMIO_HOST_FEATURES_SEL, 0);
lo = qtest_readl(dev->qts, dev->addr + QVIRTIO_MMIO_HOST_FEATURES);
if (dev->version >= 2) {
qtest_writel(dev->qts, dev->addr + QVIRTIO_MMIO_HOST_FEATURES_SEL, 1);
hi = qtest_readl(dev->qts, dev->addr + QVIRTIO_MMIO_HOST_FEATURES);
}
return (hi << 32) | lo;
}
```"""
reproduce = "n/a"
additional = """"""
|