Re: [kvm-devel] [patch] (big) real mode emulation - stc,cld

2007-10-31 Thread Nitin A Kamble
On Wed, 2007-10-31 at 09:45 +0200, Avi Kivity wrote:
> 'git gui' and 'git add -i' allow picking specific hunks out of a
> larger change. 

This seems like better way of cutting patches. Thanks a lot for sharing
the trick.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [patch] (big) real mode emulation - mov rl/rh/r

2007-10-30 Thread Nitin A Kamble
On Tue, 2007-10-30 at 18:06 -0700, Avi Kivity wrote:
> Nitin A Kamble wrote:
> > Hi Avi,
> >   Attached is the patch to implement emulation of instructions
> >   mov rl, imm8 (opcodes 0xb0-0xb3)
> >   mov rh, imm8 (opcodes 0xb4-0xb7)
> >   mov r, imm (opcodes0xb8-0xbf)
> >
> >  
> > @@ -146,8 +146,12 @@ static u16 opcode_table[256] = {
> > 0, 0, ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
> > ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
> > ByteOp | ImplicitOps, ImplicitOps,
> > -   /* 0xB0 - 0xBF */
> > -   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> > +   /* 0xB0 - 0xB7 */
> > +   Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov |
> > SrcImmByte,
> > +   Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov |
> > SrcImmByte,
> > +   /* 0xB8 - 0xBF */
> > +   Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
> > +   Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
> > /* 0xC0 - 0xC7 */
> 
> Perhaps adding DstReg would reduce the decoding code later on?

Avi,
The decoding of register is significantly different for these
instructions. It will be just moving code from one place to other place.

+   c->dst.ptr =
+   (unsigned long *)&c->regs[VCPU_REGS_RAX + (c->b
& 0x3)];
+   c->dst.ptr =
+   ((void *)&c->regs[VCPU_REGS_RAX + (c->b & 0x3)]
+ 1);
+   c->dst.ptr =
+   (unsigned long *)&c->regs[VCPU_REGS_RAX + (c->b
& 0x7)];
> --
> Any sufficiently difficult bug is indistinguishable from a feature.
> 
> 
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [patch] (big) real mode emulation - stc,cld

2007-10-30 Thread Nitin A Kamble
On Tue, 2007-10-30 at 18:02 -0700, Avi Kivity wrote:
> This is 'cld', but it looks like you're setting DF?

Good catch. Same problem hand copy of the patch. 
It should look like this.
+   case 0xfc: /* cld */
+   ctxt->eflags &= ~EFLG_DF;
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [patch] (big) real mode emulation - mul instruction from group 3

2007-10-30 Thread Nitin A Kamble
On Tue, 2007-10-30 at 17:53 -0700, Avi Kivity wrote:
> This is missing a "break;".
Hi Avi,
   You are right. The break statement should be there. It was my mistake
while getting the patch out from the test tree to the push tree. Even if
it is a small patch I should not retype it.

> 
> How are you testing these patches? 

I am running SL101 guest through my test tree. In my test tree the patch
is good, it was the bug introduced while copying.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [patch] (big) real mode emulation - stc,cld

2007-10-30 Thread Nitin A Kamble
Hi Avi,
 Attached is the patch to implement emulation of instructions 

stc (opcode 0xf9) 
cld (opcode 0xfc)

Please Apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0006-Implement-emulation-of-instructions.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [patch] (big) real mode emulation - mov rl/rh/r

2007-10-30 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement emulation of instructions
  mov rl, imm8 (opcodes 0xb0-0xb3)
  mov rh, imm8 (opcodes 0xb4-0xb7)
  mov r, imm (opcodes0xb8-0xbf)

please apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0004-Implement-emulation-of-instructions-mov-rl-rh-r.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [patch] (big) real mode emulation - jb

2007-10-30 Thread Nitin A Kamble
Hi Avi, 
  Attached is the patch to implement emulation of instruction:

jb (opcode 0xe3)

Please apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0005-Implement-emulation-of-instruction.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [patch] (big) real mode emulation - xchg

2007-10-30 Thread Nitin A Kamble
Hi Avi,
 Attached is the patch to implement emulation of further xchg
instructions.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0003-Implement-emulation-of-instructions-xchg.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [patch] (big) real mode emulation - aas

2007-10-30 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement emulation of instruction aas
please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0002-Implement-emulation-of-instruction-aas.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [patch] (big) real mode emulation - mul instruction from group 3

2007-10-30 Thread Nitin A Kamble
Hi Avi,
 Attached is the patch to implement mul instruction from the group 3
opcodes.
  Please Apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0001-Implement-multipy-instruction-from-the-group-3.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - eflags bits manipulating instruction

2007-10-16 Thread Nitin A Kamble
Hi Avi,

  Attached is the patch implementing these eflags manipulating
instructions:
  cmc, clc, cli, sti

opcodes: 0xf5, 0xf8, 0xfa, 0xfb

please Apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


binh1NSoGwali.bin
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Question about EMULATE_DO_MMIO

2007-10-16 Thread Nitin A Kamble
On Tue, 2007-10-16 at 13:12 -0700, Avi Kivity wrote:

> Why do you think it is better?  I would have thought that vm86 is much
> faster.
> 
I am seeing execution going to strange places in vm86 mode. That issue
is not coming in the emulation.

> I thought of doing it this way:
> 
> - try to run normally
> - if vm entry failed due to invalid guest state (the famous
> 0x8021),
> then emulate 50 instructions
> - repeat
This may be better, I will give it a try.

> That will also handle the few cases where VT can't handle protected
> mode.
> 
> It should exit to userspace, same as the non-emulating case.  However
> it
> shouldn't happen for normal writes.
> 
Only thing is if it in the real mode, then returning back to user mode
will setup the cpu state as real mode, and because of that vmenter will
fail.

> 
> --
> Do not meddle in the internals of kernels, for they are subtle and
> quick to panic.
> 
> 

Thanks a lot for your input.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] Question about EMULATE_DO_MMIO

2007-10-16 Thread Nitin A Kamble
Hi Avi,
   I was trying to avoid vm86 mode completely, by using emulation for
all the real mode code emulation. It is doing better than vm86 mode, but
I am seeing one issue with this approch.

   The emulator is failing due to this code. Seems like the execution
need to go back to qemu to finish some pending MMIO.

   if (vcpu->mmio_is_write) {
vcpu->mmio_needed = 0;
return EMULATE_DO_MMIO;
}

Do you have how should it be handled? I am not clear what needs to be
done to handle this situation properly.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - inc dec instructions emulation

2007-10-16 Thread Nitin A Kamble
Hi Avi,
   Attached is the patch to implement the emulation of instruction 

  inc : opcodes 0x40-0x47   
  & 
  dec : opcodes 0x48-0x4f

Please Apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0001-Implement-emulation-of-instruction-inc-dec.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] use of saved_eip

2007-09-26 Thread Nitin A Kamble
Hi Laurent,
  Sorry for calling by alst name. You 1st & last both names are totally
new to me. Are these french names?
  I understand your explanation. I was worried about code getting
misplaced due to automatic merges.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open

On Wed, 2007-09-26 at 14:51 -0700, Laurent Vivier wrote:
> Kamble, Nitin A wrote:
> > Hi Vivier, Avi,
> 
> Hi Nitin,
> (BTW, my first name is Laurent)
> 
> >   In order to debug faulures in my tree, I was looking at the
> saved_eip
> > changes coming from your commit. I did not understand the use of
> > saved_eip properly. like why is it used in the emulation of the pop
> > instruction. Can you please help me understand it's usage?
> 
> in emulate_instruction(), we decode instructions and copy vcpu
> registers
> to ctxt (in x86_decode_insn()), then we really emulate the instruction
> (in x86_emulate_insn()).
> 
> In x86_emulate_insn(), if we have a REP prefix, we decrement ECX and
> set
> EIP to next instruction, then we try to emulate the instruction.
> If the emulation fails (because this is a MMIO for instance) we have
> to
> restore the initial values of ECX and EIP because we will re-enter in
> x86_emulate_insn() once the IO has been managed by Qemu and thus ECX
> is
> decremented again and EIP set to next instruction again.
> 
> And you are right: _we_don't_have_to_do_that_for_the_pop_instruction_,
> it's a mistake because the REP prefix hasn't been processed at this
> level, it is managed (ECX and EIP are modified) later.
> 
> So, you can remove from pop_instruction:
> 
> 1383 if (c->rep_prefix) {
> 1384 c->regs[VCPU_REGS_RCX] =
> saved_rcx;
> 1385 c->eip = saved_eip;
> 1386 }
> 
> Sorry for the inconvenience,
> 
> Laurent
> 
> 



signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - correct code placement

2007-09-18 Thread Nitin A Kamble
Hi Avi,
  Some emulation case statements have gone to wrong place in the
upstream tree. This patch fixes that. This time I have created the patch
using the git-format-patch command as per your suggestion.

  Please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


0001-This-code-has-gone-to-wrong-place-in-the-file.-Movin.patch
Description: application/mbox


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - dec reg

