Commit 2b08197
committed
refactor: hoist up hugepages/file-based restore incompatibility check
Move this check out of the memory allocation code and up into the
snapshot restoration code. This allows us to encode the impossibility of
mmap-ing a snapshot file with hugepages at the type level (by simply not
giving an option to pass a `HugePageConfig` to `GuestMemoryMmap::create`
if `MemoryKind::Snapshot(_)` is passed).
Signed-off-by: Patrick Roy <[email protected]>1 parent 91901c3 commit 2b08197
File tree
7 files changed
+44
-89
lines changed- src/vmm/src
- devices/virtio
- block
- vhost_user
- virtio/io
- test_utils
- vstate
7 files changed
+44
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
| |||
784 | 783 | | |
785 | 784 | | |
786 | 785 | | |
787 | | - | |
788 | 786 | | |
789 | 787 | | |
790 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | | - | |
238 | 237 | | |
239 | 238 | | |
240 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | 469 | | |
471 | 470 | | |
472 | 471 | | |
| |||
764 | 763 | | |
765 | 764 | | |
766 | 765 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
774 | 769 | | |
775 | 770 | | |
776 | 771 | | |
| |||
887 | 882 | | |
888 | 883 | | |
889 | 884 | | |
890 | | - | |
891 | 885 | | |
892 | 886 | | |
893 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
458 | 464 | | |
459 | | - | |
460 | | - | |
461 | | - | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
| |||
514 | 518 | | |
515 | 519 | | |
516 | 520 | | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
521 | 527 | | |
522 | 528 | | |
523 | 529 | | |
524 | | - | |
525 | 530 | | |
526 | 531 | | |
527 | 532 | | |
| |||
531 | 536 | | |
532 | 537 | | |
533 | 538 | | |
534 | | - | |
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
| |||
596 | 600 | | |
597 | 601 | | |
598 | 602 | | |
599 | | - | |
| 603 | + | |
600 | 604 | | |
601 | | - | |
602 | 605 | | |
603 | 606 | | |
604 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
0 commit comments