summaryrefslogtreecommitdiff
path: root/scripts/mkmakefile
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2020-09-03 17:55:40 +1000
committerPaul Mackerras <paulus@ozlabs.org>2020-09-17 11:38:17 +1000
commit35dfb43c243b28658ef757a2b9c6454f99cfc43c (patch)
tree5134339e412f8f1e425cf6c0312e3513bfbad571 /scripts/mkmakefile
parent05e6295dc7de859c9d56334805485c4d20bebf25 (diff)
KVM: PPC: Book3S HV: Set LPCR[HDICE] before writing HDEC
POWER8 and POWER9 machines have a hardware deviation where generation of a hypervisor decrementer exception is suppressed if the HDICE bit in the LPCR register is 0 at the time when the HDEC register decrements from 0 to -1. When entering a guest, KVM first writes the HDEC register with the time until it wants the CPU to exit the guest, and then writes the LPCR with the guest value, which includes HDICE = 1. If HDEC decrements from 0 to -1 during the interval between those two events, it is possible that we can enter the guest with HDEC already negative but no HDEC exception pending, meaning that no HDEC interrupt will occur while the CPU is in the guest, or at least not until HDEC wraps around. Thus it is possible for the CPU to keep executing in the guest for a long time; up to about 4 seconds on POWER8, or about 4.46 years on POWER9 (except that the host kernel hard lockup detector will fire first). To fix this, we set the LPCR[HDICE] bit before writing HDEC on guest entry. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'scripts/mkmakefile')
0 files changed, 0 insertions, 0 deletions