diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-01-18 09:28:07 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2021-02-10 06:31:08 +0300 |
commit | 68ad28a4cdd478fa2ae37951b911ab664011098b (patch) | |
tree | 3d5afb5530e76ef0d3dceb804f0b1909b49702fa /samples/watch_queue | |
parent | b1b1697ae0cc82544a03b69df49a69a9ac307b9c (diff) | |
download | linux-68ad28a4cdd478fa2ae37951b911ab664011098b.tar.xz |
KVM: PPC: Book3S HV: Fix radix guest SLB side channel
The slbmte instruction is legal in radix mode, including radix guest
mode. This means radix guests can load the SLB with arbitrary data.
KVM host does not clear the SLB when exiting a guest if it was a
radix guest, which would allow a rogue radix guest to use the SLB as
a side channel to communicate with other guests.
Fix this by ensuring the SLB is cleared when coming out of a radix
guest. Only the first 4 entries are a concern, because radix guests
always run with LPCR[UPRT]=1, which limits the reach of slbmte. slbia
is not used (except in a non-performance-critical path) because it
can clear cached translations.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'samples/watch_queue')
0 files changed, 0 insertions, 0 deletions