All of lore.kernel.org
 help / color / mirror / Atom feed
From: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
To: xen-devel@lists.xen.org
Cc: "Edgar E . Iglesias" <edgar.iglesias@xilinx.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Subject: [PATCH v7 11/11] public: add and enable XENFEAT_ARM_SMCCC_supported feature
Date: Thu,  5 Oct 2017 00:00:27 +0300	[thread overview]
Message-ID: <1507150827-7858-12-git-send-email-volodymyr_babchuk@epam.com> (raw)
In-Reply-To: <1507150827-7858-1-git-send-email-volodymyr_babchuk@epam.com>

This feature indicates that hypervisor is compatible with ARM
SMC calling convention. Previously hypervisor would inject an
undefined instruction exception if an invalid SMC function were
called or would crash a domain if an invalid HVC function
were invoked.
XENFEAT_ARM_SMCCC_supported feature means that it safe to invoke
SMC/HVC calls that are compatible with SMC calling convention.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 xen/common/kernel.c           | 3 +++
 xen/include/public/features.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 94fdf5c..8d137c5 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -394,6 +394,9 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
                     (1U << XENFEAT_auto_translated_physmap);
             if ( is_hardware_domain(d) )
                 fi.submap |= 1U << XENFEAT_dom0;
+#ifdef CONFIG_ARM
+            fi.submap |= (1U << XENFEAT_ARM_SMCCC_supported);
+#endif
 #ifdef CONFIG_X86
             switch ( d->guest_type )
             {
diff --git a/xen/include/public/features.h b/xen/include/public/features.h
index 2110b04..1a989b8 100644
--- a/xen/include/public/features.h
+++ b/xen/include/public/features.h
@@ -102,6 +102,9 @@
 /* Guest can use XENMEMF_vnode to specify virtual node for memory op. */
 #define XENFEAT_memory_op_vnode_supported 13
 
+/* arm: Hypervisor supports ARM SMC calling convention. */
+#define XENFEAT_ARM_SMCCC_supported       14
+
 #define XENFEAT_NR_SUBMAPS 1
 
 #endif /* __XEN_PUBLIC_FEATURES_H__ */
-- 
2.7.4


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

  parent reply	other threads:[~2017-10-04 21:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 21:00 [PATCH v7 00/11] Handle SMCs and HVCs in conformance with SMCCC Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 01/11] arm: traps: use only least 32 bits of fid in PSCI handler Volodymyr Babchuk
2017-10-06 13:48   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 02/11] arm: traps: use generic register accessors in the PSCI code Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 03/11] arm: traps: check if SMC was conditional before handling it Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 04/11] public: xen.h: add definitions for UUID handling Volodymyr Babchuk
2017-10-05 13:03   ` Konrad Rzeszutek Wilk
2017-10-05 14:50     ` Volodymyr Babchuk
2017-10-09  9:40       ` George Dunlap
2017-10-10 15:19         ` Julien Grall
2017-10-10 15:26           ` Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 05/11] arm: processor.h: add definition for immediate value mask Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 06/11] arm: add SMCCC protocol definitions Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 07/11] arm: smccc: handle SMCs according to SMCCC Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 08/11] arm: traps: handle PSCI calls inside `vsmc.c` Volodymyr Babchuk
2017-10-06 13:52   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 09/11] arm: PSCI: use definitions provided by asm/smccc.h Volodymyr Babchuk
2017-10-06 13:55   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 10/11] arm: vsmc: remove 64 bit mode check in PSCI handler Volodymyr Babchuk
2017-10-06 14:00   ` Julien Grall
2017-10-09 20:32     ` Stefano Stabellini
2017-10-10 15:14       ` Julien Grall
2017-10-10 15:17   ` Julien Grall
2017-10-04 21:00 ` Volodymyr Babchuk [this message]
2017-10-06 14:01   ` [PATCH v7 11/11] public: add and enable XENFEAT_ARM_SMCCC_supported feature Julien Grall
2017-10-06 14:17     ` Jan Beulich

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=1507150827-7858-12-git-send-email-volodymyr_babchuk@epam.com \
    --to=volodymyr_babchuk@epam.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.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.