Magellan Linux

Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1031-2.6.25-xen-x86_64-Implement-HYPERVISOR-MULTI-_update_desc.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 606 - (show annotations) (download)
Thu May 22 23:13:13 2008 UTC (15 years, 11 months ago) by niro
File size: 1712 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 c0568741005d3ff5388486f7a58130f737b2ecb3 Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@Rawhide-64.localdomain>
3 Date: Tue, 27 Nov 2007 18:09:08 -0200
4 Subject: [PATCH] xen x86_64: Implement {HYPERVISOR,MULTI}_update_descriptor()
5
6 Add 64-bit versions of HYPERVISOR_update_descriptor() and
7 MULTI_update_descriptor().
8
9 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
10 Signed-off-by: Mark McLoughlin <markmc@redhat.com>
11 ---
12 include/asm-x86/xen/hypercall.h | 15 +++++++++++++++
13 1 files changed, 15 insertions(+), 0 deletions(-)
14
15 diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
16 index 1242e5b..cbf3d52 100644
17 --- a/include/asm-x86/xen/hypercall.h
18 +++ b/include/asm-x86/xen/hypercall.h
19 @@ -204,11 +204,20 @@ HYPERVISOR_get_debugreg(int reg)
20 return _hypercall1(unsigned long, get_debugreg, reg);
21 }
22
23 +#ifdef CONFIG_X86_64
24 +static inline int
25 +HYPERVISOR_update_descriptor(
26 + unsigned long ma, unsigned long word)
27 +{
28 + return _hypercall2(int, update_descriptor, ma, word);
29 +}
30 +#else
31 static inline int
32 HYPERVISOR_update_descriptor(u64 ma, u64 desc)
33 {
34 return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
35 }
36 +#endif
37
38 static inline int
39 HYPERVISOR_memory_op(unsigned int cmd, void *arg)
40 @@ -383,10 +392,16 @@ MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
41 struct desc_struct desc)
42 {
43 mcl->op = __HYPERVISOR_update_descriptor;
44 +#ifdef CONFIG_X86_64
45 + BUG_ON(sizeof(desc) != sizeof(mcl->args[2]));
46 + mcl->args[0] = maddr;
47 + mcl->args[1] = *((unsigned long *)&desc);
48 +#else
49 mcl->args[0] = maddr;
50 mcl->args[1] = maddr >> 32;
51 mcl->args[2] = desc.a;
52 mcl->args[3] = desc.b;
53 +#endif
54 }
55
56 static inline void
57 --
58 1.5.4.1
59