From: Andrew Cooper Date: Thu, 25 Feb 2021 16:54:17 +0000 (+0000) Subject: x86/dmop: Properly fail for PV guests X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~858 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=615367b5275a5b0123f1f1ee86c985fab234a5a4;p=xen.git x86/dmop: Properly fail for PV guests The current code has an early exit for PV guests, but it returns 0 having done nothing. Fixes: 524a98c2ac5 ("public / x86: introduce __HYPERCALL_dm_op...") Signed-off-by: Andrew Cooper Reviewed-by: Ian Jackson Reviewed-by: Jan Beulich Release-Acked-by: Ian Jackson --- diff --git a/xen/arch/x86/hvm/dm.c b/xen/arch/x86/hvm/dm.c index 5bc172a5d4..612749442e 100644 --- a/xen/arch/x86/hvm/dm.c +++ b/xen/arch/x86/hvm/dm.c @@ -365,6 +365,7 @@ int dm_op(const struct dmop_args *op_args) if ( rc ) return rc; + rc = -EINVAL; if ( !is_hvm_domain(d) ) goto out;