Commit 8950f2e
authored
feat: use i686 layout for nanvix-unstable guests and make snapshot RWX (#1271)
When nanvix-unstable is enabled, select the i686 layout module on
x86_64 hosts. This ensures MAX_GPA/MAX_GVA use 32-bit address space
limits and the scratch region is placed at the top of 4 GiB.
Also makes the snapshot region RWX for nanvix-unstable guests since
they have no CoW page tables and need direct write access.
Key changes:
- Propagate nanvix-unstable from hyperlight-host to hyperlight-common
- Use i686 layout when nanvix-unstable is enabled on x86_64
- Gate SNAPSHOT_PT_GVA_* exports behind not(nanvix-unstable) and
target_arch = "x86_64" (i686 layout never defines these symbols)
- Make snapshot writable for nanvix-unstable (no CoW means hardware
needs direct write access)
Signed-off-by: danbugs <danilochiarlone@gmail.com>1 parent 3c19ca9 commit 8950f2e
5 files changed
Lines changed: 32 additions & 9 deletions
File tree
- src
- hyperlight_common/src
- arch/i686
- hyperlight_host
- src
- mem
- sandbox
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
27 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
683 | 698 | | |
684 | 699 | | |
685 | 700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
| |||
0 commit comments