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

Re: [PATCH v3 for-4.14] x86/monitor: revert default behavior when monitoring register write events



On Wed, Jun 3, 2020 at 7:57 AM Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
>
> On Wed, Jun 03, 2020 at 06:25:31AM -0600, Tamas K Lengyel wrote:
> > On Wed, Jun 3, 2020 at 2:28 AM Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
> > >
> > > On Tue, Jun 02, 2020 at 07:49:09AM -0600, Tamas K Lengyel wrote:
> > > > diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c
> > > > index 8aa14137e2..36894b33a4 100644
> > > > --- a/xen/arch/x86/hvm/monitor.c
> > > > +++ b/xen/arch/x86/hvm/monitor.c
> > > > @@ -53,11 +53,11 @@ bool hvm_monitor_cr(unsigned int index, unsigned 
> > > > long value, unsigned long old)
> > > >              .u.write_ctrlreg.old_value = old
> > > >          };
> > > >
> > > > -        if ( monitor_traps(curr, sync, &req) >= 0 )
> > > > -            return 1;
> > > > +        return monitor_traps(curr, sync, &req) >= 0 &&
> > > > +            curr->domain->arch.monitor.control_register_values;
> > >
> > > Nit (it can be fixed while committing IMO): curr should be aligned to
> > > monitor.
> >
> > This is the established style already in-place, see
> > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/monitor.c;h=8aa14137e25a47d3826843441e244decf81dc855;hb=refs/heads/staging#l76:
> >
> >   76     return curr->domain->arch.monitor.emul_unimplemented_enabled &&
> >   77         monitor_traps(curr, true, &req) == 1;
> >
> > I don't really care either way but at least we should be consistent.
>
> Oh, OK. This is slightly different from the indentation that I tend to
> use, sorry for the request then.

I made the change regardless. Feel free to re-adjust the style or
change the alignment of the above return on commit.

Thanks,
Tamas



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.