linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: minyard@acm.org
Cc: Will Deacon <will@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Corey Minyard <cminyard@mvista.com>,
	linux-kernel@vger.kernel.org, Corey Minyard <tcminyard@gmail.com>
Subject: Re: [PATCH v2] arm64:kgdb: Fix kernel single-stepping
Date: Thu, 20 Feb 2020 15:06:00 +0000	[thread overview]
Message-ID: <375815af3c711b94dd2ee56326c2dd3b@kernel.org> (raw)
In-Reply-To: <20200220145048.GH3704@minyard.net>

On 2020-02-20 14:50, Corey Minyard wrote:
> On Thu, Feb 20, 2020 at 02:21:36PM +0000, Marc Zyngier wrote:
>> On 2020-02-19 15:24, minyard@acm.org wrote:
>> > From: Corey Minyard <cminyard@mvista.com>
>> 
>> [...]
>> 
>> > After studying the EL0 handling for this, I realized an issue with using
>> > MDSCR to check if single step is enabled: it can be expensive on a VM.
>> > So check the task flag first to see if single step is enabled.  Then
>> > check MDSCR if the task flag is set.
>> 
>> Very tangential remark: I'd really like people *not* to try and 
>> optimize
>> Linux based on the behaviour of a hypervisor. In general, reading a
>> system register is fast, and the fact that it traps on a given 
>> hypervisor
>> at some point may not be true in the future, nor be a valid assumption
>> across hypervisors.
> 
> Normally I would agree, but I based this upon git commit
> https://github.com/torvalds/linux/commit/2a2830703a2371b47f7b50b1d35cb15dc0e2b717
> which seemed to say that it was a significant enough factor to do in 
> the
> EL0 case.

And that's a blast from a distant past. Hypervisors have changed 
drastically
over these 6 years, and I'm still sitting on a bunch of patches that 
*could*
change the way MDSCR_EL1 is handled.

         M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2020-02-20 15:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 15:24 [PATCH v2] arm64:kgdb: Fix kernel single-stepping minyard
2020-02-20 14:06 ` Daniel Thompson
2020-02-20 14:52   ` Corey Minyard
2020-02-20 14:21 ` Marc Zyngier
2020-02-20 14:50   ` Corey Minyard
2020-02-20 15:06     ` Marc Zyngier [this message]
2020-02-20 14:22 ` Will Deacon
2020-02-20 16:30   ` Corey Minyard
2020-02-20 21:30     ` Corey Minyard
2020-02-24 18:07       ` James Morse
2020-02-25 15:38         ` Corey Minyard
2020-02-25 17:55           ` James Morse
2020-02-26  2:58             ` Corey Minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=375815af3c711b94dd2ee56326c2dd3b@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=cminyard@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=tcminyard@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).