ia64/xen-unstable

view xen/include/asm-x86/hvm/vcpu.h @ 14635:5c52e5ca8459

hvm: Clean up handling of exception intercepts.
Only intercept #DB/#BP if a debugger is attached.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Wed Mar 28 18:47:17 2007 +0100 (2007-03-28)
parents d2a91b73899a
children 8ad38aaaeb89
line source
1 /*
2 * vcpu.h: HVM per vcpu definitions
3 *
4 * Copyright (c) 2005, International Business Machines 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 */
20 #ifndef __ASM_X86_HVM_VCPU_H__
21 #define __ASM_X86_HVM_VCPU_H__
23 #include <asm/hvm/io.h>
24 #include <asm/hvm/vlapic.h>
25 #include <asm/hvm/vmx/vmcs.h>
26 #include <asm/hvm/svm/vmcb.h>
28 #define HVM_VCPU_INIT_SIPI_SIPI_STATE_NORM 0
29 #define HVM_VCPU_INIT_SIPI_SIPI_STATE_WAIT_SIPI 1
31 struct hvm_vcpu {
32 unsigned long hw_cr3; /* value we give to HW to use */
33 unsigned long ioflags;
34 struct hvm_io_op io_op;
35 struct vlapic vlapic;
36 s64 cache_tsc_offset;
37 u64 guest_time;
38 struct list_head tm_list;
40 /* For AP startup */
41 unsigned long init_sipi_sipi_state;
43 int xen_port;
45 bool_t flag_dr_dirty;
46 bool_t debug_state_latch;
48 union {
49 struct arch_vmx_struct vmx;
50 struct arch_svm_struct svm;
51 } u;
52 };
54 #define ARCH_HVM_IO_WAIT 1 /* Waiting for I/O completion */
56 #define HVM_CONTEXT_STACK_BYTES (offsetof(struct cpu_user_regs, error_code))
58 #endif /* __ASM_X86_HVM_VCPU_H__ */