diff options
author | Dr. David Alan Gilbert | 2020-07-23 18:09:15 +0200 |
---|---|---|
committer | Paolo Bonzini | 2020-10-05 16:41:22 +0200 |
commit | d0a92b353efa2ca3c2847ad38f088b16d1278290 (patch) | |
tree | 4462865ab7152fa62114783cd6702ae30ddcd5f6 /accel/kvm/trace-events | |
parent | kvm: remove kvm specific functions from global includes (diff) | |
download | qemu-d0a92b353efa2ca3c2847ad38f088b16d1278290.tar.gz qemu-d0a92b353efa2ca3c2847ad38f088b16d1278290.tar.xz qemu-d0a92b353efa2ca3c2847ad38f088b16d1278290.zip |
kvm: kvm_init_vcpu take Error pointer
Clean up the error handling in kvm_init_vcpu so we can see what went
wrong more easily.
Make it take an Error ** and fill it out with what failed, including
the cpu id, so you can tell if it only fails at a given ID.
Replace the remaining DPRINTF by a trace.
This turns a:
kvm_init_vcpu failed: Invalid argument
into:
kvm_init_vcpu: kvm_get_vcpu failed (256): Invalid argument
and with the trace you then get to see:
19049@1595520414.310107:kvm_init_vcpu index: 169 id: 212
19050@1595520414.310635:kvm_init_vcpu index: 170 id: 256
qemu-system-x86_64: kvm_init_vcpu: kvm_get_vcpu failed (256): Invalid argument
which makes stuff a lot more obvious.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200723160915.129069-1-dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel/kvm/trace-events')
-rw-r--r-- | accel/kvm/trace-events | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/accel/kvm/trace-events b/accel/kvm/trace-events index a68eb66534..e15ae8980d 100644 --- a/accel/kvm/trace-events +++ b/accel/kvm/trace-events @@ -8,6 +8,7 @@ kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d" kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p" kvm_failed_reg_get(uint64_t id, const char *msg) "Warning: Unable to retrieve ONEREG %" PRIu64 " from KVM: %s" kvm_failed_reg_set(uint64_t id, const char *msg) "Warning: Unable to set ONEREG %" PRIu64 " to KVM: %s" +kvm_init_vcpu(int cpu_index, unsigned long arch_cpu_id) "index: %d id: %lu" kvm_irqchip_commit_routes(void) "" kvm_irqchip_add_msi_route(char *name, int vector, int virq) "dev %s vector %d virq %d" kvm_irqchip_update_msi_route(int virq) "Updating MSI route virq=%d" |