summary refs log tree commit diff stats
path: root/classification_output/04/semantic/12360755
blob: 3e04cfd8df0ce1367c808d99d3599043a659a021 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
semantic: 0.911
device: 0.902
graphic: 0.899
instruction: 0.894
assembly: 0.893
other: 0.886
mistranslation: 0.844
boot: 0.818
vnc: 0.810
socket: 0.805
KVM: 0.770
network: 0.738

[Qemu-devel] [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour'

Hi,

I've bisected the following failure of the virtio_net linux v4.10 driver
to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:

virtio_net virtio0: virtio: device uses modern interface but does not have 
VIRTIO_F_VERSION_1
virtio_net: probe of virtio0 failed with error -22

To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour").

It appears that adding ",disable-modern=on,disable-legacy=off" to the
virtio-net -device makes it work again.

I presume this should really just work out of the box. Any ideas why it
isn't?

Cheers
James
signature.asc
Description:
Digital signature

On 03/17/2017 11:57 PM, James Hogan wrote:
Hi,

I've bisected the following failure of the virtio_net linux v4.10 driver
to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:

virtio_net virtio0: virtio: device uses modern interface but does not have 
VIRTIO_F_VERSION_1
virtio_net: probe of virtio0 failed with error -22

To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour").

It appears that adding ",disable-modern=on,disable-legacy=off" to the
virtio-net -device makes it work again.

I presume this should really just work out of the box. Any ideas why it
isn't?
Hi,


This is strange. This commit changes virtio devices from legacy to virtio 
"transitional".
(your command line changes it to legacy)
Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU 
side
there is nothing new.

Michael, do you have any idea?

Thanks,
Marcel
Cheers
James

On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote:
>
On 03/17/2017 11:57 PM, James Hogan wrote:
>
> Hi,
>
>
>
> I've bisected the following failure of the virtio_net linux v4.10 driver
>
> to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:
>
>
>
> virtio_net virtio0: virtio: device uses modern interface but does not have
>
> VIRTIO_F_VERSION_1
>
> virtio_net: probe of virtio0 failed with error -22
>
>
>
> To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour").
>
>
>
> It appears that adding ",disable-modern=on,disable-legacy=off" to the
>
> virtio-net -device makes it work again.
>
>
>
> I presume this should really just work out of the box. Any ideas why it
>
> isn't?
>
>
>
>
Hi,
>
>
>
This is strange. This commit changes virtio devices from legacy to virtio
>
"transitional".
>
(your command line changes it to legacy)
>
Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU
>
side
>
there is nothing new.
>
>
Michael, do you have any idea?
>
>
Thanks,
>
Marcel
My guess would be firmware mishandling 64 bit BARs - we saw such
a case on sparc previously. As a result you are probably reading
all zeroes from features register or something like that.
Marcel, could you send a patch making the bar 32 bit?
If that helps we know what the issue is.

>
> Cheers
>
> James
>
>

On 03/20/2017 05:43 PM, Michael S. Tsirkin wrote:
On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote:
On 03/17/2017 11:57 PM, James Hogan wrote:
Hi,

I've bisected the following failure of the virtio_net linux v4.10 driver
to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:

virtio_net virtio0: virtio: device uses modern interface but does not have 
VIRTIO_F_VERSION_1
virtio_net: probe of virtio0 failed with error -22

To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour").

It appears that adding ",disable-modern=on,disable-legacy=off" to the
virtio-net -device makes it work again.

I presume this should really just work out of the box. Any ideas why it
isn't?
Hi,


This is strange. This commit changes virtio devices from legacy to virtio 
"transitional".
(your command line changes it to legacy)
Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU 
side
there is nothing new.

Michael, do you have any idea?

Thanks,
Marcel
My guess would be firmware mishandling 64 bit BARs - we saw such
a case on sparc previously. As a result you are probably reading
all zeroes from features register or something like that.
Marcel, could you send a patch making the bar 32 bit?
If that helps we know what the issue is.
Sure,

Thanks,
Marcel
Cheers
James

On 03/20/2017 05:43 PM, Michael S. Tsirkin wrote:
On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote:
On 03/17/2017 11:57 PM, James Hogan wrote:
Hi,

I've bisected the following failure of the virtio_net linux v4.10 driver
to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:

virtio_net virtio0: virtio: device uses modern interface but does not have 
VIRTIO_F_VERSION_1
virtio_net: probe of virtio0 failed with error -22

To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour").

It appears that adding ",disable-modern=on,disable-legacy=off" to the
virtio-net -device makes it work again.

I presume this should really just work out of the box. Any ideas why it
isn't?
Hi,


This is strange. This commit changes virtio devices from legacy to virtio 
"transitional".
(your command line changes it to legacy)
Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU 
side
there is nothing new.

Michael, do you have any idea?

Thanks,
Marcel
My guess would be firmware mishandling 64 bit BARs - we saw such
a case on sparc previously. As a result you are probably reading
all zeroes from features register or something like that.
Marcel, could you send a patch making the bar 32 bit?
If that helps we know what the issue is.
Hi James,

Can you please check if the below patch fixes the problem?
Please note it is not a solution.

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index f9b7244..5b4d429 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1671,9 +1671,7 @@ static void virtio_pci_device_plugged(DeviceState *d, 
Error **errp)
         }

         pci_register_bar(&proxy->pci_dev, proxy->modern_mem_bar_idx,
-                         PCI_BASE_ADDRESS_SPACE_MEMORY |
-                         PCI_BASE_ADDRESS_MEM_PREFETCH |
-                         PCI_BASE_ADDRESS_MEM_TYPE_64,
+                         PCI_BASE_ADDRESS_SPACE_MEMORY,
                          &proxy->modern_bar);

         proxy->config_cap = virtio_pci_add_mem_cap(proxy, &cfg.cap);


Thanks,
Marcel

Hi Marcel,

On Tue, Mar 21, 2017 at 04:16:58PM +0200, Marcel Apfelbaum wrote:
>
Can you please check if the below patch fixes the problem?
>
Please note it is not a solution.
>
>
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>
index f9b7244..5b4d429 100644
>
--- a/hw/virtio/virtio-pci.c
>
+++ b/hw/virtio/virtio-pci.c
>
@@ -1671,9 +1671,7 @@ static void virtio_pci_device_plugged(DeviceState *d,
>
Error **errp)
>
}
>
>
pci_register_bar(&proxy->pci_dev, proxy->modern_mem_bar_idx,
>
-                         PCI_BASE_ADDRESS_SPACE_MEMORY |
>
-                         PCI_BASE_ADDRESS_MEM_PREFETCH |
>
-                         PCI_BASE_ADDRESS_MEM_TYPE_64,
>
+                         PCI_BASE_ADDRESS_SPACE_MEMORY,
>
&proxy->modern_bar);
>
>
proxy->config_cap = virtio_pci_add_mem_cap(proxy, &cfg.cap);
Sorry for the delay trying this, I was away last week.

No, it doesn't seem to make any difference.

Thanks
James
signature.asc
Description:
Digital signature