Lines Matching refs:n1vmcb

196     struct vmcb_struct *n1vmcb, struct vmcb_struct *n2vmcb)  in nestedsvm_fpu_vmentry()  argument
201 if ( !(n1cr0 & X86_CR0_TS) && (n1vmcb->_cr0 & X86_CR0_TS) ) { in nestedsvm_fpu_vmentry()
217 static void nestedsvm_fpu_vmexit(struct vmcb_struct *n1vmcb, in nestedsvm_fpu_vmexit() argument
223 n1vmcb->_cr0 |= X86_CR0_TS; in nestedsvm_fpu_vmexit()
224 n1vmcb->_exception_intercepts |= (1U << TRAP_no_device); in nestedsvm_fpu_vmexit()
225 } else if ( !(n1cr0 & X86_CR0_TS) && (n1vmcb->_cr0 & X86_CR0_TS) ) { in nestedsvm_fpu_vmexit()
228 n1vmcb->_cr0 &= ~X86_CR0_TS; in nestedsvm_fpu_vmexit()
229 n1vmcb->_exception_intercepts &= ~(1U << TRAP_no_device); in nestedsvm_fpu_vmexit()
237 struct vmcb_struct *n1vmcb; in nsvm_vcpu_hostsave() local
239 n1vmcb = nv->nv_n1vmcx; in nsvm_vcpu_hostsave()
240 ASSERT(n1vmcb != NULL); in nsvm_vcpu_hostsave()
242 n1vmcb->rip += inst_len; in nsvm_vcpu_hostsave()
246 n1vmcb->_efer = v->arch.hvm_vcpu.guest_efer; in nsvm_vcpu_hostsave()
247 n1vmcb->_cr0 = v->arch.hvm_vcpu.guest_cr[0]; in nsvm_vcpu_hostsave()
248 n1vmcb->_cr2 = v->arch.hvm_vcpu.guest_cr[2]; in nsvm_vcpu_hostsave()
249 n1vmcb->_cr4 = v->arch.hvm_vcpu.guest_cr[4]; in nsvm_vcpu_hostsave()
253 (n1vmcb->rflags & X86_EFLAGS_IF) ? 1 : 0; in nsvm_vcpu_hostsave()
262 struct vmcb_struct *n1vmcb, *n2vmcb; in nsvm_vcpu_hostrestore() local
265 n1vmcb = nv->nv_n1vmcx; in nsvm_vcpu_hostrestore()
267 ASSERT(n1vmcb != NULL); in nsvm_vcpu_hostrestore()
275 v->arch.hvm_svm.vmcb = n1vmcb; in nsvm_vcpu_hostrestore()
279 v->arch.hvm_vcpu.guest_efer = n1vmcb->_efer; in nsvm_vcpu_hostrestore()
280 rc = hvm_set_efer(n1vmcb->_efer); in nsvm_vcpu_hostrestore()
287 v->arch.hvm_vcpu.guest_cr[4] = n1vmcb->_cr4; in nsvm_vcpu_hostrestore()
288 rc = hvm_set_cr4(n1vmcb->_cr4, 1); in nsvm_vcpu_hostrestore()
295 nestedsvm_fpu_vmexit(n1vmcb, n2vmcb, in nsvm_vcpu_hostrestore()
297 v->arch.hvm_vcpu.guest_cr[0] = n1vmcb->_cr0 | X86_CR0_PE; in nsvm_vcpu_hostrestore()
298 n1vmcb->rflags &= ~X86_EFLAGS_VM; in nsvm_vcpu_hostrestore()
299 rc = hvm_set_cr0(n1vmcb->_cr0 | X86_CR0_PE, 1); in nsvm_vcpu_hostrestore()
307 v->arch.hvm_vcpu.guest_cr[2] = n1vmcb->_cr2; in nsvm_vcpu_hostrestore()
327 rc = hvm_set_cr3(n1vmcb->_cr3, 1); in nsvm_vcpu_hostrestore()
333 regs->rax = n1vmcb->rax; in nsvm_vcpu_hostrestore()
334 regs->rsp = n1vmcb->rsp; in nsvm_vcpu_hostrestore()
335 regs->rip = n1vmcb->rip; in nsvm_vcpu_hostrestore()
336 regs->rflags = n1vmcb->rflags; in nsvm_vcpu_hostrestore()
337 n1vmcb->_dr7 = 0; /* disable all breakpoints */ in nsvm_vcpu_hostrestore()
338 n1vmcb->_cpl = 0; in nsvm_vcpu_hostrestore()
343 n1vmcb->exitintinfo.bytes = 0; in nsvm_vcpu_hostrestore()
346 n1vmcb->cleanbits.bytes = 0; in nsvm_vcpu_hostrestore()
427 struct vmcb_struct *ns_vmcb, *n1vmcb, *n2vmcb; in nsvm_vmcb_prepare4vmrun() local
433 n1vmcb = nv->nv_n1vmcx; in nsvm_vmcb_prepare4vmrun()
436 ASSERT(n1vmcb != NULL); in nsvm_vmcb_prepare4vmrun()
476 n1vmcb->_cr_intercepts | ns_vmcb->_cr_intercepts; in nsvm_vmcb_prepare4vmrun()
478 n1vmcb->_dr_intercepts | ns_vmcb->_dr_intercepts; in nsvm_vmcb_prepare4vmrun()
480 n1vmcb->_exception_intercepts | ns_vmcb->_exception_intercepts; in nsvm_vmcb_prepare4vmrun()
482 n1vmcb->_general1_intercepts | ns_vmcb->_general1_intercepts; in nsvm_vmcb_prepare4vmrun()
484 n1vmcb->_general2_intercepts | ns_vmcb->_general2_intercepts; in nsvm_vmcb_prepare4vmrun()
489 min(n1vmcb->_pause_filter_count, ns_vmcb->_pause_filter_count); in nsvm_vmcb_prepare4vmrun()
491 n2vmcb->_pause_filter_count = n1vmcb->_pause_filter_count; in nsvm_vmcb_prepare4vmrun()
494 n2vmcb->_tsc_offset = n1vmcb->_tsc_offset + ns_vmcb->_tsc_offset; in nsvm_vmcb_prepare4vmrun()
529 n1vmcb->lbr_control.bytes | ns_vmcb->lbr_control.bytes; in nsvm_vmcb_prepare4vmrun()
569 cr0 = nestedsvm_fpu_vmentry(svm->ns_cr0, ns_vmcb, n1vmcb, n2vmcb); in nsvm_vmcb_prepare4vmrun()
598 n2vmcb->_h_cr3 = n1vmcb->_h_cr3; in nsvm_vmcb_prepare4vmrun()