From: Tamas K Lengyel <tamas@tklengyel.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Julien Grall <julien.grall@arm.com>,
Steve Capper <Steve.Capper@arm.com>,
Jan Beulich <JBeulich@suse.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v5 5/9] monitor: ARM SMC events
Date: Tue, 7 Jun 2016 10:06:34 -0600 [thread overview]
Message-ID: <CABfawh=D+HHpHaD-g8R2esiFiXr6S3z7+cm60Mdq2r9uoAJ_ng@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1606071121400.14126@sstabellini-ThinkPad-X260>
[-- Attachment #1.1: Type: text/plain, Size: 3619 bytes --]
On Jun 7, 2016 04:30, "Stefano Stabellini" <sstabellini@kernel.org> wrote:
>
> On Tue, 7 Jun 2016, Jan Beulich wrote:
> > >>> On 06.06.16 at 18:38, <julien.grall@arm.com> wrote:
> > > On 06/06/16 17:14, Tamas K Lengyel wrote:
> > >> On Mon, Jun 6, 2016 at 9:56 AM, Tamas K Lengyel <tamas@tklengyel.com>
wrote:
> > >>> On Mon, Jun 6, 2016 at 9:54 AM, Julien Grall <julien.grall@arm.com>
wrote:
> > >> So either way, I don't see a technical reason why Xen should silently
> > >> swallow any SMC trap if the vm_event user specifically asked them to
> > >> be forwarded. Other then it being odd that some ARM chips have
varying
> > >> behavior regarding a subset of SMC instructions, it should not affect
> > >> when the vm_event user gets the events. If the user requests that it
> > >> wants to get notified any time an SMC is trapped to the VMM, it
> > >> should, regardless of whether that makes sense for "us". Depending on
> > >> the use-case of the user, indeed it may need extra information if it
> > >> wants to do emulation. If that need arises, the interface can easily
> > >> be extended to accommodate that usecase. We can also add a comment
> > >> saying that the forwarded events may also include ones with failed
> > >> condition checks depending on the CPU implementation. Also, it would
> > >> also be possible in the future to add a monitor configuration bit
> > >> where the user can specify if it wants the failed condition check
SMCs
> > >> ignored by default or not. At this time however I want to start
simple
> > >> and just forward all events, adding more bits and pieces only as
> > >> needed.
> > >
> > > We disagree on what is a "starting simple". It easier to relax than
> > > restricting a behavior later one.
> > >
> > > Even if we decide to add a bit to ignore some SMC in a later version
of
> > > Xen, the introspection app will need to carry the burden mentioned in
> > > lengthly way on the previous mails because they may want to support
> > > older version of Xen.
> >
> > FWIW, I'm with Julien here given the information available so far
> > on this thread. Some of the basic problem is that the original
> > patch (and namely its modification to the public header) doesn't
> > really make clear what's intended: To intercept all SMC instruction
> > uses (aiui that's impossible on some hardware) or to intercept all
> > privileged calls resulting from their use (in which case instances
> > with the condition being false wouldn't count).
>
> Right. I think that the first thing to do would be to write down in the
> public header file what is the intended behavior. Given the scope for
> confusion, this is necessary regardless of the chosen behavior.
>
>
> > What you, Tamas, want to get to seems to be some middle
> > ground, which I don't see what use it would be to the consumer.
>
> I think that forwarding SMC events only for unconditional SMCs and SMCs
> which succeeded the conditional check would make for a better interface.
> This would be my preference.
>
> If you really want to forward SMC events for SMCs which failed the
> conditional check, then please add to the SMC event struct all the
> necessary information so that the monitoring application can quickly
> find out whether the conditional check succeeded or failed without
> jumping through hoops.
Ack. As I said I have no use for conditional SMCs at all so this is beyond
what I am looking for. From my perspective it is just easier to forward
every trap.
So as for doing the actual filtering, Julien mentioned he is going to add a
patch for that. I'll wait for that and then rebase on top.
Thanks,
Tamas
[-- Attachment #1.2: Type: text/html, Size: 4622 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-07 16:06 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 22:52 [PATCH v5 1/9] vm_event: clear up return value of vm_event_monitor_traps Tamas K Lengyel
2016-06-02 22:52 ` [PATCH v5 2/9] monitor: Rename vm_event_monitor_get_capabilities Tamas K Lengyel
2016-06-17 19:07 ` Tamas K Lengyel
2016-06-21 9:20 ` Julien Grall
2016-06-02 22:52 ` [PATCH v5 3/9] monitor: Rename vm_event_monitor_guest_request Tamas K Lengyel
2016-06-17 19:10 ` Tamas K Lengyel
2016-06-21 9:18 ` Julien Grall
2016-06-02 22:52 ` [PATCH v5 4/9] monitor: Rename hvm/event to hvm/monitor Tamas K Lengyel
2016-06-02 22:52 ` [PATCH v5 5/9] monitor: ARM SMC events Tamas K Lengyel
2016-06-03 9:49 ` Julien Grall
2016-06-03 13:40 ` Tamas K Lengyel
2016-06-03 14:43 ` Julien Grall
2016-06-03 15:03 ` Tamas K Lengyel
2016-06-03 15:06 ` Julien Grall
2016-06-03 15:42 ` Tamas K Lengyel
2016-06-03 15:27 ` Tamas K Lengyel
2016-06-03 15:34 ` Tamas K Lengyel
2016-06-04 9:03 ` Edgar E. Iglesias
2016-06-04 17:40 ` Tamas K Lengyel
2016-06-06 10:07 ` Julien Grall
[not found] ` <CABfawh=tOsUP1dQi9oAZM+iy3rMmCKDW=VByT-L-xYdAMBiMKw@mail.gmail.com>
[not found] ` <CABfawhkSXqky9WWp8NyKEUrH_ZzSJToxAncTeSYeKBg1q63rwg@mail.gmail.com>
2016-06-06 15:24 ` Tamas K Lengyel
2016-06-06 15:54 ` Julien Grall
2016-06-06 15:56 ` Tamas K Lengyel
2016-06-06 16:14 ` Tamas K Lengyel
2016-06-06 16:38 ` Julien Grall
2016-06-06 17:28 ` Tamas K Lengyel
2016-06-07 7:13 ` Jan Beulich
2016-06-07 10:30 ` Stefano Stabellini
2016-06-07 16:06 ` Tamas K Lengyel [this message]
2016-06-02 22:52 ` [PATCH v5 6/9] arm/vm_event: get/set registers Tamas K Lengyel
2016-06-03 10:34 ` Jan Beulich
2016-06-03 19:27 ` Tamas K Lengyel
2016-06-02 22:52 ` [PATCH v5 7/9] tools/libxc: add xc_monitor_privileged_call Tamas K Lengyel
2016-06-02 22:52 ` [PATCH v5 8/9] x86/vm_event: Add HVM debug exception vm_events Tamas K Lengyel
2016-06-03 10:49 ` Jan Beulich
2016-06-03 13:29 ` Tamas K Lengyel
2016-06-03 14:23 ` Jan Beulich
2016-06-03 14:34 ` Tamas K Lengyel
2016-06-03 14:45 ` Jan Beulich
2016-06-03 14:51 ` Tamas K Lengyel
2016-06-02 22:52 ` [PATCH v5 9/9] tools/xen-access: add test-case for ARM SMC Tamas K Lengyel
2016-06-03 7:08 ` [PATCH v5 1/9] vm_event: clear up return value of vm_event_monitor_traps Razvan Cojocaru
2016-06-03 15:54 ` Jan Beulich
2016-06-03 16:03 ` Tamas K Lengyel
2016-06-17 19:09 ` Tamas K Lengyel
2016-06-24 10:58 ` Tian, Kevin
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='CABfawh=D+HHpHaD-g8R2esiFiXr6S3z7+cm60Mdq2r9uoAJ_ng@mail.gmail.com' \
--to=tamas@tklengyel.com \
--cc=JBeulich@suse.com \
--cc=Steve.Capper@arm.com \
--cc=edgar.iglesias@gmail.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--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).