ia64/xen-unstable

view xen/include/asm-ia64/vmx_platform.h @ 7720:b2ea26d2099a

Support recent change moving virtual IOAPIC model into Xen for
ia64/VTI. Now ia64/vti will create links to arch/x86/dm/vmx_vioapic.c
and include/x86/vmx_vlapic.h.

Firstly, a small change to common virtual IOAPIC model to be used by
both sides. Also some compilation fix to tools is included in first
one. Secondly, there are ia64-specific changes to hook to common
IOAPIC model.

Based on this patch upon latest xen-ia64-unstable tip, we can see
multiple domains working again on XEN/IA64, including both domU and
VTI domain simultaneously in run-time.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by Anthony Xu <Anthony.xu@intel.com>
Signed-off-by Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by Eddie Dong <eddie.dong@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Nov 09 14:53:12 2005 +0100 (2005-11-09)
parents 649cd37aa1ab
children 50640456147b
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/arch-ia64.h>
24 #include <asm/vmx_vioapic.h>
26 struct mmio_list;
27 typedef struct virutal_platform_def {
28 unsigned long shared_page_va;
29 unsigned long pib_base;
30 unsigned char xtp;
31 struct mmio_list *mmio;
32 /* One IOSAPIC now... */
33 struct vmx_vioapic vmx_vioapic;
34 } vir_plat_t;
36 static inline int __fls(uint32_t word)
37 {
38 long double d = word;
39 long exp;
41 __asm__ __volatile__ ("getf.exp %0=%1" : "=r"(exp) : "f"(d));
42 return word ? (exp - 0xffff) : -1;
43 }
45 /* This is a connect structure between vIOSAPIC model and vLSAPIC model.
46 * vlapic is required by vIOSAPIC model to manipulate pending bits, and
47 * we just map them into vpd here
48 */
49 typedef struct vlapic {
50 struct vcpu *vcpu; /* Link to current vcpu */
51 } vlapic_t;
53 extern uint64_t dummy_tmr[];
54 #define VCPU(_v,_x) _v->arch.privregs->_x
55 #define VLAPIC_ID(l) (uint16_t)(VCPU((l)->vcpu, lid) >> 16)
56 #define VLAPIC_IRR(l) VCPU((l)->vcpu, irr[0])
58 /* As long as we register vlsapic to ioapic controller, it's said enabled */
59 #define vlapic_enabled(l) 1
60 #define vmx_apic_support(d) 1
62 #define VLAPIC_DELIV_MODE_FIXED 0x0
63 #define VLAPIC_DELIV_MODE_REDIR 0x1
64 #define VLAPIC_DELIV_MODE_LPRI VLAPIC_DELIV_MODE_REDIR
65 #define VLAPIC_DELIV_MODE_PMI 0x2
66 #define VLAPIC_DELIV_MODE_SMI 0x2 /* For IA32 */
67 #define VLAPIC_DELIV_MODE_RESERVED 0x3
68 #define VLAPIC_DELIV_MODE_NMI 0x4
69 #define VLAPIC_DELIV_MODE_INIT 0x5
70 #define VLAPIC_DELIV_MODE_STARTUP 0x6 /* For IA32 */
71 #define VLAPIC_DELIV_MODE_EXT 0x7
73 #endif