qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass


From: Eduardo Habkost
Subject: Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass
Date: Fri, 31 Jul 2020 15:24:04 -0400

On Fri, Jul 31, 2020 at 03:14:02PM -0400, Robert Foley wrote:
> On Fri, 31 Jul 2020 at 13:44, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > >
> > > +static inline void cpu_class_disable_bql_interrupt(CPUClass *cc)
> > > +{
> > > +    cc->bql_interrupt = false;
> > > +}
> >
> > Class data is not supposed to change outside class_init.  Why do
> > you need this function?  I don't see it being used anywhere in
> > this series.
> 
> This function was to be called from changes in a later patch series
> that depend on these changes.  BTW,  I added a correction above,
> it should be disable, not enable.  The idea is that it is initialized to true,
> but then the per arch changes would use this call at init time to set
> it to false
> as needed.

If you plan to call it from class_init, I don't think you need a
wrapper.  You can simply set cc->bql_interrupt=false directly
inside arch-specific class_init functions.

If you plan to call it from somewhere else, then maybe the field
doesn't belong to CPUClass.

> 
> We can remove this function from this series and add it in later when
> it gets used,
> it might make things more clear.

Makes sense to me.

-- 
Eduardo




reply via email to

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