Virtio 0.9 implementation was limited to the maximum virtqueue size of MAX_QUEUE_NUM and the virtio-net driver would fail to initialize on hosts exceeding this limit. This commit lifts the restriction by allocating the queue memory based on the actual queue size instead of using a fixed maximum. Note that virtio 1.0 still uses the MAX_QUEUE_NUM constant to cap the size (unfortunately this functionality is not available in virtio 0.9). Signed-off-by: Ladi Prosek <lprosek@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
21 |
|
21 |
|
22 |
|
22 |
|
23 |
|
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 |
|
|
24 |
|
49 |
|
25 |
|
50 |
|
26 |
|
51 |
|
27 |
|
52 |
|
28 |
|
53 |
|
|
54 |
|
|
29 |
|
55 |
|
30 |
|
56 |
|
31 |
|
57 |
|
|
|
||
39 |
|
65 |
|
40 |
|
66 |
|
41 |
|
67 |
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
68 |
|
48 |
|
69 |
|
49 |
|
70 |
|
|
|
||
54 |
|
75 |
|
55 |
|
76 |
|
56 |
|
77 |
|
57 |
|
|
|
58 |
|
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
59 |
|
84 |
|
60 |
|
85 |
|
61 |
|
86 |
|
|
|
||
354 |
|
379 |
|
355 |
|
380 |
|
356 |
|
381 |
|
357 |
|
|
|
|
382 |
|
|
358 |
|
383 |
|
359 |
|
384 |
|
360 |
|
385 |
|
|
|
||
371 |
|
396 |
|
372 |
|
397 |
|
373 |
|
398 |
|
374 |
|
|
|
|
399 |
|
|
|
400 |
|
|
|
401 |
|
|
|
402 |
|
|
|
403 |
|
|
|
404 |
|
|
375 |
|
405 |
|
376 |
|
406 |
|
377 |
|
407 |
|
|
|
||
185 |
|
185 |
|
186 |
|
186 |
|
187 |
|
187 |
|
|
188 |
|
|
188 |
|
189 |
|
189 |
|
190 |
|
190 |
|
191 |
|
|
|
||
196 |
|
196 |
|
197 |
|
197 |
|
198 |
|
198 |
|
|
199 |
|
|
199 |
|
200 |
|
200 |
|
201 |
|
201 |
|
202 |
|
|
203 |
|
|
202 |
|
204 |
|
203 |
|
205 |
|
204 |
|
206 |
|
|
|
||
71 |
|
71 |
|
72 |
|
72 |
|
73 |
|
73 |
|
74 |
|
|
|
75 |
|
|
|
76 |
|
74 |
|
77 |
|
|
|
|
75 |
|
|
78 |
|
76 |
|
79 |
|
77 |
|
80 |
|
78 |
|
81 |
|
|
|
|
79 |
|
|
82 |
|
80 |
|
83 |
|
81 |
|
84 |
|
82 |
|