Commit cac29ff
committed
fix: remove cached scratch_base_gpa from HyperlightVm
The scratch_base_gpa field was computed once at construction time but
update_scratch_mapping() can be called with different-sized scratch
regions. This is a correctness hazard. Revert to upstream's approach
of computing the GPA inline from the scratch region's actual size.
Signed-off-by: danbugs <danilochiarlone@gmail.com>1 parent 06c246f commit cac29ff
1 file changed
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | 169 | | |
172 | 170 | | |
173 | 171 | | |
| |||
474 | 472 | | |
475 | 473 | | |
476 | 474 | | |
477 | | - | |
478 | | - | |
479 | 475 | | |
480 | 476 | | |
481 | 477 | | |
| |||
491 | 487 | | |
492 | 488 | | |
493 | 489 | | |
494 | | - | |
495 | 490 | | |
496 | 491 | | |
497 | 492 | | |
| |||
670 | 665 | | |
671 | 666 | | |
672 | 667 | | |
673 | | - | |
| 668 | + | |
674 | 669 | | |
675 | 670 | | |
676 | 671 | | |
677 | | - | |
| 672 | + | |
678 | 673 | | |
679 | 674 | | |
680 | 675 | | |
| |||
0 commit comments