mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 03:31:15 +00:00
tcg/i386: rdpmc: fix the the condtions
Backports c45b426acd1ad8e30fbe1b9af8c07b2889c28c6b
This commit is contained in:
parent
d7adcf1d7f
commit
dfd53d7573
|
@ -207,7 +207,8 @@ void helper_rdtscp(CPUX86State *env)
|
||||||
|
|
||||||
void helper_rdpmc(CPUX86State *env)
|
void helper_rdpmc(CPUX86State *env)
|
||||||
{
|
{
|
||||||
if ((env->cr[4] & CR4_PCE_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
|
if (((env->cr[4] & CR4_PCE_MASK) == 0 ) &&
|
||||||
|
((env->hflags & HF_CPL_MASK) != 0)) {
|
||||||
raise_exception_ra(env, EXCP0D_GPF, GETPC());
|
raise_exception_ra(env, EXCP0D_GPF, GETPC());
|
||||||
}
|
}
|
||||||
cpu_svm_check_intercept_param(env, SVM_EXIT_RDPMC, 0, GETPC());
|
cpu_svm_check_intercept_param(env, SVM_EXIT_RDPMC, 0, GETPC());
|
||||||
|
|
Loading…
Reference in a new issue