[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] migration: pre_save return int
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] migration: pre_save return int |
Date: |
Wed, 20 Sep 2017 15:57:46 +0200 |
On Tue, 19 Sep 2017 19:00:34 +0100
"Dr. David Alan Gilbert (git)" <address@hidden> wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> Modify the pre_save method on VMStateDescription to return an int
> rather than void so that it potentially can fail.
>
> Changed zillions of devices to make them return 0; the only
> case I've made it return non-0 is hw/intc/s390_flic_kvm.c that already
> had an error_report/return case.
Never thought that this device would be at the bleeding edge ;)
>
> Note: If you add an error exit in your pre_save you must emit
> an error_report to say why.
Would it make sense to relay an error object? For example,
cpu_pre_save() in target/s390x/machine.c calls
kvm_s390_vcpu_interrupt_pre_save() which already does an error report.
If we relay that error instead, we would avoid saying "oops, this
didn't work" several times with decreasing amount of information.
On the other hand, that change would be more invasive.
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> ---
> hw/intc/s390_flic_kvm.c | 6 ++++--
> hw/s390x/css.c | 10 +++++++---
> hw/s390x/virtio-ccw.c | 4 +++-
> target/s390x/machine.c | 4 +++-
That said, the changes in s390-related code look fine.
- [Qemu-devel] [PATCH 0/5] migration: let pre_save fail, Dr. David Alan Gilbert (git), 2017/09/19
- [Qemu-devel] [PATCH 2/5] migration: check pre_save return in vmstate_save_state, Dr. David Alan Gilbert (git), 2017/09/19
- [Qemu-devel] [PATCH 1/5] migration: pre_save return int, Dr. David Alan Gilbert (git), 2017/09/19
- Re: [Qemu-devel] [PATCH 1/5] migration: pre_save return int,
Cornelia Huck <=
- [Qemu-devel] [PATCH 3/5] migration: wire vmstate_save_state errors up to vmstate_subsection_save, Dr. David Alan Gilbert (git), 2017/09/19
- [Qemu-devel] [PATCH 4/5] migration: Route errors up through vmstate_save, Dr. David Alan Gilbert (git), 2017/09/19
- [Qemu-devel] [PATCH 5/5] migration: Route more error paths, Dr. David Alan Gilbert (git), 2017/09/19