[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 7/7] arch.monitor: move bits to common (arch_domain to domain)


  • To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
  • Date: Tue, 9 Feb 2016 09:14:43 +0200
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Tue, 09 Feb 2016 07:14:59 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=Ydz1Liyg1jLEWgk4hO8JIWHOkt0UMiMUSWhAaKLFGmBlHtaadGyiQ8BOTkwsuAYpmkMcNcb/WL+SLbO83vKjqH3QK14If3p4/ijlKQZrIoe+ntVb3P6vO1INS/ghKOb1arwzdSMUAu3Hs3x/Azk3o0TkLU+9uZjpWwVzAZvNV45XblXDPnH/bCxrMtEKEJ8Iv+bn4xfzu14Eri+3oU7BVVsMtBsqN1M7DatUJR9w8pSbio0GMyOcq864hEWfHv+eNgTgtfo8U0J3087pnFbbvnhSYj3/aAJkNNQObAb3EzI9JW0NjoKxroaV95AvOjZvcR1M82I363ZOkkGWhCKdkQ==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 2/8/2016 8:29 PM, Tamas K Lengyel wrote:


On Mon, Feb 8, 2016 at 9:58 AM, Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> wrote:
This patch moves bitfield members for single-step, software-breakpoint and
guest-request monitor vm-events from the arch-side (struct arch_domain) to
the common-side (struct domain). Ctrl-reg bits (i.e. write_ctrlreg_* members)
are left on the arch-side, because control-registers number can vary across
architectures.

Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>

Technically this looks fine, but I do wonder if and what plans you have to actually implement these events for ARM.

Currently I've only planned implementations for control-register write events & guest-requests.
The other two also seem feasible though, I might give adding those a shot sometime after sending the other patches.

I haven't spent too much time looking into it, but I'm not aware of equivalent features on ARM to Intel MTF (singlestepping) or to software-breakpoint trapping. The only instruction I know that functionally comes close to software-breakpoint trapping (INT3) is the SMC instruction which can be trapped into the VMM, but I would not call that a "breakpoint" in the traditional sense.

Tamas


There's the debugging architecture, hypervisor control of that is possible on both 32-bit & 64-bit ARM.
It isn't as easy as for X86 though, where MTF is a hypervisor-internal feature and INT3 can be
trapped specifically, whereas on ARM granularity of trap-setting is less of a concern apparently.
For this reason, the only issue I see here is the performance penalty these traps would cause for
arbitrary software breakpoints (for obvious reasons that doesn't matter in the case of single-stepping).

For INT3, the ARM equivalent is be the BKPT/BRK (set HDCR.TDE on AArch32/MDCR_EL2.TDE AArch64) instruction.
Trapping on this instruction implies trapping on
- AArch32: some other debug exceptions (looking @ B1.8.9, ARMv7 DDI 0406C.b)
- AArch64: *all software debug exceptions* + *all debug register accesses* (this might cause some headaches)
For MTF-like functionality, the debug architecture also provides ways for single-stepping.
That would similarly generate software breakpoint exceptions which can be routed to the hypervisor.

Corneliu.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.