ia64/xen-unstable

view xen/include/asm-x86/hvm/vioapic.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents fd5b2ed9574a
children
line source
1 /*
2 * Copyright (C) 2001 MandrakeSoft S.A.
3 *
4 * MandrakeSoft S.A.
5 * 43, rue d'Aboukir
6 * 75002 Paris - France
7 * http://www.linux-mandrake.com/
8 * http://www.mandrakesoft.com/
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
25 #ifndef __ASM_X86_HVM_VIOAPIC_H__
26 #define __ASM_X86_HVM_VIOAPIC_H__
28 #include <xen/config.h>
29 #include <xen/types.h>
30 #include <xen/smp.h>
31 #include <public/hvm/save.h>
33 #if !VIOAPIC_IS_IOSAPIC
34 #define VIOAPIC_VERSION_ID 0x11 /* IOAPIC version */
35 #else
36 #define VIOAPIC_VERSION_ID 0x21 /* IOSAPIC version */
37 #endif
39 #define VIOAPIC_EDGE_TRIG 0
40 #define VIOAPIC_LEVEL_TRIG 1
42 #define VIOAPIC_DEFAULT_BASE_ADDRESS 0xfec00000
43 #define VIOAPIC_MEM_LENGTH 0x100
45 /* Direct registers. */
46 #define VIOAPIC_REG_SELECT 0x00
47 #define VIOAPIC_REG_WINDOW 0x10
48 #define VIOAPIC_REG_EOI 0x40 /* IA64 IOSAPIC only */
50 /* Indirect registers. */
51 #define VIOAPIC_REG_APIC_ID 0x00 /* x86 IOAPIC only */
52 #define VIOAPIC_REG_VERSION 0x01
53 #define VIOAPIC_REG_ARB_ID 0x02 /* x86 IOAPIC only */
55 struct hvm_vioapic {
56 struct hvm_hw_vioapic hvm_hw_vioapic;
57 struct domain *domain;
58 };
60 #define domain_vioapic(d) (&(d)->arch.hvm_domain.vioapic->hvm_hw_vioapic)
61 #define vioapic_domain(v) (container_of((v), struct hvm_vioapic, \
62 hvm_hw_vioapic)->domain)
64 int vioapic_init(struct domain *d);
65 void vioapic_deinit(struct domain *d);
66 void vioapic_reset(struct domain *d);
67 void vioapic_irq_positive_edge(struct domain *d, unsigned int irq);
68 void vioapic_update_EOI(struct domain *d, int vector);
70 #endif /* __ASM_X86_HVM_VIOAPIC_H__ */