Repository navigation
Commit caf6900
KVM: MMU: lazily drop large spte
Currently, kvm zaps the large spte if write-protected is needed, the later
read can fault on that spte. Actually, we can make the large spte readonly
instead of making them not present, the page fault caused by read access can
be avoided
The idea is from Avi:
| As I mentioned before, write-protecting a large spte is a good idea,
| since it moves some work from protect-time to fault-time, so it reduces
| jitter. This removes the need for the return value.
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>1 parent 5037878 commit caf6900
1 file changed
Lines changed: 7 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
1109 | | - | |
1110 | | - | |
| 1109 | + | |
1111 | 1110 | | |
1112 | 1111 | | |
1113 | 1112 | | |
| |||
1116 | 1115 | | |
1117 | 1116 | | |
1118 | 1117 | | |
1119 | | - | |
| 1118 | + | |
1120 | 1119 | | |
1121 | | - | |
1122 | | - | |
| 1120 | + | |
1123 | 1121 | | |
1124 | 1122 | | |
1125 | 1123 | | |
| |||
1129 | 1127 | | |
1130 | 1128 | | |
1131 | 1129 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | 1130 | | |
1138 | 1131 | | |
1139 | 1132 | | |
1140 | 1133 | | |
1141 | | - | |
1142 | | - | |
| 1134 | + | |
1143 | 1135 | | |
1144 | 1136 | | |
1145 | 1137 | | |
| |||
1151 | 1143 | | |
1152 | 1144 | | |
1153 | 1145 | | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | 1146 | | |
| 1147 | + | |
1159 | 1148 | | |
1160 | 1149 | | |
1161 | 1150 | | |
| |||
2596 | 2585 | | |
2597 | 2586 | | |
2598 | 2587 | | |
| 2588 | + | |
| 2589 | + | |
2599 | 2590 | | |
2600 | 2591 | | |
2601 | 2592 | | |
| |||
0 commit comments