Commit 73be81b
committed
KVM: SVM: Add a helper to allocate and initialize permissions bitmaps
Add a helper to allocate and initialize an MSR or I/O permissions map, as
the logic is identical between the two map types, the only difference is
the size of the bitmap. Opportunistically add a comment to explain why
the bitmaps are initialized with 0xff, e.g. instead of the more common
zero-initialized behavior, which is the main motivation for deduplicating
the code.
No functional change intended.
Link: https://lore.kernel.org/r/20250610225737.156318-31-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 54f1c77 commit 73be81b
2 files changed
Lines changed: 22 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
726 | 726 | | |
727 | | - | |
728 | | - | |
729 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | | - | |
735 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
736 | 740 | | |
737 | | - | |
| 741 | + | |
738 | 742 | | |
739 | 743 | | |
740 | 744 | | |
| |||
5314 | 5318 | | |
5315 | 5319 | | |
5316 | 5320 | | |
5317 | | - | |
5318 | | - | |
5319 | 5321 | | |
5320 | | - | |
5321 | | - | |
| 5322 | + | |
5322 | 5323 | | |
5323 | 5324 | | |
5324 | 5325 | | |
| |||
5399 | 5400 | | |
5400 | 5401 | | |
5401 | 5402 | | |
5402 | | - | |
5403 | | - | |
| 5403 | + | |
| 5404 | + | |
5404 | 5405 | | |
5405 | 5406 | | |
5406 | | - | |
5407 | | - | |
5408 | | - | |
| 5407 | + | |
5409 | 5408 | | |
5410 | 5409 | | |
5411 | 5410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
671 | 677 | | |
672 | 678 | | |
673 | 679 | | |
| |||
0 commit comments