x86/dmop: Properly fail for PV guests
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 5 Mar 2021 14:36:27 +0000 (15:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Mar 2021 14:36:27 +0000 (15:36 +0100)
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 <andrew.cooper3@citrix.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 615367b5275a5b0123f1f1ee86c985fab234a5a4
master date: 2021-02-26 12:28:52 +0000

xen/arch/x86/hvm/dm.c

index e3f845165d2a6d663556b9c80ea6f7894a8cffa3..7586952633c94e29c11b4ee5356d83fc2b9b9ed2 100644 (file)
@@ -370,6 +370,7 @@ static int dm_op(const struct dmop_args *op_args)
     if ( rc )
         return rc;
 
+    rc = -EINVAL;
     if ( !is_hvm_domain(d) )
         goto out;