]> xenbits.xensource.com Git - xen.git/commitdiff
public: add and enable XENFEAT_ARM_SMCCC_supported feature
authorVolodymyr Babchuk <volodymyr_babchuk@epam.com>
Tue, 10 Oct 2017 15:52:51 +0000 (18:52 +0300)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 11 Oct 2017 19:42:04 +0000 (12:42 -0700)
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>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/kernel.c
xen/include/public/features.h

index 94fdf5c60a36a76d080f92956c0d332c22c084f6..8d137c58fb243780a0526e725cb4f9f0bf128403 100644 (file)
@@ -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 )
             {
index 2110b04554031b7bc7e6c160c5ab0f8a461b0023..1a989b8bf979d513b6d5c9e397ccf21c0b5c3e0a 100644 (file)
 /* 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__ */