ia64/xen-unstable

view xen/include/asm-x86/hvm/domain.h @ 19738:8dd5c3cae086

x86 hvm: move dirty_vram into struct hvm_domain

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 14:04:03 2009 +0100 (2009-06-05)
parents 9bc5799566be
children 82bbce59b65d
line source
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 */
21 #ifndef __ASM_X86_HVM_DOMAIN_H__
22 #define __ASM_X86_HVM_DOMAIN_H__
24 #include <xen/iommu.h>
25 #include <asm/hvm/irq.h>
26 #include <asm/hvm/vpt.h>
27 #include <asm/hvm/vlapic.h>
28 #include <asm/hvm/vioapic.h>
29 #include <asm/hvm/io.h>
30 #include <xen/hvm/iommu.h>
31 #include <asm/hvm/viridian.h>
32 #include <asm/hvm/vmx/vmcs.h>
33 #include <asm/hvm/svm/vmcb.h>
34 #include <public/hvm/params.h>
35 #include <public/hvm/save.h>
37 struct hvm_ioreq_page {
38 spinlock_t lock;
39 struct page_info *page;
40 void *va;
41 };
43 struct hvm_domain {
44 struct hvm_ioreq_page ioreq;
45 struct hvm_ioreq_page buf_ioreq;
47 s64 tsc_frequency;
48 struct pl_time pl_time;
50 struct hvm_io_handler io_handler;
52 /* Lock protects access to irq, vpic and vioapic. */
53 spinlock_t irq_lock;
54 struct hvm_irq irq;
55 struct hvm_hw_vpic vpic[2]; /* 0=master; 1=slave */
56 struct hvm_vioapic *vioapic;
57 struct hvm_hw_stdvga stdvga;
59 /* hvm_print_line() logging. */
60 char pbuf[80];
61 int pbuf_idx;
62 spinlock_t pbuf_lock;
64 uint64_t params[HVM_NR_PARAMS];
66 /* Memory ranges with pinned cache attributes. */
67 struct list_head pinned_cacheattr_ranges;
69 /* VRAM dirty support. */
70 struct sh_dirty_vram *dirty_vram;
72 /* If one of vcpus of this domain is in no_fill_mode or
73 * mtrr/pat between vcpus is not the same, set is_in_uc_mode
74 */
75 spinlock_t uc_lock;
76 bool_t is_in_uc_mode;
78 /* Pass-through */
79 struct hvm_iommu hvm_iommu;
81 /* hypervisor intercepted msix table */
82 struct list_head msixtbl_list;
83 spinlock_t msixtbl_list_lock;
85 struct viridian_domain viridian;
87 bool_t hap_enabled;
88 bool_t qemu_mapcache_invalidate;
89 bool_t is_s3_suspended;
91 union {
92 struct vmx_domain vmx;
93 struct svm_domain svm;
94 };
95 };
97 #endif /* __ASM_X86_HVM_DOMAIN_H__ */