Skip to content

Commit 4e515b3

Browse files
committed
iommu: minor fixes
Signed-off-by: Cheng Li <cheng.li10@unsw.edu.au>
1 parent 481926e commit 4e515b3

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

build_sdk.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
DEFAULT_KERNEL_OPTIONS_X86_64 = {
6868
"KernelPlatform": "pc99",
6969
"KernelX86MicroArch": "generic",
70-
# See https://github.com/seL4/microkit/issues/418 for details.
7170
"KernelIOMMU": True,
7271
} | DEFAULT_KERNEL_OPTIONS
7372

tool/microkit/src/capdl/iomem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
sel4::Config,
1414
};
1515

16-
// Logic of seL4 setting VT-d page table level:
16+
// Logic of seL4 setting VT-d page table level:
1717
// Determine whether three-level VT-d pt is supported by host. If supported, set PT level to three if supported.
1818
// If not, check whether 4, 5, 6, 2 level is supported one by one.
1919
// https://github.com/seL4/seL4/blob/15.0.0/src/plat/pc99/machine/intel-vtd.c#L498
@@ -48,7 +48,7 @@ pub fn create_iospace(
4848
}),
4949
});
5050

51-
// Domain ID cannot be negative so add one to PD ID
51+
// Domain ID cannot be zero so add one to PD ID
5252
const PD_TO_DOMAIN_ID_OFFSET: u16 = 1;
5353

5454
spec_container.add_root_object(CapDLNamedObject {

tool/microkit/src/sdf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ fn io_check_maps(
17751775
if map_end > crate::capdl::iomem::VTD_MAX_ADDR {
17761776
return Err(
17771777
format!(
1778-
"Error: iomap for '{}' has address 0x{:x} which exceeds the upper limits of 0x{:x} in {} '{}' @ {}",
1778+
"Error: iomap for '{}' has address {:#x} which exceeds the upper limits of {:#x} in {} '{}' @ {}",
17791779
io_map.name,
17801780
map_end,
17811781
crate::capdl::iomem::VTD_MAX_ADDR,

tool/microkit/tests/sdf/iommu_out_of_bound.system

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright 2024, UNSW.
3+
Copyright 2026, UNSW.
44
55
SPDX-License-Identifier: BSD-2-Clause
66
-->

tool/microkit/tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,11 @@ mod protection_domain {
697697
}
698698

699699
#[test]
700-
fn test_iommu_valid_on_x86() {
700+
fn test_iommu_out_of_bound() {
701701
check_error(
702702
&DEFAULT_X86_64_KERNEL_CONFIG,
703703
"iommu_out_of_bound.system",
704-
"Error: iomap for 'region' has address 0x8000001000 which exceeds the upper limits of 549755813887 in protection domain 'test' @ iommu_out_of_bound.system:13:9",
704+
"Error: iomap for 'region' has address 0x8000001000 which exceeds the upper limits of 0x7FFFFFFFFF in protection domain 'test' @ iommu_out_of_bound.system:13:9",
705705
)
706706
}
707707
}

0 commit comments

Comments
 (0)