KVM: PPC: Book3S HV nestedv2: Do not call H_COPY_TOFROM_GUEST

H_COPY_TOFROM_GUEST is part of the nestedv1 API and so should not be
called by a nestedv2 host. Do not attempt to call it.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231201132618.555031-10-vaibhav@linux.ibm.com
This commit is contained in:
Jordan Niethe 2023-12-01 18:56:14 +05:30 committed by Michael Ellerman
parent a9a3de530d
commit 4bc8ff6f17

View File

@ -40,6 +40,9 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
unsigned long quadrant, ret = n;
bool is_load = !!to;
if (kvmhv_is_nestedv2())
return H_UNSUPPORTED;
/* Can't access quadrants 1 or 2 in non-HV mode, call the HV to do it */
if (kvmhv_on_pseries())
return plpar_hcall_norets(H_COPY_TOFROM_GUEST, lpid, pid, eaddr,