ia64/xen-unstable

view xen/include/asm-x86/hvm/domain.h @ 16878:7a2824f99a28

x86, hvm: Only invalidate qemu mapcache on XENMEM_decrease_reservation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 24 18:09:26 2008 +0000 (2008-01-24)
parents f17b34df974f
children 98c2665056ea
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 <asm/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 <asm/hvm/iommu.h>
31 #include <public/hvm/params.h>
32 #include <public/hvm/save.h>
34 struct hvm_ioreq_page {
35 spinlock_t lock;
36 struct page_info *page;
37 void *va;
38 };
40 struct hvm_domain {
41 struct hvm_ioreq_page ioreq;
42 struct hvm_ioreq_page buf_ioreq;
44 s64 tsc_frequency;
45 struct pl_time pl_time;
47 struct hvm_io_handler io_handler;
49 /* Lock protects access to irq, vpic and vioapic. */
50 spinlock_t irq_lock;
51 struct hvm_irq irq;
52 struct hvm_hw_vpic vpic[2]; /* 0=master; 1=slave */
53 struct hvm_vioapic *vioapic;
54 struct hvm_hw_stdvga stdvga;
56 /* hvm_print_line() logging. */
57 char pbuf[80];
58 int pbuf_idx;
59 spinlock_t pbuf_lock;
61 uint64_t params[HVM_NR_PARAMS];
63 unsigned long vmx_apic_access_mfn;
65 /* Memory ranges with pinned cache attributes. */
66 struct list_head pinned_cacheattr_ranges;
68 /* If one of vcpus of this domain is in no_fill_mode or
69 * mtrr/pat between vcpus is not the same, set is_in_uc_mode
70 */
71 spinlock_t uc_lock;
72 bool_t is_in_uc_mode;
74 /* Pass-through */
75 struct hvm_iommu hvm_iommu;
77 #if CONFIG_PAGING_LEVELS == 3
78 bool_t amd_npt_4gb_warning;
79 #endif
81 bool_t qemu_mapcache_invalidate;
82 };
84 #endif /* __ASM_X86_HVM_DOMAIN_H__ */