Revision 914178d3 target-i386/op_helper.c

b/target-i386/op_helper.c
2994 2994
void helper_invlpg(target_ulong addr)
2995 2995
{
2996 2996
    helper_svm_check_intercept_param(SVM_EXIT_INVLPG, 0);
2997
    cpu_x86_flush_tlb(env, addr);
2997
    tlb_flush_page(env, addr);
2998 2998
}
2999 2999

  
3000 3000
void helper_rdtsc(void)
......
4721 4721

  
4722 4722
#if defined(CONFIG_USER_ONLY)
4723 4723

  
4724
void helper_vmrun(void) 
4724
void helper_vmrun(int aflag)
4725 4725
{ 
4726 4726
}
4727 4727
void helper_vmmcall(void) 
4728 4728
{ 
4729 4729
}
4730
void helper_vmload(void) 
4730
void helper_vmload(int aflag)
4731 4731
{ 
4732 4732
}
4733
void helper_vmsave(void) 
4733
void helper_vmsave(int aflag)
4734 4734
{ 
4735 4735
}
4736 4736
void helper_stgi(void)
......
4742 4742
void helper_skinit(void) 
4743 4743
{ 
4744 4744
}
4745
void helper_invlpga(void) 
4745
void helper_invlpga(int aflag)
4746 4746
{ 
4747 4747
}
4748 4748
void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) 
......
4791 4791
                           sc->base, sc->limit, sc->flags);
4792 4792
}
4793 4793

  
4794
void helper_vmrun(void)
4794
void helper_vmrun(int aflag)
4795 4795
{
4796 4796
    target_ulong addr;
4797 4797
    uint32_t event_inj;
......
4799 4799

  
4800 4800
    helper_svm_check_intercept_param(SVM_EXIT_VMRUN, 0);
4801 4801

  
4802
    addr = EAX;
4802
    if (aflag == 2)
4803
        addr = EAX;
4804
    else
4805
        addr = (uint32_t)EAX;
4806

  
4803 4807
    if (loglevel & CPU_LOG_TB_IN_ASM)
4804 4808
        fprintf(logfile,"vmrun! " TARGET_FMT_lx "\n", addr);
4805 4809

  
......
4970 4974
    raise_exception(EXCP06_ILLOP);
4971 4975
}
4972 4976

  
4973
void helper_vmload(void)
4977
void helper_vmload(int aflag)
4974 4978
{
4975 4979
    target_ulong addr;
4976 4980
    helper_svm_check_intercept_param(SVM_EXIT_VMLOAD, 0);
4977 4981

  
4978
    /* XXX: invalid in 32 bit */
4979
    addr = EAX;
4982
    if (aflag == 2)
4983
        addr = EAX;
4984
    else
4985
        addr = (uint32_t)EAX;
4986

  
4980 4987
    if (loglevel & CPU_LOG_TB_IN_ASM)
4981 4988
        fprintf(logfile,"vmload! " TARGET_FMT_lx "\nFS: %016" PRIx64 " | " TARGET_FMT_lx "\n",
4982 4989
                addr, ldq_phys(addr + offsetof(struct vmcb, save.fs.base)),
......
5003 5010
    env->sysenter_eip = ldq_phys(addr + offsetof(struct vmcb, save.sysenter_eip));
5004 5011
}
5005 5012

  
5006
void helper_vmsave(void)
5013
void helper_vmsave(int aflag)
5007 5014
{
5008 5015
    target_ulong addr;
5009 5016
    helper_svm_check_intercept_param(SVM_EXIT_VMSAVE, 0);
5010
    addr = EAX;
5017

  
5018
    if (aflag == 2)
5019
        addr = EAX;
5020
    else
5021
        addr = (uint32_t)EAX;
5022

  
5011 5023
    if (loglevel & CPU_LOG_TB_IN_ASM)
5012 5024
        fprintf(logfile,"vmsave! " TARGET_FMT_lx "\nFS: %016" PRIx64 " | " TARGET_FMT_lx "\n",
5013 5025
                addr, ldq_phys(addr + offsetof(struct vmcb, save.fs.base)),
......
5050 5062
{
5051 5063
    helper_svm_check_intercept_param(SVM_EXIT_SKINIT, 0);
5052 5064
    /* XXX: not implemented */
5053
    if (loglevel & CPU_LOG_TB_IN_ASM)
5054
        fprintf(logfile,"skinit!\n");
5055 5065
    raise_exception(EXCP06_ILLOP);
5056 5066
}
5057 5067

  
5058
void helper_invlpga(void)
5068
void helper_invlpga(int aflag)
5059 5069
{
5070
    target_ulong addr;
5060 5071
    helper_svm_check_intercept_param(SVM_EXIT_INVLPGA, 0);
5061
    tlb_flush(env, 0);
5072
    
5073
    if (aflag == 2)
5074
        addr = EAX;
5075
    else
5076
        addr = (uint32_t)EAX;
5077

  
5078
    /* XXX: could use the ASID to see if it is needed to do the
5079
       flush */
5080
    tlb_flush_page(env, addr);
5062 5081
}
5063 5082

  
5064 5083
void helper_svm_check_intercept_param(uint32_t type, uint64_t param)

Also available in: Unified diff