qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]