]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: use correct type for HYPERVISOR_memory_op()
authorJuergen Gross <jgross@suse.com>
Fri, 4 Sep 2015 12:50:33 +0000 (14:50 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 11:43:38 +0000 (03:43 -0800)
commit99ebc931d2066f511fc287dd76aa6f9be801d650
treef343d036d01feec80142d8187e72974d41cd5882
parentb763a99fdd7c2acaec5a33274fd312fe9f116aab
xen: use correct type for HYPERVISOR_memory_op()

HYPERVISOR_memory_op() is defined to return an "int" value. This is
wrong, as the Xen hypervisor will return "long".

The sub-function XENMEM_maximum_reservation returns the maximum
number of pages for the current domain. An int will overflow for a
domain configured with 8TB of memory or more.

Correct this by using the correct type.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 24f775a6605a8ffc697c0767fc7ea85656ddb958)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 8e28e5e7031f3333e26141a86e46583c04b895c7)
arch/x86/include/asm/xen/hypercall.h
arch/x86/xen/setup.c