From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Neuling <mikey@neuling.org>
Cc: mikey@neuling.org, linuxppc-dev@lists.ozlabs.org,
Cameron Kaiser <spectre@floodgap.com>
Subject: Re: [PATCH v2] powerpc: Add force enable of DAWR on P9 option
Date: Fri, 3 May 2019 16:50:02 +1000 (AEST) [thread overview]
Message-ID: <44wN6f6dqYz9sB8@ozlabs.org> (raw)
In-Reply-To: <20190401060312.22670-1-mikey@neuling.org>
On Mon, 2019-04-01 at 06:03:12 UTC, Michael Neuling wrote:
> This adds a flag so that the DAWR can be enabled on P9 via:
> echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous
>
> The DAWR was previously force disabled on POWER9 in:
> 9654153158 powerpc: Disable DAWR in the base POWER9 CPU features
> Also see Documentation/powerpc/DAWR-POWER9.txt
>
> This is a dangerous setting, USE AT YOUR OWN RISK.
>
> Some users may not care about a bad user crashing their box
> (ie. single user/desktop systems) and really want the DAWR. This
> allows them to force enable DAWR.
>
> This flag can also be used to disable DAWR access. Once this is
> cleared, all DAWR access should be cleared immediately and your
> machine once again safe from crashing.
>
> Userspace may get confused by toggling this. If DAWR is force
> enabled/disabled between getting the number of breakpoints (via
> PTRACE_GETHWDBGINFO) and setting the breakpoint, userspace will get an
> inconsistent view of what's available. Similarly for guests.
>
> For the DAWR to be enabled in a KVM guest, the DAWR needs to be force
> enabled in the host AND the guest. For this reason, this won't work on
> POWERVM as it doesn't allow the HCALL to work. Writes of 'Y' to the
> dawr_enable_dangerous file will fail if the hypervisor doesn't support
> writing the DAWR.
>
> To double check the DAWR is working, run this kernel selftest:
> tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
> Any errors/failures/skips mean something is wrong.
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
Applied to powerpc topic/ppc-kvm, thanks.
https://git.kernel.org/powerpc/c/c1fe190c06723322f2dfac31d3b982c5
cheers
next prev parent reply other threads:[~2019-05-03 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 6:03 [PATCH v2] powerpc: Add force enable of DAWR on P9 option Michael Neuling
2019-05-03 6:50 ` Michael Ellerman [this message]
2019-06-10 17:31 ` Cédric Le Goater
2019-06-11 6:44 ` Michael Neuling
2019-06-11 6:48 ` Cédric Le Goater
2019-06-11 7:24 ` Michael Neuling
2019-06-11 7:51 ` Christophe Leroy
2019-06-11 9:37 ` Michael Neuling
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=44wN6f6dqYz9sB8@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=spectre@floodgap.com \
/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).