Commit f021c8b3 authored by Isaku Yamahata's avatar Isaku Yamahata Committed by Tony Luck

ia64/xen: xencomm conversion functions for hypercalls

On ia64/xen, pointer arguments for hypercall is passed
by pseudo physical address(guest physical address.)
So such hypercalls needs address conversion functions.
This patch implements concrete conversion functions for
such hypercalls.
Signed-off-by: default avatarAkio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: default avatarYaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: default avatarIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 11d43778
/*
* Copyright (C) 2006 Tristan Gingold <tristan.gingold@bull.net>, Bull SAS
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ASM_IA64_XEN_XCOM_HCALL_H
#define _ASM_IA64_XEN_XCOM_HCALL_H
/* These function creates inline or mini descriptor for the parameters and
calls the corresponding xencomm_arch_hypercall_X.
Architectures should defines HYPERVISOR_xxx as xencomm_hypercall_xxx unless
they want to use their own wrapper. */
extern int xencomm_hypercall_console_io(int cmd, int count, char *str);
extern int xencomm_hypercall_event_channel_op(int cmd, void *op);
extern int xencomm_hypercall_xen_version(int cmd, void *arg);
extern int xencomm_hypercall_physdev_op(int cmd, void *op);
extern int xencomm_hypercall_grant_table_op(unsigned int cmd, void *op,
unsigned int count);
extern int xencomm_hypercall_sched_op(int cmd, void *arg);
extern int xencomm_hypercall_multicall(void *call_list, int nr_calls);
extern int xencomm_hypercall_callback_op(int cmd, void *arg);
extern int xencomm_hypercall_memory_op(unsigned int cmd, void *arg);
extern int xencomm_hypercall_suspend(unsigned long srec);
extern long xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg);
extern long xencomm_hypercall_opt_feature(void *arg);
#endif /* _ASM_IA64_XEN_XCOM_HCALL_H */
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
/* Must be called before any hypercall. */ /* Must be called before any hypercall. */
extern void xencomm_initialize(void); extern void xencomm_initialize(void);
extern int xencomm_is_initialized(void);
/* Check if virtual contiguity means physical contiguity /* Check if virtual contiguity means physical contiguity
* where the passed address is a pointer value in virtual address. * where the passed address is a pointer value in virtual address.
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
# Makefile for Xen components # Makefile for Xen components
# #
obj-y := hypercall.o xencomm.o obj-y := hypercall.o xencomm.o xcom_hcall.o
This diff is collapsed.
...@@ -19,11 +19,22 @@ ...@@ -19,11 +19,22 @@
#include <linux/mm.h> #include <linux/mm.h>
static unsigned long kernel_virtual_offset; static unsigned long kernel_virtual_offset;
static int is_xencomm_initialized;
/* for xen early printk. It uses console io hypercall which uses xencomm.
* However early printk may use it before xencomm initialization.
*/
int
xencomm_is_initialized(void)
{
return is_xencomm_initialized;
}
void void
xencomm_initialize(void) xencomm_initialize(void)
{ {
kernel_virtual_offset = KERNEL_START - ia64_tpa(KERNEL_START); kernel_virtual_offset = KERNEL_START - ia64_tpa(KERNEL_START);
is_xencomm_initialized = 1;
} }
/* Translate virtual address to physical address. */ /* Translate virtual address to physical address. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment