On Fri, 17 Jun 2022 at 15:53, Peter Xu <pet...@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 <pet...@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...@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