debuggers.hg

view xen/include/asm-ia64/vmx_platform.h @ 16392:91575bb23d07

[IA64] vti save-restore: hvm domain io page clean up.

- set_hvm_param hypercall clean up.
- The reference counts of the io pages must be incremented.
- Buffered pio wasn't SMP safe.
- Clean up get_vio() parameter.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Wed Nov 07 10:31:09 2007 -0700 (2007-11-07)
parents 0cf0feba58fb
children f9ca1d8c9e65
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 #include <asm/hvm/vacpi.h>
28 /* Value of guest os type */
29 #define OS_BASE 0xB0
30 #define OS_UNKNOWN 0xB0
31 #define OS_WINDOWS 0xB1
32 #define OS_LINUX 0xB2
33 #define OS_END 0xB3
35 #define GOS_WINDOWS(_v) \
36 ((_v)->domain->arch.vmx_platform.gos_type == OS_WINDOWS)
38 #define GOS_LINUX(_v) \
39 ((_v)->domain->arch.vmx_platform.gos_type == OS_LINUX)
41 /* port guest Firmware use to indicate os type
42 * this port is used to trigger SMI on x86,
43 * it is not used on ia64 */
44 #define OS_TYPE_PORT 0xB2
46 struct vmx_ioreq_page {
47 spinlock_t lock;
48 struct page_info *page;
49 void *va;
50 };
51 int vmx_set_ioreq_page(struct domain *d,
52 struct vmx_ioreq_page *iorp, unsigned long gmfn);
54 typedef struct virtual_platform_def {
55 unsigned long gos_type;
56 struct vmx_ioreq_page ioreq;
57 struct vmx_ioreq_page buf_ioreq;
58 struct vmx_ioreq_page buf_pioreq;
59 unsigned long pib_base;
60 unsigned long params[HVM_NR_PARAMS];
61 /* One IOSAPIC now... */
62 struct viosapic viosapic;
63 struct vacpi vacpi;
64 } vir_plat_t;
66 static inline int __fls(uint32_t word)
67 {
68 long double d = word;
69 long exp;
71 __asm__ __volatile__ ("getf.exp %0=%1" : "=r"(exp) : "f"(d));
72 return word ? (exp - 0xffff) : -1;
73 }
74 #endif