Skip to content

Commit 9c944d6

Browse files
committed
IDT: Update tests for new entries #HV and #CP
Update tests for IDTs considering newly added vector entries #CP and #HV. Signed-off-by: Carlos Bilbao <[email protected]>
1 parent b2b82af commit 9c944d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/structures/idt.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,9 @@ mod test {
13881388
15 => &idt.reserved_1.options,
13891389
17 => &idt.alignment_check.options,
13901390
18 => &idt.machine_check.options,
1391-
i @ 21..=28 => &idt.reserved_2[i - 21].options,
1391+
21 => &idt.cp_protection_exception.options,
1392+
i @ 22..=27 => &idt.reserved_2[i - 22].options,
1393+
28 => &idt.hv_injection_exception.options,
13921394
29 => &idt.vmm_communication_exception.options,
13931395
30 => &idt.security_exception.options,
13941396
31 => &idt.reserved_3.options,
@@ -1444,7 +1446,7 @@ mod test {
14441446
}
14451447
set_general_handler!(&mut idt, general_handler);
14461448
for i in 0..256 {
1447-
if i == 15 || i == 31 || (21..=28).contains(&i) {
1449+
if i == 15 || i == 31 || (22..=27).contains(&i) {
14481450
// reserved entries should not be set
14491451
assert!(!entry_present(&idt, i));
14501452
} else {

0 commit comments

Comments
 (0)