All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corneliu ZUZU <czuzu@bitdefender.com>
To: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH 7/7] arch.monitor: move bits to common (arch_domain to domain)
Date: Tue, 9 Feb 2016 09:14:43 +0200	[thread overview]
Message-ID: <56B991E3.4020508@bitdefender.com> (raw)
In-Reply-To: <CABfawh=nYRwXS=+WwiXL52G3VxdgE6O5a2EXsN3BTjFXEjfdCg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2443 bytes --]

On 2/8/2016 8:29 PM, Tamas K Lengyel wrote:
>
>
> On Mon, Feb 8, 2016 at 9:58 AM, Corneliu ZUZU <czuzu@bitdefender.com 
> <mailto:czuzu@bitdefender.com>> 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@bitdefender.com
>     <mailto:czuzu@bitdefender.com>>
>
>
> 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.

[-- Attachment #1.2: Type: text/html, Size: 4170 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2016-02-09  7:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 16:57 [PATCH 0/7] Vm-events: move monitor vm-events code to common code Corneliu ZUZU
2016-02-08 16:57 ` [PATCH 1/7] arm: move arch/arm/hvm.c to arch/arm/hvm/hvm.c Corneliu ZUZU
2016-02-08 17:04   ` Andrew Cooper
2016-02-08 17:12     ` Corneliu ZUZU
2016-02-08 17:14       ` Andrew Cooper
2016-02-09 11:03   ` Stefano Stabellini
2016-02-09 11:28     ` Corneliu ZUZU
2016-02-09 11:55       ` Jan Beulich
2016-02-09 12:22         ` Stefano Stabellini
2016-02-09 12:32         ` Corneliu ZUZU
2016-02-09 17:40           ` Tamas K Lengyel
2016-02-09 19:19             ` Corneliu ZUZU
2016-02-08 16:57 ` [PATCH 2/7] x86: hvm events: merge 2 functions into 1 Corneliu ZUZU
2016-02-08 17:15   ` Andrew Cooper
2016-02-08 17:30     ` Tamas K Lengyel
2016-02-08 17:49     ` Corneliu ZUZU
2016-02-08 18:17       ` Tamas K Lengyel
2016-02-08 18:45         ` Corneliu ZUZU
2016-02-09 11:19   ` Jan Beulich
2016-02-09 11:52     ` Corneliu ZUZU
2016-02-09 12:12       ` Jan Beulich
2016-02-09 12:24         ` Corneliu ZUZU
2016-02-08 16:57 ` [PATCH 3/7] xen/vm-events: Move monitor_domctl to common-side Corneliu ZUZU
2016-02-08 18:15   ` Tamas K Lengyel
2016-02-08 18:43     ` Corneliu ZUZU
2016-02-08 18:50       ` Tamas K Lengyel
2016-02-08 16:57 ` [PATCH 4/7] Rename monitor_x86.c to monitor.c and monitor_arch.h to monitor.h Corneliu ZUZU
2016-02-08 18:18   ` Tamas K Lengyel
2016-02-08 18:55     ` Corneliu ZUZU
2016-02-08 16:58 ` [PATCH 5/7] xen/vm-events: Move hvm_event_* functions to common-side Corneliu ZUZU
2016-02-08 16:58 ` [PATCH 6/7] Rename event_x86.c to event.c and event_arch.h to event.h + minor fixes Corneliu ZUZU
2016-02-08 16:58 ` [PATCH 7/7] arch.monitor: move bits to common (arch_domain to domain) Corneliu ZUZU
2016-02-08 18:29   ` Tamas K Lengyel
2016-02-09  7:14     ` Corneliu ZUZU [this message]
2016-02-08 17:06 ` [PATCH 0/7] Vm-events: move monitor vm-events code to common code Corneliu ZUZU

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=56B991E3.4020508@bitdefender.com \
    --to=czuzu@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.