mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-05 14:11:32 +00:00
fix(x86): use IOMMU only when needed for passthrough
This commit is contained in:
@ -434,9 +434,13 @@ impl X86PvPlatform {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl BootSetupPlatform for X86PvPlatform {
|
||||
fn create_domain(&self) -> CreateDomain {
|
||||
fn create_domain(&self, needs_passthrough: bool) -> CreateDomain {
|
||||
CreateDomain {
|
||||
flags: XEN_DOMCTL_CDF_IOMMU,
|
||||
flags: if needs_passthrough {
|
||||
XEN_DOMCTL_CDF_IOMMU
|
||||
} else {
|
||||
0
|
||||
},
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user