From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: edgar.iglesias@xilinx.com, julien.grall@arm.com, xen-devel@lists.xen.org
Subject: Re: [RFC v2 2/6] xen/arm: Introduce platform_hvc
Date: Mon, 31 Jul 2017 23:30:28 +0200 [thread overview]
Message-ID: <20170731213028.GX4859@toto> (raw)
In-Reply-To: <alpine.DEB.2.10.1702131406130.6418@sstabellini-ThinkPad-X260>
On Mon, Feb 13, 2017 at 02:08:43PM -0800, Stefano Stabellini wrote:
> On Tue, 7 Feb 2017, Edgar E. Iglesias wrote:
> > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> >
> > Introduce platform_hvc as a way to handle hypercalls that
> > Xen does not know about in a platform specific way. This
> > is particularly useful for implementing the SiP (SoC
> > implementation specific) service calls.
> >
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> > ---
> > xen/arch/arm/platform.c | 8 ++++++++
> > xen/arch/arm/traps.c | 3 +++
> > xen/include/asm-arm/platform.h | 5 +++++
> > 3 files changed, 16 insertions(+)
> >
> > diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c
> > index 0af6d57..90ea6b8 100644
> > --- a/xen/arch/arm/platform.c
> > +++ b/xen/arch/arm/platform.c
> > @@ -127,6 +127,14 @@ void platform_poweroff(void)
> > platform->poweroff();
> > }
> >
> > +bool platform_hvc(struct cpu_user_regs *regs)
>
> This is fine, but we need a different name for it, as it can be used to
> handle both HVC and SMC calls. Maybe "firmware_call"?
Hi,
Sorry for the super long delay.. I'm looking at this again now.
Yes, you're right. I went with
platform_firmware_call() and platform->firmware_call().
I kept the platform_ prefix in the wrapper function to be
consistent with the other hooks.
Thanks,
Edgar
>
>
> > +{
> > + if ( platform && platform->hvc )
> > + return platform->hvc(regs);
> > +
> > + return false;
> > +}
> > +
> > bool_t platform_has_quirk(uint32_t quirk)
> > {
> > uint32_t quirks = 0;
> > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> > index c5a4d41..33950d9 100644
> > --- a/xen/arch/arm/traps.c
> > +++ b/xen/arch/arm/traps.c
> > @@ -44,6 +44,7 @@
> > #include <asm/cpufeature.h>
> > #include <asm/flushtlb.h>
> > #include <asm/monitor.h>
> > +#include <asm/platform.h>
> >
> > #include "decode.h"
> > #include "vtimer.h"
> > @@ -1430,6 +1431,8 @@ static void do_trap_psci(struct cpu_user_regs *regs)
> > }
> > break;
> > default:
> > + if ( platform_hvc(regs) )
> > + return;
> > domain_crash_synchronous();
> > return;
> > }
> > diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h
> > index 08010ba..4d51f0a 100644
> > --- a/xen/include/asm-arm/platform.h
> > +++ b/xen/include/asm-arm/platform.h
> > @@ -26,6 +26,10 @@ struct platform_desc {
> > void (*reset)(void);
> > /* Platform power-off */
> > void (*poweroff)(void);
> > + /* Platform specific HVC handler.
> > + * Returns true if the call was handled and false if not.
> > + */
> > + bool (*hvc)(struct cpu_user_regs *regs);
> > /*
> > * Platform quirks
> > * Defined has a function because a platform can support multiple
> > @@ -55,6 +59,7 @@ int platform_cpu_up(int cpu);
> > #endif
> > void platform_reset(void);
> > void platform_poweroff(void);
> > +bool platform_hvc(struct cpu_user_regs *regs);
> > bool_t platform_has_quirk(uint32_t quirk);
> > bool_t platform_device_is_blacklisted(const struct dt_device_node *node);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-07-31 21:30 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 19:41 [RFC v2 0/6] zynqmp: Add forwarding of platform specific firmware calls Edgar E. Iglesias
2017-02-07 19:42 ` [RFC v2 1/6] xen/arm: traps: Reorder early overwrite of FID Edgar E. Iglesias
2017-02-13 22:06 ` Stefano Stabellini
2017-02-07 19:42 ` [RFC v2 2/6] xen/arm: Introduce platform_hvc Edgar E. Iglesias
2017-02-13 22:08 ` Stefano Stabellini
2017-07-31 21:30 ` Edgar E. Iglesias [this message]
2017-02-07 19:42 ` [RFC v2 3/6] xen/arm: Allow platform_hvc to handle guest SMC calls Edgar E. Iglesias
2017-02-07 20:38 ` Tamas K Lengyel
2017-02-07 20:51 ` Julien Grall
2017-02-08 0:24 ` Tamas K Lengyel
2017-02-08 8:31 ` Edgar E. Iglesias
2017-02-08 16:40 ` Tamas K Lengyel
2017-02-08 16:58 ` Julien Grall
2017-02-08 17:21 ` Tamas K Lengyel
2017-02-08 17:29 ` Edgar E. Iglesias
2017-02-08 19:40 ` Edgar E. Iglesias
2017-02-08 20:15 ` Tamas K Lengyel
2017-02-08 22:04 ` Julien Grall
2017-02-08 23:28 ` Tamas K Lengyel
2017-02-09 0:08 ` Julien Grall
2017-02-09 1:20 ` Stefano Stabellini
2017-02-09 9:12 ` Edgar E. Iglesias
2017-02-09 9:27 ` Edgar E. Iglesias
2017-02-09 18:22 ` Stefano Stabellini
2017-02-09 18:25 ` Tamas K Lengyel
2017-02-09 18:43 ` Stefano Stabellini
2017-02-09 19:32 ` Tamas K Lengyel
2017-07-31 22:23 ` Edgar E. Iglesias
2017-08-01 10:37 ` Julien Grall
2017-08-01 11:40 ` Edgar E. Iglesias
2017-02-09 16:46 ` Volodymyr Babchuk
2017-02-09 18:11 ` Tamas K Lengyel
2017-02-09 18:39 ` Julien Grall
2017-02-09 19:42 ` Tamas K Lengyel
2017-02-09 20:01 ` Edgar E. Iglesias
2017-02-09 20:36 ` Tamas K Lengyel
2017-02-09 14:46 ` Edgar E. Iglesias
2017-02-07 19:42 ` [RFC v2 4/6] xen/arm: Introduce call_smcc64 Edgar E. Iglesias
2017-02-13 22:11 ` Stefano Stabellini
2017-02-07 19:42 ` [RFC v2 5/6] xen/arm: zynqmp: Forward plaform specific firmware calls Edgar E. Iglesias
2017-02-14 0:02 ` Stefano Stabellini
2017-02-17 18:47 ` Julien Grall
2017-02-07 19:42 ` [RFC v2 6/6] xen/arm: zynqmp: Remove blacklist of ZynqMP's PM node Edgar E. Iglesias
2017-02-14 0:03 ` Stefano Stabellini
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=20170731213028.GX4859@toto \
--to=edgar.iglesias@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--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.