2007-09-14 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement emulation of instruction:
dec reg
opcodes: 0x48 - 0x4f
Please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit ea06cdff59c8f9d74be2f6d7b7c4137a7c150a50
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Sep 14 14:55:33 2007 -0700

Implement emulation of instruction:
	dec reg
	opcode: 0x48 - 0x4f

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index f5a4f4a..64909ff 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -100,7 +100,8 @@ static u8 opcode_table[256] = {
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	/* 0x48 - 0x4F */
-	0, 0, 0, 0, 0, 0, 0, 0,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	/* 0x50 - 0x57 */
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -1409,6 +1410,22 @@ pop_instruction:
 			}
 		no_wb = 1; /* Disable writeback. */
 		break;
+	case 0x48 ... 0x4f: /* dec r16/r32 */
+		dst.ptr = (unsigned long *)&_regs[b & 0x7];
+		dst.val = *dst.ptr;
+		switch (op_bytes) {
+		case 2:
+			*(u16 *)dst.ptr = (u16)dst.val - 1;
+			break;
+		case 4:
+			*dst.ptr = (u32)dst.val - 1;
+			break;	/* 64b: zero-ext */
+		case 8:
+			*dst.ptr = dst.val - 1;
+			break;
+		}
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0xa4 ... 0xa5:	/* movs */
 		dst.type = OP_MEM;
 		dst.bytes = (d & ByteOp) ? 1 : op_bytes;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - inc reg

2007-09-14 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement instructions:
inc reg
opcode: 0x40 - 0x47
  Please apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit c47e7ccd17a9fe79e0f5e8b3198d6cd84e7c85ed
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Sep 14 14:47:42 2007 -0700

