[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180116203218.GA6318@Asurada-Nvidia>
Date: Tue, 16 Jan 2018 12:32:19 -0800
From: Nicolin Chen <nicoleotsuka@...il.com>
To: Marc Zyngier <marc.zyngier@....com>
Cc: mark.rutland@....com, catalin.marinas@....com, will.deacon@....com,
oleg@...hat.com, cdall@...aro.org, tbaicar@...eaurora.org,
julien.thierry@....com, Dave.Martin@....com, robin.murphy@....com,
james.morse@....com, ard.biesheuvel@...aro.org,
xiexiuqi@...wei.com, mingo@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v1] arm64: Handle traps from accessing CNTVCT/CNTFRQ
for CONFIG_COMPAT
Hello Marc,
On Thu, Jan 11, 2018 at 08:51:37AM +0000, Marc Zyngier wrote:
> > [ I also added cntfrq here for safety as theoretically it could
> > trigger the trap as well. However, my another test case (with
> > mrc insturction) doesn't seem to trigger a trap. So I would
> > drop it in the next version if someone can confirm it's not
> > required. Thanks -- Nicolin ]
>
> See my previous series on this very subject[1] as well as Will's reply.
Thanks for the background.
> > - for (hook = sys64_hooks; hook->handler; hook++)
> > + for (; hook && hook->handler; hook++)
> > if ((hook->esr_mask & esr) == hook->esr_val) {
> > hook->handler(esr, regs);
> > return;
> >
>
> Also, this code is fairly broken in its handling of conditional
> instructions.
I understand that it should take care of the condition field as
a general instruction handler. Just for curiosity: If we confine
the topic to read access of CNTVCT/CNTFRQ, what'd be the penalty
by ignoring the condition field and executing it anyway?
Thank you
Nicolin
Powered by blists - more mailing lists