Skip to content

Commit

Permalink
xen/dmop: Fix XEN_DMOP_nr_vcpus to actually return data
Browse files Browse the repository at this point in the history
The const_op boolean needs clobbering to cause data to be written back to the
caller.

Fixes: c4441ab ("dmop: Add XEN_DMOP_nr_vcpus")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
  • Loading branch information
andyhhp committed Mar 4, 2021
1 parent 73b1370 commit 6b0ac9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions xen/arch/arm/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ int dm_op(const struct dmop_args *op_args)
struct xen_dm_op_nr_vcpus *data = &op.u.nr_vcpus;

data->vcpus = d->max_vcpus;
const_op = false;
rc = 0;
break;
}
Expand Down
1 change: 1 addition & 0 deletions xen/arch/x86/hvm/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ int dm_op(const struct dmop_args *op_args)
struct xen_dm_op_nr_vcpus *data = &op.u.nr_vcpus;

data->vcpus = d->max_vcpus;
const_op = false;
rc = 0;
break;
}
Expand Down

0 comments on commit 6b0ac9a

Please sign in to comment.