aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/xen
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-08 18:06:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-16 04:56:46 -0400
commitca15f20f1126f897500ade892a2d598a08da1b56 (patch)
tree35a277a13591855e32d12cd574f2264b7b6af86b /include/asm-x86/xen
parent7077c33d81a8d790135ae87cd19e6efcb075c23a (diff)
xen: fix 64-bit hypercall variants
64-bit guests can pass 64-bit quantities in a single argument, so fix up the hypercalls. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/xen')
-rw-r--r--include/asm-x86/xen/hypercall.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
index 2a4f9b41d684..0551b9d82ec4 100644
--- a/include/asm-x86/xen/hypercall.h
+++ b/include/asm-x86/xen/hypercall.h
@@ -223,12 +223,12 @@ static inline int
223HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val, 223HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val,
224 unsigned long flags) 224 unsigned long flags)
225{ 225{
226 unsigned long pte_hi = 0; 226 if (sizeof(new_val) == sizeof(long))
227#ifdef CONFIG_X86_PAE 227 return _hypercall3(int, update_va_mapping, va,
228 pte_hi = new_val.pte_high; 228 new_val.pte, flags);
229#endif 229 else
230 return _hypercall4(int, update_va_mapping, va, 230 return _hypercall4(int, update_va_mapping, va,
231 new_val.pte_low, pte_hi, flags); 231 new_val.pte, new_val.pte >> 32, flags);
232} 232}
233 233
234static inline int 234static inline int
@@ -281,12 +281,13 @@ static inline int
281HYPERVISOR_update_va_mapping_otherdomain(unsigned long va, pte_t new_val, 281HYPERVISOR_update_va_mapping_otherdomain(unsigned long va, pte_t new_val,
282 unsigned long flags, domid_t domid) 282 unsigned long flags, domid_t domid)
283{ 283{
284 unsigned long pte_hi = 0; 284 if (sizeof(new_val) == sizeof(long))
285#ifdef CONFIG_X86_PAE 285 return _hypercall4(int, update_va_mapping_otherdomain, va,
286 pte_hi = new_val.pte_high; 286 new_val.pte, flags, domid);
287#endif 287 else
288 return _hypercall5(int, update_va_mapping_otherdomain, va, 288 return _hypercall5(int, update_va_mapping_otherdomain, va,
289 new_val.pte_low, pte_hi, flags, domid); 289 new_val.pte, new_val.pte >> 32,
290 flags, domid);
290} 291}
291 292
292static inline int 293static inline int
@@ -327,14 +328,14 @@ MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
327{ 328{
328 mcl->op = __HYPERVISOR_update_va_mapping; 329 mcl->op = __HYPERVISOR_update_va_mapping;
329 mcl->args[0] = va; 330 mcl->args[0] = va;
330#ifdef CONFIG_X86_PAE 331 if (sizeof(new_val) == sizeof(long)) {
331 mcl->args[1] = new_val.pte_low; 332 mcl->args[1] = new_val.pte;
332 mcl->args[2] = new_val.pte_high; 333 mcl->args[2] = flags;
333#else 334 } else {
334 mcl->args[1] = new_val.pte_low; 335 mcl->args[1] = new_val.pte;
335 mcl->args[2] = 0; 336 mcl->args[2] = new_val.pte >> 32;
336#endif 337 mcl->args[3] = flags;
337 mcl->args[3] = flags; 338 }
338} 339}
339 340
340static inline void 341static inline void
@@ -354,15 +355,16 @@ MULTI_update_va_mapping_otherdomain(struct multicall_entry *mcl, unsigned long v
354{ 355{
355 mcl->op = __HYPERVISOR_update_va_mapping_otherdomain; 356 mcl->op = __HYPERVISOR_update_va_mapping_otherdomain;
356 mcl->args[0] = va; 357 mcl->args[0] = va;
357#ifdef CONFIG_X86_PAE 358 if (sizeof(new_val) == sizeof(long)) {
358 mcl->args[1] = new_val.pte_low; 359 mcl->args[1] = new_val.pte;
359 mcl->args[2] = new_val.pte_high; 360 mcl->args[2] = flags;
360#else 361 mcl->args[3] = domid;
361 mcl->args[1] = new_val.pte_low; 362 } else {
362 mcl->args[2] = 0; 363 mcl->args[1] = new_val.pte;
363#endif 364 mcl->args[2] = new_val.pte >> 32;
364 mcl->args[3] = flags; 365 mcl->args[3] = flags;
365 mcl->args[4] = domid; 366 mcl->args[4] = domid;
367 }
366} 368}
367 369
368static inline void 370static inline void