ia64/xen-unstable

view xen/include/asm-ia64/grant_table.h @ 17668:f65906f262f9

[IA64] trivial compilation error fix for 17645:8d18e52a1b23.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Fri May 16 09:31:03 2008 +0100 (2008-05-16)
parents 8d18e52a1b23
children
line source
1 /******************************************************************************
2 * include/asm-ia64/grant_table.h
3 */
5 #ifndef __ASM_GRANT_TABLE_H__
6 #define __ASM_GRANT_TABLE_H__
8 #define INITIAL_NR_GRANT_FRAMES 1
10 // for grant map/unmap
11 int create_grant_host_mapping(unsigned long gpaddr, unsigned long mfn,
12 unsigned int flags, unsigned int cache_flags);
13 int replace_grant_host_mapping(unsigned long gpaddr, unsigned long mfn, unsigned long new_gpaddr, unsigned int flags);
15 // for grant transfer
16 int guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn, unsigned int page_order);
18 /* XXX
19 * somewhere appropriate
20 * those constand shouldn't be pre-defined and
21 * those area should be reserved by EFI MD.
22 */
23 /* Guest phsyical address of shared_info */
24 #define IA64_SHARED_INFO_PADDR (1UL << 40)
25 /* Guest phsyical address of mapped_regs */
26 #define IA64_XMAPPEDREGS_BASE_PADDR (IA64_SHARED_INFO_PADDR + XSI_SIZE)
27 #define IA64_XMAPPEDREGS_PADDR(vcpu_id) \
28 (IA64_XMAPPEDREGS_BASE_PADDR + \
29 (vcpu_id) * max_t(unsigned long, PAGE_SIZE, XMAPPEDREGS_SIZE))
31 /* Guest physical address of the grant table. */
32 #define IA64_GRANT_TABLE_PADDR IA64_XMAPPEDREGS_PADDR(NR_CPUS)
34 #define gnttab_shared_maddr(t, i) (virt_to_maddr((t)->shared[(i)]))
35 #define gnttab_shared_page(t, i) (virt_to_page((t)->shared[(i)]))
37 #define ia64_gnttab_create_shared_page(d, t, i) \
38 do { \
39 BUG_ON((d)->arch.mm.pgd == NULL); \
40 assign_domain_page((d), \
41 IA64_GRANT_TABLE_PADDR + ((i) << PAGE_SHIFT), \
42 gnttab_shared_maddr((t), (i))); \
43 } while (0)
45 /*
46 * for grant table shared page
47 * grant_table_create() might call this macro before allocating the p2m table.
48 * In such case, arch_domain_create() completes the initialization.
49 */
50 #define gnttab_create_shared_page(d, t, i) \
51 do { \
52 share_xen_page_with_guest(gnttab_shared_page((t), (i)), \
53 (d), XENSHARE_writable); \
54 if ((d)->arch.mm.pgd) \
55 ia64_gnttab_create_shared_page((d), (t), (i)); \
56 } while (0)
58 #define gnttab_shared_gmfn(d, t, i) \
59 ((IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) + (i))
61 #define gnttab_mark_dirty(d, f) ((void)f)
63 static inline void gnttab_clear_flag(unsigned long nr, uint16_t *addr)
64 {
65 clear_bit(nr, addr);
66 }
68 #define gnttab_host_mapping_get_page_type(op, ld, rd) \
69 (!((op)->flags & GNTMAP_readonly))
71 #define gnttab_release_host_mappings 1
73 static inline int replace_grant_supported(void)
74 {
75 return 1;
76 }
78 #endif /* __ASM_GRANT_TABLE_H__ */