[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of
From: |
Cornelia Huck |
Subject: |
Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM |
Date: |
Thu, 22 Oct 2020 17:49:24 +0200 |
On Thu, 22 Oct 2020 21:12:58 +0530
Kirti Wankhede <kwankhede@nvidia.com> wrote:
> On 10/22/2020 1:21 PM, Cornelia Huck wrote:
> > I'm a bit worried though that all that reasoning which flags are set or
> > cleared when is quite complex, and it's easy to make mistakes.
> >
> > Can we model this as a FSM, where an event (running state changes)
> > transitions the device state from one state to another? I (personally)
> > find FSMs easier to comprehend, but I'm not sure whether that change
> > would be too invasive. If others can parse the state changes with that
> > mask/value interface, I won't object to it.
> >
>
> I agree FSM will be easy and for long term may be easy to maintain. But
> at this moment it will be intrusive change. For now we can go ahead with
> this code and later we can change to FSM model, if all agrees on it.
Yes, we can certainly revisit this later.