Lines Matching refs:vmcb
35 struct vmcb_struct *vmcb; in alloc_vmcb() local
37 vmcb = alloc_xenheap_page(); in alloc_vmcb()
38 if ( vmcb == NULL ) in alloc_vmcb()
44 clear_page(vmcb); in alloc_vmcb()
45 return vmcb; in alloc_vmcb()
48 void free_vmcb(struct vmcb_struct *vmcb) in free_vmcb() argument
50 free_xenheap_page(vmcb); in free_vmcb()
57 struct vmcb_struct *vmcb = arch_svm->vmcb; in construct_vmcb() local
60 BUILD_BUG_ON(sizeof(*vmcb) != PAGE_SIZE); in construct_vmcb()
62 vmcb->_general1_intercepts = in construct_vmcb()
70 vmcb->_general2_intercepts = in construct_vmcb()
79 vmcb->_dr_intercepts = ~0u; in construct_vmcb()
82 vmcb->_cr_intercepts = ~(CR_INTERCEPT_CR2_READ | in construct_vmcb()
106 vmcb->_msrpm_base_pa = (u64)virt_to_maddr(arch_svm->msrpm); in construct_vmcb()
107 vmcb->_iopm_base_pa = __pa(v->domain->arch.hvm_domain.io_bitmap); in construct_vmcb()
110 vmcb->_vintr.fields.intr_masking = 1; in construct_vmcb()
113 vmcb->eventinj.bytes = 0; in construct_vmcb()
116 vmcb->_tsc_offset = 0; in construct_vmcb()
121 vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_RDTSC; in construct_vmcb()
122 vmcb->_general2_intercepts |= GENERAL2_INTERCEPT_RDTSCP; in construct_vmcb()
130 vmcb->cs.limit = ~0u; in construct_vmcb()
131 vmcb->es.limit = ~0u; in construct_vmcb()
132 vmcb->ss.limit = ~0u; in construct_vmcb()
133 vmcb->ds.limit = ~0u; in construct_vmcb()
134 vmcb->fs.limit = ~0u; in construct_vmcb()
135 vmcb->gs.limit = ~0u; in construct_vmcb()
138 vmcb->cs.base = 0; in construct_vmcb()
139 vmcb->es.base = 0; in construct_vmcb()
140 vmcb->ss.base = 0; in construct_vmcb()
141 vmcb->ds.base = 0; in construct_vmcb()
142 vmcb->fs.base = 0; in construct_vmcb()
143 vmcb->gs.base = 0; in construct_vmcb()
146 vmcb->es.attr = 0xc93; /* read/write, accessed */ in construct_vmcb()
147 vmcb->ss.attr = 0xc93; in construct_vmcb()
148 vmcb->ds.attr = 0xc93; in construct_vmcb()
149 vmcb->fs.attr = 0xc93; in construct_vmcb()
150 vmcb->gs.attr = 0xc93; in construct_vmcb()
151 vmcb->cs.attr = 0xc9b; /* exec/read, accessed */ in construct_vmcb()
154 vmcb->idtr.base = 0; in construct_vmcb()
155 vmcb->idtr.limit = 0; in construct_vmcb()
158 vmcb->gdtr.base = 0; in construct_vmcb()
159 vmcb->gdtr.limit = 0; in construct_vmcb()
162 vmcb->ldtr.sel = 0; in construct_vmcb()
163 vmcb->ldtr.base = 0; in construct_vmcb()
164 vmcb->ldtr.limit = 0; in construct_vmcb()
165 vmcb->ldtr.attr = 0; in construct_vmcb()
168 vmcb->tr.attr = 0x08b; /* 32-bit TSS (busy) */ in construct_vmcb()
169 vmcb->tr.base = 0; in construct_vmcb()
170 vmcb->tr.limit = 0xff; in construct_vmcb()
180 vmcb->_exception_intercepts = in construct_vmcb()
186 vmcb->_np_enable = 1; /* enable nested paging */ in construct_vmcb()
187 vmcb->_g_pat = MSR_IA32_CR_PAT_RESET; /* guest PAT */ in construct_vmcb()
188 vmcb->_h_cr3 = pagetable_get_paddr( in construct_vmcb()
192 vmcb->_cr_intercepts &= in construct_vmcb()
199 vmcb->_general1_intercepts &= ~GENERAL1_INTERCEPT_INVLPG; in construct_vmcb()
206 vmcb->_exception_intercepts |= (1U << TRAP_page_fault); in construct_vmcb()
211 vmcb->_pause_filter_count = SVM_PAUSEFILTER_INIT; in construct_vmcb()
212 vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_PAUSE; in construct_vmcb()
215 vmcb->cleanbits.bytes = 0; in construct_vmcb()
233 arch_svm->vmcb = nv->nv_n1vmcx; in svm_create_vmcb()
239 arch_svm->vmcb = NULL; in svm_create_vmcb()
243 arch_svm->vmcb_pa = nv->nv_n1vmcx_pa = virt_to_maddr(arch_svm->vmcb); in svm_create_vmcb()
264 arch_svm->vmcb = NULL; in svm_destroy_vmcb()
284 svm_vmcb_dump("key_handler", v->arch.hvm_svm.vmcb); in vmcb_dump()