aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/xen
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2015-09-04 14:50:33 +0200
committerDavid Vrabel <david.vrabel@citrix.com>2015-09-28 14:48:52 +0100
commit24f775a6605a8ffc697c0767fc7ea85656ddb958 (patch)
tree405762fa77d7b70171aaeb732f9f6cb808c6f3dd /arch/x86/include/asm/xen
parentLinux 4.3-rc3 (diff)
downloadlinux-dev-24f775a6605a8ffc697c0767fc7ea85656ddb958.tar.xz
linux-dev-24f775a6605a8ffc697c0767fc7ea85656ddb958.zip
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>
Diffstat (limited to 'arch/x86/include/asm/xen')
-rw-r--r--arch/x86/include/asm/xen/hypercall.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index 83aea8055119..4c20dd333412 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -336,10 +336,10 @@ HYPERVISOR_update_descriptor(u64 ma, u64 desc)
return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
}
-static inline int
+static inline long
HYPERVISOR_memory_op(unsigned int cmd, void *arg)
{
- return _hypercall2(int, memory_op, cmd, arg);
+ return _hypercall2(long, memory_op, cmd, arg);
}
static inline int