[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] cpu: Do not reset a vCPU before it is created
From: |
Peter Maydell |
Subject: |
Re: [PATCH 1/2] cpu: Do not reset a vCPU before it is created |
Date: |
Mon, 9 Mar 2020 13:09:06 +0000 |
On Mon, 9 Mar 2020 at 12:11, Philippe Mathieu-Daudé <address@hidden> wrote:
>
> cpu_reset() might modify architecture-specific fields allocated
> by qemu_init_vcpu(). To avoid bugs similar to the one fixed in
> commit 00d0f7cb66 when introducing new architectures, move the
> cpu_reset() calls after qemu_init_vcpu().
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Why do we need to call cpu_reset() from realize anyway?
Generally for devices this is incorrect as they should be
being reset by some other mechanism.
Obviously actually determining that dropping the cpu_reset()
call is safe would require some tedious auditing.
If we do do a cpu_reset() in realize, should it be after
the call to the parent realize function ?
thanks
-- PMM
[PATCH 2/2] cpu: Assert a vCPU is created before resetting it, Philippe Mathieu-Daudé, 2020/03/09