Skip to content

Commit 6516bb3

Browse files
authored
Merge pull request coconut-svsm#1031 from stefano-garzarella/fix-ghcb-offset
kernel/ghcb: add missing register offset assertions
2 parents 89a4aff + 40b0b69 commit 6516bb3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

kernel/src/sev/ghcb.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,17 @@ const _: () = assert!(
940940
&& offset_of!(GHCB, rcx) == 0x308
941941
&& offset_of!(GHCB, rdx) == 0x310
942942
&& offset_of!(GHCB, rbx) == 0x318
943+
&& offset_of!(GHCB, rbp) == 0x328
944+
&& offset_of!(GHCB, rsi) == 0x330
945+
&& offset_of!(GHCB, rdi) == 0x338
946+
&& offset_of!(GHCB, r8) == 0x340
947+
&& offset_of!(GHCB, r9) == 0x348
948+
&& offset_of!(GHCB, r10) == 0x350
949+
&& offset_of!(GHCB, r11) == 0x358
950+
&& offset_of!(GHCB, r12) == 0x360
951+
&& offset_of!(GHCB, r13) == 0x368
952+
&& offset_of!(GHCB, r14) == 0x370
953+
&& offset_of!(GHCB, r15) == 0x378
943954
&& offset_of!(GHCB, sw_exit_code) == 0x390
944955
&& offset_of!(GHCB, sw_exit_info_1) == 0x398
945956
&& offset_of!(GHCB, sw_exit_info_2) == 0x3a0

0 commit comments

Comments
 (0)