/[pkg-src]/trunk/kernel26-xen/patches-2.6.25-r1/1016-2.6.25-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch |
Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1016-2.6.25-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
Parent Directory | Revision Log
Revision 606 -
(show annotations)
(download)
Thu May 22 23:13:13 2008 UTC (16 years ago) by niro
File size: 1781 byte(s)
Thu May 22 23:13:13 2008 UTC (16 years ago) by niro
File size: 1781 byte(s)
-ver bump to 2.6.25-magellan-r1: - linux-2.6.25.4 - fbcondecor-0.9.4 - squashfs-3.3 - unionfs-2.3.3 - tuxonice-3.0-rc7 - linux-phc-0.3.0 - acpi-dstd-0.9a - reiser4 - xen-3.2.0 . ipw3945-1.2.2
1 | From 3ba4fd12c6ff5269a2e727c5f84aa7a18b8fa4a3 Mon Sep 17 00:00:00 2001 |
2 | From: Mark McLoughlin <markmc@redhat.com> |
3 | Date: Thu, 6 Mar 2008 11:10:59 +0000 |
4 | Subject: [PATCH] xen x86_64: Add 64 bit version of privcmd_hypercall() |
5 | |
6 | Signed-off-by: Mark McLoughlin <markmc@redhat.com> |
7 | --- |
8 | include/asm-x86/xen/hypercall.h | 28 ++++++++++++++++++++++++++++ |
9 | 1 files changed, 28 insertions(+), 0 deletions(-) |
10 | |
11 | diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h |
12 | index cd554ca..b0c518c 100644 |
13 | --- a/include/asm-x86/xen/hypercall.h |
14 | +++ b/include/asm-x86/xen/hypercall.h |
15 | @@ -412,6 +412,7 @@ MULTI_stack_switch(struct multicall_entry *mcl, |
16 | |
17 | #include <xen/sys/privcmd.h> |
18 | |
19 | +#ifdef CONFIG_X86_32 |
20 | static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall) |
21 | { |
22 | int ret; |
23 | @@ -437,5 +438,32 @@ static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall) |
24 | |
25 | return ret; |
26 | } |
27 | +#else /* CONFIG_X86_32 */ |
28 | +static inline int privcmd_hypercall(privcmd_hypercall_t *hypercall) |
29 | +{ |
30 | + int ret; |
31 | + long ign1, ign2, ign3; |
32 | + |
33 | + if (hypercall->op >= (PAGE_SIZE >> 5)) |
34 | + return -EINVAL; |
35 | + |
36 | + __asm__ __volatile__ ( |
37 | + "movq %8,%%r10; movq %9,%%r8;" |
38 | + "shll $5,%%eax ;" |
39 | + "addq $hypercall_page,%%rax ;" |
40 | + "call *%%rax" |
41 | + : "=a" (ret), "=D" (ign1), |
42 | + "=S" (ign2), "=d" (ign3) |
43 | + : "0" ((unsigned int)hypercall->op), |
44 | + "1" (hypercall->arg[0]), |
45 | + "2" (hypercall->arg[1]), |
46 | + "3" (hypercall->arg[2]), |
47 | + "g" (hypercall->arg[3]), |
48 | + "g" (hypercall->arg[4]) |
49 | + : "r8", "r10", "memory" ); |
50 | + |
51 | + return ret; |
52 | +} |
53 | +#endif /* CONFIG_X86_32 */ |
54 | |
55 | #endif /* __HYPERCALL_H__ */ |
56 | -- |
57 | 1.5.4.1 |
58 |