]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV P9: Clear vcpu cpu fields before enabling host irqs
authorNicholas Piggin <npiggin@gmail.com>
Thu, 8 Sep 2022 13:25:41 +0000 (23:25 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Sep 2022 15:07:19 +0000 (01:07 +1000)
commit1dbb927f054f6f0c3e4d88ce939028ba78a8ddf7
tree69c5c80307a4767df01f2daa4063dbd5850ec354
parenta1c7b9d6d2bd58ecd4ba958e8ae22f0f1418448f
KVM: PPC: Book3S HV P9: Clear vcpu cpu fields before enabling host irqs

On guest entry, vcpu->cpu and vcpu->arch.thread_cpu are set after
disabling host irqs. On guest exit there is a window whre tick time
accounting briefly enables irqs before these fields are cleared.

Move them up to ensure they are cleared before host irqs are run.
This is possibly not a problem, but is more symmetric and makes the
fields less surprising.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220908132545.4085849-1-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv.c