Commit 7006b75
x86/sev: Allow for use of the early boot GHCB for PSC requests
Using a GHCB for a page stage change (as opposed to the MSR protocol)
allows for multiple pages to be processed in a single request. In prep
for early PSC requests in support of unaccepted memory, update the
invocation of vmgexit_psc() to be able to use the early boot GHCB and not
just the per-CPU GHCB structure.
In order to use the proper GHCB (early boot vs per-CPU), set a flag that
indicates when the per-CPU GHCBs are available and registered. For APs,
the per-CPU GHCBs are created before they are started and registered upon
startup, so this flag can be used globally for the BSP and APs instead of
creating a per-CPU flag. This will allow for a significant reduction in
the number of MSR protocol page state change requests when accepting
memory.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/d6cbb21f87f81eb8282dd3bf6c34d9698c8a4bbc.1686063086.git.thomas.lendacky@amd.com1 parent 69dcb1e commit 7006b75
1 file changed
Lines changed: 38 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
123 | 135 | | |
124 | 136 | | |
125 | 137 | | |
| |||
662 | 674 | | |
663 | 675 | | |
664 | 676 | | |
665 | | - | |
| 677 | + | |
666 | 678 | | |
667 | 679 | | |
668 | 680 | | |
| |||
756 | 768 | | |
757 | 769 | | |
758 | 770 | | |
759 | | - | |
| 771 | + | |
760 | 772 | | |
761 | 773 | | |
762 | 774 | | |
763 | | - | |
764 | 775 | | |
765 | | - | |
766 | | - | |
767 | 776 | | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
| 777 | + | |
779 | 778 | | |
780 | 779 | | |
781 | 780 | | |
| |||
832 | 831 | | |
833 | 832 | | |
834 | 833 | | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | 834 | | |
841 | 835 | | |
842 | 836 | | |
843 | 837 | | |
844 | 838 | | |
845 | 839 | | |
| 840 | + | |
846 | 841 | | |
847 | 842 | | |
| 843 | + | |
848 | 844 | | |
| 845 | + | |
849 | 846 | | |
850 | 847 | | |
851 | 848 | | |
| |||
875 | 872 | | |
876 | 873 | | |
877 | 874 | | |
878 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
879 | 883 | | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
880 | 889 | | |
881 | 890 | | |
882 | 891 | | |
883 | 892 | | |
884 | 893 | | |
885 | 894 | | |
886 | 895 | | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
887 | 900 | | |
888 | 901 | | |
889 | 902 | | |
| |||
1261 | 1274 | | |
1262 | 1275 | | |
1263 | 1276 | | |
| 1277 | + | |
| 1278 | + | |
1264 | 1279 | | |
1265 | 1280 | | |
1266 | 1281 | | |
| |||
0 commit comments