aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86_emulate.c
diff options
context:
space:
mode:
authorLaurent Vivier <Laurent.Vivier@bull.net>2007-08-05 03:43:32 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:23 -0400
commit3090dd7377c7eb5cbe229e2a538f9dc7e5b06814 (patch)
tree7f93e361f5bcea61b9b10f607fb69e4d9b124478 /drivers/kvm/x86_emulate.c
parente70669abd4e60dfea3ac1639848e20e2b8dd1255 (diff)
KVM: Clean up kvm_setup_pio()
Split kvm_setup_pio() into two functions, one to setup in/out pio (kvm_emulate_pio()) and one to setup ins/outs pio (kvm_emulate_pio_string()). 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index d553719fc4cb..b4f439cfc66e 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1123,12 +1123,11 @@ special_insn:
1123 switch(b) { 1123 switch(b) {
1124 case 0x6c: /* insb */ 1124 case 0x6c: /* insb */
1125 case 0x6d: /* insw/insd */ 1125 case 0x6d: /* insw/insd */
1126 if (kvm_setup_pio(ctxt->vcpu, NULL, 1126 if (kvm_emulate_pio_string(ctxt->vcpu, NULL,
1127 1, /* in */ 1127 1, /* in */
1128 (d & ByteOp) ? 1 : op_bytes, /* size */ 1128 (d & ByteOp) ? 1 : op_bytes, /* size */
1129 rep_prefix ? 1129 rep_prefix ?
1130 address_mask(_regs[VCPU_REGS_RCX]) : 1, /* count */ 1130 address_mask(_regs[VCPU_REGS_RCX]) : 1, /* count */
1131 1, /* strings */
1132 (_eflags & EFLG_DF), /* down */ 1131 (_eflags & EFLG_DF), /* down */
1133 register_address(ctxt->es_base, 1132 register_address(ctxt->es_base,
1134 _regs[VCPU_REGS_RDI]), /* address */ 1133 _regs[VCPU_REGS_RDI]), /* address */
@@ -1139,12 +1138,11 @@ special_insn:
1139 return 0; 1138 return 0;
1140 case 0x6e: /* outsb */ 1139 case 0x6e: /* outsb */
1141 case 0x6f: /* outsw/outsd */ 1140 case 0x6f: /* outsw/outsd */
1142 if (kvm_setup_pio(ctxt->vcpu, NULL, 1141 if (kvm_emulate_pio_string(ctxt->vcpu, NULL,
1143 0, /* in */ 1142 0, /* in */
1144 (d & ByteOp) ? 1 : op_bytes, /* size */ 1143 (d & ByteOp) ? 1 : op_bytes, /* size */
1145 rep_prefix ? 1144 rep_prefix ?
1146 address_mask(_regs[VCPU_REGS_RCX]) : 1, /* count */ 1145 address_mask(_regs[VCPU_REGS_RCX]) : 1, /* count */
1147 1, /* strings */
1148 (_eflags & EFLG_DF), /* down */ 1146 (_eflags & EFLG_DF), /* down */
1149 register_address(override_base ? 1147 register_address(override_base ?
1150 *override_base : ctxt->ds_base, 1148 *override_base : ctxt->ds_base,