summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYong Ding <yongding@codeaurora.org>2018-03-19 16:39:28 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-03-20 19:01:52 -0700
commit4fc0ee9d997b4f2ebff497655c024ec4d5b2ea47 (patch)
tree89badda802f35e33fa318228234593e381abffad /include
parentbb9c0e0ec85aa211716bff72ae378e0c87dae4a2 (diff)
soc: qcom: hab: add habmm_socket_query support
This query API can be used by hab clients to get their virtual channels' info if necessary, eg, the local and remote vmids. Change-Id: I1293b51a1127997f493f07c0c2181423bf45d79e Signed-off-by: Yong Ding <yongding@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/habmm.h13
-rw-r--r--include/uapi/linux/habmm.h11
2 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/habmm.h b/include/linux/habmm.h
index 4d3a81f536d9..1c27ee4f14f7 100644
--- a/include/linux/habmm.h
+++ b/include/linux/habmm.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -35,4 +35,15 @@ int32_t habmm_import(int32_t handle, void **buff_shared, uint32_t size_bytes,
int32_t habmm_unimport(int32_t handle, uint32_t export_id, void *buff_shared,
uint32_t flags);
+struct hab_socket_info {
+ int32_t vmid_remote; /* habmm's vmid */
+ int32_t vmid_local;
+ /* name from hypervisor framework if available */
+ char vmname_remote[12];
+ char vmname_local[12];
+};
+
+int32_t habmm_socket_query(int32_t handle, struct hab_socket_info *info,
+ uint32_t flags);
+
#endif
diff --git a/include/uapi/linux/habmm.h b/include/uapi/linux/habmm.h
index 8586048e20c0..b1b6561f2552 100644
--- a/include/uapi/linux/habmm.h
+++ b/include/uapi/linux/habmm.h
@@ -59,6 +59,14 @@ struct hab_unimport {
__u32 flags;
};
+struct hab_info {
+ __s32 vcid;
+ __u64 ids; /* high part remote; low part local */
+ __u64 names;
+ __u32 namesize; /* single name length */
+ __u32 flags;
+};
+
#define HAB_IOC_TYPE 0x0A
#define HAB_MAX_MSG_SIZEBYTES 0x1000
#define HAB_MAX_EXPORT_SIZE 0x8000000
@@ -163,4 +171,7 @@ struct hab_unimport {
#define IOCTL_HAB_VC_UNIMPORT \
_IOW(HAB_IOC_TYPE, 0x9, struct hab_unimport)
+#define IOCTL_HAB_VC_QUERY \
+ _IOWR(HAB_IOC_TYPE, 0xA, struct hab_info)
+
#endif /* HABMM_H */