diff options
author | Laurent Vivier <Laurent.Vivier@bull.net> | 2007-09-18 05:26:38 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:46 -0500 |
commit | a7ddce3afc8326870b9e5e02fa41e028bffb10a5 (patch) | |
tree | 468940bff7a338892d4353fa12d82200504b3c7f /drivers/kvm/x86_emulate.c | |
parent | 7aa81cc04781b5b99a0647ec04533599d78cd219 (diff) |
KVM: x86 emulator: remove unused functions
Remove #ifdef functions never used
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index f12bc2c74040..9ea82f84743e 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -1639,42 +1639,3 @@ cannot_emulate: | |||
1639 | DPRINTF("Cannot emulate %02x\n", b); | 1639 | DPRINTF("Cannot emulate %02x\n", b); |
1640 | return -1; | 1640 | return -1; |
1641 | } | 1641 | } |
1642 | |||
1643 | #ifdef __XEN__ | ||
1644 | |||
1645 | #include <asm/mm.h> | ||
1646 | #include <asm/uaccess.h> | ||
1647 | |||
1648 | int | ||
1649 | x86_emulate_read_std(unsigned long addr, | ||
1650 | unsigned long *val, | ||
1651 | unsigned int bytes, struct x86_emulate_ctxt *ctxt) | ||
1652 | { | ||
1653 | unsigned int rc; | ||
1654 | |||
1655 | *val = 0; | ||
1656 | |||
1657 | if ((rc = copy_from_user((void *)val, (void *)addr, bytes)) != 0) { | ||
1658 | propagate_page_fault(addr + bytes - rc, 0); /* read fault */ | ||
1659 | return X86EMUL_PROPAGATE_FAULT; | ||
1660 | } | ||
1661 | |||
1662 | return X86EMUL_CONTINUE; | ||
1663 | } | ||
1664 | |||
1665 | int | ||
1666 | x86_emulate_write_std(unsigned long addr, | ||
1667 | unsigned long val, | ||
1668 | unsigned int bytes, struct x86_emulate_ctxt *ctxt) | ||
1669 | { | ||
1670 | unsigned int rc; | ||
1671 | |||
1672 | if ((rc = copy_to_user((void *)addr, (void *)&val, bytes)) != 0) { | ||
1673 | propagate_page_fault(addr + bytes - rc, PGERR_write_access); | ||
1674 | return X86EMUL_PROPAGATE_FAULT; | ||
1675 | } | ||
1676 | |||
1677 | return X86EMUL_CONTINUE; | ||
1678 | } | ||
1679 | |||
1680 | #endif | ||