mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 05:20:50 +00:00
* Fix MMX instructions for system emulators
* Fix uninitialized TranslateFault after canonical address checks -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmOIa40UHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroON/wf6AuomXEtqw6OxPCKwYwnXwAA64mO0 rN9tFw1YcrlynFkzwaGkGThQOuQen2FXBVx1NL64781oZFYU9Zq04rxH3CpZCVVq J/POjnrHzaNeWoipiyj4kBi662FF8a6vS+l3pvwfI38jxi4oqRrPowGuqnqus5LS Y88Q5y9u+e5MKSO+MpiH0C8/CxlKaKTIUURAr2YKYvwV5vGGVsCQ0BYAxUsfBq5S IijzilFBgj5N1vbNnGp/Ltr1vS4xdSmfugxf+myGO45kyr9MkwYUpSqE0nKuVlHX OdbhtOfVgifKPf5vahshILu0dZSeFKAOUuGg3gS1THydTtStjonRQA9TBA== =ops5 -----END PGP SIGNATURE----- Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging * Fix MMX instructions for system emulators * Fix uninitialized TranslateFault after canonical address checks # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmOIa40UHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroON/wf6AuomXEtqw6OxPCKwYwnXwAA64mO0 # rN9tFw1YcrlynFkzwaGkGThQOuQen2FXBVx1NL64781oZFYU9Zq04rxH3CpZCVVq # J/POjnrHzaNeWoipiyj4kBi662FF8a6vS+l3pvwfI38jxi4oqRrPowGuqnqus5LS # Y88Q5y9u+e5MKSO+MpiH0C8/CxlKaKTIUURAr2YKYvwV5vGGVsCQ0BYAxUsfBq5S # IijzilFBgj5N1vbNnGp/Ltr1vS4xdSmfugxf+myGO45kyr9MkwYUpSqE0nKuVlHX # OdbhtOfVgifKPf5vahshILu0dZSeFKAOUuGg3gS1THydTtStjonRQA9TBA== # =ops5 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 01 Dec 2022 03:53:33 EST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: target/i386: Always completely initialize TranslateFault target/i386: allow MMX instructions with CR4.OSFXSR=0 Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
4bd638ac65
@ -1488,7 +1488,8 @@ static bool validate_vex(DisasContext *s, X86DecodedInsn *decode)
|
|||||||
if (!(s->flags & HF_AVX_EN_MASK)) {
|
if (!(s->flags & HF_AVX_EN_MASK)) {
|
||||||
goto illegal;
|
goto illegal;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (e->special != X86_SPECIAL_MMX ||
|
||||||
|
(s->prefix & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))) {
|
||||||
if (!(s->flags & HF_OSFXSR_MASK)) {
|
if (!(s->flags & HF_OSFXSR_MASK)) {
|
||||||
goto illegal;
|
goto illegal;
|
||||||
}
|
}
|
||||||
|
@ -71,10 +71,11 @@ static bool ptw_translate(PTETranslate *inout, hwaddr addr)
|
|||||||
TranslateFault *err = inout->err;
|
TranslateFault *err = inout->err;
|
||||||
|
|
||||||
assert(inout->ptw_idx == MMU_NESTED_IDX);
|
assert(inout->ptw_idx == MMU_NESTED_IDX);
|
||||||
err->exception_index = 0; /* unused */
|
*err = (TranslateFault){
|
||||||
err->error_code = inout->env->error_code;
|
.error_code = inout->env->error_code,
|
||||||
err->cr2 = addr;
|
.cr2 = addr,
|
||||||
err->stage2 = S2_GPT;
|
.stage2 = S2_GPT,
|
||||||
|
};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -431,10 +432,11 @@ do_check_protect_pse36:
|
|||||||
MMU_NESTED_IDX, true,
|
MMU_NESTED_IDX, true,
|
||||||
&pte_trans.haddr, &full, 0);
|
&pte_trans.haddr, &full, 0);
|
||||||
if (unlikely(flags & TLB_INVALID_MASK)) {
|
if (unlikely(flags & TLB_INVALID_MASK)) {
|
||||||
err->exception_index = 0; /* unused */
|
*err = (TranslateFault){
|
||||||
err->error_code = env->error_code;
|
.error_code = env->error_code,
|
||||||
err->cr2 = paddr;
|
.cr2 = paddr,
|
||||||
err->stage2 = S2_GPA;
|
.stage2 = S2_GPA,
|
||||||
|
};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,10 +496,11 @@ do_check_protect_pse36:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
err->exception_index = EXCP0E_PAGE;
|
*err = (TranslateFault){
|
||||||
err->error_code = error_code;
|
.exception_index = EXCP0E_PAGE,
|
||||||
err->cr2 = addr;
|
.error_code = error_code,
|
||||||
err->stage2 = S2_NONE;
|
.cr2 = addr,
|
||||||
|
};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,9 +567,10 @@ static bool get_physical_address(CPUX86State *env, vaddr addr,
|
|||||||
int shift = in.pg_mode & PG_MODE_LA57 ? 56 : 47;
|
int shift = in.pg_mode & PG_MODE_LA57 ? 56 : 47;
|
||||||
int64_t sext = (int64_t)addr >> shift;
|
int64_t sext = (int64_t)addr >> shift;
|
||||||
if (sext != 0 && sext != -1) {
|
if (sext != 0 && sext != -1) {
|
||||||
err->exception_index = EXCP0D_GPF;
|
*err = (TranslateFault){
|
||||||
err->error_code = 0;
|
.exception_index = EXCP0D_GPF,
|
||||||
err->cr2 = addr;
|
.cr2 = addr,
|
||||||
|
};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user