ia64/xen-unstable

view xen/include/asm-ia64/vmx.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 ecdc570407ec
children
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
2 /*
3 * vmx.h: prototype for generial vmx related interface
4 * Copyright (c) 2004, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 *
19 * Kun Tian (Kevin Tian) (kevin.tian@intel.com)
20 */
22 #ifndef _ASM_IA64_VT_H
23 #define _ASM_IA64_VT_H
25 #include <public/hvm/ioreq.h>
26 #include <asm/ia64_int.h>
28 #define vmx_user_mode(regs) (((struct ia64_psr *)&(regs)->cr_ipsr)->vm == 1)
30 #define VCPU_LID(v) (((u64)(v)->vcpu_id)<<24)
32 extern void identify_vmx_feature(void);
33 extern unsigned int vmx_enabled;
34 extern void *vmx_init_env(void *start, unsigned long end_in_pa);
35 extern int vmx_final_setup_guest(struct vcpu *v);
36 extern void vmx_save_state(struct vcpu *v);
37 extern void vmx_load_state(struct vcpu *v);
38 extern int vmx_setup_platform(struct domain *d);
39 extern void vmx_do_resume(struct vcpu *v);
40 extern void vmx_io_assist(struct vcpu *v);
41 extern IA64FAULT ia64_hypercall (struct pt_regs *regs);
42 extern unsigned long __gpfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
43 extern void set_privileged_operation_isr (struct vcpu *vcpu,int inst);
44 extern void set_rsv_reg_field_isr (struct vcpu *vcpu);
45 extern void vmx_relinquish_guest_resources(struct domain *d);
46 extern void vmx_relinquish_vcpu_resources(struct vcpu *v);
47 extern void vmx_send_assist_req(struct vcpu *v);
48 extern void deliver_pal_init(struct vcpu *vcpu);
49 extern void vmx_pend_pal_init(struct domain *d);
50 extern void vmx_lazy_load_fpu(struct vcpu *vcpu);
52 static inline vcpu_iodata_t *get_vio(struct vcpu *v)
53 {
54 struct domain *d = v->domain;
55 shared_iopage_t *p = (shared_iopage_t *)d->arch.vmx_platform.ioreq.va;
56 ASSERT((v == current) || spin_is_locked(&d->arch.vmx_platform.ioreq.lock));
57 ASSERT(d->arch.vmx_platform.ioreq.va != NULL);
58 return &p->vcpu_iodata[v->vcpu_id];
59 }
60 #endif /* _ASM_IA64_VT_H */