Implement emulation of instruction:
	inc reg
	opcode: 0x40 - 0x47

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index ab7db47..f5a4f4a 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -96,8 +96,11 @@ static u8 opcode_table[256] = {
 	ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
 	ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
 	0, 0, 0, 0,
-	/* 0x40 - 0x4F */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0x40 - 0x47 */
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	/* 0x48 - 0x4F */
+	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x50 - 0x57 */
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -1390,6 +1393,22 @@ pop_instruction:
 		_eip = ctxt->vcpu->rip;
 	}
 	switch (b) {
+	case 0x40 ... 0x47:	/* inc reg */
+		dst.ptr = (unsigned long *)&_regs[b & 0x7];
+		dst.val = *dst.ptr;
+			switch (op_bytes) {
+			case 2:
+*(u16 *)dst.ptr = (u16)dst.val + 1;
+break;
+			case 4:
+*dst.ptr = (u32)dst.val + 1;
+break;	/* 64b: zero-ext */
+			case 8:
+*dst.ptr = dst.val + 1;
+break;
+			}
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0xa4 ... 0xa5:	/* movs */
 		dst.type = OP_MEM;
 		dst.bytes = (d & ByteOp) ? 1 : op_bytes;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - jmp abs

2007-09-14 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement instruction:
jump absolute
opcode: 0xff /4
  Please apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit d67d775e429b32da323715f52f4ef4ce03a9031c
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Sep 14 14:25:23 2007 -0700

Implement emulation of instruction:
	jump absolute r/m
	opcode: 0xff /4

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 58e8394..ab7db47 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1229,6 +1229,12 @@ push:
 		case 1:	/* dec */
 			emulate_1op("dec", dst, _eflags);
 			break;
+		case 4: /* jmp abs */
+			if (b == 0xff)
+_eip = dst.val;
+			else
+goto cannot_emulate;
+			break;
 		case 6:	/* push */
 			/* 64-bit mode: PUSH always pushes a 64-bit operand. */
 			if (mode == X86EMUL_MODE_PROT64) {


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] (big) real mode emulation - initialization fixes

2007-09-14 Thread Nitin A Kamble
On Fri, 2007-09-14 at 10:08 -0700, Avi Kivity wrote:
> This seems like it is papering over other bugs.  Some instructions use
> src.val or dst.val without having decoded the src or dst operand.
> 
> Which instructions are these?  Can we fix them instead?

  Instructions using 8bit operands such as al, ah are affected.
Especially utilizing signed operands. By not using this initialization
these operands are getting wrong value from remaining stale bits.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - popf

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement emulation of instruction:
popf
opcode: 0x9d

  Please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 7bbe21004014731ac7f645de879a91b9160e6a1d
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 20:45:34 2007 -0700

Implement emulation of instruction:
	popf
	opcode:  0x9d

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 90ee392..58e8394 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -127,7 +127,7 @@ static u8 opcode_table[256] = {
 	ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
 	0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov,
 	/* 0x90 - 0x9F */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, ImplicitOps, 0, 0,
 	/* 0xA0 - 0xA7 */
 	ByteOp | DstReg | SrcMem | Mov, DstReg | SrcMem | Mov,
 	ByteOp | DstMem | SrcReg | Mov, DstMem | SrcReg | Mov,
@@ -1365,6 +1365,9 @@ pop_instruction:
 	case 0x9c: /* pushf */
 		src.val =  (unsigned long) _eflags;
 		goto push;
+	case 0x9d: /* popf */
+		dst.ptr = (unsigned long *) &_eflags;
+		goto pop_instruction;
 	case 0xc3: /* ret */
 		dst.ptr = &_eip;
 		goto pop_instruction;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] (big) real mode emulation - initialization fixes

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to initialize src.val & dst.val. Without this,
certain instructions are getting affected in their emulation.

  Please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 113fa85a2bc3f6f4b53c4f748f5b4b3144572595
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 20:26:57 2007 -0700

Intialize src.val & dst.val, to fix bugs in certain instruction emulations.
    
    Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index c2540c3..90ee392 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -832,6 +832,7 @@ done_prefixes:
 	  srcmem_common:
 		src.type = OP_MEM;
 		src.ptr = (unsigned long *)cr2;
+		src.val = 0;
 		if ((rc = ops->read_emulated((unsigned long)src.ptr,
 	 &src.val, src.bytes, ctxt->vcpu)) != 0)
 			goto done;
@@ -896,6 +897,7 @@ done_prefixes:
 		dst.type = OP_MEM;
 		dst.ptr = (unsigned long *)cr2;
 		dst.bytes = (d & ByteOp) ? 1 : op_bytes;
+		dst.val = 0;
 		if (d & BitOp) {
 			unsigned long mask = ~(dst.bytes * 8 - 1);
 


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - mov imm

2007-09-13 Thread Nitin A Kamble
Hi Avi,
   Attached is the patch to implement instruction:
mov rl/rh/r, imm
opcodes: 0xb0 - 0xbf

  Please apply,

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 910f3167e57c224206a2ef5fe2cb248494724087
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 20:18:51 2007 -0700

Implement emulation of instruction
	mov rl/rh/r imm
	opcodes: 0xb0 - 0xbf

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 2d2801f..c2540c3 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -137,8 +137,12 @@ static u8 opcode_table[256] = {
 	0, 0, ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
 	ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
 	ByteOp | ImplicitOps, ImplicitOps,
-	/* 0xB0 - 0xBF */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xB0 - 0xB7 */
+	Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte,
+	Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte,
+	/* 0xB8 - 0xBF */
+	Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
+	Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
 	/* 0xC0 - 0xC7 */
 	ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImmByte | ModRM,
 	0, ImplicitOps, 0, 0,
@@ -1102,6 +1106,23 @@ push:
 		dst.val = (unsigned long)_regs[VCPU_REGS_RAX];
 		_eip += ad_bytes;	/* skip dst displacement */
 		break;
+	case 0xb0 ... 0xb3:	/* mov rl, imm8 */
+		dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX + (b & 0x3)];
+		dst.val = src.val;
+		dst.type = OP_REG;
+		dst.bytes = 1;
+		break;
+	case 0xb4 ... 0xb7:	/* mov rh, imm8 */
+		dst.ptr = ((void *)&_regs[VCPU_REGS_RAX + (b & 0x3)] + 1);
+		dst.val = src.val;
+		dst.type = OP_REG;
+		dst.bytes = 1;
+		break;
+	case 0xb8 ... 0xbf:	/* mov r, imm */
+		dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX + (b & 0x7)];
+		dst.val = src.val;
+		dst.type = OP_REG;
+		break;
 	case 0xc0 ... 0xc1:
 	  grp2:		/* Grp2 */
 		switch (modrm_reg) {


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - lea

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement instruction:
lea
opcode:  0x8d

Please apply

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 7e19bcbeb8feebf9ee80c0948ca64c03729d7dda
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 20:07:11 2007 -0700

Implement emulation of instruction:
lea r16/r32, m
opcode:  0x8d:

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index e3fb9ba..2d2801f 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -125,7 +125,7 @@ static u8 opcode_table[256] = {
 	/* 0x88 - 0x8F */
 	ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
 	ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
-	0, 0, 0, DstMem | SrcNone | ModRM | Mov,
+	0, ModRM | DstReg, 0, DstMem | SrcNone | ModRM | Mov,
 	/* 0x90 - 0x9F */
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
 	/* 0xA0 - 0xA7 */
@@ -1080,6 +1080,9 @@ push:
 			goto modrm_done;
 		}
 		goto mov;
+	case 0x8d: /* lea r16/r32, m */
+		dst.val = modrm_val;
+		break;
 	case 0x8f:		/* pop (sole member of Grp1a) */
 		/* 64-bit mode: POP always pops a 64-bit operand. */
 		if (mode == X86EMUL_MODE_PROT64)


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] (big) real mode emulation - mov correction

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  The attached patch corrects the emulation of instruction:
mov
opcodes:  0x88 - 0x8b

  Please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit e976ee1c4f89211f971c704c28617dd6a3b84dc9
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 19:59:00 2007 -0700

Correct behavior of instruction:
	mov
	opcodes:  0x88 - 0x8b

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 2e4c631..e3fb9ba 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1074,6 +1074,11 @@ push:
 		lock_prefix = 1;
 		break;
 	case 0x88 ... 0x8b:	/* mov */
+		if ((modrm_mod == 0x3) && (d & SrcMem)) {
+			d &= ~SrcMem;
+			d |= SrcReg;
+			goto modrm_done;
+		}
 		goto mov;
 	case 0x8f:		/* pop (sole member of Grp1a) */
 		/* 64-bit mode: POP always pops a 64-bit operand. */


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - cmp correction

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to correct the implementation of instruction:
cmp
opcodes: 0x3c, 0x3d
  Please Apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 637711de0b9b2431c32cfdd880fed6baabec3982
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 19:52:21 2007 -0700

Correct emulation of instruction
	cmp
	opcodes: 0x3c & 0x3d

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 5ca4626..2e4c631 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -985,10 +985,31 @@ done_prefixes:
 	  xor:		/* xor */
 		emulate_2op_SrcV("xor", src, dst, _eflags);
 		break;
-	case 0x38 ... 0x3d:
+	case 0x38 ... 0x3b:
 	  cmp:		/* cmp */
 		emulate_2op_SrcV("cmp", src, dst, _eflags);
 		break;
+	case 0x3c:
+		dst.type = OP_REG;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		dst.val = *(u8 *)dst.ptr;
+		dst.bytes = 1;
+		dst.orig_val = dst.val;
+		goto cmp;
+	case 0x3d:
+		dst.ptr = (unsigned long *) &_regs[VCPU_REGS_RAX];
+		switch ((dst.bytes = op_bytes)) {
+		case 2:
+			dst.val = *(u16 *) dst.ptr;
+			break;
+		case 4:
+			dst.val = *(u32 *) dst.ptr;
+			break;
+		case 8:
+			dst.val = *(u64 *) dst.ptr;
+			break;
+		}
+		goto cmp;
 	case 0x63:		/* movsxd */
 		if (mode != X86EMUL_MODE_PROT64)
 			goto cannot_emulate;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - sub imm

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  Attached patch implement emulation of instructions:
sub al imm8  (opcode 0x2c)
sub ax imm16, sub eax imm32 (opcode 0x2d)

Please Apply

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 6c2690c56af49dd810b504d7c5b8983e4bf25604
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 19:39:56 2007 -0700

Implement emulation of instructions:
	sub al imm8  			(opcode 0x2c)
	sub ax imm16, sub eax imm32  	(opcode 0x2d)

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 2ffe7f8..5ca4626 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -87,7 +87,7 @@ static u8 opcode_table[256] = {
 	/* 0x28 - 0x2F */
 	ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
 	ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
-	0, 0, 0, 0,
+	SrcImmByte, SrcImm, 0, 0,
 	/* 0x30 - 0x37 */
 	ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
 	ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
@@ -963,10 +963,24 @@ done_prefixes:
 			dst.val = *(u32 *)dst.ptr;
 		dst.orig_val = dst.val;
 		goto and;
-	case 0x28 ... 0x2d:
+	case 0x28 ... 0x2b:
 	  sub:		/* sub */
 		emulate_2op_SrcV("sub", src, dst, _eflags);
 		break;
+	case 0x2c: 		/* sub al imm8 */
+		dst.type = OP_REG;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		dst.val = *(u8 *)dst.ptr;
+		dst.bytes = 1;
+		dst.orig_val = dst.val;
+		goto sub;
+	case 0x2d:		/* sub ax imm16, sub eax imm32 */
+		dst.type = OP_REG;
+		dst.bytes = 2;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		dst.val = *(u16 *)dst.ptr;
+		dst.orig_val = dst.val;
+		goto sub;
 	case 0x30 ... 0x35:
 	  xor:		/* xor */
 		emulate_2op_SrcV("xor", src, dst, _eflags);


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - or instruction correction

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  This patch corrects the emulation of the instruction "or" for opcodes
0xc & 0cd.
  Please Apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit e7b48d62cfaf4261ec228ee58bcb3d30b434ab8c
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 19:30:26 2007 -0700

Correct the emulation of or instruction, opcodes 0xc & 0xd.

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index eaf89fa..2ffe7f8 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -913,10 +913,27 @@ done_prefixes:
 	  add:		/* add */
 		emulate_2op_SrcV("add", src, dst, _eflags);
 		break;
-	case 0x08 ... 0x0d:
+	case 0x08 ... 0x0b:
 	  or:		/* or */
 		emulate_2op_SrcV("or", src, dst, _eflags);
 		break;
+	case 0x0c: 		/* or al imm8 */
+		dst.type = OP_REG;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		dst.val = *(u8 *)dst.ptr;
+		dst.bytes = 1;
+		dst.orig_val = dst.val;
+		goto or;
+	case 0x0d:		/* or ax imm16, or eax imm32 */
+		dst.type = OP_REG;
+		dst.bytes = op_bytes;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		if (op_bytes == 2)
+			dst.val = *(u16 *)dst.ptr;
+		else
+			dst.val = *(u32 *)dst.ptr;
+		dst.orig_val = dst.val;
+		goto or;
 	case 0x10 ... 0x15:
 	  adc:		/* adc */
 		emulate_2op_SrcV("adc", src, dst, _eflags);


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - jump conditional short relative

2007-09-13 Thread Nitin A Kamble
Hi Avi,
  This patch is extension to the previous "jump conditional" patch. it
implements more jump conditional instruction, opcodes 0x70-0x7f.

Please Apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit c8ea6835e9e4af29339b6abd7800fdd570a23d3a
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 19:21:43 2007 -0700

Implement emulation of more jump conditional instructions
	jcc shortrel
	opcodes: 0x70 - 0x7f

    Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 60feccc..eaf89fa 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -111,8 +111,12 @@ static u8 opcode_table[256] = {
 	0, 0, ImplicitOps|Mov, 0,
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* insb, insw/insd */
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* outsb, outsw/outsd */
-	/* 0x70 - 0x7F */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0x70 - 0x77 */
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	/* 0x78 - 0x7F */
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	/* 0x80 - 0x87 */
 	ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImm | ModRM,
 	ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImmByte | ModRM,
@@ -1269,6 +1273,12 @@ pop_instruction:
 ) == 0)
 			return -1;
 		return 0;
+	case 0x70 ... 0x7f: /* jcc (short) */ {
+		int rel = insn_fetch(s8, 1, _eip);
+		if (test_cc(b, _eflags))
+		JMP_REL(rel);
+		break;
+	}
 	case 0x9c: /* pushf */
 		src.val =  (unsigned long) _eflags;
 		goto push;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - jump conditional relative

2007-09-13 Thread Nitin A Kamble
Hi Avi,
 Attached is the patch to implement instruction:
jump conditional relative (like: jnz jo etc)
opcode : 0x0f80 - 0x0f8f
Please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 3a29a61aabc299ccd5b41d50207e2dfbc7b38236
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 14:57:28 2007 -0700

Implement emulation of instruction:
	jump conditional rel
	opcodes: 0x0f80 - 0x0f8f

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 18c2b2c..007961b 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -188,7 +188,10 @@ static u16 twobyte_table[256] = {
 	/* 0x70 - 0x7F */
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x80 - 0x8F */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	/* 0x90 - 0x9F */
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xA0 - 0xA7 */
@@ -479,6 +482,42 @@ static int read_descriptor(struct x86_emulate_ctxt *ctxt,
 	return rc;
 }
 
+static int
+test_cc(unsigned int condition, unsigned int flags)
+{
+int rc = 0;
+
+	switch ((condition & 15) >> 1) {
+	case 0: /* o */
+		rc |= (flags & EFLG_OF);
+		break;
+	case 1: /* b/c/nae */
+		rc |= (flags & EFLG_CF);
+		break;
+	case 2: /* z/e */
+		rc |= (flags & EFLG_ZF);
+		break;
+	case 3: /* be/na */
+		rc |= (flags & (EFLG_CF|EFLG_ZF));
+		break;
+	case 4: /* s */
+		rc |= (flags & EFLG_SF);
+		break;
+	case 5: /* p/pe */
+		rc |= (flags & EFLG_PF);
+		break;
+	case 7: /* le/ng */
+		rc |= (flags & EFLG_ZF);
+		/* fall through */
+	case 6: /* l/nge */
+		rc |= (!(flags & EFLG_SF) != !(flags & EFLG_OF));
+		break;
+	}
+
+	/* Odd condition identifiers (lsb == 1) have inverted sense. */
+	return (!!rc ^ (condition & 1));
+}
+
 int
 x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
 {
@@ -1487,6 +1526,26 @@ twobyte_special_insn:
 		}
 		rc = X86EMUL_CONTINUE;
 		break;
+	case 0x80 ... 0x8f: /* jnz rel, etc*/ {
+		long int rel;
+		switch (op_bytes) {
+		case 2:
+			rel = insn_fetch(s16, 2, _eip);
+			break;
+		case 4:
+			rel = insn_fetch(s32, 4, _eip);
+			break;
+		case 8:
+			rel = insn_fetch(s64, 8, _eip);
+			break;
+		default:
+			DPRINTF("jnz: Invalid op_bytes\n");
+			goto cannot_emulate;
+		}
+		if (test_cc(b, _eflags))
+			JMP_REL(rel);
+		}
+		break;
 	case 0xc7:		/* Grp9 (cmpxchg8b) */
 		{
 			u64 old, new;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] (big) real mode emulation - push imm8

2007-09-13 Thread Nitin A Kamble
The patch was empty in the last email. My mistake. Reattaching it. 

Thanks to Bernhard for pointing it out.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open

On Thu, 2007-09-13 at 11:15 -0700, Nitin A Kamble wrote:
> Hi Avi,
>Attached is the updated version of the patch, to match the latest tip
> of the tree.
> 
> Please apply.

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 18c2b2c..cd3c5f7 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -978,19 +978,8 @@ push:
 		dst.val = src.val;
 		lock_prefix = 1;
 		break;
-	case 0xa0 ... 0xa1:	/* mov */
-		dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
-		dst.val = src.val;
-		_eip += ad_bytes;	/* skip src displacement */
-		break;
-	case 0xa2 ... 0xa3:	/* mov */
-		dst.val = (unsigned long)_regs[VCPU_REGS_RAX];
-		_eip += ad_bytes;	/* skip dst displacement */
-		break;
 	case 0x88 ... 0x8b:	/* mov */
-	case 0xc6 ... 0xc7:	/* mov (sole member of Grp11) */
-		dst.val = src.val;
-		break;
+		goto mov;
 	case 0x8f:		/* pop (sole member of Grp1a) */
 		/* 64-bit mode: POP always pops a 64-bit operand. */
 		if (mode == X86EMUL_MODE_PROT64)
@@ -1001,6 +990,15 @@ push:
 			goto done;
 		register_address_increment(_regs[VCPU_REGS_RSP], dst.bytes);
 		break;
+	case 0xa0 ... 0xa1:	/* mov */
+		dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
+		dst.val = src.val;
+		_eip += ad_bytes;	/* skip src displacement */
+		break;
+	case 0xa2 ... 0xa3:	/* mov */
+		dst.val = (unsigned long)_regs[VCPU_REGS_RAX];
+		_eip += ad_bytes;	/* skip dst displacement */
+		break;
 	case 0xc0 ... 0xc1:
 	  grp2:		/* Grp2 */
 		switch (modrm_reg) {
@@ -1028,6 +1026,10 @@ push:
 			break;
 		}
 		break;
+	case 0xc6 ... 0xc7:	/* mov (sole member of Grp11) */
+	mov:
+		dst.val = src.val;
+		break;
 	case 0xd0 ... 0xd1:	/* Grp2 */
 		src.val = 1;
 		goto grp2;
@@ -1186,6 +1188,17 @@ special_insn:
 		dst.ptr = (void *) register_address(
 			ctxt->ss_base, _regs[VCPU_REGS_RSP]);
 		break;
+	case 0x58 ... 0x5f: /* pop reg */
+		dst.ptr = (unsigned long *)&_regs[b & 0x7];
+pop_instruction:
+		if ((rc = ops->read_std(register_address(ctxt->ss_base,
+			_regs[VCPU_REGS_RSP]), dst.ptr, op_bytes, ctxt->vcpu))
+			!= 0)
+			goto done;
+
+		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0x6c:		/* insb */
 	case 0x6d:		/* insw/insd */
 		 if (kvm_emulate_pio_string(ctxt->vcpu, NULL,
@@ -1217,12 +1230,15 @@ special_insn:
 ) == 0)
 			return -1;
 		return 0;
-
 	case 0x9c: /* pushf */
 		src.val =  (unsigned long) _eflags;
 		goto push;
-		break;
-
+	case 0xc3: /* ret */
+		dst.ptr = &_eip;
+		goto pop_instruction;
+	case 0xf4:  /* hlt */
+		ctxt->vcpu->halt_request = 1;
+		goto done;
 	}
 	if (rep_prefix) {
 		if (_regs[VCPU_REGS_RCX] == 0) {
@@ -1271,24 +1287,7 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
-	case 0xf4:  /* hlt */
-		ctxt->vcpu->halt_request = 1;
-		goto done;
-	case 0xc3: /* ret */
-		dst.ptr = &_eip;
-		goto pop_instruction;
-	case 0x58 ... 0x5f: /* pop reg */
-		dst.ptr = (unsigned long *)&_regs[b & 0x7];
-
-pop_instruction:
-		if ((rc = ops->read_std(register_address(ctxt->ss_base,
-			_regs[VCPU_REGS_RSP]), dst.ptr, op_bytes, ctxt->vcpu))
-			!= 0)
-			goto done;
 
-		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
-		no_wb = 1; /* Disable writeback. */
-		break;
 	}
 	goto writeback;
 
@@ -1382,6 +1381,16 @@ twobyte_insn:
 		/* Odd cmov opcodes (lsb == 1) have inverted sense. */
 		no_wb ^= b & 1;
 		break;
+	case 0xa3:
+	  bt:		/* bt */
+		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
+		emulate_2op_SrcV_nobyte("bt", src, dst, _eflags);
+		break;
+	case 0xab:
+	  bts:		/* bts */
+		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
+		emulate_2op_SrcV_nobyte("bts", src, dst, _eflags);
+		break;
 	case 0xb0 ... 0xb1:	/* cmpxchg */
 		/*
 		 * Save real source value, then compare EAX against
@@ -1399,30 +1408,15 @@ twobyte_insn:
 			dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
 		}
 		break;
-	case 0xa3:
-	  bt:		/* bt */
-		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
-		emulate_2op_SrcV_nobyte("bt", src, dst, _eflags);
-		break;
 	case 0xb3:
 	  btr:		/* btr */
 		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
 		emulate_2op_SrcV_nobyte("btr", src, dst, _eflags);
 		break;
-	case 0xab:
-	  bts:		/* bts */
-		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
-		emulate_2op_SrcV_nobyte("bts", src, dst

Re: [kvm-devel] [PATCH] (big) real mode emulation - push imm8

2007-09-13 Thread Nitin A Kamble
Hi Avi,
   Attached is the updated version of the patch, to match the latest tip
of the tree.

Please apply.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open

On Wed, 2007-09-12 at 17:36 -0700, Kamble, Nitin A wrote:
> Hi Avi,
>  Thanks for pushing my patch in.  
> 
> Can you also take the attached patch? It will make my daily merges
> easier.
> 
> Thanks & Regards,
> Nitin
> Linux Open Source Technology Center, Intel Corporation
> 
> 
> The Mind is like a parachute; it works much better when it's open.
> 
> -Original Message-
> From: Avi Kivity [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 12, 2007 1:28 AM
> To: Laurent Vivier
> Cc: Kamble, Nitin A; kvm-devel
> Subject: Re: [kvm-devel] [PATCH] (big) real mode emulation - push imm8
> 
> Laurent Vivier wrote:
> > Avi Kivity wrote:
> >   
> >> Nitin A Kamble wrote:
> >> 
> >>> Hi Avi,
> >>>   Attached is the patch to implement the push imm8 instruction
> opcode
> >>> 0x6a.
> >>>
> >>> Please apply or comment.
> >>>
> >>>   
> >>>   
> >> The patches look good, but I am holding on right now because of the 
> >> emulator split.  If that is not merged in the next couple of days, I 
> >> will merge your patches.
> >> 
> >
> > I'm currently working on this.
> >
> >   
> Thanks!
> 
> > But first of all I'm trying to install a FC-6 to reproduce the problem
> (I don't
> > have it with a Debian etch): I don't know why but I have some problems
> with the
> > fedora installer (even If I take older kvm or qemu). The merge seems
> good.
> >
> > Avi, if you want you can apply all modification you have on the
> x86_emulator,
> > I'll rewrite the emulator split according these modifications.
> >   
> 
> Okay, I'll apply Nitin's patches.
> 
> 
> email message attachment
> >  Forwarded Message 
> > From: Kamble, Nitin A <[EMAIL PROTECTED]>
> > Reply-To: Kamble, Nitin A <[EMAIL PROTECTED]>
> > To: Avi Kivity <[EMAIL PROTECTED]>
> > Cc: kvm-devel 
> > Subject: [PATCH] (big) real mode emulation - sort opcode entries 2
> > Date: Thu, 6 Sep 2007 14:54:55 -0700
> > 
> > Hi Avi,
> >   Attached is the patch to sort remaining op-codes entries in the
> > x86_emulate.c
> >   This patch is just restructuring current code, not new logic added to
> > the file. It makes my life simpler with merging my x86 emulation tree.
> > 
> > please apply.
> > 



signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - sort opcode entries 2

2007-09-06 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to sort remaining op-codes entries in the
x86_emulate.c
  This patch is just restructuring current code, not new logic added to
the file. It makes my life simpler with merging my x86 emulation tree.

please apply.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 0af0b63e81cc345009d63703e5a7228fc9edd4d2
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 6 16:46:31 2007 -0700

sort remaining opcodes in the master tree, to make merge with my tree easiser.
Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>


diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 7439b34..97b7616 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -976,19 +976,8 @@ done_prefixes:
 		dst.val = src.val;
 		lock_prefix = 1;
 		break;
-	case 0xa0 ... 0xa1:	/* mov */
-		dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
-		dst.val = src.val;
-		_eip += ad_bytes;	/* skip src displacement */
-		break;
-	case 0xa2 ... 0xa3:	/* mov */
-		dst.val = (unsigned long)_regs[VCPU_REGS_RAX];
-		_eip += ad_bytes;	/* skip dst displacement */
-		break;
 	case 0x88 ... 0x8b:	/* mov */
-	case 0xc6 ... 0xc7:	/* mov (sole member of Grp11) */
-		dst.val = src.val;
-		break;
+		goto mov;
 	case 0x8f:		/* pop (sole member of Grp1a) */
 		/* 64-bit mode: POP always pops a 64-bit operand. */
 		if (mode == X86EMUL_MODE_PROT64)
@@ -999,6 +988,15 @@ done_prefixes:
 			goto done;
 		register_address_increment(_regs[VCPU_REGS_RSP], dst.bytes);
 		break;
+	case 0xa0 ... 0xa1:	/* mov */
+		dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
+		dst.val = src.val;
+		_eip += ad_bytes;	/* skip src displacement */
+		break;
+	case 0xa2 ... 0xa3:	/* mov */
+		dst.val = (unsigned long)_regs[VCPU_REGS_RAX];
+		_eip += ad_bytes;	/* skip dst displacement */
+		break;
 	case 0xc0 ... 0xc1:
 	  grp2:		/* Grp2 */
 		switch (modrm_reg) {
@@ -1026,6 +1024,10 @@ done_prefixes:
 			break;
 		}
 		break;
+	case 0xc6 ... 0xc7:	/* mov (sole member of Grp11) */
+	mov:
+		dst.val = src.val;
+		break;
 	case 0xd0 ... 0xd1:	/* Grp2 */
 		src.val = 1;
 		goto grp2;
@@ -1164,6 +1166,8 @@ special_insn:
 		dst.ptr = (void *) register_address(
 			ctxt->ss_base, _regs[VCPU_REGS_RSP]);
 		break;
+	case 0x58 ... 0x5f: /* pop reg */
+		dst.ptr = (unsigned long *)&_regs[b & 0x7];
 	case 0x6c:		/* insb */
 	case 0x6d:		/* insw/insd */
 		 if (kvm_emulate_pio_string(ctxt->vcpu, NULL,
@@ -1195,6 +1199,22 @@ special_insn:
 ) == 0)
 			return -1;
 		return 0;
+	case 0xc3: /* ret */
+		dst.ptr = &_eip;
+		goto pop_instruction;
+	case 0xf4:  /* hlt */
+		ctxt->vcpu->halt_request = 1;
+		goto done;
+
+pop_instruction:
+		if ((rc = ops->read_std(register_address(ctxt->ss_base,
+			_regs[VCPU_REGS_RSP]), dst.ptr, op_bytes, ctxt->vcpu))
+			!= 0)
+			goto done;
+
+		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	}
 	if (rep_prefix) {
 		if (_regs[VCPU_REGS_RCX] == 0) {
@@ -1243,24 +1263,7 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
-	case 0xf4:  /* hlt */
-		ctxt->vcpu->halt_request = 1;
-		goto done;
-	case 0xc3: /* ret */
-		dst.ptr = &_eip;
-		goto pop_instruction;
-	case 0x58 ... 0x5f: /* pop reg */
-		dst.ptr = (unsigned long *)&_regs[b & 0x7];
-
-pop_instruction:
-		if ((rc = ops->read_std(register_address(ctxt->ss_base,
-			_regs[VCPU_REGS_RSP]), dst.ptr, op_bytes, ctxt->vcpu))
-			!= 0)
-			goto done;
 
-		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
-		no_wb = 1; /* Disable writeback. */
-		break;
 	}
 	goto writeback;
 
@@ -1354,6 +1357,16 @@ twobyte_insn:
 		/* Odd cmov opcodes (lsb == 1) have inverted sense. */
 		no_wb ^= b & 1;
 		break;
+	case 0xa3:
+	  bt:		/* bt */
+		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
+		emulate_2op_SrcV_nobyte("bt", src, dst, _eflags);
+		break;
+	case 0xab:
+	  bts:		/* bts */
+		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
+		emulate_2op_SrcV_nobyte("bts", src, dst, _eflags);
+		break;
 	case 0xb0 ... 0xb1:	/* cmpxchg */
 		/*
 		 * Save real source value, then compare EAX against
@@ -1371,30 +1384,15 @@ twobyte_insn:
 			dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
 		}
 		break;
-	case 0xa3:
-	  bt:		/* bt */
-		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
-		emulate_2op_SrcV_nobyte("bt", src, dst, _eflags);
-		break;
 	case 0xb3:
 	  btr:		/* btr */
 		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
 		emulate_2op_SrcV_nobyte("btr", src, dst, _eflags);
 		break;
-

[kvm-devel] [PATCH] (big) real mode emulation - pushf

2007-08-28 Thread Nitin A Kamble
Hi Avi,
 Attached is the patch to implement emulation of instruction pushf,
opcode 0x9c.
  Please apply or comment.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit c291035169e88bc3115e9692720f84bcbc50d0ed
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Tue Aug 28 21:27:24 2007 -0700

Implement emulation of instruction
	pushf
	opcode: 0x9c

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index c488277..02daec6 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -123,7 +123,7 @@ static u8 opcode_table[256] = {
 	ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
 	0, 0, 0, DstMem | SrcNone | ModRM | Mov,
 	/* 0x90 - 0x9F */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0,
 	/* 0xA0 - 0xA7 */
 	ByteOp | DstReg | SrcMem | Mov, DstReg | SrcMem | Mov,
 	ByteOp | DstMem | SrcReg | Mov, DstMem | SrcReg | Mov,
@@ -938,7 +938,8 @@ push:
 		dst.bytes = op_bytes;
 		dst.val = src.val;
 		register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes);
-		dst.ptr = register_address(ctxt->ss_base, _regs[VCPU_REGS_RSP]);
+		dst.ptr = (void *) register_address(ctxt->ss_base,
+			_regs[VCPU_REGS_RSP]);
 		break;
 	case 0x80 ... 0x83:	/* Grp1 */
 		switch (modrm_reg) {
@@ -1226,6 +1227,12 @@ special_insn:
 ) == 0)
 			return -1;
 		return 0;
+
+	case 0x9c: /* pushf */
+		src.val =  (unsigned long) _eflags;
+		goto push;
+		break;
+
 	}
 	if (rep_prefix) {
 		if (_regs[VCPU_REGS_RCX] == 0) {


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - call near

2007-08-28 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement instruction call near, opcode 0xe8.
 Please apply or comment.   
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit d05cbb38ee1603dceb390d0b5ad6c3789364e940
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Tue Aug 28 21:06:36 2007 -0700

Implement emulation of instruction
	opcode: 0xe8
	call (near)
Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 2d5caf6..c488277 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -150,7 +150,7 @@ static u8 opcode_table[256] = {
 	/* 0xE0 - 0xE7 */
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xE8 - 0xEF */
-	0, SrcImm|ImplicitOps, 0, SrcImmByte|ImplicitOps, 0, 0, 0, 0,
+	ImplicitOps, SrcImm|ImplicitOps, 0, SrcImmByte|ImplicitOps, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -1043,6 +1043,26 @@ push:
 	case 0xd2 ... 0xd3:	/* Grp2 */
 		src.val = _regs[VCPU_REGS_RCX];
 		goto grp2;
+	case 0xe8: /* call (near) */ {
+		long int rel;
+		switch (op_bytes) {
+		case 2:
+			rel = insn_fetch(s16, 2, _eip);
+			break;
+		case 4:
+			rel = insn_fetch(s32, 4, _eip);
+			break;
+		case 8:
+			rel = insn_fetch(s64, 8, _eip);
+			break;
+		default:
+			DPRINTF("Call: Invalid op_bytes\n");
+			goto cannot_emulate;
+		}
+		src.val = (unsigned long) _eip;
+		JMP_REL(rel);
+		goto push;
+	}
 	case 0xe9: /* jmp rel */
 	case 0xeb: /* jmp rel short */
 		JMP_REL(src.val);


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] (big) real mode emulation - push imm8

2007-08-28 Thread Nitin A Kamble
Hi Avi,
  Attached is the patch to implement the push imm8 instruction opcode
0x6a.

Please apply or comment.

And regarding the patches in the dos format, I tried sending patches to
my yahoo/gmail account and I don't see them in the DOS format. It's
strange it is reaching you in the DOS format. I don't know a way to
avoid it right now. Please let me know if there is any known trick or
method to avoid this issue.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit bd06a9509bbd4a7df1277f743bc9cfcc8498bad8
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Tue Aug 28 20:58:38 2007 -0700

Implement the instruction
	push imm8
	opcode: 0x6a
    Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 7439b34..2d5caf6 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -104,10 +104,11 @@ static u8 opcode_table[256] = {
 	/* 0x58 - 0x5F */
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
-	/* 0x60 - 0x6B */
+	/* 0x60 - 0x67 */
 	0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ ,
-	0, 0, 0, 0, 0, 0, 0, 0,
-	/* 0x6C - 0x6F */
+	0, 0, 0, 0,
+	/* 0x68 - 0x6F */
+	0, 0, ImplicitOps|Mov, 0,
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* insb, insw/insd */
 	SrcNone  | ByteOp  | ImplicitOps, SrcNone  | ImplicitOps, /* outsb, outsw/outsd */
 	/* 0x70 - 0x7F */
@@ -929,6 +930,16 @@ done_prefixes:
 			goto cannot_emulate;
 		dst.val = (s32) src.val;
 		break;
+	case 0x6a: /* push imm8 */
+		src.val = 0L;
+		src.val = insn_fetch(s8, 1, _eip);
+push:
+		dst.type  = OP_MEM;
+		dst.bytes = op_bytes;
+		dst.val = src.val;
+		register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes);
+		dst.ptr = register_address(ctxt->ss_base, _regs[VCPU_REGS_RSP]);
+		break;
 	case 0x80 ... 0x83:	/* Grp1 */
 		switch (modrm_reg) {
 		case 0:


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Patch] (big) real mode emulation - push reg

2007-08-17 Thread Nitin A Kamble
On Fri, 2007-08-17 at 05:21 -0700, Avi Kivity wrote:

> I don't thing 'd |= Mov' is necessary any more to force writeback.
> Please check.
> 
Hi Avi,
You are right, it was a bit stale code.

> Also, please keep opcodes in sorted order.
It is now.
Resending the updated "push reg" emulation patch.
Please Apply or comment.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 8e55a4dad9f74ed9d883f1faccd11405d6775344
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 17 18:47:18 2007 -0700

Implementing emulation of instructions:
push reg (opcode 0x50-0x57)

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index fed0b2a..4eec909 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -99,7 +99,8 @@ static u8 opcode_table[256] = {
 	/* 0x40 - 0x4F */
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x50 - 0x57 */
-	0, 0, 0, 0, 0, 0, 0, 0,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	/* 0x58 - 0x5F */
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -1148,6 +1149,19 @@ special_insn:
 	if (twobyte)
 		goto twobyte_special_insn;
 	switch(b) {
+	case 0x50 ... 0x57:  /* push reg */
+		if (op_bytes == 2)
+			src.val = (u16) _regs[b & 0x7];
+		else
+			src.val = (u32) _regs[b & 0x7];
+		dst.type  = OP_MEM;
+		dst.bytes = op_bytes;
+		dst.val = src.val;
+		register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes);
+		dst.ptr = (void *) register_address(
+			ctxt->ss_base, _regs[VCPU_REGS_RSP]);
+		no_wb = 1; /* force writeback */
+		break;
 	case 0x6c:		/* insb */
 	case 0x6d:		/* insw/insd */
 		 if (kvm_emulate_pio_string(ctxt->vcpu, NULL,
@@ -1384,6 +1398,7 @@ btc:		/* btc */
 		dst.val = (d & ByteOp) ? (s8) src.val : (s16) src.val;
 		break;
 	}
+
 	goto writeback;
 
 twobyte_special_insn:


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Patch] (big) real mode emulation - jmp rel

2007-08-17 Thread Nitin A Kamble
On Fri, 2007-08-17 at 05:24 -0700, Avi Kivity wrote:
> A file scope function would indeed be uglier.  But the macro has more
> serious problems; it's impossible to understand how variables are
> affected since nobody expects function local variables whose address
> is
> not taken to change after something that looks like a macro is called.
> 
> At the very least, it needs to be in uppercase so that people know
> something funny is going on.  But it's really better as a function.
> 
> (and yes, the rest of the file uses macros.  and yes, the rest of the
> file is an unmaintainable mess)

Hi Avi,
  I tried either ways, and to me the macro looks cleaner. Now I have
upper-cased it for your satisfaction. :)
  Also attached the "jmp rel short" emulation patch.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 47259a989606e37e5ba24f6722a8258368e6d0a2
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 17 18:39:29 2007 -0700

Implementing emulation of instruction
    	jmp rel short imm8
	opcode: 0xeb
Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 393dfb6..fed0b2a 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -148,7 +148,7 @@ static u8 opcode_table[256] = {
 	/* 0xE0 - 0xE7 */
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xE8 - 0xEF */
-	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
+	0, SrcImm|ImplicitOps, 0, SrcImmByte|ImplicitOps, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -1029,6 +1029,7 @@ grp2:		/* Grp2 */
 		src.val = _regs[VCPU_REGS_RCX];
 		goto grp2;
 	case 0xe9: /* jmp rel */
+	case 0xeb: /* jmp rel short */
 		JMP_REL(src.val);
 		no_wb = 1; /* Disable writeback. */
 		break;
commit 17994104bef0da3d182d2b8736fbd1cf8d4a77f0
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 17 18:33:07 2007 -0700

Implement emulation of instruction "jmp rel" opcode 0xe9

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index b196d25..393dfb6 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -145,8 +145,10 @@ static u8 opcode_table[256] = {
 	0, 0, 0, 0,
 	/* 0xD8 - 0xDF */
 	0, 0, 0, 0, 0, 0, 0, 0,
-	/* 0xE0 - 0xEF */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE0 - 0xE7 */
+	0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE8 - 0xEF */
+	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -447,6 +449,12 @@ struct operand {
 			   (((reg) + _inc) & ((1UL << (ad_bytes << 3)) - 1)); \
 	} while (0)
 
+#define JMP_REL(rel) 			\
+	do {\
+		_eip += (int)(rel);	\
+		_eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \
+	} while (0)
+
 /*
  * Given the 'reg' portion of a ModRM byte, and a register block, return a
  * pointer into the block that addresses the relevant register.
@@ -1020,6 +1028,10 @@ grp2:		/* Grp2 */
 	case 0xd2 ... 0xd3:	/* Grp2 */
 		src.val = _regs[VCPU_REGS_RCX];
 		goto grp2;
+	case 0xe9: /* jmp rel */
+		JMP_REL(src.val);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0xf6 ... 0xf7:	/* Grp3 */
 		switch (modrm_reg) {
 		case 0 ... 1:	/* test */


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - sorted opcodes

2007-08-17 Thread Nitin A Kamble
On Fri, 2007-08-17 at 05:18 -0700, Avi Kivity wrote:
> Applied, thanks.
> 
> Please keep opcodes in sorted order, and don't post patches in dos
> format.
> 
> 
Hi Avi,
  Attached is the patch, doing code cleanup. It keeps the emulation of
op-codes in sorted order. Also removes the white-space before labels.

  I don't see any reason for it to reach you in the dos format. I use
evolution to send email, and I am sending it from my Linux desktop. Only
thing is I have to go through the Exchange server to send email. Can you
send back one of my patch? I will check what is happening.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit c609269ebc40e385ec5a82363d5ee4a49388776c
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 17 18:21:08 2007 -0700

Rearrange the emulation code so that opcodes stay in sorted order.
And rearrange the lables as per the kernel requirements.

 Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index b4f439c..b196d25 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -782,7 +782,7 @@ done_prefixes:
 		goto srcmem_common;
 	case SrcMem:
 		src.bytes = (d & ByteOp) ? 1 : op_bytes;
-	  srcmem_common:
+srcmem_common:
 		src.type = OP_MEM;
 		src.ptr = (unsigned long *)cr2;
 		if ((rc = ops->read_emulated((unsigned long)src.ptr,
@@ -898,6 +898,18 @@ done_prefixes:
 	  cmp:		/* cmp */
 		emulate_2op_SrcV("cmp", src, dst, _eflags);
 		break;
+	case 0x58 ... 0x5f: 	/* pop reg */
+		dst.ptr = (unsigned long *)&_regs[b & 0x7];
+
+pop_instruction:
+		if ((rc = ops->read_std(register_address(ctxt->ss_base,
+			_regs[VCPU_REGS_RSP]), dst.ptr, op_bytes, ctxt->vcpu))
+			!= 0)
+			goto done;
+
+		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0x63:		/* movsxd */
 		if (mode != X86EMUL_MODE_PROT64)
 			goto cannot_emulate;
@@ -924,7 +936,7 @@ done_prefixes:
 		}
 		break;
 	case 0x84 ... 0x85:
-	  test:		/* test */
+test:		/* test */
 		emulate_2op_SrcV("test", src, dst, _eflags);
 		break;
 	case 0x86 ... 0x87:	/* xchg */
@@ -960,7 +972,7 @@ done_prefixes:
 		_eip += ad_bytes;	/* skip dst displacement */
 		break;
 	case 0x88 ... 0x8b:	/* mov */
-	case 0xc6 ... 0xc7:	/* mov (sole member of Grp11) */
+mov:
 		dst.val = src.val;
 		break;
 	case 0x8f:		/* pop (sole member of Grp1a) */
@@ -974,7 +986,7 @@ done_prefixes:
 		register_address_increment(_regs[VCPU_REGS_RSP], dst.bytes);
 		break;
 	case 0xc0 ... 0xc1:
-	  grp2:		/* Grp2 */
+grp2:		/* Grp2 */
 		switch (modrm_reg) {
 		case 0:	/* rol */
 			emulate_2op_SrcB("rol", src, dst, _eflags);
@@ -1000,6 +1012,8 @@ done_prefixes:
 			break;
 		}
 		break;
+	case 0xc6 ... 0xc7:	/* mov (sole member of Grp11) */
+		goto mov;
 	case 0xd0 ... 0xd1:	/* Grp2 */
 		src.val = 1;
 		goto grp2;
@@ -1200,24 +1214,12 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
-	case 0xf4:  /* hlt */
-		ctxt->vcpu->halt_request = 1;
-		goto done;
 	case 0xc3: /* ret */
 		dst.ptr = &_eip;
 		goto pop_instruction;
-	case 0x58 ... 0x5f: /* pop reg */
-		dst.ptr = (unsigned long *)&_regs[b & 0x7];
-
-pop_instruction:
-		if ((rc = ops->read_std(register_address(ctxt->ss_base,
-			_regs[VCPU_REGS_RSP]), dst.ptr, op_bytes, ctxt->vcpu))
-			!= 0)
-			goto done;
-
-		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
-		no_wb = 1; /* Disable writeback. */
-		break;
+	case 0xf4:  /* hlt */
+		ctxt->vcpu->halt_request = 1;
+		goto done;
 	}
 	goto writeback;
 
@@ -1311,6 +1313,16 @@ twobyte_insn:
 		/* Odd cmov opcodes (lsb == 1) have inverted sense. */
 		no_wb ^= b & 1;
 		break;
+	case 0xa3:
+bt:		/* bt */
+		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
+		emulate_2op_SrcV_nobyte("bt", src, dst, _eflags);
+		break;
+	case 0xab:
+bts:		/* bts */
+		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
+		emulate_2op_SrcV_nobyte("bts", src, dst, _eflags);
+		break;
 	case 0xb0 ... 0xb1:	/* cmpxchg */
 		/*
 		 * Save real source value, then compare EAX against
@@ -1328,30 +1340,15 @@ twobyte_insn:
 			dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX];
 		}
 		break;
-	case 0xa3:
-	  bt:		/* bt */
-		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
-		emulate_2op_SrcV_nobyte("bt", src, dst, _eflags);
-		break;
 	case 0xb3:
-	  btr:		/* btr */
+btr:		/* btr */
 		src.val &= (dst.bytes << 3) - 1; /* only subword offset */
 		emulate_2op_SrcV_nobyte("btr", 

Re: [kvm-devel] [Patch] (big) real mode emulation - jmp rel

2007-08-16 Thread Nitin A Kamble
Hi Avi,
   If you are fine with macro then attached are the updated patches for
"jmp rel" & "jmp rel short" instruction emulation.

On Thu, 2007-08-16 at 13:34 -0700, Nitin A Kamble wrote:
> Avi,
>   In my opinion converting this small function to file-scope function,
> would make code look ugly. I think the earlier Macro definition was
> better.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 38177680ad53b330d0f8b4fcec20953a7a7dfa2d
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Aug 16 19:10:14 2007 -0700

Implement instruction "jmp rel" opcode 0xe9

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index b4f439c..6519cf9 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -145,8 +145,10 @@ static u8 opcode_table[256] = {
 	0, 0, 0, 0,
 	/* 0xD8 - 0xDF */
 	0, 0, 0, 0, 0, 0, 0, 0,
-	/* 0xE0 - 0xEF */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE0 - 0xE7 */
+	0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE8 - 0xEF */
+	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -447,6 +449,12 @@ struct operand {
 			   (((reg) + _inc) & ((1UL << (ad_bytes << 3)) - 1)); \
 	} while (0)
 
+#define jmp_rel(rel) 			\
+	do {\
+		_eip += (int)(rel);	\
+		_eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \
+	} while (0)
+
 /*
  * Given the 'reg' portion of a ModRM byte, and a register block, return a
  * pointer into the block that addresses the relevant register.
@@ -1200,6 +1208,10 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
+	case 0xe9: /* jmp rel */
+		jmp_rel(src.val);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0xf4:  /* hlt */
 		ctxt->vcpu->halt_request = 1;
 		goto done;
commit 38f7db6830c862cd0470aaa07cabe616ff741d69
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 10 18:48:05 2007 -0700

Implement "jmp rel short" opcode: 0xeb

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 40fb6ee..16ea385 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -148,7 +148,7 @@ static u8 opcode_table[256] = {
 	/* 0xE0 - 0xE7 */
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xE8 - 0xEF */
-	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
+	0, SrcImm|ImplicitOps, 0, SrcImmByte|ImplicitOps, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -1208,6 +1208,7 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
+	case 0xeb: /* jmp rel short */
 	case 0xe9: /* jmp rel */
 		jmp_rel(src.val);
 		no_wb = 1; /* Disable writeback. */


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - push reg

2007-08-16 Thread Nitin A Kamble
Hi Avi,
 Attached is a patch to implement instruction:
push reg (opcode 0x50 - 0x57)
Please apply or comment.

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 7f712b2d8cda67299e17473356050490a5c05be5
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Aug 16 19:47:19 2007 -0700

Implementing emulation of instructions:
	push reg (opcode 0x50-0x57)

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index cfdbaa5..09ca692 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -99,7 +99,8 @@ static u8 opcode_table[256] = {
 	/* 0x40 - 0x4F */
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x50 - 0x57 */
-	0, 0, 0, 0, 0, 0, 0, 0,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	/* 0x58 - 0x5F */
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -1247,7 +1248,21 @@ pop_instruction:
 		register_address_increment(_regs[VCPU_REGS_RSP], op_bytes);
 		no_wb = 1; /* Disable writeback. */
 		break;
+	case 0x50 ... 0x57:  /* push reg */
+		if (op_bytes == 2)
+			src.val = (u16) _regs[b & 0x7];
+		else
+			src.val = (u32) _regs[b & 0x7];
+		dst.type  = OP_MEM;
+		dst.bytes = op_bytes;
+		dst.val = src.val;
+		register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes);
+		dst.ptr = (void *) register_address(
+			ctxt->ss_base, _regs[VCPU_REGS_RSP]);
+		d |= Mov; /* force writeback */
+		break;
 	}
+
 	goto writeback;
 
 twobyte_insn:


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - and ax imm

2007-08-16 Thread Nitin A Kamble
Hi Avi,
 Attached is the patch to implement "and al imm8", "and ax imm16" & "
and eax imm32" instructions.
  Please apply or comment.
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open
commit 16312d9a828af54d3d4ad7dc0a9a1f038de72bf6
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Aug 16 19:19:44 2007 -0700

Implement emulation of instruction
	and al imm8 (opcode 0x24)
	and ax/eax imm16/imm32 (opcode 0x25)

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index a2d520b..cfdbaa5 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -83,7 +83,7 @@ static u8 opcode_table[256] = {
 	/* 0x20 - 0x27 */
 	ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
 	ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
-	0, 0, 0, 0,
+	SrcImmByte, SrcImm, 0, 0,
 	/* 0x28 - 0x2F */
 	ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM,
 	ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM,
@@ -890,7 +890,23 @@ done_prefixes:
 	  sbb:		/* sbb */
 		emulate_2op_SrcV("sbb", src, dst, _eflags);
 		break;
-	case 0x20 ... 0x25:
+	case 0x24:  /* and al imm8 */
+		dst.type = OP_REG;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		dst.val = *(u8 *)dst.ptr;
+		dst.bytes = 1;
+		dst.orig_val = dst.val;
+		goto and;
+	case 0x25:  /* and ax imm16, or eax imm32 */
+		dst.type = OP_REG;
+		dst.bytes = op_bytes;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		if (op_bytes == 2)
+			dst.val = *(u16 *)dst.ptr;
+		else
+			dst.val = *(u32 *)dst.ptr;
+		dst.orig_val = dst.val;
+	case 0x20 ... 0x23:
 	  and:		/* and */
 		emulate_2op_SrcV("and", src, dst, _eflags);
 		break;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Patch] (big) real mode emulation - jmp rel

2007-08-16 Thread Nitin A Kamble
Avi,
In my opinion converting this small function to file-scope function,
would make code look ugly. I think the earlier Macro definition was
better.


On Thu, 2007-08-16 at 03:25 -0700, Avi Kivity wrote:
> > + inline void jmp_rel(int rel)
> > + {
> > + _eip += (int)(rel);
> > + _eip = ((op_bytes == 2) ? (uint16_t)_eip :
> (uint32_t)_eip);
> > + };
> > +
> 
> This is a nested function which we don't use (in the kernel or
> userspace).
> 
> It needs to be a file-scope function (static, too).

-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Patch] (big) real mode emulation - jmp rel

2007-08-15 Thread Nitin A Kamble
Hi Avi,
  I modified the patch as per your suggestions. Attached is the update
patch for the "jmp rel" instruction. Also the "jmp rel short" patch
would go on top of it.

Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-
The mind is like a parachute; it works much better when it's open.
On Mon, 2007-08-13 at 01:49 -0700, Avi Kivity wrote:
> Please use an inline function instead of a macro.  That will help when
> we later make large scale changes (for example, splitting the emulator
> into a decoder and executor).
> 
> (and, when defining the macro, indent the contents)
> 
> --
> error compiling committee.c: too many arguments to function
> 
> 

commit dd675f122c14adac40c9ac1eb5864de60330cc8c
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Wed Aug 15 20:52:41 2007 -0700

Implement instruction "jmp rel" opcode 0xe9

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index b4f439c..9130fd5 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -145,8 +145,10 @@ static u8 opcode_table[256] = {
 	0, 0, 0, 0,
 	/* 0xD8 - 0xDF */
 	0, 0, 0, 0, 0, 0, 0, 0,
-	/* 0xE0 - 0xEF */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE0 - 0xE7 */
+	0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE8 - 0xEF */
+	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -504,6 +506,12 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
 	unsigned long _eip = ctxt->vcpu->rip, _eflags = ctxt->eflags;
 	unsigned long modrm_val = 0;
 
+	inline void jmp_rel(int rel)
+	{
+		_eip += (int)(rel);
+		_eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip);
+	};
+
 	memcpy(_regs, ctxt->vcpu->regs, sizeof _regs);
 
 	switch (mode) {
@@ -1200,6 +1208,10 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
+	case 0xe9: /* jmp rel */
+		jmp_rel(src.val);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0xf4:  /* hlt */
 		ctxt->vcpu->halt_request = 1;
 		goto done;
commit 38f7db6830c862cd0470aaa07cabe616ff741d69
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 10 18:48:05 2007 -0700

Implement "jmp rel short" opcode: 0xeb

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 40fb6ee..16ea385 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -148,7 +148,7 @@ static u8 opcode_table[256] = {
 	/* 0xE0 - 0xE7 */
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xE8 - 0xEF */
-	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
+	0, SrcImm|ImplicitOps, 0, SrcImmByte|ImplicitOps, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -1208,6 +1208,7 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
+	case 0xeb: /* jmp rel short */
 	case 0xe9: /* jmp rel */
 		jmp_rel(src.val);
 		no_wb = 1; /* Disable writeback. */


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - jmp rel short

2007-08-10 Thread Nitin A Kamble
Hi Avi,
Attached is the patch for the instruction "jmp rel short", opcode
0xeb.

  This patch goes on top of last patch (jmp rel).


Thanks & Regards,
Nitin 
Open Source Technology Center, Intel Corporation.
-
The mind is like a parachute; it works much better when it's open. 
commit 38f7db6830c862cd0470aaa07cabe616ff741d69
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 10 18:48:05 2007 -0700

Implement "jmp rel short" opcode: 0xeb
    
Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 40fb6ee..16ea385 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -148,7 +148,7 @@ static u8 opcode_table[256] = {
 	/* 0xE0 - 0xE7 */
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xE8 - 0xEF */
-	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
+	0, SrcImm|ImplicitOps, 0, SrcImmByte|ImplicitOps, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -1208,6 +1208,7 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
+	case 0xeb: /* jmp rel short */
 	case 0xe9: /* jmp rel */
 		jmp_rel(src.val);
 		no_wb = 1; /* Disable writeback. */


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - jmp rel

2007-08-10 Thread Nitin A Kamble
Hi Avi,
The patch to implement "jmp rel" emulation is attached.

Thanks & Regards,
Nitin 
Open Source Technology Center, Intel Corporation.
-
The mind is like a parachute; it works much better when it's open. 
commit 1d77b7ad2bcb20858dd66d9653952a8d1cc0a153
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 10 18:36:12 2007 -0700

Implement instruction "jmp rel" opcode 0xe9
    
Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index b4f439c..40fb6ee 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -145,8 +145,10 @@ static u8 opcode_table[256] = {
 	0, 0, 0, 0,
 	/* 0xD8 - 0xDF */
 	0, 0, 0, 0, 0, 0, 0, 0,
-	/* 0xE0 - 0xEF */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE0 - 0xE7 */
+	0, 0, 0, 0, 0, 0, 0, 0,
+	/* 0xE8 - 0xEF */
+	0, SrcImm|ImplicitOps, 0, 0, 0, 0, 0, 0,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
 	ImplicitOps, 0,
@@ -447,6 +449,12 @@ struct operand {
 			   (((reg) + _inc) & ((1UL << (ad_bytes << 3)) - 1)); \
 	} while (0)
 
+#define jmp_rel(rel)			\
+do {	\
+	_eip += (int)(rel);		\
+	_eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip);	\
+} while (0)
+
 /*
  * Given the 'reg' portion of a ModRM byte, and a register block, return a
  * pointer into the block that addresses the relevant register.
@@ -1200,6 +1208,10 @@ special_insn:
 	case 0xae ... 0xaf:	/* scas */
 		DPRINTF("Urk! I don't handle SCAS.\n");
 		goto cannot_emulate;
+	case 0xe9: /* jmp rel */
+		jmp_rel(src.val);
+		no_wb = 1; /* Disable writeback. */
+		break;
 	case 0xf4:  /* hlt */
 		ctxt->vcpu->halt_request = 1;
 		goto done;


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Patch] (big) real mode emulation - emulator_write_std

2007-08-10 Thread Nitin A Kamble
Hi Avi,
  I have been collected quiet a few patches in my tree now. They are all
in dirty(style, debug) state. Now I started cleaning some of the code in
my tree, and cutting patches again. I plan to send you steady stream of
patches now. so you can expect lots of patches coming from me in coming
days now.

About the status of the big real mode; In my private tree I have evolved
the segment registers support for the emulator to next level now. I
think I can also cut that patch also and send it to you. now it is much
more complete than earlier. As of today the SuSe Linux 10.1 is
proceeding in the big-real mode into the int 10 call. that is with the
help emulation of about 20 new instructions, and also the infrastructure
support for those instructions.  Probably I should keep a count of
instructions emulated in the big real mode to gauge my progress. 

I am cutting my tree into simple patches, so it will be easy for you to
understand and apply/comment. 

Thanks & Regards,
Nitin 
Open Source Technology Center, Intel Corporation.
-
The mind is like a parachute; it works much better when it's open. 
commit a757404387d3580f1a9dca86b2caf142103c6bdf
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Fri Aug 10 17:30:16 2007 -0700

Implement the function emulator_write_std()

Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index f7ff231..4a213e2 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -962,8 +962,35 @@ static int emulator_write_std(unsigned long addr,
 			  unsigned int bytes,
 			  struct kvm_vcpu *vcpu)
 {
-	pr_unimpl(vcpu, "emulator_write_std: addr %lx n %d\n", addr, bytes);
-	return X86EMUL_UNHANDLEABLE;
+	void *data = (void *) val;
+
+	while (bytes) {
+		gpa_t gpa;
+		unsigned offset = addr & (PAGE_SIZE-1);
+		unsigned tocopy = min(bytes, (unsigned)PAGE_SIZE - offset);
+		unsigned long pfn;
+		struct page *page;
+		void *page_virt;
+
+		gpa = vcpu->mmu.gva_to_gpa(vcpu, addr);
+		if (gpa == UNMAPPED_GVA)
+			return X86EMUL_PROPAGATE_FAULT;
+		pfn = gpa >> PAGE_SHIFT;
+		page = gfn_to_page(vcpu->kvm, pfn);
+		if (!page)
+			return X86EMUL_UNHANDLEABLE;
+		page_virt = kmap_atomic(page, KM_USER0);
+
+		memcpy(page_virt + offset, data, tocopy);
+
+		kunmap_atomic(page_virt, KM_USER0);
+
+		bytes -= tocopy;
+		data += tocopy;
+		addr += tocopy;
+	}
+
+	return X86EMUL_CONTINUE;
 }
 
 static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu,


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel