Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e778161fb4612d2ceac9604f10e1061f5f4cf48
Commit:     7e778161fb4612d2ceac9604f10e1061f5f4cf48
Parent:     c53ce170a9e8531f293e402c7d8c65e38452a551
Author:     Nitin A Kamble <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 19 11:07:06 2007 +0300
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Sat Oct 13 10:18:24 2007 +0200

    KVM: x86 emulator: implement 'push reg' (opcodes 0x50-0x57)
    
    Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/x86_emulate.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 1036e02..cf895aa 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,
@@ -1151,6 +1152,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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to