1 | /* |
---|
2 | * domain.h: HVM per domain definitions |
---|
3 | * |
---|
4 | * Copyright (c) 2004, Intel Corporation. |
---|
5 | * Copyright (c) 2005, International Business Machines Corporation |
---|
6 | * |
---|
7 | * This program is free software; you can redistribute it and/or modify it |
---|
8 | * under the terms and conditions of the GNU General Public License, |
---|
9 | * version 2, as published by the Free Software Foundation. |
---|
10 | * |
---|
11 | * This program is distributed in the hope it will be useful, but WITHOUT |
---|
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
14 | * more details. |
---|
15 | * |
---|
16 | * You should have received a copy of the GNU General Public License along with |
---|
17 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
---|
18 | * Place - Suite 330, Boston, MA 02111-1307 USA. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef __ASM_X86_HVM_DOMAIN_H__ |
---|
22 | #define __ASM_X86_HVM_DOMAIN_H__ |
---|
23 | |
---|
24 | #include <asm/hvm/irq.h> |
---|
25 | #include <asm/hvm/vpt.h> |
---|
26 | #include <asm/hvm/vlapic.h> |
---|
27 | #include <asm/hvm/io.h> |
---|
28 | #include <public/hvm/params.h> |
---|
29 | #include <public/hvm/save.h> |
---|
30 | |
---|
31 | struct hvm_ioreq_page { |
---|
32 | spinlock_t lock; |
---|
33 | struct page_info *page; |
---|
34 | void *va; |
---|
35 | }; |
---|
36 | |
---|
37 | struct hvm_domain { |
---|
38 | struct hvm_ioreq_page ioreq; |
---|
39 | struct hvm_ioreq_page buf_ioreq; |
---|
40 | |
---|
41 | s64 tsc_frequency; |
---|
42 | struct pl_time pl_time; |
---|
43 | |
---|
44 | struct hvm_io_handler io_handler; |
---|
45 | |
---|
46 | /* Lock protects access to irq, vpic and vioapic. */ |
---|
47 | spinlock_t irq_lock; |
---|
48 | struct hvm_irq irq; |
---|
49 | struct hvm_hw_vpic vpic[2]; /* 0=master; 1=slave */ |
---|
50 | struct hvm_hw_vioapic vioapic; |
---|
51 | |
---|
52 | /* hvm_print_line() logging. */ |
---|
53 | char pbuf[80]; |
---|
54 | int pbuf_idx; |
---|
55 | spinlock_t pbuf_lock; |
---|
56 | |
---|
57 | uint64_t params[HVM_NR_PARAMS]; |
---|
58 | }; |
---|
59 | |
---|
60 | #endif /* __ASM_X86_HVM_DOMAIN_H__ */ |
---|
61 | |
---|