Lines Matching full:save
207 /* enable/disable Next RIP Save */
345 svm->vmcb->save.efer = efer | EFER_SVME; in svm_set_efer()
391 old_rflags = svm->vmcb->save.rflags; in __svm_skip_emulated_instruction()
397 svm->vmcb->save.rflags = old_rflags; in __svm_skip_emulated_instruction()
437 * Save the injection information, even when using next_rip, as the in svm_update_soft_interrupt_rip()
446 svm->soft_int_csbase = svm->vmcb->save.cs.base; in svm_update_soft_interrupt_rip()
809 * save it. in msr_write_intercepted()
813 * save it. in msr_write_intercepted()
989 to_vmcb->save.dbgctl = from_vmcb->save.dbgctl; in svm_copy_lbrs()
990 to_vmcb->save.br_from = from_vmcb->save.br_from; in svm_copy_lbrs()
991 to_vmcb->save.br_to = from_vmcb->save.br_to; in svm_copy_lbrs()
992 to_vmcb->save.last_excp_from = from_vmcb->save.last_excp_from; in svm_copy_lbrs()
993 to_vmcb->save.last_excp_to = from_vmcb->save.last_excp_to; in svm_copy_lbrs()
1051 bool enable_lbrv = (svm_get_lbr_vmcb(svm)->save.dbgctl & DEBUGCTLMSR_LBR) || in svm_update_lbrv()
1071 svm->vmcb->save.rflags &= ~X86_EFLAGS_TF; in disable_nmi_singlestep()
1073 svm->vmcb->save.rflags &= ~X86_EFLAGS_RF; in disable_nmi_singlestep()
1241 struct vmcb_save_area *save = &vmcb->save; in init_vmcb() local
1308 init_seg(&save->es); in init_vmcb()
1309 init_seg(&save->ss); in init_vmcb()
1310 init_seg(&save->ds); in init_vmcb()
1311 init_seg(&save->fs); in init_vmcb()
1312 init_seg(&save->gs); in init_vmcb()
1314 save->cs.selector = 0xf000; in init_vmcb()
1315 save->cs.base = 0xffff0000; in init_vmcb()
1317 save->cs.attrib = SVM_SELECTOR_READ_MASK | SVM_SELECTOR_P_MASK | in init_vmcb()
1319 save->cs.limit = 0xffff; in init_vmcb()
1321 save->gdtr.base = 0; in init_vmcb()
1322 save->gdtr.limit = 0xffff; in init_vmcb()
1323 save->idtr.base = 0; in init_vmcb()
1324 save->idtr.limit = 0xffff; in init_vmcb()
1326 init_sys_seg(&save->ldtr, SEG_TYPE_LDT); in init_vmcb()
1327 init_sys_seg(&save->tr, SEG_TYPE_BUSY_TSS16); in init_vmcb()
1336 save->g_pat = vcpu->arch.pat; in init_vmcb()
1337 save->cr3 = 0; in init_vmcb()
1522 * Save additional host state that will be restored on VMEXIT (sev-es) in svm_prepare_switch_to_guest()
1523 * or subsequent vmload of host save area. in svm_prepare_switch_to_guest()
1535 * because TSC_AUX is restored on #VMEXIT from the host save area in svm_prepare_switch_to_guest()
1581 unsigned long rflags = svm->vmcb->save.rflags; in svm_get_rflags()
1603 to_svm(vcpu)->vmcb->save.rflags = rflags; in svm_set_rflags()
1648 * Requesting an interrupt window if save.RFLAGS.IF=0 is pointless as in svm_set_vintr()
1689 struct vmcb_save_area *save = &to_svm(vcpu)->vmcb->save; in svm_seg() local
1690 struct vmcb_save_area *save01 = &to_svm(vcpu)->vmcb01.ptr->save; in svm_seg()
1693 case VCPU_SREG_CS: return &save->cs; in svm_seg()
1694 case VCPU_SREG_DS: return &save->ds; in svm_seg()
1695 case VCPU_SREG_ES: return &save->es; in svm_seg()
1698 case VCPU_SREG_SS: return &save->ss; in svm_seg()
1777 var->dpl = to_svm(vcpu)->vmcb->save.cpl; in svm_get_segment()
1784 struct vmcb_save_area *save = &to_svm(vcpu)->vmcb->save; in svm_get_cpl() local
1786 return save->cpl; in svm_get_cpl()
1802 dt->size = svm->vmcb->save.idtr.limit; in svm_get_idt()
1803 dt->address = svm->vmcb->save.idtr.base; in svm_get_idt()
1810 svm->vmcb->save.idtr.limit = dt->size; in svm_set_idt()
1811 svm->vmcb->save.idtr.base = dt->address ; in svm_set_idt()
1819 dt->size = svm->vmcb->save.gdtr.limit; in svm_get_gdt()
1820 dt->address = svm->vmcb->save.gdtr.base; in svm_get_gdt()
1827 svm->vmcb->save.gdtr.limit = dt->size; in svm_set_gdt()
1828 svm->vmcb->save.gdtr.base = dt->address ; in svm_set_gdt()
1840 * VMCB save area now, since the save area will become the initial in sev_post_set_cr3()
1841 * contents of the VMSA, and future VMCB save area updates won't be in sev_post_set_cr3()
1845 svm->vmcb->save.cr3 = cr3; in sev_post_set_cr3()
1866 svm->vmcb->save.efer |= EFER_LMA | EFER_LME; in svm_set_cr0()
1872 svm->vmcb->save.efer &= ~(EFER_LMA | EFER_LME); in svm_set_cr0()
1892 svm->vmcb->save.cr0 = hcr0; in svm_set_cr0()
1933 to_svm(vcpu)->vmcb->save.cr4 = cr4; in svm_set_cr4()
1966 svm->vmcb->save.cpl = (var->dpl & 3); in svm_set_segment()
2003 if (unlikely(value != vmcb->save.dr6)) { in svm_set_dr6()
2004 vmcb->save.dr6 = value; in svm_set_dr6()
2021 * We cannot reset svm->vmcb->save.dr6 to DR6_ACTIVE_LOW here, in svm_sync_dirty_debug_regs()
2024 vcpu->arch.dr6 = svm->vmcb->save.dr6; in svm_sync_dirty_debug_regs()
2025 vcpu->arch.dr7 = svm->vmcb->save.dr7; in svm_sync_dirty_debug_regs()
2037 svm->vmcb->save.dr7 = value; in svm_set_dr7()
2094 u32 payload = svm->vmcb->save.dr6 ^ DR6_ACTIVE_LOW; in db_interception()
2108 kvm_run->debug.arch.dr6 = svm->vmcb->save.dr6; in db_interception()
2109 kvm_run->debug.arch.dr7 = svm->vmcb->save.dr7; in db_interception()
2111 svm->vmcb->save.cs.base + svm->vmcb->save.rip; in db_interception()
2125 kvm_run->debug.arch.pc = svm->vmcb->save.cs.base + svm->vmcb->save.rip; in bp_interception()
2220 * The VM save area for SEV-ES guests has already been encrypted so it in shutdown_interception()
2283 ret = kvm_vcpu_map(vcpu, gpa_to_gfn(svm->vmcb->save.rax), &map); in vmload_vmsave_interception()
2416 if (svm->vmcb->save.rax & ~PAGE_MASK) in gp_interception()
2493 trace_kvm_invlpga(to_svm(vcpu)->vmcb->save.rip, asid, gva); in invlpga_interception()
2503 trace_kvm_skinit(to_svm(vcpu)->vmcb->save.rip, kvm_rax_read(vcpu)); in skinit_interception()
2870 msr_info->data = svm->vmcb01.ptr->save.star; in svm_get_msr()
2874 msr_info->data = svm->vmcb01.ptr->save.lstar; in svm_get_msr()
2877 msr_info->data = svm->vmcb01.ptr->save.cstar; in svm_get_msr()
2880 msr_info->data = svm->vmcb01.ptr->save.gs.base; in svm_get_msr()
2883 msr_info->data = svm->vmcb01.ptr->save.fs.base; in svm_get_msr()
2886 msr_info->data = svm->vmcb01.ptr->save.kernel_gs_base; in svm_get_msr()
2889 msr_info->data = svm->vmcb01.ptr->save.sfmask; in svm_get_msr()
2893 msr_info->data = svm->vmcb01.ptr->save.sysenter_cs; in svm_get_msr()
2896 msr_info->data = (u32)svm->vmcb01.ptr->save.sysenter_eip; in svm_get_msr()
2901 msr_info->data = svm->vmcb01.ptr->save.sysenter_esp; in svm_get_msr()
2909 msr_info->data = svm_get_lbr_vmcb(svm)->save.dbgctl; in svm_get_msr()
2912 msr_info->data = svm_get_lbr_vmcb(svm)->save.br_from; in svm_get_msr()
2915 msr_info->data = svm_get_lbr_vmcb(svm)->save.br_to; in svm_get_msr()
2918 msr_info->data = svm_get_lbr_vmcb(svm)->save.last_excp_from; in svm_get_msr()
2921 msr_info->data = svm_get_lbr_vmcb(svm)->save.last_excp_to; in svm_get_msr()
2935 msr_info->data = svm->vmcb->save.spec_ctrl; in svm_get_msr()
3057 svm->vmcb01.ptr->save.g_pat = data; in svm_set_msr()
3071 svm->vmcb->save.spec_ctrl = data; in svm_set_msr()
3101 svm->vmcb01.ptr->save.star = data; in svm_set_msr()
3105 svm->vmcb01.ptr->save.lstar = data; in svm_set_msr()
3108 svm->vmcb01.ptr->save.cstar = data; in svm_set_msr()
3111 svm->vmcb01.ptr->save.gs.base = data; in svm_set_msr()
3114 svm->vmcb01.ptr->save.fs.base = data; in svm_set_msr()
3117 svm->vmcb01.ptr->save.kernel_gs_base = data; in svm_set_msr()
3120 svm->vmcb01.ptr->save.sfmask = data; in svm_set_msr()
3124 svm->vmcb01.ptr->save.sysenter_cs = data; in svm_set_msr()
3127 svm->vmcb01.ptr->save.sysenter_eip = (u32)data; in svm_set_msr()
3138 svm->vmcb01.ptr->save.sysenter_esp = (u32)data; in svm_set_msr()
3146 * from the host save area (which has been initialized in in svm_set_msr()
3173 svm_get_lbr_vmcb(svm)->save.dbgctl = data; in svm_set_msr()
3369 struct vmcb_save_area *save = &svm->vmcb->save; in dump_vmcb() local
3370 struct vmcb_save_area *save01 = &svm->vmcb01.ptr->save; in dump_vmcb()
3416 pr_err("VMCB State Save Area:\n"); in dump_vmcb()
3419 save->es.selector, save->es.attrib, in dump_vmcb()
3420 save->es.limit, save->es.base); in dump_vmcb()
3423 save->cs.selector, save->cs.attrib, in dump_vmcb()
3424 save->cs.limit, save->cs.base); in dump_vmcb()
3427 save->ss.selector, save->ss.attrib, in dump_vmcb()
3428 save->ss.limit, save->ss.base); in dump_vmcb()
3431 save->ds.selector, save->ds.attrib, in dump_vmcb()
3432 save->ds.limit, save->ds.base); in dump_vmcb()
3443 save->gdtr.selector, save->gdtr.attrib, in dump_vmcb()
3444 save->gdtr.limit, save->gdtr.base); in dump_vmcb()
3451 save->idtr.selector, save->idtr.attrib, in dump_vmcb()
3452 save->idtr.limit, save->idtr.base); in dump_vmcb()
3458 save->vmpl, save->cpl, save->efer); in dump_vmcb()
3460 "cr0:", save->cr0, "cr2:", save->cr2); in dump_vmcb()
3462 "cr3:", save->cr3, "cr4:", save->cr4); in dump_vmcb()
3464 "dr6:", save->dr6, "dr7:", save->dr7); in dump_vmcb()
3466 "rip:", save->rip, "rflags:", save->rflags); in dump_vmcb()
3468 "rsp:", save->rsp, "rax:", save->rax); in dump_vmcb()
3480 "gpat:", save->g_pat, "dbgctl:", save->dbgctl); in dump_vmcb()
3482 "br_from:", save->br_from, "br_to:", save->br_to); in dump_vmcb()
3484 "excp_from:", save->last_excp_from, in dump_vmcb()
3485 "excp_to:", save->last_excp_to); in dump_vmcb()
3552 vcpu->arch.cr0 = svm->vmcb->save.cr0; in svm_handle_exit()
3554 vcpu->arch.cr3 = svm->vmcb->save.cr3; in svm_handle_exit()
3831 ? !(svm->vmcb01.ptr->save.rflags & X86_EFLAGS_IF) in svm_interrupt_blocked()
3948 svm->vmcb->save.rflags |= (X86_EFLAGS_TF | X86_EFLAGS_RF); in svm_enable_nmi_window()
4207 svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX]; in svm_vcpu_run()
4208 svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP]; in svm_vcpu_run()
4209 svm->vmcb->save.rip = vcpu->arch.regs[VCPU_REGS_RIP]; in svm_vcpu_run()
4238 svm->vmcb->save.cr2 = vcpu->arch.cr2; in svm_vcpu_run()
4271 vcpu->arch.cr2 = svm->vmcb->save.cr2; in svm_vcpu_run()
4272 vcpu->arch.regs[VCPU_REGS_RAX] = svm->vmcb->save.rax; in svm_vcpu_run()
4273 vcpu->arch.regs[VCPU_REGS_RSP] = svm->vmcb->save.rsp; in svm_vcpu_run()
4274 vcpu->arch.regs[VCPU_REGS_RIP] = svm->vmcb->save.rip; in svm_vcpu_run()
4349 svm->vmcb->save.cr3 = cr3; in svm_load_mmu_pgd()
4689 svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX]; in svm_enter_smm()
4690 svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP]; in svm_enter_smm()
4691 svm->vmcb->save.rip = vcpu->arch.regs[VCPU_REGS_RIP]; in svm_enter_smm()
4700 * be lost. Temporary save non-VMLOAD/VMSAVE state to the host save in svm_enter_smm()
4702 * format of the area is identical to guest save area offsetted in svm_enter_smm()
4705 * L1 hypervisor to save additional host context (e.g. KVM does in svm_enter_smm()
4712 BUILD_BUG_ON(offsetof(struct vmcb, save) != 0x400); in svm_enter_smm()
4715 &svm->vmcb01.ptr->save); in svm_enter_smm()
4758 svm_copy_vmrun_state(&svm->vmcb01.ptr->save, map_save.hva + 0x400); in svm_leave_smm()
4768 nested_copy_vmcb_save_to_cache(svm, &vmcb12->save); in svm_leave_smm()