Commit b0ee3ff06e54a30b1540c08507b873a00192aa0e
1 parent
28c1c656
ltr for x86_64 should check the upper descriptor type, by Bernhard Kauer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2582 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
1 deletions
target-i386/helper.c
... | ... | @@ -1864,8 +1864,11 @@ void helper_ltr_T0(void) |
1864 | 1864 | raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc); |
1865 | 1865 | #ifdef TARGET_X86_64 |
1866 | 1866 | if (env->hflags & HF_LMA_MASK) { |
1867 | - uint32_t e3; | |
1867 | + uint32_t e3, e4; | |
1868 | 1868 | e3 = ldl_kernel(ptr + 8); |
1869 | + e4 = ldl_kernel(ptr + 12); | |
1870 | + if ((e4 >> DESC_TYPE_SHIFT) & 0xf) | |
1871 | + raise_exception_err(EXCP0D_GPF, selector & 0xfffc); | |
1869 | 1872 | load_seg_cache_raw_dt(&env->tr, e1, e2); |
1870 | 1873 | env->tr.base |= (target_ulong)e3 << 32; |
1871 | 1874 | } else | ... | ... |