mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Rename control parameter for VIRTIO_F_ACCESS_PLATFORM
Rename from iommu to access_platform_enabled. The original name was iommu as this feature was exposed for devices behind an IOMMU however this feature is also now used for confidential VMs so adopt a more general name. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -45,7 +45,7 @@ pub struct Blk {
|
||||
guest_memory: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
|
||||
seccomp_action: SeccompAction,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
}
|
||||
|
||||
impl Blk {
|
||||
@@ -55,7 +55,7 @@ impl Blk {
|
||||
vu_cfg: VhostUserConfig,
|
||||
seccomp_action: SeccompAction,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
state: Option<State>,
|
||||
) -> Result<Blk> {
|
||||
let num_queues = vu_cfg.num_queues;
|
||||
@@ -191,7 +191,7 @@ impl Blk {
|
||||
guest_memory: None,
|
||||
seccomp_action,
|
||||
exit_evt,
|
||||
iommu,
|
||||
access_platform_enabled,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ impl VirtioDevice for Blk {
|
||||
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.vu_common.virtio_common.avail_features;
|
||||
if self.iommu {
|
||||
if self.access_platform_enabled {
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
|
||||
@@ -68,7 +68,7 @@ pub struct Fs {
|
||||
seccomp_action: SeccompAction,
|
||||
guest_memory: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
}
|
||||
|
||||
impl Fs {
|
||||
@@ -83,7 +83,7 @@ impl Fs {
|
||||
cache: Option<(VirtioSharedMemoryList, MmapRegion)>,
|
||||
seccomp_action: SeccompAction,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
state: Option<State>,
|
||||
) -> Result<Fs> {
|
||||
// Calculate the actual number of queues needed.
|
||||
@@ -200,7 +200,7 @@ impl Fs {
|
||||
seccomp_action,
|
||||
guest_memory: None,
|
||||
exit_evt,
|
||||
iommu,
|
||||
access_platform_enabled,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ impl VirtioDevice for Fs {
|
||||
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.vu_common.virtio_common.avail_features;
|
||||
if self.iommu {
|
||||
if self.access_platform_enabled {
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
|
||||
@@ -42,7 +42,7 @@ pub struct GenericVhostUser {
|
||||
seccomp_action: SeccompAction,
|
||||
guest_memory: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
cfg_warning: AtomicBool,
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ impl GenericVhostUser {
|
||||
cache: Option<(VirtioSharedMemoryList, MmapRegion)>,
|
||||
seccomp_action: SeccompAction,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
state: Option<State>,
|
||||
) -> Result<GenericVhostUser> {
|
||||
// Calculate the actual number of queues needed.
|
||||
@@ -159,7 +159,7 @@ since the backend only supports {backend_num_queues}\n",
|
||||
seccomp_action,
|
||||
guest_memory: None,
|
||||
exit_evt,
|
||||
iommu,
|
||||
access_platform_enabled,
|
||||
cfg_warning: AtomicBool::new(false),
|
||||
})
|
||||
}
|
||||
@@ -201,7 +201,7 @@ impl VirtioDevice for GenericVhostUser {
|
||||
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.vu_common.virtio_common.avail_features;
|
||||
if self.iommu {
|
||||
if self.access_platform_enabled {
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
|
||||
@@ -48,7 +48,7 @@ pub struct Net {
|
||||
ctrl_queue_epoll_thread: Option<thread::JoinHandle<()>>,
|
||||
seccomp_action: SeccompAction,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
}
|
||||
|
||||
impl Net {
|
||||
@@ -62,7 +62,7 @@ impl Net {
|
||||
server: bool,
|
||||
seccomp_action: SeccompAction,
|
||||
exit_evt: EventFd,
|
||||
iommu: bool,
|
||||
access_platform_enabled: bool,
|
||||
state: Option<State>,
|
||||
offload_tso: bool,
|
||||
offload_ufo: bool,
|
||||
@@ -220,7 +220,7 @@ impl Net {
|
||||
ctrl_queue_epoll_thread: None,
|
||||
seccomp_action,
|
||||
exit_evt,
|
||||
iommu,
|
||||
access_platform_enabled,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ impl VirtioDevice for Net {
|
||||
|
||||
fn features(&self) -> u64 {
|
||||
let mut features = self.vu_common.virtio_common.avail_features;
|
||||
if self.iommu {
|
||||
if self.access_platform_enabled {
|
||||
features |= 1u64 << VIRTIO_F_ACCESS_PLATFORM;
|
||||
}
|
||||
features
|
||||
|
||||
Reference in New Issue
Block a user