Lines Matching refs:save
376 /* save the current state in the old TSS */
4951 /* save the current CPU state in the hsave page */
4952 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.base), env->gdt.base);
4953 stl_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.limit), env->gdt.limit);
4955 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.base), env->idt.base);
4956 stl_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.limit), env->idt.limit);
4958 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr0), env->cr[0]);
4959 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr2), env->cr[2]);
4960 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr3), env->cr[3]);
4961 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr4), env->cr[4]);
4962 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr6), env->dr[6]);
4963 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr7), env->dr[7]);
4965 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.efer), env->efer);
4966 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rflags), compute_eflags());
4968 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.es),
4970 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.cs),
4972 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ss),
4974 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ds),
4977 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip),
4979 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rsp), ESP);
4980 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rax), EAX);
4996 env->gdt.base = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.gdtr.base));
4997 env->gdt.limit = ldl_phys(env->vm_vmcb + offsetof(struct vmcb, save.gdtr.limit));
4999 env->idt.base = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.idtr.base));
5000 env->idt.limit = ldl_phys(env->vm_vmcb + offsetof(struct vmcb, save.idtr.limit));
5005 cpu_x86_update_cr0(env, ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr0)));
5006 cpu_x86_update_cr4(env, ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr4)));
5007 cpu_x86_update_cr3(env, ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr3)));
5008 env->cr[2] = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr2));
5019 ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.efer)));
5021 load_eflags(ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rflags)),
5025 svm_load_seg_cache(env->vm_vmcb + offsetof(struct vmcb, save.es),
5027 svm_load_seg_cache(env->vm_vmcb + offsetof(struct vmcb, save.cs),
5029 svm_load_seg_cache(env->vm_vmcb + offsetof(struct vmcb, save.ss),
5031 svm_load_seg_cache(env->vm_vmcb + offsetof(struct vmcb, save.ds),
5034 EIP = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rip));
5036 ESP = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rsp));
5037 EAX = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rax));
5038 env->dr[7] = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr7));
5039 env->dr[6] = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr6));
5040 cpu_x86_set_cpl(env, ldub_phys(env->vm_vmcb + offsetof(struct vmcb, save.cpl)));
5124 addr, ldq_phys(addr + offsetof(struct vmcb, save.fs.base)),
5127 svm_load_seg_cache(addr + offsetof(struct vmcb, save.fs),
5129 svm_load_seg_cache(addr + offsetof(struct vmcb, save.gs),
5131 svm_load_seg(addr + offsetof(struct vmcb, save.tr),
5133 svm_load_seg(addr + offsetof(struct vmcb, save.ldtr),
5137 env->kernelgsbase = ldq_phys(addr + offsetof(struct vmcb, save.kernel_gs_base));
5138 env->lstar = ldq_phys(addr + offsetof(struct vmcb, save.lstar));
5139 env->cstar = ldq_phys(addr + offsetof(struct vmcb, save.cstar));
5140 env->fmask = ldq_phys(addr + offsetof(struct vmcb, save.sfmask));
5142 env->star = ldq_phys(addr + offsetof(struct vmcb, save.star));
5143 env->sysenter_cs = ldq_phys(addr + offsetof(struct vmcb, save.sysenter_cs));
5144 env->sysenter_esp = ldq_phys(addr + offsetof(struct vmcb, save.sysenter_esp));
5145 env->sysenter_eip = ldq_phys(addr + offsetof(struct vmcb, save.sysenter_eip));
5159 addr, ldq_phys(addr + offsetof(struct vmcb, save.fs.base)),
5162 svm_save_seg(addr + offsetof(struct vmcb, save.fs),
5164 svm_save_seg(addr + offsetof(struct vmcb, save.gs),
5166 svm_save_seg(addr + offsetof(struct vmcb, save.tr),
5168 svm_save_seg(addr + offsetof(struct vmcb, save.ldtr),
5172 stq_phys(addr + offsetof(struct vmcb, save.kernel_gs_base), env->kernelgsbase);
5173 stq_phys(addr + offsetof(struct vmcb, save.lstar), env->lstar);
5174 stq_phys(addr + offsetof(struct vmcb, save.cstar), env->cstar);
5175 stq_phys(addr + offsetof(struct vmcb, save.sfmask), env->fmask);
5177 stq_phys(addr + offsetof(struct vmcb, save.star), env->star);
5178 stq_phys(addr + offsetof(struct vmcb, save.sysenter_cs), env->sysenter_cs);
5179 stq_phys(addr + offsetof(struct vmcb, save.sysenter_esp), env->sysenter_esp);
5180 stq_phys(addr + offsetof(struct vmcb, save.sysenter_eip), env->sysenter_eip);
5318 /* Save the VM state in the vmcb */
5319 svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.es),
5321 svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.cs),
5323 svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.ss),
5325 svm_save_seg(env->vm_vmcb + offsetof(struct vmcb, save.ds),
5328 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.gdtr.base), env->gdt.base);
5329 stl_phys(env->vm_vmcb + offsetof(struct vmcb, save.gdtr.limit), env->gdt.limit);
5331 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.idtr.base), env->idt.base);
5332 stl_phys(env->vm_vmcb + offsetof(struct vmcb, save.idtr.limit), env->idt.limit);
5334 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.efer), env->efer);
5335 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr0), env->cr[0]);
5336 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr2), env->cr[2]);
5337 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr3), env->cr[3]);
5338 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.cr4), env->cr[4]);
5347 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rflags), compute_eflags());
5348 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rip), env->eip);
5349 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rsp), ESP);
5350 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rax), EAX);
5351 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr7), env->dr[7]);
5352 stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr6), env->dr[6]);
5353 stb_phys(env->vm_vmcb + offsetof(struct vmcb, save.cpl), env->hflags & HF_CPL_MASK);
5363 env->gdt.base = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.base));
5364 env->gdt.limit = ldl_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.limit));
5366 env->idt.base = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.base));
5367 env->idt.limit = ldl_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.limit));
5369 cpu_x86_update_cr0(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr0)) | CR0_PE_MASK);
5370 cpu_x86_update_cr4(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr4)));
5371 cpu_x86_update_cr3(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr3)));
5375 ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.efer)));
5377 load_eflags(ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rflags)),
5381 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.es),
5383 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.cs),
5385 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.ss),
5387 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.ds),
5390 EIP = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip));
5391 ESP = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rsp));
5392 EAX = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rax));
5394 env->dr[6] = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr6));
5395 env->dr[7] = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr7));