Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68441
b: refs/heads/master
c: 0967b7b
h: refs/heads/master
i:
  68439: fb971fb
v: v3
  • Loading branch information
Avi Kivity committed Oct 13, 2007
1 parent 3470743 commit b8b5509
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 535eabcf0e55804b53d27fe45217d874b19bcfa9
refs/heads/master: 0967b7bf1c22b55777aba46ff616547feed0b141
7 changes: 5 additions & 2 deletions trunk/drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1815,8 +1815,6 @@ static int complete_pio(struct kvm_vcpu *vcpu)
io->count -= io->cur_count;
io->cur_count = 0;

if (!io->count)
kvm_x86_ops->skip_emulated_instruction(vcpu);
return 0;
}

Expand Down Expand Up @@ -1876,6 +1874,8 @@ int kvm_emulate_pio (struct kvm_vcpu *vcpu, struct kvm_run *run, int in,
memcpy(vcpu->pio_data, &vcpu->regs[VCPU_REGS_RAX], 4);
kvm_x86_ops->decache_regs(vcpu);

kvm_x86_ops->skip_emulated_instruction(vcpu);

pio_dev = vcpu_find_pio_dev(vcpu, port);
if (pio_dev) {
kernel_pio(pio_dev, vcpu, vcpu->pio_data);
Expand Down Expand Up @@ -1938,6 +1938,9 @@ int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, struct kvm_run *run, int in,
vcpu->run->io.count = now;
vcpu->pio.cur_count = now;

if (vcpu->pio.cur_count == vcpu->pio.count)
kvm_x86_ops->skip_emulated_instruction(vcpu);

for (i = 0; i < nr_pages; ++i) {
mutex_lock(&vcpu->kvm->lock);
page = gva_to_page(vcpu, address + i * PAGE_SIZE);
Expand Down

0 comments on commit b8b5509

Please sign in to comment.