mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
tools/virtio: add dma stubs
Fixes build after recent IOMMU-related changes, mustly by adding more stubs. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
446374d7c7
commit
6be3ffaa0e
5 changed files with 52 additions and 1 deletions
|
@ -40,6 +40,19 @@ static inline void __virtio_clear_bit(struct virtio_device *vdev,
|
|||
#define virtio_has_feature(dev, feature) \
|
||||
(__virtio_test_bit((dev), feature))
|
||||
|
||||
/**
|
||||
* virtio_has_iommu_quirk - determine whether this device has the iommu quirk
|
||||
* @vdev: the device
|
||||
*/
|
||||
static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev)
|
||||
{
|
||||
/*
|
||||
* Note the reverse polarity of the quirk feature (compared to most
|
||||
* other features), this is for compatibility with legacy systems.
|
||||
*/
|
||||
return !virtio_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM);
|
||||
}
|
||||
|
||||
static inline bool virtio_is_little_endian(struct virtio_device *vdev)
|
||||
{
|
||||
return virtio_has_feature(vdev, VIRTIO_F_VERSION_1) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue