From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: "Alex Bennée" <alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org"
<kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org>,
"christoffer.dall-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<christoffer.dall-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Marc Zyngier <Marc.Zyngier-5wv7dgnIgG8@public.gmane.org>,
"peter.maydell-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<peter.maydell-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"agraf-l3A5Bk7waGM@public.gmane.org"
<agraf-l3A5Bk7waGM@public.gmane.org>,
"drjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<drjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"zhichao.huang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<zhichao.huang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Lorenzo Pieralisi
<Lorenzo.Pieralisi-5wv7dgnIgG8@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>,
Gleb Natapov <gleb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org"
<jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>,
"open list:DOCUMENTATION"
<linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>,
open list
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>"open
list:ABI/API" <linu>
Subject: Re: [PATCH v4 10/12] KVM: arm64: guest debug, HW assisted debug support
Date: Fri, 15 May 2015 16:23:46 +0100 [thread overview]
Message-ID: <20150515152346.GB23652@leverpostej> (raw)
In-Reply-To: <1431700035-23479-11-git-send-email-alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Hi Alex,
On Fri, May 15, 2015 at 03:27:13PM +0100, Alex Bennée wrote:
> This adds support for userspace to control the HW debug registers for
> guest debug. In the debug ioctl we copy the IMPDEF defined number of
> registers into a new register set called host_debug_state. There is now
> a new vcpu parameter called debug_ptr which selects which register set
> is to copied into the real registers when world switch occurs.
>
> I've moved some helper functions into the hw_breakpoint.h header for
> re-use.
>
> As with single step we need to tweak the guest registers to enable the
> exceptions so we need to save and restore those bits.
>
> Two new capabilities have been added to the KVM_EXTENSION ioctl to allow
> userspace to query the number of hardware break and watch points
> available on the host hardware.
There's the unfortunate possibility that these could vary across cores
in a big.LITTLE system (though we haven't seen that thus far). The
kernel sanity checks should currently explode if such a case is
encountered, but I don't know what we'd do were that to happen.
This gets more fun when you consider the context-aware breakpoints are
the highest numbered. So the set of (context-aware) breakpoints might
not intersect across all CPUs.
I'm not sure what the best thing to do is w.r.t. exposing that to
userspace.
Thanks,
Mark.
next prev parent reply other threads:[~2015-05-15 15:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1431700035-23479-1-git-send-email-alex.bennee@linaro.org>
2015-05-15 14:27 ` [PATCH v4 01/12] KVM: add comments for kvm_debug_exit_arch struct Alex Bennée
2015-05-15 14:27 ` [PATCH v4 02/12] KVM: define common KVM_GUESTDBG_USE_SW/HW_BP bits Alex Bennée
2015-05-15 15:42 ` Christian Borntraeger
[not found] ` <555613F2.9060204-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2015-05-15 17:33 ` David Hildenbrand
2015-05-15 17:46 ` Jan Kiszka
2015-05-15 15:58 ` Christian Borntraeger
2015-05-15 14:27 ` [PATCH v4 10/12] KVM: arm64: guest debug, HW assisted debug support Alex Bennée
[not found] ` <1431700035-23479-11-git-send-email-alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-05-15 15:23 ` Mark Rutland [this message]
2015-05-15 16:16 ` Alex Bennée
2015-05-15 17:01 ` Mark Rutland
2015-05-15 17:09 ` Peter Maydell
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=20150515152346.GB23652@leverpostej \
--to=mark.rutland-5wv7dgnigg8@public.gmane.org \
--cc=Lorenzo.Pieralisi-5wv7dgnIgG8@public.gmane.org \
--cc=Marc.Zyngier-5wv7dgnIgG8@public.gmane.org \
--cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
--cc=agraf-l3A5Bk7waGM@public.gmane.org \
--cc=alex.bennee-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=christoffer.dall-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=drjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=gleb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=peter.maydell-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=zhichao.huang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).