mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Rename VIRTIO_F_IOMMU_PLATFORM
Rename the transport feature bit constant from VIRTIO_F_IOMMU_PLATFORM to VIRTIO_F_ACCESS_PLATFORM across the entire virtio-devices crate. The virtio specification as of v1.1 carries bit 33 as VIRTIO_F_ACCESS_PLATFORM. The Linux kernel UAPI header <linux/virtio_config.h> carries VIRTIO_F_IOMMU_PLATFORM only as a backward-compatible alias. This is a pure rename with no functional or behavioral change. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
313d980538
commit
da0d0a2090
@@ -31,7 +31,7 @@ use super::{DEFAULT_VIRTIO_FEATURES, Error, Result};
|
||||
use crate::seccomp_filters::Thread;
|
||||
use crate::thread_helper::spawn_virtio_thread;
|
||||
use crate::vhost_user::VhostUserCommon;
|
||||
use crate::{GuestMemoryMmap, GuestRegionMmap, VIRTIO_F_IOMMU_PLATFORM, VirtioInterrupt};
|
||||
use crate::{GuestMemoryMmap, GuestRegionMmap, VIRTIO_F_ACCESS_PLATFORM, VirtioInterrupt};
|
||||
|
||||
const DEFAULT_QUEUE_NUMBER: usize = 1;
|
||||
|
||||
@@ -239,7 +239,7 @@ impl VirtioDevice for Blk {
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.common.avail_features;
|
||||
if self.iommu {
|
||||
features |= 1u64 << VIRTIO_F_IOMMU_PLATFORM;
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::seccomp_filters::Thread;
|
||||
use crate::thread_helper::spawn_virtio_thread;
|
||||
use crate::vhost_user::VhostUserCommon;
|
||||
use crate::{
|
||||
ActivateResult, GuestMemoryMmap, GuestRegionMmap, MmapRegion, VIRTIO_F_IOMMU_PLATFORM,
|
||||
ActivateResult, GuestMemoryMmap, GuestRegionMmap, MmapRegion, VIRTIO_F_ACCESS_PLATFORM,
|
||||
VirtioCommon, VirtioDevice, VirtioDeviceType, VirtioInterrupt, VirtioSharedMemoryList,
|
||||
};
|
||||
|
||||
@@ -248,7 +248,7 @@ impl VirtioDevice for Fs {
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.common.avail_features;
|
||||
if self.iommu {
|
||||
features |= 1u64 << VIRTIO_F_IOMMU_PLATFORM;
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ use crate::seccomp_filters::Thread;
|
||||
use crate::thread_helper::spawn_virtio_thread;
|
||||
use crate::vhost_user::VhostUserCommon;
|
||||
use crate::{
|
||||
ActivateResult, GuestMemoryMmap, GuestRegionMmap, MmapRegion, VIRTIO_F_IOMMU_PLATFORM,
|
||||
ActivateResult, GuestMemoryMmap, GuestRegionMmap, MmapRegion, VIRTIO_F_ACCESS_PLATFORM,
|
||||
VirtioCommon, VirtioDevice, VirtioInterrupt, VirtioSharedMemoryList,
|
||||
};
|
||||
|
||||
@@ -218,7 +218,7 @@ impl VirtioDevice for GenericVhostUser {
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.common.avail_features;
|
||||
if self.iommu {
|
||||
features |= 1u64 << VIRTIO_F_IOMMU_PLATFORM;
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ use crate::thread_helper::spawn_virtio_thread;
|
||||
use crate::vhost_user::vu_common_ctrl::{VhostUserConfig, VhostUserHandle};
|
||||
use crate::vhost_user::{DEFAULT_VIRTIO_FEATURES, Error, Result, VhostUserCommon};
|
||||
use crate::{
|
||||
ActivateResult, GuestMemoryMmap, GuestRegionMmap, NetCtrlEpollHandler, VIRTIO_F_IOMMU_PLATFORM,
|
||||
VirtioCommon, VirtioDevice, VirtioDeviceType, VirtioInterrupt,
|
||||
ActivateResult, GuestMemoryMmap, GuestRegionMmap, NetCtrlEpollHandler,
|
||||
VIRTIO_F_ACCESS_PLATFORM, VirtioCommon, VirtioDevice, VirtioDeviceType, VirtioInterrupt,
|
||||
};
|
||||
|
||||
const DEFAULT_QUEUE_NUMBER: usize = 2;
|
||||
@@ -275,7 +275,7 @@ impl VirtioDevice for Net {
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.common.avail_features;
|
||||
if self.iommu {
|
||||
features |= 1u64 << VIRTIO_F_IOMMU_PLATFORM;
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user