direct-io.hg

view xen/include/asm-ia64/vmx_platform.h @ 14153:a9d246105752

Accelerate IDE PIO on HVM/IA64 [3/3]

Add a bufferring mechanism for IDE PIO in a hypervisor.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Tue Feb 27 15:34:55 2007 +0000 (2007-02-27)
parents 3bd97b4fe77d
children 4ca4374eabd5
line source
1 /*
2 * vmx_platform.h: VMX platform support
3 * Copyright (c) 2004, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 *
18 */
19 #ifndef __ASM_IA64_VMX_PLATFORM_H__
20 #define __ASM_IA64_VMX_PLATFORM_H__
22 #include <public/xen.h>
23 #include <public/hvm/params.h>
24 #include <asm/viosapic.h>
25 struct mmio_list;
26 typedef struct virtual_platform_def {
27 unsigned long buffered_io_va;
28 spinlock_t buffered_io_lock;
29 unsigned long buffered_pio_va;
30 unsigned long shared_page_va;
31 unsigned long pib_base;
32 unsigned long params[HVM_NR_PARAMS];
33 struct mmio_list *mmio;
34 /* One IOSAPIC now... */
35 struct viosapic viosapic;
36 } vir_plat_t;
38 static inline int __fls(uint32_t word)
39 {
40 long double d = word;
41 long exp;
43 __asm__ __volatile__ ("getf.exp %0=%1" : "=r"(exp) : "f"(d));
44 return word ? (exp - 0xffff) : -1;
45 }
46 #endif