]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: Don't abort guest on KVM_EXIT_IO
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 31 Mar 2010 18:11:30 +0000 (21:11 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Wed, 31 Mar 2010 18:13:24 +0000 (21:13 +0300)
This is a preparational step for emulating IO.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
tools/kvm/ioport.c
tools/kvm/main.c

index 7725b5fc3aeb4dce94c9807ab82acca3ed9c423f..e77a663d724b06587be06600b9783ae38c83d26b 100644 (file)
@@ -4,12 +4,18 @@
 
 static void kvm__emulate_io_out(struct kvm *self, uint16_t port, void *data, int size, uint32_t count)
 {
-       fprintf(stderr, "%s port=%x, size=%d, count=%" PRIu32 "\n", __func__, port, size, count);
+       fprintf(stderr, "IO error: OUT port=%x, size=%d, count=%" PRIu32 "\n", port, size, count);
+
+       kvm__show_registers(self);
+       kvm__show_code(self);
 }
 
 static void kvm__emulate_io_in(struct kvm *self, uint16_t port, void *data, int size, uint32_t count)
 {
-       fprintf(stderr, "%s port=%x, size=%d, count=%" PRIu32 "\n", __func__, port, size, count);
+       fprintf(stderr, "IO error: IN port=%x, size=%d, count=%" PRIu32 "\n", port, size, count);
+
+       kvm__show_registers(self);
+       kvm__show_code(self);
 }
 
 void kvm__emulate_io(struct kvm *self, uint16_t port, void *data, int direction, int size, uint32_t count)
index 59303bfdb5f83ca28588d6e73006b3bb494265f3..9a6817b96ddedb8f6dec16c896e857e3ff97eb4b 100644 (file)
@@ -73,7 +73,6 @@ int main(int argc, char *argv[])
                                        kvm->kvm_run->io.direction,
                                        kvm->kvm_run->io.size,
                                        kvm->kvm_run->io.count);
-                       goto exit_kvm;
                        break;
                default:
                        goto exit_kvm;