[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cpu: Add starts_halted() method
From: |
Peter Maydell |
Subject: |
Re: [PATCH] cpu: Add starts_halted() method |
Date: |
Wed, 8 Jul 2020 16:32:51 +0100 |
On Wed, 8 Jul 2020 at 16:25, Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Wed, Jul 08, 2020 at 02:14:03PM +0100, Peter Maydell wrote:
> > The original bug as described in the commit message sounds
> > to me like something we should look to fix in the implementation
> > of async_run_on_cpu() -- it shouldn't cause a CPU that's halfway
> > through reset to do a KVM_RUN or otherwise run guest code,
> > whether that CPU is going to start powered-up or powered-down.
>
> What "halfway through reset" means, exactly? Isn't halted==1
> enough to indicate the CPU is in that state?
I mean "while we're in the middle of the CPU method that's
called by cpu_reset()". "halted==1" says "the CPU is halted";
that's not the same thing. KVM_RUN happening
as a side effect in the middle of that code is a bug
whether the CPU happens to be intended to be put into the
halted state or not. If the CPU is intended to be created
not-halted then KVM_RUN can happen after cpu reset
completes, but not before.
thanks
-- PMM
- [PATCH] cpu: Add starts_halted() method, Thiago Jung Bauermann, 2020/07/07
- Re: [PATCH] cpu: Add starts_halted() method, Eduardo Habkost, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Thiago Jung Bauermann, 2020/07/07
- Re: [PATCH] cpu: Add starts_halted() method, Philippe Mathieu-Daudé, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, David Gibson, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Peter Maydell, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Eduardo Habkost, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method,
Peter Maydell <=
- Re: [PATCH] cpu: Add starts_halted() method, Eduardo Habkost, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Peter Maydell, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Eduardo Habkost, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Peter Maydell, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Eduardo Habkost, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Thiago Jung Bauermann, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Thiago Jung Bauermann, 2020/07/08
- Re: [PATCH] cpu: Add starts_halted() method, Philippe Mathieu-Daudé, 2020/07/09
- Re: [PATCH] cpu: Add starts_halted() method, Thiago Jung Bauermann, 2020/07/10
- Re: [PATCH] cpu: Add starts_halted() method, Eduardo Habkost, 2020/07/10