KVM: PPC: Book3S HV: Refactor HFSCR emulation for KVM guests
authorGautam Menghani <gautam@linux.ibm.com>
Tue, 16 Jul 2024 11:52:04 +0000 (17:22 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Aug 2024 03:51:01 +0000 (13:51 +1000)
commit9739ff4887c77a38575c23b12766b0a37c8be13c
tree05b19f5c3c3e85e1827dfa159a5316780e3817be
parentde9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed
KVM: PPC: Book3S HV: Refactor HFSCR emulation for KVM guests

Refactor HFSCR emulation for KVM guests when they exit out with
H_FAC_UNAVAIL to use a switch case instead of checking all "cause"
values, since the "cause" values are mutually exclusive; and this is
better expressed with a switch case.

Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240716115206.70210-1-gautam@linux.ibm.com
arch/powerpc/kvm/book3s_hv.c