int old_pid, old_lpid;
bool is_load = !!to;
- /* Can't access quadrants 1 or 2 in non-HV mode */
- if (kvmhv_on_pseries()) {
- /* TODO h-call */
- return -EPERM;
- }
+ /* 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,
+ __pa(to), __pa(from), n);
quadrant = 1;
if (!pid)