ia64/xen-unstable

view xen/include/asm-ia64/viosapic.h @ 16171:e7d7a4adf357

[IA64] vti domain save/restore: implement hvm_save/load. work in progress.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Sun Oct 21 14:39:07 2007 -0600 (2007-10-21)
parents 3bd97b4fe77d
children 5450b008afce
line source
1 /*
2 *
3 * Copyright (C) 2001 MandrakeSoft S.A.
4 *
5 * MandrakeSoft S.A.
6 * 43, rue d'Aboukir
7 * 75002 Paris - France
8 * http://www.linux-mandrake.com/
9 * http://www.mandrakesoft.com/
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
26 #ifndef __ASM_IA64_VMX_VIOSAPIC_H__
27 #define __ASM_IA64_VMX_VIOSAPIC_H__
29 #include <xen/config.h>
30 #include <xen/types.h>
31 #include <xen/smp.h>
32 #include <public/arch-ia64/hvm/save.h> /* for VIOSAPIC_NUM_PINS and
33 union viosapic_rte */
35 /* Direct registers. */
36 #define VIOSAPIC_REG_SELECT 0x00
37 #define VIOSAPIC_WINDOW 0x10
38 #define VIOSAPIC_EOI 0x40
40 #define VIOSAPIC_VERSION 0x1
42 #define VIOSAPIC_DEST_SHIFT 16
45 #define VIOSAPIC_VERSION_ID 0x21 /* IOSAPIC version */
47 #define VIOSAPIC_DEFAULT_BASE_ADDRESS 0xfec00000
48 #define VIOSAPIC_MEM_LENGTH 0x100
50 #define domain_viosapic(d) (&(d)->arch.hvm_domain.viosapic)
51 #define viosapic_domain(v) (container_of((v), struct domain, \
52 arch.hvm_domain.viosapic))
53 #define vcpu_viosapic(v) (&(v)->domain->arch.hvm_domain.viosapic)
55 struct viosapic {
56 uint64_t irr;
57 uint64_t isr; /* This is used for level trigger */
58 uint32_t ioregsel;
59 spinlock_t lock;
60 struct vcpu * lowest_vcpu;
61 uint64_t base_address;
62 union viosapic_rte redirtbl[VIOSAPIC_NUM_PINS];
63 };
65 void viosapic_init(struct domain *d);
66 void viosapic_set_irq(struct domain *d, int irq, int level);
67 void viosapic_set_pci_irq(struct domain *d, int device, int intx, int level);
68 void viosapic_write(struct vcpu *v, unsigned long addr,
69 unsigned long length, unsigned long val);
71 unsigned long viosapic_read(struct vcpu *v, unsigned long addr,
72 unsigned long length);
74 #endif /* __ASM_IA64_VMX_VIOSAPIC_H__ */