> On Mon, Jul 26, 2010 at 2:59 AM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > >> On 07/25/2010 09:20 PM, Mohammed Gamal wrote: >> >>> + if (c->op_bytes == 4) >>> + temp_eflags = ((temp_eflags& 0x257fd5) | (ctxt->eflags& >>> 0x1a0000)); >>> >> Should this do also >> >> if (c->op_bytes == 2) >> temp_eflags = ((temp_eflags & 0x7fd5) | (ctxt->eflags & ~0xffffL)); >> >> ? >> > I don't think this is needed. The temp_eflags value is assigned > directly to eflags if we're operand size is 16 bits. At least that's > what the Intel manual says! > Intel manual says: EFLAGS[15:0] ← Pop(); > >> Or better, extract a new function computing the mask from emulate_popf, >> which would do something similar to what I wrote above. >> >> Paolo >> >> > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html