Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction

2008-07-31 Thread Andrea Arcangeli
On Thu, Jul 31, 2008 at 01:25:40PM +0300, Mohammed Gamal wrote: > The only check was if CS RPL equals SS RPL, so what happens is that > when a vmexit and then a vmentry occurs CS and SS RPL maybe equal, but Yes same problem here, vmentry fails because CS is set to >16 bit value (I think) but the l

Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction

2008-07-31 Thread Mohammed Gamal
Here is an update patch. This adds 'cld' and 'std' instructions. The group table entries are added. Signed-off-by: Mohammed Gamal <[EMAIL PROTECTED]> --- arch/x86/kvm/x86_emulate.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arc

Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction

2008-07-31 Thread Avi Kivity
Mohammed Gamal wrote: On Thu, Jul 31, 2008 at 12:57 PM, Avi Kivity <[EMAIL PROTECTED]> wrote: Mohammed Gamal wrote: This patch adds 'cld' and 'std' instructions to the emulator I presume for big real mode? Which guest wants it? Actually I was experimenting with checkin

Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction

2008-07-31 Thread Mohammed Gamal
On Thu, Jul 31, 2008 at 12:57 PM, Avi Kivity <[EMAIL PROTECTED]> wrote: > Mohammed Gamal wrote: >> >> This patch adds 'cld' and 'std' instructions to the emulator >> >> > > I presume for big real mode? Which guest wants it? Actually I was experimenting with checking guest state and emulating on m

Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction

2008-07-31 Thread Avi Kivity
Mohammed Gamal wrote: This patch adds 'cld' and 'std' instructions to the emulator I presume for big real mode? Which guest wants it? @@ -1755,6 +1755,14 @@ special_insn: ctxt->eflags |= X86_EFLAGS_IF; c->dst.type = OP_NONE; /* Disable writeback. */

[PATCH][RESEND] x86_emulator: Emulate cld and std instruction

2008-07-30 Thread Mohammed Gamal
This patch adds 'cld' and 'std' instructions to the emulator Signed-off-by: Mohammed Gamal <[EMAIL PROTECTED]> --- arch/x86/kvm/x86_emulate.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index d5da7f1..9c7