Revision 0573fbfc target-i386/helper2.c

b/target-i386/helper2.c
27 27

  
28 28
#include "cpu.h"
29 29
#include "exec-all.h"
30
#include "svm.h"
30 31

  
31 32
//#define DEBUG_MMU
32 33

  
......
111 112
                               CPUID_CX8 | CPUID_PGE | CPUID_CMOV |
112 113
                               CPUID_PAT);
113 114
        env->pat = 0x0007040600070406ULL;
115
        env->cpuid_ext3_features = CPUID_EXT3_SVM;
114 116
        env->cpuid_ext_features = CPUID_EXT_SSE3;
115 117
        env->cpuid_features |= CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | CPUID_PAE | CPUID_SEP;
116 118
        env->cpuid_features |= CPUID_APIC;
117
        env->cpuid_xlevel = 0x80000006;
119
        env->cpuid_xlevel = 0x8000000e;
118 120
        {
119 121
            const char *model_id = "QEMU Virtual CPU version " QEMU_VERSION;
120 122
            int c, len, i;
......
131 133
        /* currently not enabled for std i386 because not fully tested */
132 134
        env->cpuid_ext2_features = (env->cpuid_features & 0x0183F3FF);
133 135
        env->cpuid_ext2_features |= CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX;
134
        env->cpuid_xlevel = 0x80000008;
135 136

  
136 137
        /* these features are needed for Win64 and aren't fully implemented */
137 138
        env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA;
......
162 163
#ifdef CONFIG_SOFTMMU
163 164
    env->hflags |= HF_SOFTMMU_MASK;
164 165
#endif
166
    env->hflags |= HF_GIF_MASK;
165 167

  
166 168
    cpu_x86_update_cr0(env, 0x60000010);
167 169
    env->a20_mask = 0xffffffff;
......
865 867
 do_fault_protect:
866 868
    error_code = PG_ERROR_P_MASK;
867 869
 do_fault:
868
    env->cr[2] = addr;
869 870
    error_code |= (is_write << PG_ERROR_W_BIT);
870 871
    if (is_user)
871 872
        error_code |= PG_ERROR_U_MASK;
......
873 874
        (env->efer & MSR_EFER_NXE) &&
874 875
        (env->cr[4] & CR4_PAE_MASK))
875 876
        error_code |= PG_ERROR_I_D_MASK;
877
    if (INTERCEPTEDl(_exceptions, 1 << EXCP0E_PAGE)) {
878
        stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), addr);
879
    } else {
880
        env->cr[2] = addr;
881
    }
876 882
    env->error_code = error_code;
877 883
    env->exception_index = EXCP0E_PAGE;
884
    /* the VMM will handle this */
885
    if (INTERCEPTEDl(_exceptions, 1 << EXCP0E_PAGE))
886
        return 2;
878 887
    return 1;
879 888
}
880 889

  

Also available in: Unified diff