x86/hvm: Fix altp2m_op hypercall continuations
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Oct 2019 13:32:40 +0000 (14:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Oct 2019 13:32:40 +0000 (14:32 +0100)
commit527e324dbb35e5c1d5e747520a54e957b8acfa90
treef4b99a2767a63f80ba63fec17b0550f77c90b8f7
parent91836ce37bb2b110039ee55c749bfa32d09dc586
x86/hvm: Fix altp2m_op hypercall continuations

c/s 9383de210 "x86/altp2m: support for setting restrictions for an array of
pages" introduced this logic, but do_hvm_op() was already capable of handling
-ERESTART correctly.

More problematic however is a continuation from compat_altp2m_op().  The arg
written back into register state points into the hypercall XLAT area, not at
the original parameter passed by the guest.  It may be truncated by the
vmentry, but definitely won't be correct on the next invocation.

Delete the hypercall_create_continuation() call, and return -ERESTART, which
will cause the compat case to start working correctly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 8228577ad1ba9f4b49370b76c90b75fb9243ee2f
master date: 2019-04-09 19:34:41 +0100
xen/arch/x86/hvm/hvm.c