diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2013-05-19 20:57:00 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-05-19 22:38:09 -0400 |
| commit | 8b21ab140ec581caf3340a51cdbe91a76c36d9d8 (patch) | |
| tree | b0439dd85d548bddfc710857791812346e37d634 /include/uapi/linux | |
| parent | d5fe85af85367d5892e4308f596de4e2a5fb9017 (diff) | |
virtio_pci: better macro exported in uapi
Macro VIRTIO_PCI_CONFIG assumes that userspace actually has a structure
with a field named msix_enabled. Add VIRTIO_PCI_CONFIG_OFF that gets
the msix_enabled by value instead, to make it useful for userspace. We
still keep VIRTIO_PCI_CONFIG around for now, in case some userspace uses
it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/virtio_pci.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h index ea66f3f60d63..e5ec1caab82a 100644 --- a/include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h | |||
| @@ -80,7 +80,9 @@ | |||
| 80 | 80 | ||
| 81 | /* The remaining space is defined by each driver as the per-driver | 81 | /* The remaining space is defined by each driver as the per-driver |
| 82 | * configuration space */ | 82 | * configuration space */ |
| 83 | #define VIRTIO_PCI_CONFIG(dev) ((dev)->msix_enabled ? 24 : 20) | 83 | #define VIRTIO_PCI_CONFIG_OFF(msix_enabled) ((msix_enabled) ? 24 : 20) |
| 84 | /* Deprecated: please use VIRTIO_PCI_CONFIG_OFF instead */ | ||
| 85 | #define VIRTIO_PCI_CONFIG(dev) VIRTIO_PCI_CONFIG_OFF((dev)->msix_enabled) | ||
| 84 | 86 | ||
| 85 | /* Virtio ABI version, this must match exactly */ | 87 | /* Virtio ABI version, this must match exactly */ |
| 86 | #define VIRTIO_PCI_ABI_VERSION 0 | 88 | #define VIRTIO_PCI_ABI_VERSION 0 |
