ia64/xen-unstable

view xen/include/asm-x86/hvm/domain.h @ 19825:81edfffb3aff

Scaling guest's TSC when the target machine's frequency is different
with its requirement.

Using trap&emulate for guest's each rdtsc instruction first, maybe it
can be optimized later.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 24 11:05:22 2009 +0100 (2009-06-24)
parents 82bbce59b65d
children
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 uint32_t gtsc_khz; /* kHz */
48 bool_t tsc_scaled;
49 struct pl_time pl_time;
51 struct hvm_io_handler io_handler;
53 /* Lock protects access to irq, vpic and vioapic. */
54 spinlock_t irq_lock;
55 struct hvm_irq irq;
56 struct hvm_hw_vpic vpic[2]; /* 0=master; 1=slave */
57 struct hvm_vioapic *vioapic;
58 struct hvm_hw_stdvga stdvga;
60 /* hvm_print_line() logging. */
61 char pbuf[80];
62 int pbuf_idx;
63 spinlock_t pbuf_lock;
65 uint64_t params[HVM_NR_PARAMS];
67 /* Memory ranges with pinned cache attributes. */
68 struct list_head pinned_cacheattr_ranges;
70 /* VRAM dirty support. */
71 struct sh_dirty_vram *dirty_vram;
73 /* If one of vcpus of this domain is in no_fill_mode or
74 * mtrr/pat between vcpus is not the same, set is_in_uc_mode
75 */
76 spinlock_t uc_lock;
77 bool_t is_in_uc_mode;
79 /* Pass-through */
80 struct hvm_iommu hvm_iommu;
82 /* hypervisor intercepted msix table */
83 struct list_head msixtbl_list;
84 spinlock_t msixtbl_list_lock;
86 struct viridian_domain viridian;
88 bool_t hap_enabled;
89 bool_t qemu_mapcache_invalidate;
90 bool_t is_s3_suspended;
92 union {
93 struct vmx_domain vmx;
94 struct svm_domain svm;
95 };
96 };
98 #endif /* __ASM_X86_HVM_DOMAIN_H__ */