aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2011-05-01 13:27:55 -0400
committerAvi Kivity <avi@redhat.com>2011-05-22 08:48:03 -0400
commit3b9be3bf2e4d45828f84ba615283a53d11ebf470 (patch)
tree77b93cc9e08f5a9e57dd4be8664af8c15a9ca729 /arch/x86/kvm
parentadddcecf9222aa32938480cc1d03de629fab2a86 (diff)
KVM: x86 emulator: Remove unused arg from emulate_pop()
The opt of emulate_grp1a() is also removed. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/emulate.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index d4f4375c0480..569e57dd1d55 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1402,7 +1402,6 @@ static int em_push(struct x86_emulate_ctxt *ctxt)
1402} 1402}
1403 1403
1404static int emulate_pop(struct x86_emulate_ctxt *ctxt, 1404static int emulate_pop(struct x86_emulate_ctxt *ctxt,
1405 struct x86_emulate_ops *ops,
1406 void *dest, int len) 1405 void *dest, int len)
1407{ 1406{
1408 struct decode_cache *c = &ctxt->decode; 1407 struct decode_cache *c = &ctxt->decode;
@@ -1423,7 +1422,7 @@ static int em_pop(struct x86_emulate_ctxt *ctxt)
1423{ 1422{
1424 struct decode_cache *c = &ctxt->decode; 1423 struct decode_cache *c = &ctxt->decode;
1425 1424
1426 return emulate_pop(ctxt, ctxt->ops, &c->dst.val, c->op_bytes); 1425 return emulate_pop(ctxt, &c->dst.val, c->op_bytes);
1427} 1426}
1428 1427
1429static int emulate_popf(struct x86_emulate_ctxt *ctxt, 1428static int emulate_popf(struct x86_emulate_ctxt *ctxt,
@@ -1435,7 +1434,7 @@ static int emulate_popf(struct x86_emulate_ctxt *ctxt,
1435 int iopl = (ctxt->eflags & X86_EFLAGS_IOPL) >> IOPL_SHIFT; 1434 int iopl = (ctxt->eflags & X86_EFLAGS_IOPL) >> IOPL_SHIFT;
1436 int cpl = ops->cpl(ctxt); 1435 int cpl = ops->cpl(ctxt);
1437 1436
1438 rc = emulate_pop(ctxt, ops, &val, len); 1437 rc = emulate_pop(ctxt, &val, len);
1439 if (rc != X86EMUL_CONTINUE) 1438 if (rc != X86EMUL_CONTINUE)
1440 return rc; 1439 return rc;
1441 1440
@@ -1494,7 +1493,7 @@ static int emulate_pop_sreg(struct x86_emulate_ctxt *ctxt,
1494 unsigned long selector; 1493 unsigned long selector;
1495 int rc; 1494 int rc;
1496 1495
1497 rc = emulate_pop(ctxt, ops, &selector, c->op_bytes); 1496 rc = emulate_pop(ctxt, &selector, c->op_bytes);
1498 if (rc != X86EMUL_CONTINUE) 1497 if (rc != X86EMUL_CONTINUE)
1499 return rc; 1498 return rc;
1500 1499
@@ -1544,7 +1543,7 @@ static int em_popa(struct x86_emulate_ctxt *ctxt)
1544 --reg; 1543 --reg;
1545 } 1544 }
1546 1545
1547 rc = emulate_pop(ctxt, ctxt->ops, &c->regs[reg], c->op_bytes); 1546 rc = emulate_pop(ctxt, &c->regs[reg], c->op_bytes);
1548 if (rc != X86EMUL_CONTINUE) 1547 if (rc != X86EMUL_CONTINUE)
1549 break; 1548 break;
1550 --reg; 1549 --reg;
@@ -1633,7 +1632,7 @@ static int emulate_iret_real(struct x86_emulate_ctxt *ctxt,
1633 1632
1634 /* TODO: Add stack limit check */ 1633 /* TODO: Add stack limit check */
1635 1634
1636 rc = emulate_pop(ctxt, ops, &temp_eip, c->op_bytes); 1635 rc = emulate_pop(ctxt, &temp_eip, c->op_bytes);
1637 1636
1638 if (rc != X86EMUL_CONTINUE) 1637 if (rc != X86EMUL_CONTINUE)
1639 return rc; 1638 return rc;
@@ -1641,12 +1640,12 @@ static int emulate_iret_real(struct x86_emulate_ctxt *ctxt,
1641 if (temp_eip & ~0xffff) 1640 if (temp_eip & ~0xffff)
1642 return emulate_gp(ctxt, 0); 1641 return emulate_gp(ctxt, 0);
1643 1642
1644 rc = emulate_pop(ctxt, ops, &cs, c->op_bytes); 1643 rc = emulate_pop(ctxt, &cs, c->op_bytes);
1645 1644
1646 if (rc != X86EMUL_CONTINUE) 1645 if (rc != X86EMUL_CONTINUE)
1647 return rc; 1646 return rc;
1648 1647
1649 rc = emulate_pop(ctxt, ops, &temp_eflags, c->op_bytes); 1648 rc = emulate_pop(ctxt, &temp_eflags, c->op_bytes);
1650 1649
1651 if (rc != X86EMUL_CONTINUE) 1650 if (rc != X86EMUL_CONTINUE)
1652 return rc; 1651 return rc;
@@ -1688,12 +1687,11 @@ static inline int emulate_iret(struct x86_emulate_ctxt *ctxt,
1688 } 1687 }
1689} 1688}
1690 1689
1691static inline int emulate_grp1a(struct x86_emulate_ctxt *ctxt, 1690static inline int emulate_grp1a(struct x86_emulate_ctxt *ctxt)
1692 struct x86_emulate_ops *ops)
1693{ 1691{
1694 struct decode_cache *c = &ctxt->decode; 1692 struct decode_cache *c = &ctxt->decode;
1695 1693
1696 return emulate_pop(ctxt, ops, &c->dst.val, c->dst.bytes); 1694 return emulate_pop(ctxt, &c->dst.val, c->dst.bytes);
1697} 1695}
1698 1696
1699static inline void emulate_grp2(struct x86_emulate_ctxt *ctxt) 1697static inline void emulate_grp2(struct x86_emulate_ctxt *ctxt)
@@ -1822,12 +1820,12 @@ static int emulate_ret_far(struct x86_emulate_ctxt *ctxt,
1822 int rc; 1820 int rc;
1823 unsigned long cs; 1821 unsigned long cs;
1824 1822
1825 rc = emulate_pop(ctxt, ops, &c->eip, c->op_bytes); 1823 rc = emulate_pop(ctxt, &c->eip, c->op_bytes);
1826 if (rc != X86EMUL_CONTINUE) 1824 if (rc != X86EMUL_CONTINUE)
1827 return rc; 1825 return rc;
1828 if (c->op_bytes == 4) 1826 if (c->op_bytes == 4)
1829 c->eip = (u32)c->eip; 1827 c->eip = (u32)c->eip;
1830 rc = emulate_pop(ctxt, ops, &cs, c->op_bytes); 1828 rc = emulate_pop(ctxt, &cs, c->op_bytes);
1831 if (rc != X86EMUL_CONTINUE) 1829 if (rc != X86EMUL_CONTINUE)
1832 return rc; 1830 return rc;
1833 rc = load_segment_descriptor(ctxt, ops, (u16)cs, VCPU_SREG_CS); 1831 rc = load_segment_descriptor(ctxt, ops, (u16)cs, VCPU_SREG_CS);
@@ -2543,7 +2541,7 @@ static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt)
2543 c->dst.type = OP_REG; 2541 c->dst.type = OP_REG;
2544 c->dst.addr.reg = &c->eip; 2542 c->dst.addr.reg = &c->eip;
2545 c->dst.bytes = c->op_bytes; 2543 c->dst.bytes = c->op_bytes;
2546 rc = emulate_pop(ctxt, ctxt->ops, &c->dst.val, c->op_bytes); 2544 rc = emulate_pop(ctxt, &c->dst.val, c->op_bytes);
2547 if (rc != X86EMUL_CONTINUE) 2545 if (rc != X86EMUL_CONTINUE)
2548 return rc; 2546 return rc;
2549 register_address_increment(c, &c->regs[VCPU_REGS_RSP], c->src.val); 2547 register_address_increment(c, &c->regs[VCPU_REGS_RSP], c->src.val);
@@ -3918,7 +3916,7 @@ special_insn:
3918 break; 3916 break;
3919 } 3917 }
3920 case 0x8f: /* pop (sole member of Grp1a) */ 3918 case 0x8f: /* pop (sole member of Grp1a) */
3921 rc = emulate_grp1a(ctxt, ops); 3919 rc = emulate_grp1a(ctxt);
3922 break; 3920 break;
3923 case 0x90 ... 0x97: /* nop / xchg reg, rax */ 3921 case 0x90 ... 0x97: /* nop / xchg reg, rax */
3924 if (c->dst.addr.reg == &c->regs[VCPU_REGS_RAX]) 3922 if (c->dst.addr.reg == &c->regs[VCPU_REGS_RAX])