blob: 5559a2d31c46af9c936f5103f752c35509d0c44b [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Rusty Russellec3d41c2007-10-22 11:03:36 +10002#ifndef _LINUX_VIRTIO_CONFIG_H
3#define _LINUX_VIRTIO_CONFIG_H
Rusty Russell674bfc22008-07-25 12:06:03 -05004
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -06005#include <linux/err.h>
Paul Gortmaker187f1882011-11-23 20:12:59 -05006#include <linux/bug.h>
Rusty Russell72e61eb2008-05-02 21:50:49 -05007#include <linux/virtio.h>
Michael S. Tsirkineef960a2014-10-22 15:35:56 +03008#include <linux/virtio_byteorder.h>
David Howells607ca462012-10-13 10:46:48 +01009#include <uapi/linux/virtio_config.h>
Rusty Russellec3d41c2007-10-22 11:03:36 +100010
Christoph Hellwigfb5e31d2017-02-05 18:15:22 +010011struct irq_affinity;
12
Rusty Russellec3d41c2007-10-22 11:03:36 +100013/**
14 * virtio_config_ops - operations for configuring a virtio device
Rusty Russella586d4f2008-02-04 23:49:56 -050015 * @get: read the value of a configuration field
Rusty Russellec3d41c2007-10-22 11:03:36 +100016 * vdev: the virtio_device
Rusty Russella586d4f2008-02-04 23:49:56 -050017 * offset: the offset of the configuration field
Rusty Russellec3d41c2007-10-22 11:03:36 +100018 * buf: the buffer to write the field value into.
Rusty Russella586d4f2008-02-04 23:49:56 -050019 * len: the length of the buffer
Rusty Russella586d4f2008-02-04 23:49:56 -050020 * @set: write the value of a configuration field
Rusty Russellec3d41c2007-10-22 11:03:36 +100021 * vdev: the virtio_device
Rusty Russella586d4f2008-02-04 23:49:56 -050022 * offset: the offset of the configuration field
Rusty Russellec3d41c2007-10-22 11:03:36 +100023 * buf: the buffer to read the field value from.
Rusty Russella586d4f2008-02-04 23:49:56 -050024 * len: the length of the buffer
Michael S. Tsirkind71de9e2014-12-14 16:55:44 +020025 * @generation: config generation counter
26 * vdev: the virtio_device
27 * Returns the config generation counter
Rusty Russellec3d41c2007-10-22 11:03:36 +100028 * @get_status: read the status byte
29 * vdev: the virtio_device
30 * Returns the status byte
31 * @set_status: write the status byte
32 * vdev: the virtio_device
33 * status: the new status byte
Rusty Russell6e5aa7e2008-02-04 23:50:03 -050034 * @reset: reset the device
35 * vdev: the virtio device
36 * After this, status and feature negotiation must be done again
Michael S. Tsirkine6af5782011-11-17 17:41:15 +020037 * Device must not be reset from its vq/config callbacks, or in
38 * parallel with being added/removed.
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060039 * @find_vqs: find virtqueues and instantiate them.
Rusty Russellec3d41c2007-10-22 11:03:36 +100040 * vdev: the virtio_device
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060041 * nvqs: the number of virtqueues to find
42 * vqs: on success, includes new virtqueues
43 * callbacks: array of callbacks, for each virtqueue
Michael S. Tsirkin6457f122012-09-05 21:47:45 +030044 * include a NULL entry for vqs that do not need a callback
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060045 * names: array of virtqueue names (mainly for debugging)
Michael S. Tsirkin6457f122012-09-05 21:47:45 +030046 * include a NULL entry for vqs unused by driver
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060047 * Returns 0 on success or error status
48 * @del_vqs: free virtqueues found by find_vqs().
Rusty Russellc45a6812008-05-02 21:50:50 -050049 * @get_features: get the array of feature bits for this device.
50 * vdev: the virtio_device
51 * Returns the first 32 feature bits (all we currently need).
Rusty Russellc6248962008-07-25 12:06:07 -050052 * @finalize_features: confirm what device features we'll be using.
Rusty Russellc45a6812008-05-02 21:50:50 -050053 * vdev: the virtio_device
Rusty Russellc6248962008-07-25 12:06:07 -050054 * This gives the final feature bits for the device: it can change
55 * the dev->feature bits if it wants.
Michael S. Tsirkin5c609a52014-12-04 20:20:27 +020056 * Returns 0 on success or error status
Rick Jones66846042011-11-14 14:17:08 +000057 * @bus_name: return the bus name associated with the device
58 * vdev: the virtio_device
59 * This returns a pointer to the bus name a la pci_name from which
60 * the caller can then copy.
Jason Wang75a0a522012-08-28 13:54:14 +020061 * @set_vq_affinity: set the affinity for a virtqueue.
Christoph Hellwigbbaba472017-02-05 18:15:23 +010062 * @get_vq_affinity: get the affinity for a virtqueue (optional).
Rusty Russellec3d41c2007-10-22 11:03:36 +100063 */
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060064typedef void vq_callback_t(struct virtqueue *);
Rusty Russell1842f232009-07-30 16:03:46 -060065struct virtio_config_ops {
Rusty Russella586d4f2008-02-04 23:49:56 -050066 void (*get)(struct virtio_device *vdev, unsigned offset,
Rusty Russellec3d41c2007-10-22 11:03:36 +100067 void *buf, unsigned len);
Rusty Russella586d4f2008-02-04 23:49:56 -050068 void (*set)(struct virtio_device *vdev, unsigned offset,
Rusty Russellec3d41c2007-10-22 11:03:36 +100069 const void *buf, unsigned len);
Michael S. Tsirkind71de9e2014-12-14 16:55:44 +020070 u32 (*generation)(struct virtio_device *vdev);
Rusty Russellec3d41c2007-10-22 11:03:36 +100071 u8 (*get_status)(struct virtio_device *vdev);
72 void (*set_status)(struct virtio_device *vdev, u8 status);
Rusty Russell6e5aa7e2008-02-04 23:50:03 -050073 void (*reset)(struct virtio_device *vdev);
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060074 int (*find_vqs)(struct virtio_device *, unsigned nvqs,
Christoph Hellwigfb5e31d2017-02-05 18:15:22 +010075 struct virtqueue *vqs[], vq_callback_t *callbacks[],
Michael S. Tsirkinf94682d2017-03-06 18:32:29 +020076 const char * const names[], const bool *ctx,
77 struct irq_affinity *desc);
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -060078 void (*del_vqs)(struct virtio_device *);
Michael S. Tsirkind0254772014-10-07 16:39:43 +020079 u64 (*get_features)(struct virtio_device *vdev);
Michael S. Tsirkin5c609a52014-12-04 20:20:27 +020080 int (*finalize_features)(struct virtio_device *vdev);
Rick Jones66846042011-11-14 14:17:08 +000081 const char *(*bus_name)(struct virtio_device *vdev);
Jason Wang75a0a522012-08-28 13:54:14 +020082 int (*set_vq_affinity)(struct virtqueue *vq, int cpu);
Christoph Hellwigbbaba472017-02-05 18:15:23 +010083 const struct cpumask *(*get_vq_affinity)(struct virtio_device *vdev,
84 int index);
Rusty Russellec3d41c2007-10-22 11:03:36 +100085};
86
Rusty Russellc45a6812008-05-02 21:50:50 -050087/* If driver didn't advertise the feature, it will never appear. */
88void virtio_check_driver_offered_feature(const struct virtio_device *vdev,
89 unsigned int fbit);
90
91/**
Michael S. Tsirkind4024af2014-11-27 21:19:02 +020092 * __virtio_test_bit - helper to test feature bits. For use by transports.
93 * Devices should normally use virtio_has_feature,
94 * which includes more checks.
Rusty Russellc45a6812008-05-02 21:50:50 -050095 * @vdev: the device
96 * @fbit: the feature bit
97 */
Michael S. Tsirkind4024af2014-11-27 21:19:02 +020098static inline bool __virtio_test_bit(const struct virtio_device *vdev,
99 unsigned int fbit)
100{
101 /* Did you forget to fix assumptions on max features? */
102 if (__builtin_constant_p(fbit))
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200103 BUILD_BUG_ON(fbit >= 64);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200104 else
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200105 BUG_ON(fbit >= 64);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200106
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200107 return vdev->features & BIT_ULL(fbit);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200108}
109
110/**
111 * __virtio_set_bit - helper to set feature bits. For use by transports.
112 * @vdev: the device
113 * @fbit: the feature bit
114 */
115static inline void __virtio_set_bit(struct virtio_device *vdev,
116 unsigned int fbit)
117{
118 /* Did you forget to fix assumptions on max features? */
119 if (__builtin_constant_p(fbit))
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200120 BUILD_BUG_ON(fbit >= 64);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200121 else
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200122 BUG_ON(fbit >= 64);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200123
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200124 vdev->features |= BIT_ULL(fbit);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200125}
126
127/**
128 * __virtio_clear_bit - helper to clear feature bits. For use by transports.
129 * @vdev: the device
130 * @fbit: the feature bit
131 */
132static inline void __virtio_clear_bit(struct virtio_device *vdev,
Rusty Russellc45a6812008-05-02 21:50:50 -0500133 unsigned int fbit)
134{
135 /* Did you forget to fix assumptions on max features? */
Rusty Russell1765e3a2011-01-24 14:45:10 -0600136 if (__builtin_constant_p(fbit))
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200137 BUILD_BUG_ON(fbit >= 64);
Rusty Russell1765e3a2011-01-24 14:45:10 -0600138 else
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200139 BUG_ON(fbit >= 64);
Rusty Russellc45a6812008-05-02 21:50:50 -0500140
Michael S. Tsirkind0254772014-10-07 16:39:43 +0200141 vdev->features &= ~BIT_ULL(fbit);
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200142}
143
144/**
145 * virtio_has_feature - helper to determine if this device has this feature.
146 * @vdev: the device
147 * @fbit: the feature bit
148 */
149static inline bool virtio_has_feature(const struct virtio_device *vdev,
150 unsigned int fbit)
151{
Mark McLoughlinee006b352009-05-11 18:11:44 +0100152 if (fbit < VIRTIO_TRANSPORT_F_START)
153 virtio_check_driver_offered_feature(vdev, fbit);
154
Michael S. Tsirkind4024af2014-11-27 21:19:02 +0200155 return __virtio_test_bit(vdev, fbit);
Rusty Russellc45a6812008-05-02 21:50:50 -0500156}
157
Michael S. Tsirkin1a937692016-04-18 12:58:14 +0300158/**
159 * virtio_has_iommu_quirk - determine whether this device has the iommu quirk
160 * @vdev: the device
161 */
162static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev)
163{
164 /*
165 * Note the reverse polarity of the quirk feature (compared to most
166 * other features), this is for compatibility with legacy systems.
167 */
168 return !virtio_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM);
169}
170
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -0600171static inline
172struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
173 vq_callback_t *c, const char *n)
174{
175 vq_callback_t *callbacks[] = { c };
176 const char *names[] = { n };
177 struct virtqueue *vq;
Michael S. Tsirkinf94682d2017-03-06 18:32:29 +0200178 int err = vdev->config->find_vqs(vdev, 1, &vq, callbacks, names, NULL,
179 NULL);
Michael S. Tsirkind2a7ddd2009-06-12 22:16:36 -0600180 if (err < 0)
181 return ERR_PTR(err);
182 return vq;
183}
Rick Jones66846042011-11-14 14:17:08 +0000184
Michael S. Tsirkin9b2bbdb2017-03-06 18:19:39 +0200185static inline
186int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
187 struct virtqueue *vqs[], vq_callback_t *callbacks[],
188 const char * const names[],
189 struct irq_affinity *desc)
190{
Michael S. Tsirkinf94682d2017-03-06 18:32:29 +0200191 return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, NULL, desc);
192}
193
194static inline
195int virtio_find_vqs_ctx(struct virtio_device *vdev, unsigned nvqs,
196 struct virtqueue *vqs[], vq_callback_t *callbacks[],
197 const char * const names[], const bool *ctx,
198 struct irq_affinity *desc)
199{
200 return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, ctx,
201 desc);
Michael S. Tsirkin9b2bbdb2017-03-06 18:19:39 +0200202}
203
Michael S. Tsirkin3569db52014-10-15 10:22:30 +1030204/**
205 * virtio_device_ready - enable vq use in probe function
206 * @vdev: the device
207 *
208 * Driver must call this to use vqs in the probe function.
209 *
210 * Note: vqs are enabled automatically after probe returns.
211 */
212static inline
213void virtio_device_ready(struct virtio_device *dev)
214{
215 unsigned status = dev->config->get_status(dev);
216
217 BUG_ON(status & VIRTIO_CONFIG_S_DRIVER_OK);
218 dev->config->set_status(dev, status | VIRTIO_CONFIG_S_DRIVER_OK);
219}
220
Rick Jones66846042011-11-14 14:17:08 +0000221static inline
222const char *virtio_bus_name(struct virtio_device *vdev)
223{
224 if (!vdev->config->bus_name)
225 return "virtio";
226 return vdev->config->bus_name(vdev);
227}
228
Jason Wang75a0a522012-08-28 13:54:14 +0200229/**
230 * virtqueue_set_affinity - setting affinity for a virtqueue
231 * @vq: the virtqueue
232 * @cpu: the cpu no.
233 *
234 * Pay attention the function are best-effort: the affinity hint may not be set
235 * due to config support, irq type and sharing.
236 *
237 */
238static inline
239int virtqueue_set_affinity(struct virtqueue *vq, int cpu)
240{
241 struct virtio_device *vdev = vq->vdev;
242 if (vdev->config->set_vq_affinity)
243 return vdev->config->set_vq_affinity(vq, cpu);
244 return 0;
245}
246
Greg Kurzcf561f02015-04-24 14:24:27 +0200247static inline bool virtio_is_little_endian(struct virtio_device *vdev)
248{
Greg Kurz7d824102015-04-24 14:26:24 +0200249 return virtio_has_feature(vdev, VIRTIO_F_VERSION_1) ||
250 virtio_legacy_is_little_endian();
Greg Kurzcf561f02015-04-24 14:24:27 +0200251}
252
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300253/* Memory accessors */
254static inline u16 virtio16_to_cpu(struct virtio_device *vdev, __virtio16 val)
255{
Greg Kurzcf561f02015-04-24 14:24:27 +0200256 return __virtio16_to_cpu(virtio_is_little_endian(vdev), val);
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300257}
258
259static inline __virtio16 cpu_to_virtio16(struct virtio_device *vdev, u16 val)
260{
Greg Kurzcf561f02015-04-24 14:24:27 +0200261 return __cpu_to_virtio16(virtio_is_little_endian(vdev), val);
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300262}
263
264static inline u32 virtio32_to_cpu(struct virtio_device *vdev, __virtio32 val)
265{
Greg Kurzcf561f02015-04-24 14:24:27 +0200266 return __virtio32_to_cpu(virtio_is_little_endian(vdev), val);
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300267}
268
269static inline __virtio32 cpu_to_virtio32(struct virtio_device *vdev, u32 val)
270{
Greg Kurzcf561f02015-04-24 14:24:27 +0200271 return __cpu_to_virtio32(virtio_is_little_endian(vdev), val);
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300272}
273
274static inline u64 virtio64_to_cpu(struct virtio_device *vdev, __virtio64 val)
275{
Greg Kurzcf561f02015-04-24 14:24:27 +0200276 return __virtio64_to_cpu(virtio_is_little_endian(vdev), val);
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300277}
278
279static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
280{
Greg Kurzcf561f02015-04-24 14:24:27 +0200281 return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
Michael S. Tsirkineef960a2014-10-22 15:35:56 +0300282}
283
Rusty Russell0b90d062013-10-14 18:11:51 +1030284/* Config space accessors. */
285#define virtio_cread(vdev, structname, member, ptr) \
286 do { \
287 /* Must match the member's type, and be integer */ \
288 if (!typecheck(typeof((((structname*)0)->member)), *(ptr))) \
289 (*ptr) = 1; \
290 \
291 switch (sizeof(*ptr)) { \
292 case 1: \
293 *(ptr) = virtio_cread8(vdev, \
294 offsetof(structname, member)); \
295 break; \
296 case 2: \
297 *(ptr) = virtio_cread16(vdev, \
298 offsetof(structname, member)); \
299 break; \
300 case 4: \
301 *(ptr) = virtio_cread32(vdev, \
302 offsetof(structname, member)); \
303 break; \
304 case 8: \
305 *(ptr) = virtio_cread64(vdev, \
306 offsetof(structname, member)); \
307 break; \
308 default: \
309 BUG(); \
310 } \
311 } while(0)
312
313/* Config space accessors. */
314#define virtio_cwrite(vdev, structname, member, ptr) \
315 do { \
316 /* Must match the member's type, and be integer */ \
317 if (!typecheck(typeof((((structname*)0)->member)), *(ptr))) \
318 BUG_ON((*ptr) == 1); \
319 \
320 switch (sizeof(*ptr)) { \
321 case 1: \
322 virtio_cwrite8(vdev, \
323 offsetof(structname, member), \
324 *(ptr)); \
325 break; \
326 case 2: \
327 virtio_cwrite16(vdev, \
328 offsetof(structname, member), \
329 *(ptr)); \
330 break; \
331 case 4: \
332 virtio_cwrite32(vdev, \
333 offsetof(structname, member), \
334 *(ptr)); \
335 break; \
336 case 8: \
337 virtio_cwrite64(vdev, \
338 offsetof(structname, member), \
339 *(ptr)); \
340 break; \
341 default: \
342 BUG(); \
343 } \
344 } while(0)
345
Michael S. Tsirkind71de9e2014-12-14 16:55:44 +0200346/* Read @count fields, @bytes each. */
347static inline void __virtio_cread_many(struct virtio_device *vdev,
348 unsigned int offset,
349 void *buf, size_t count, size_t bytes)
350{
351 u32 old, gen = vdev->config->generation ?
352 vdev->config->generation(vdev) : 0;
353 int i;
354
355 do {
356 old = gen;
357
358 for (i = 0; i < count; i++)
359 vdev->config->get(vdev, offset + bytes * i,
360 buf + i * bytes, bytes);
361
362 gen = vdev->config->generation ?
363 vdev->config->generation(vdev) : 0;
364 } while (gen != old);
365}
366
Rusty Russell0b90d062013-10-14 18:11:51 +1030367static inline void virtio_cread_bytes(struct virtio_device *vdev,
368 unsigned int offset,
369 void *buf, size_t len)
370{
Michael S. Tsirkind71de9e2014-12-14 16:55:44 +0200371 __virtio_cread_many(vdev, offset, buf, len, 1);
Rusty Russell0b90d062013-10-14 18:11:51 +1030372}
373
Michael S. Tsirkincaa0e2d2015-04-01 08:21:51 +1030374static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset)
375{
376 u8 ret;
377 vdev->config->get(vdev, offset, &ret, sizeof(ret));
378 return ret;
379}
380
Rusty Russell0b90d062013-10-14 18:11:51 +1030381static inline void virtio_cwrite8(struct virtio_device *vdev,
382 unsigned int offset, u8 val)
383{
384 vdev->config->set(vdev, offset, &val, sizeof(val));
385}
386
387static inline u16 virtio_cread16(struct virtio_device *vdev,
388 unsigned int offset)
389{
390 u16 ret;
391 vdev->config->get(vdev, offset, &ret, sizeof(ret));
Michael S. Tsirkin92e6d742014-10-22 16:59:01 +0300392 return virtio16_to_cpu(vdev, (__force __virtio16)ret);
Rusty Russell0b90d062013-10-14 18:11:51 +1030393}
394
395static inline void virtio_cwrite16(struct virtio_device *vdev,
396 unsigned int offset, u16 val)
397{
Michael S. Tsirkin92e6d742014-10-22 16:59:01 +0300398 val = (__force u16)cpu_to_virtio16(vdev, val);
Rusty Russell0b90d062013-10-14 18:11:51 +1030399 vdev->config->set(vdev, offset, &val, sizeof(val));
400}
401
402static inline u32 virtio_cread32(struct virtio_device *vdev,
403 unsigned int offset)
404{
405 u32 ret;
406 vdev->config->get(vdev, offset, &ret, sizeof(ret));
Michael S. Tsirkin92e6d742014-10-22 16:59:01 +0300407 return virtio32_to_cpu(vdev, (__force __virtio32)ret);
Rusty Russell0b90d062013-10-14 18:11:51 +1030408}
409
410static inline void virtio_cwrite32(struct virtio_device *vdev,
411 unsigned int offset, u32 val)
412{
Michael S. Tsirkin92e6d742014-10-22 16:59:01 +0300413 val = (__force u32)cpu_to_virtio32(vdev, val);
Rusty Russell0b90d062013-10-14 18:11:51 +1030414 vdev->config->set(vdev, offset, &val, sizeof(val));
415}
416
417static inline u64 virtio_cread64(struct virtio_device *vdev,
418 unsigned int offset)
419{
420 u64 ret;
Michael S. Tsirkind71de9e2014-12-14 16:55:44 +0200421 __virtio_cread_many(vdev, offset, &ret, 1, sizeof(ret));
Michael S. Tsirkin92e6d742014-10-22 16:59:01 +0300422 return virtio64_to_cpu(vdev, (__force __virtio64)ret);
Rusty Russell0b90d062013-10-14 18:11:51 +1030423}
424
425static inline void virtio_cwrite64(struct virtio_device *vdev,
426 unsigned int offset, u64 val)
427{
Michael S. Tsirkin92e6d742014-10-22 16:59:01 +0300428 val = (__force u64)cpu_to_virtio64(vdev, val);
Rusty Russell0b90d062013-10-14 18:11:51 +1030429 vdev->config->set(vdev, offset, &val, sizeof(val));
430}
431
432/* Conditional config space accessors. */
433#define virtio_cread_feature(vdev, fbit, structname, member, ptr) \
434 ({ \
435 int _r = 0; \
436 if (!virtio_has_feature(vdev, fbit)) \
437 _r = -ENOENT; \
438 else \
439 virtio_cread((vdev), structname, member, ptr); \
440 _r; \
441 })
Jason Wang75a0a522012-08-28 13:54:14 +0200442
Rusty Russellec3d41c2007-10-22 11:03:36 +1000443#endif /* _LINUX_VIRTIO_CONFIG_H */