[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] KVM: Hook kvm_arch_put_registers() errors to the caller
From: |
Peter Maydell |
Subject: |
Re: [PATCH 5/5] KVM: Hook kvm_arch_put_registers() errors to the caller |
Date: |
Thu, 23 Jun 2022 14:09:43 +0100 |
On Fri, 17 Jun 2022 at 15:53, Peter Xu <peterx@redhat.com> wrote:
>
> Leverage the new mechanism to pass over errors to upper stack for
> kvm_arch_put_registers() when called for the post_init() accel hook.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> accel/kvm/kvm-all.c | 13 ++++++++++---
> accel/kvm/kvm-cpus.h | 2 +-
> softmmu/cpus.c | 5 ++++-
> 3 files changed, 15 insertions(+), 5 deletions(-)
Checking for errors definitely does seem like the right thing to do.
That said:
(1) Why do we want to check for errors only on the call
for post_init synchronize, and not any of the other places
where we call kvm_arch_put_registers()?
(2) I suspect this will uncover some situations where we've
been happening-to-work because we ignore an error, and now
will start to actively fail. But I guess there's not much
we can do about that except say "we'll fix them as we encounter
bug reports about them". (I know of at least one: on the
Mac M1 running Linux, if the host doesn't have this kernel fix:
https://lore.kernel.org/all/YnHz6Cw5ONR2e+KA@google.com/T/
then the first put_registers will fail (mostly harmlessly).
I think that's the post_init sync but it might be the post_reset
one.)
thanks
-- PMM
- [PATCH 0/5] CPU: Detect put cpu register errors for migrations, Peter Xu, 2022/06/17
- [PATCH 1/5] cpus-common: Introduce run_on_cpu_func2 which allows error returns, Peter Xu, 2022/06/17
- [PATCH 3/5] accel: Allow synchronize_post_init() to take an Error**, Peter Xu, 2022/06/17
- [PATCH 4/5] cpu: Allow cpu_synchronize_all_post_init() to take an errp, Peter Xu, 2022/06/17
- [PATCH 5/5] KVM: Hook kvm_arch_put_registers() errors to the caller, Peter Xu, 2022/06/17
- Re: [PATCH 5/5] KVM: Hook kvm_arch_put_registers() errors to the caller,
Peter Maydell <=
- [PATCH 2/5] cpus-common: Add run_on_cpu2(), Peter Xu, 2022/06/17