Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/devices/src/virtio/iommu/sys/windows.rs
5394 views
1
// Copyright 2022 The ChromiumOS Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
use std::cell::RefCell;
6
use std::collections::BTreeMap;
7
use std::rc::Rc;
8
9
use cros_async::AsyncTube;
10
use cros_async::Executor;
11
12
use crate::virtio::iommu::Result;
13
use crate::virtio::iommu::State;
14
15
pub(in crate::virtio::iommu) async fn handle_command_tube(
16
_state: &Rc<RefCell<State>>,
17
_command_tube: AsyncTube,
18
) -> Result<()> {
19
panic!("IOMMU is not supported on Windows");
20
}
21
22
pub(in crate::virtio::iommu) async fn handle_translate_request(
23
_ex: &Executor,
24
_state: &Rc<RefCell<State>>,
25
_request_tube: Option<AsyncTube>,
26
_response_tubes: Option<BTreeMap<u32, AsyncTube>>,
27
) -> Result<()> {
28
// TODO nkgold (b/222588331): the below implementation assures AsyncTube::send is sync, where it
29
// should be async (as it is on Windows). Once that's fixed there's no reason this function
30
// needs an os-specific implementation.
31
panic!("IOMMU is not supported on Windows");
32
}
33
34