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
This commit is contained in:
Gautam Menghani 2024-07-16 17:22:04 +05:30 • committed by Michael Ellerman
commit 9739ff4887