Magellan Linux

Annotation of /trunk/kernel26-xen/patches-2.6.25-r1/1029-2.6.25-xen-x86_64-Add-update_va_mapping-64-bit-code.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 606 - (hide annotations) (download)
Thu May 22 23:13:13 2008 UTC (16 years, 4 months ago) by niro
File size: 3606 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 niro 606 From 9cdf45415a0b3071facc618cda387179d263124a Mon Sep 17 00:00:00 2001
2     From: Eduardo Habkost <ehabkost@Rawhide-64.localdomain>
3     Date: Tue, 27 Nov 2007 14:50:24 -0200
4     Subject: [PATCH] xen x86_64: Add update_va_mapping 64-bit code
5    
6     Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
7     ---
8     include/asm-x86/xen/hypercall.h | 44 ++++++++++++++++++++++++++++++-------
9     include/asm-x86/xen/hypervisor.h | 3 --
10     2 files changed, 35 insertions(+), 12 deletions(-)
11    
12     diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
13     index b0c518c..1242e5b 100644
14     --- a/include/asm-x86/xen/hypercall.h
15     +++ b/include/asm-x86/xen/hypercall.h
16     @@ -120,6 +120,15 @@ extern struct { char _entry[32]; } hypercall_page[];
17     (type)__res; \
18     })
19    
20     +#if defined(CONFIG_X86_64)
21     +#define MULTI_UVMFLAGS_INDEX 2
22     +#define MULTI_UVMDOMID_INDEX 3
23     +#else
24     +#define MULTI_UVMFLAGS_INDEX 3
25     +#define MULTI_UVMDOMID_INDEX 4
26     +#endif
27     +
28     +
29     static inline int
30     HYPERVISOR_set_trap_table(struct trap_info *table)
31     {
32     @@ -217,12 +226,17 @@ static inline int
33     HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val,
34     unsigned long flags)
35     {
36     +#ifdef CONFIG_X86_64
37     + return _hypercall3(int, update_va_mapping, va,
38     + new_val.pte, flags);
39     +#else
40     unsigned long pte_hi = 0;
41     #ifdef CONFIG_X86_PAE
42     pte_hi = new_val.pte_high;
43     #endif
44     return _hypercall4(int, update_va_mapping, va,
45     new_val.pte_low, pte_hi, flags);
46     +#endif
47     }
48    
49     static inline int
50     @@ -275,12 +289,17 @@ static inline int
51     HYPERVISOR_update_va_mapping_otherdomain(unsigned long va, pte_t new_val,
52     unsigned long flags, domid_t domid)
53     {
54     +#ifdef CONFIG_X86_64
55     + return _hypercall4(int, update_va_mapping_otherdomain, va,
56     + new_val.pte, flags, domid);
57     +#else
58     unsigned long pte_hi = 0;
59     #ifdef CONFIG_X86_PAE
60     pte_hi = new_val.pte_high;
61     #endif
62     return _hypercall5(int, update_va_mapping_otherdomain, va,
63     new_val.pte_low, pte_hi, flags, domid);
64     +#endif
65     }
66    
67     static inline int
68     @@ -314,14 +333,18 @@ MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
69     {
70     mcl->op = __HYPERVISOR_update_va_mapping;
71     mcl->args[0] = va;
72     -#ifdef CONFIG_X86_PAE
73     - mcl->args[1] = new_val.pte_low;
74     - mcl->args[2] = new_val.pte_high;
75     +
76     +#ifdef CONFIG_X86_64
77     + mcl->args[1] = new_val.pte;
78     #else
79     mcl->args[1] = new_val.pte_low;
80     +# ifdef CONFIG_X86_PAE
81     + mcl->args[2] = new_val.pte_high;
82     +# else
83     mcl->args[2] = 0;
84     +# endif
85     #endif
86     - mcl->args[3] = flags;
87     + mcl->args[MULTI_UVMFLAGS_INDEX] = flags;
88     }
89    
90     static inline void
91     @@ -341,15 +364,18 @@ MULTI_update_va_mapping_otherdomain(struct multicall_entry *mcl, unsigned long v
92     {
93     mcl->op = __HYPERVISOR_update_va_mapping_otherdomain;
94     mcl->args[0] = va;
95     -#ifdef CONFIG_X86_PAE
96     - mcl->args[1] = new_val.pte_low;
97     - mcl->args[2] = new_val.pte_high;
98     +#ifdef CONFIG_X86_64
99     + mcl->args[1] = new_val.pte;
100     #else
101     mcl->args[1] = new_val.pte_low;
102     +# ifdef CONFIG_X86_PAE
103     + mcl->args[2] = new_val.pte_high;
104     +# else
105     mcl->args[2] = 0;
106     +# endif
107     #endif
108     - mcl->args[3] = flags;
109     - mcl->args[4] = domid;
110     + mcl->args[MULTI_UVMFLAGS_INDEX] = flags;
111     + mcl->args[MULTI_UVMDOMID_INDEX] = domid;
112     }
113    
114     static inline void
115     diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h
116     index 8e15dd2..49a5e24 100644
117     --- a/include/asm-x86/xen/hypervisor.h
118     +++ b/include/asm-x86/xen/hypervisor.h
119     @@ -65,9 +65,6 @@ extern void force_evtchn_callback(void);
120     u64 jiffies_to_st(unsigned long jiffies);
121    
122    
123     -#define MULTI_UVMFLAGS_INDEX 3
124     -#define MULTI_UVMDOMID_INDEX 4
125     -
126     #define is_running_on_xen() (xen_start_info ? 1 : 0)
127    
128     #endif /* __HYPERVISOR_H__ */
129     --
130     1.5.4.1
131