x86: make certain memory sub-ops return valid values
authorJan Beulich <jbeulich@suse.com>
Mon, 4 Mar 2013 09:16:04 +0000 (10:16 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Mar 2013 09:16:04 +0000 (10:16 +0100)
commit7ffc9779aa5120c5098d938cb88f69a1dda9a0fe
tree14fafc8697f4eccf496d2592990da17e6080ca71
parent53decd322157e922cac2988e07da6d39538c8033
x86: make certain memory sub-ops return valid values

When a domain's shared info field "max_pfn" is zero,
domain_get_maximum_gpfn() so far returned ULONG_MAX, which
do_memory_op() in turn converted to -1 (i.e. -EPERM). Make the former
always return a sensible number (i.e. zero if the field was zero) and
have the latter no longer truncate return values.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm.c
xen/common/compat/memory.c
xen/common/memory.c