1/* 2 * Copyright (C) 2006 Hollis Blanchard <hollisb@us.ibm.com>, IBM Corporation 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19#ifndef _ASM_IA64_XEN_XENCOMM_H 20#define _ASM_IA64_XEN_XENCOMM_H 21 22#include <xen/xencomm.h> 23#include <asm/pgtable.h> 24 25/* Must be called before any hypercall. */ 26extern void xencomm_initialize(void); 27extern int xencomm_is_initialized(void); 28 29/* Check if virtual contiguity means physical contiguity 30 * where the passed address is a pointer value in virtual address. 31 * On ia64, identity mapping area in region 7 or the piece of region 5 32 * that is mapped by itr[IA64_TR_KERNEL]/dtr[IA64_TR_KERNEL] 33 */ 34static inline int xencomm_is_phys_contiguous(unsigned long addr) 35{ 36 return (PAGE_OFFSET <= addr && 37 addr < (PAGE_OFFSET + (1UL << IA64_MAX_PHYS_BITS))) || 38 (KERNEL_START <= addr && 39 addr < KERNEL_START + KERNEL_TR_PAGE_SIZE); 40} 41 42#endif /* _ASM_IA64_XEN_XENCOMM_H */ 43