xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v4 4/8] monitor: ARM SMC events
Date: Tue, 5 Jul 2016 10:58:56 +0100	[thread overview]
Message-ID: <577B84E0.1040700@arm.com> (raw)
In-Reply-To: <CABfawh=cXDxNtY4fA+uUraU=nncW800V+P5V=4WY-Dsy8rigfQ@mail.gmail.com>

Hello Tamas,

On 04/07/16 22:05, Tamas K Lengyel wrote:
> On Mon, Jul 4, 2016 at 2:02 PM, Julien Grall <julien.grall@arm.com> wrote:
>>
>>
>> On 04/07/2016 20:13, Tamas K Lengyel wrote:
>>>>
>>>> On ARMv8, ESR_EL2.ISS has a different encoding depending on the state
>>>> (i.e
>>>> AArch64 or AArch32). See D7-1861 in ARM DDI 0487A.i. Furthermore, in
>>>> AArch32
>>>> state, the ARMv8 specs permits to trap conditional SMC instructions that
>>>> fail their condition check (see D7-1897 in ARM DDI 0406C.c).

[...]

>>> I'm unable to find the reference you mention about conditional SMCs
>>> generating Hyp traps even if they fail their condition checks on
>>> certain implementations. The only references I find in ARMv8 manual
>>> states explicitly that "The trap that HCR_EL2.TSC enables traps the
>>> attempted execution of a conditional SMC instruction only if the
>>> instruction passes its condition code check" (D1.15) and "The
>>> architecture requires that a Hyp trap on a conditional SMC instruction
>>> generates an exception only if the instruction passes its condition
>>> code check, see Trapping use of the SMC instruction on page G1-3510"
>>> (G1.16).
>>
>>
>> If you look at description of HCR_EL2.TSC at D7-1973 in DDI 0487A.j;
>> "In AArch32 state, the ARMv8-A architecture permits, but does not require,
>> this trap to apply to conditional SMC instructions that fail their condition
>> code check, in the same way as with traps on
>> other conditional instructions."
>>
>> AFAICT the change was already present in the ARM ARM beginning of 2015. So I
>> suspect you are using an old version of the spec. In general, I would
>> recommend you to use the most recent spec for your development.
>>
>> For future question related to the spec, please mention the version of the
>> spec you quote. It makes easier to find out what is going on.
>
> Ah yes, indeed, I was looking at an older version. From the manual
> though it is not clear to me how we can differentiate SMCs that had
> their condition check fail from the others once its trapped to the
> VMM..

It would be very similar to how Xen is checking if a conditional 
instruction fails its condition check (see check_conditional_instr).

> Are you still planning to implement that filter?

It is in my todo list, however at the moment it towards the end. Feel 
free to send  patch yourself.

Regards,

-- 
Julien Grall

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

  reply	other threads:[~2016-07-05  9:59 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29 22:37 [PATCH v4 1/8] monitor: Rename vm_event_monitor_get_capabilities Tamas K Lengyel
2016-05-29 22:37 ` [PATCH v4 2/8] monitor: Rename vm_event_monitor_guest_request Tamas K Lengyel
2016-05-30  7:05   ` Razvan Cojocaru
2016-05-30 13:51   ` Jan Beulich
2016-05-29 22:37 ` [PATCH v4 3/8] monitor: Rename hvm/event to hvm/monitor Tamas K Lengyel
2016-05-30  7:08   ` Razvan Cojocaru
2016-05-30 13:53   ` Jan Beulich
2016-05-29 22:37 ` [PATCH v4 4/8] monitor: ARM SMC events Tamas K Lengyel
2016-06-01 11:37   ` Julien Grall
     [not found]     ` <CABfawhmO9tUG3-OcorfwqdOgZTkjoUk+u=dHySGonBDvobqyKw@mail.gmail.com>
     [not found]       ` <CABfawhmK2GAmQqZMhrgjYzeUZ_XaoyRUPuJxyPK5LJEHwsp5SA@mail.gmail.com>
     [not found]         ` <CABfawh=J1fwinTYKGvJNrFPOsGLSXz6U3GE8fxPz3-KsXSWfbQ@mail.gmail.com>
     [not found]           ` <CABfawhn7zvE=hn0hq1ryH+sW-jdkAXgZM1C2KxwZVUE8pbp8cQ@mail.gmail.com>
2016-06-01 15:41             ` Tamas K Lengyel
2016-06-02 14:23               ` Julien Grall
2016-06-02 22:31                 ` Tamas K Lengyel
2016-07-04 19:13                 ` Tamas K Lengyel
2016-07-04 20:02                   ` Julien Grall
2016-07-04 21:05                     ` Tamas K Lengyel
2016-07-05  9:58                       ` Julien Grall [this message]
2016-05-29 22:37 ` [PATCH v4 5/8] arm/vm_event: get/set registers Tamas K Lengyel
2016-05-30  7:09   ` Razvan Cojocaru
2016-05-30 11:50   ` Jan Beulich
2016-05-30 19:47     ` Tamas K Lengyel
2016-05-30 20:20       ` Julien Grall
2016-05-30 20:37         ` Tamas K Lengyel
2016-05-30 20:46           ` Razvan Cojocaru
2016-05-30 20:53             ` Tamas K Lengyel
2016-05-30 21:35           ` Julien Grall
2016-05-30 21:41             ` Tamas K Lengyel
2016-05-31  7:54           ` Jan Beulich
2016-05-31  8:06             ` Razvan Cojocaru
2016-05-31  8:30               ` Jan Beulich
2016-05-31 16:20             ` Tamas K Lengyel
2016-05-31  7:48       ` Jan Beulich
2016-05-31 16:28         ` Tamas K Lengyel
2016-06-01  8:41           ` Jan Beulich
2016-06-01 11:24             ` Julien Grall
2016-06-01 18:21               ` Tamas K Lengyel
2016-06-01 19:34                 ` Razvan Cojocaru
2016-06-01 19:43                   ` Julien Grall
2016-06-02  7:35                   ` Jan Beulich
2016-06-02  8:26                     ` Razvan Cojocaru
2016-06-02  9:38                       ` Jan Beulich
2016-06-02  9:42                         ` Razvan Cojocaru
2016-06-01 19:38                 ` Julien Grall
2016-06-01 19:49                   ` Julien Grall
2016-06-01 19:50                   ` Tamas K Lengyel
2016-05-29 22:37 ` [PATCH v4 6/8] tools/libxc: add xc_monitor_privileged_call Tamas K Lengyel
2016-05-29 22:37 ` [PATCH v4 7/8] tools/xen-access: add test-case for ARM SMC Tamas K Lengyel
2016-05-30  9:56   ` Wei Liu
2016-05-29 22:37 ` [PATCH v4 8/8] x86/vm_event: Add HVM debug exception vm_events Tamas K Lengyel
2016-05-30  7:29   ` Razvan Cojocaru
2016-05-30 14:16   ` Jan Beulich
2016-05-30 20:13     ` Tamas K Lengyel
2016-05-30 20:58       ` Andrew Cooper
2016-05-31  7:59       ` Jan Beulich
2016-06-01 21:46         ` Tamas K Lengyel
2016-06-01 22:17           ` Andrew Cooper
2016-06-02  0:01             ` Tamas K Lengyel

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=577B84E0.1040700@arm.com \
    --to=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xenproject.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).