Lines Matching refs:vm_hsave
127 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.base), env->gdt.base);
128 stl_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.limit), env->gdt.limit);
130 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.base), env->idt.base);
131 stl_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.limit), env->idt.limit);
133 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr0), env->cr[0]);
134 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr2), env->cr[2]);
135 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr3), env->cr[3]);
136 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr4), env->cr[4]);
137 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr6), env->dr[6]);
138 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr7), env->dr[7]);
140 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.efer), env->efer);
141 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rflags), cpu_compute_eflags(env));
143 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.es),
145 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.cs),
147 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ss),
149 svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ds),
152 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip),
154 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rsp), ESP);
155 stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rax), EAX);
538 /* Reload the host state from vm_hsave */
546 env->gdt.base = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.base));
547 env->gdt.limit = ldl_phys(env->vm_hsave + offsetof(struct vmcb, save.gdtr.limit));
549 env->idt.base = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.base));
550 env->idt.limit = ldl_phys(env->vm_hsave + offsetof(struct vmcb, save.idtr.limit));
552 cpu_x86_update_cr0(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr0)) | CR0_PE_MASK);
553 cpu_x86_update_cr4(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr4)));
554 cpu_x86_update_cr3(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.cr3)));
558 ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.efer)));
560 cpu_load_eflags(env, ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rflags)),
564 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.es),
566 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.cs),
568 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.ss),
570 svm_load_seg_cache(env->vm_hsave + offsetof(struct vmcb, save.ds),
573 EIP = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip));
574 ESP = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rsp));
575 EAX = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.rax));
577 env->dr[6] = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr6));
578 env->dr[7] = ldq_phys(env->vm_hsave + offsetof(struct vmcb, save.dr7));