Lines Matching defs:kenv

511                       struct kqemu_cpu_state *kenv)
520 env->regs[R_ECX] = kenv->next_eip;
544 env->regs[R_ECX] = (uint32_t)kenv->next_eip;
693 struct kqemu_cpu_state kcpu_state, *kenv = &kcpu_state;
708 kenv->regs[i] = env->regs[i];
709 kenv->eip = env->eip;
710 kenv->eflags = env->eflags;
712 kqemu_load_seg(&kenv->segs[i], &env->segs[i]);
713 kqemu_load_seg(&kenv->ldt, &env->ldt);
714 kqemu_load_seg(&kenv->tr, &env->tr);
715 kqemu_load_seg(&kenv->gdt, &env->gdt);
716 kqemu_load_seg(&kenv->idt, &env->idt);
717 kenv->cr0 = env->cr[0];
718 kenv->cr2 = env->cr[2];
719 kenv->cr3 = env->cr[3];
720 kenv->cr4 = env->cr[4];
721 kenv->a20_mask = env->a20_mask;
722 kenv->efer = env->efer;
723 kenv->tsc_offset = 0;
724 kenv->star = env->star;
725 kenv->sysenter_cs = env->sysenter_cs;
726 kenv->sysenter_esp = env->sysenter_esp;
727 kenv->sysenter_eip = env->sysenter_eip;
729 kenv->lstar = env->lstar;
730 kenv->cstar = env->cstar;
731 kenv->fmask = env->fmask;
732 kenv->kernelgsbase = env->kernelgsbase;
735 kenv->dr7 = env->dr[7];
736 kenv->dr0 = env->dr[0];
737 kenv->dr1 = env->dr[1];
738 kenv->dr2 = env->dr[2];
739 kenv->dr3 = env->dr[3];
741 kenv->dr7 = 0;
743 kenv->dr6 = env->dr[6];
745 kenv->cpl = cpl;
746 kenv->nb_pages_to_flush = nb_pages_to_flush;
747 kenv->user_only = (env->kqemu_enabled == 1);
748 kenv->nb_ram_pages_to_update = nb_ram_pages_to_update;
750 kenv->nb_modified_ram_pages = nb_modified_ram_pages;
761 kenv, sizeof(struct kqemu_cpu_state),
762 kenv, sizeof(struct kqemu_cpu_state),
764 ret = kenv->retval;
769 ioctl(kqemu_fd, KQEMU_EXEC, kenv);
770 ret = kenv->retval;
778 env->regs[i] = kenv->regs[i];
779 env->eip = kenv->eip;
780 env->eflags = kenv->eflags;
782 kqemu_save_seg(&env->segs[i], &kenv->segs[i]);
783 cpu_x86_set_cpl(env, kenv->cpl);
784 kqemu_save_seg(&env->ldt, &kenv->ldt);
785 env->cr[0] = kenv->cr0;
786 env->cr[4] = kenv->cr4;
787 env->cr[3] = kenv->cr3;
788 env->cr[2] = kenv->cr2;
789 env->dr[6] = kenv->dr6;
791 env->kernelgsbase = kenv->kernelgsbase;
795 if (kenv->nb_pages_to_flush >= KQEMU_FLUSH_ALL) {
798 for(i = 0; i < kenv->nb_pages_to_flush; i++) {
809 if (kenv->nb_ram_pages_to_update > 0) {
813 if (kenv->nb_modified_ram_pages > 0) {
814 for(i = 0; i < kenv->nb_modified_ram_pages; i++) {
868 return do_syscall(env, kenv);
874 env->exception_next_eip = kenv->next_eip;
883 env->error_code = kenv->error_code;