commit | c5d4c2c9ce4f4b6980a71dec50f2db4c2e55778d | [log] [tgz] |
---|---|---|
author | Michael S. Tsirkin <mst@redhat.com> | Wed Apr 01 13:33:20 2015 +1030 |
committer | Rusty Russell <rusty@rustcorp.com.au> | Wed Apr 01 14:37:15 2015 +1030 |
tree | 237c8573d47db80749a3353eee128f7ec1d57c2c | |
parent | 3eebd233fcb392286d385e764eb91e90d6218cdf [diff] |
virtio_pci_modern: type-safe io accessors The spec is very clear on this: 4.1.3.1 Driver Requirements: PCI Device Layout The driver MUST access each field using the “natural” access method, i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit fields and 8-bit accesses for 8-bit fields. Add type-safe wrappers to prevent access with incorrect width. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>