Magellan Linux

Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1084-2.6.25-xen-Implement-64-bit-version-of-HYPERVISOR_set_callbacks.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: 2258 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 7e0b680f00bb4bc93cd89f234bb7d5b71592372a Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@redhat.com>
3 Date: Wed, 26 Dec 2007 15:51:34 -0200
4 Subject: [PATCH] Implement 64-bit version of HYPERVISOR_set_callbacks() (IFDEF?)
5
6 HYPERVISOR_set_callbacks() interface is different on x86_64.
7
8 (More #ifdef abuse).
9
10 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
11 ---
12 arch/x86/xen/setup.c | 6 ++++++
13 include/asm-x86/xen/hypercall.h | 12 ++++++++++++
14 2 files changed, 18 insertions(+), 0 deletions(-)
15
16 diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
17 index 2216e44..99b7463 100644
18 --- a/arch/x86/xen/setup.c
19 +++ b/arch/x86/xen/setup.c
20 @@ -94,8 +94,14 @@ void __init xen_arch_setup(void)
21 if (!xen_feature(XENFEAT_auto_translated_physmap))
22 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3);
23
24 +#ifdef CONFIG_X86_32
25 HYPERVISOR_set_callbacks(__KERNEL_CS, (unsigned long)xen_hypervisor_callback,
26 __KERNEL_CS, (unsigned long)xen_failsafe_callback);
27 +#else
28 + HYPERVISOR_set_callbacks((unsigned long)xen_hypervisor_callback,
29 + (unsigned long)xen_failsafe_callback,
30 + (unsigned long)system_call);
31 +#endif
32
33 set_iopl.iopl = 1;
34 rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
35 diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
36 index 605775e..0588d6d 100644
37 --- a/include/asm-x86/xen/hypercall.h
38 +++ b/include/asm-x86/xen/hypercall.h
39 @@ -226,6 +226,7 @@ HYPERVISOR_stack_switch(unsigned long ss, unsigned long esp)
40 return _hypercall2(int, stack_switch, ss, esp);
41 }
42
43 +#ifdef CONFIG_X86_32
44 static inline int
45 HYPERVISOR_set_callbacks(unsigned long event_selector,
46 unsigned long event_address,
47 @@ -236,6 +237,17 @@ HYPERVISOR_set_callbacks(unsigned long event_selector,
48 event_selector, event_address,
49 failsafe_selector, failsafe_address);
50 }
51 +#else /* CONFIG_X86_64 */
52 +static inline int
53 +HYPERVISOR_set_callbacks(unsigned long event_address,
54 + unsigned long failsafe_address,
55 + unsigned long syscall_address)
56 +{
57 + return _hypercall3(int, set_callbacks,
58 + event_address, failsafe_address,
59 + syscall_address);
60 +}
61 +#endif /* CONFIG_X86_{32,64} */
62
63 static inline int
64 HYPERVISOR_fpu_taskswitch(int set)
65 --
66 1.5.4.1
67