linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/9] arm64: KVM: debug infrastructure support
Date: Wed, 07 May 2014 16:57:36 +0100	[thread overview]
Message-ID: <536A57F0.7050806@arm.com> (raw)
In-Reply-To: <CAFEAcA8XwVLevHhAZXPijoSk3Dw=BaoUT+qUNj3QkQZm2n5EPA@mail.gmail.com>

On 07/05/14 16:42, Peter Maydell wrote:
> On 7 May 2014 16:20, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> This patch series adds debug support, a key feature missing from the
>> KVM/arm64 port.
>>
>> The main idea is to keep track of whether the debug registers are
>> "dirty" (changed by the guest) or not. In this case, perform the usual
>> save/restore dance, for one run only. It means we only have a penalty
>> if a guest is actually using the debug registers.
>>
>> The huge amount of registers is properly frightening, but CPUs
>> actually only implement a subset of them. Also, there is a number of
>> registers we don't bother emulating (things having to do with external
>> debug and OSlock).
> 
> Presumably these registers now appear in the userspace
> interface too, yes? Did you check that they all cope with
> the "migration reads all register values on the source and then
> writes them on the destination in arbitrary order" semantics without
> further fiddling? (I have a note that says that at least
> OSLAR_EL1/OSLSR_EL1 won't work that way, for instance.)

The only registers that are exported to userspace are MDSCR_EL1,
DBG{BW}{CV}Rn_EL1 and MDCCINT_EL1 (and their 32bit counterparts). They
should be fine being saved/restored in any order, as long as you're not
running the vcpu in between.

The OSL*_EL1 registers are just ignored so far. So far, it is unclear
how they would be supported in a guest, and I don't have any test
environment for them. Should the need arise, support can be added on top
of what we have now.

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

  reply	other threads:[~2014-05-07 15:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 15:20 [PATCH 0/9] arm64: KVM: debug infrastructure support Marc Zyngier
2014-05-07 15:20 ` [PATCH 1/9] arm64: KVM: rename pm_fake handler to trap_wi_raz Marc Zyngier
2014-05-07 15:34   ` Peter Maydell
2014-05-07 15:42     ` Marc Zyngier
2014-05-19  8:43   ` Anup Patel
2014-05-07 15:20 ` [PATCH 2/9] arm64: move DBG_MDSCR_* to asm/debug-monitors.h Marc Zyngier
2014-05-07 17:14   ` Will Deacon
2014-05-07 15:20 ` [PATCH 3/9] arm64: KVM: add trap handlers for AArch64 debug registers Marc Zyngier
2014-05-19  8:27   ` Anup Patel
2014-05-07 15:20 ` [PATCH 4/9] arm64: KVM: common infrastructure for handling AArch32 CP14/CP15 Marc Zyngier
2014-05-19  8:29   ` Anup Patel
2014-05-07 15:20 ` [PATCH 5/9] arm64: KVM: use separate tables for AArch32 32 and 64bit traps Marc Zyngier
2014-05-19  8:29   ` Anup Patel
2014-05-07 15:20 ` [PATCH 6/9] arm64: KVM: check ordering of all system register tables Marc Zyngier
2014-05-19  8:31   ` Anup Patel
2014-05-07 15:20 ` [PATCH 7/9] arm64: KVM: add trap handlers for AArch32 debug registers Marc Zyngier
2014-05-19  8:33   ` Anup Patel
2014-05-07 15:20 ` [PATCH 8/9] arm64: KVM: implement lazy world switch for " Marc Zyngier
2014-05-19  8:38   ` Anup Patel
2014-05-19 16:01     ` Marc Zyngier
2014-05-07 15:20 ` [PATCH 9/9] arm64: KVM: enable trapping of all " Marc Zyngier
2014-05-19  8:40   ` Anup Patel
2014-05-07 15:42 ` [PATCH 0/9] arm64: KVM: debug infrastructure support Peter Maydell
2014-05-07 15:57   ` Marc Zyngier [this message]
2014-05-19  9:05 ` Anup Patel
2014-05-19  9:28   ` Marc Zyngier
2014-05-19  9:35     ` Anup Patel
2014-05-19 12:22       ` Marc Zyngier
2014-05-19 12:32     ` Peter Maydell
2014-05-19 12:59       ` Marc Zyngier

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=536A57F0.7050806@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).