From 9d0d056848cd909f45c272dc64bfb93b765cb0cb Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 31 Mar 2010 21:11:30 +0300 Subject: [PATCH] kvm: Don't abort guest on KVM_EXIT_IO This is a preparational step for emulating IO. Signed-off-by: Pekka Enberg --- tools/kvm/ioport.c | 10 ++++++++-- tools/kvm/main.c | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/kvm/ioport.c b/tools/kvm/ioport.c index 7725b5fc3aeb..e77a663d724b 100644 --- a/tools/kvm/ioport.c +++ b/tools/kvm/ioport.c @@ -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) diff --git a/tools/kvm/main.c b/tools/kvm/main.c index 59303bfdb5f8..9a6817b96dde 100644 --- a/tools/kvm/main.c +++ b/tools/kvm/main.c @@ -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; -- 2.39.5