qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] QEMU target-i386 decoding bug ?


From: Xin Tong
Subject: [Qemu-devel] QEMU target-i386 decoding bug ?
Date: Thu, 5 Feb 2015 19:18:53 -0800

Is there a decoding bug here ? would not stgi and vmfunc both fall
into the  case 4: /* STGI */ ? And it seems case 4 is only handling
STGI.

// CHECK: stgi
// CHECK: encoding: [0x0f,0x01,0xdc]

// CHECK: vmfunc
// CHECK: encoding: [0x0f,0x01,0xd4]

        case 2: /* lgdt */
        case 3: /* lidt */
            if (mod == 3) {
                gen_update_cc_op(s);
                gen_jmp_im(pc_start - s->cs_base);
                switch(rm) {
                case 0: /* VMRUN */
                ...
                case 4: /* STGI */
                    if ((!(s->flags & HF_SVME_MASK) &&
                         !(s->cpuid_ext3_features & CPUID_EXT3_SKINIT)) ||
                        !s->pe)
                        goto illegal_op;
                    if (s->cpl != 0) {
                        gen_exception(s, EXCP0D_GPF, pc_start - s->cs_base);
                        break;
                    } else {
                        gen_helper_stgi(cpu_env);
                    }
                    break;
Thanks,
Trent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]