VMCS_SM_CMD_HOST_WALK_PID_MAP,
VMCS_SM_CMD_CLEAN_INVALID,
+ VMCS_SM_CMD_CLEAN_INVALID2,
VMCS_SM_CMD_LAST /* Do no delete */
};
} s[8];
};
+struct vmcs_sm_ioctl_clean_invalid2 {
+ uint8_t op_count;
+ uint8_t zero[3];
+ struct vmcs_sm_ioctl_clean_invalid_block {
+ uint16_t invalidate_mode;
+ uint16_t block_count;
+ void * start_address;
+ uint32_t block_size;
+ uint32_t inter_block_stride;
+ } s[0];
+};
+
/* IOCTL numbers */
#define VMCS_SM_IOCTL_MEM_ALLOC\
_IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_ALLOC,\
#define VMCS_SM_IOCTL_MEM_CLEAN_INVALID\
_IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_CLEAN_INVALID,\
struct vmcs_sm_ioctl_clean_invalid)
+#define VMCS_SM_IOCTL_MEM_CLEAN_INVALID2\
+ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_CLEAN_INVALID2,\
+ struct vmcs_sm_ioctl_clean_invalid2)
#define VMCS_SM_IOCTL_SIZE_USR_HDL\
_IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_SIZE_USR_HANDLE,\
out:
return rc;
}
+
+/* Flush or invalidate the memory associated with this user opaque handle
+**
+** Returns: non-zero on error
+**
+** structure contains a list of flush/invalidate commands
+** See header file
+*/
+int vcsm_clean_invalid2( struct vcsm_user_clean_invalid2_s *s )
+{
+ int rc = 0;
+
+ if ( vcsm_handle == VCSM_INVALID_HANDLE )
+ {
+ vcos_log_error( "[%s]: [%d]: invalid device or invalid handle!",
+ __func__,
+ getpid() );
+
+ rc = -1;
+ goto out;
+ }
+
+ rc = ioctl( vcsm_handle,
+ VMCS_SM_IOCTL_MEM_CLEAN_INVALID2,
+ s );
+
+ /* Done.
+ */
+ goto out;
+
+out:
+ return rc;
+}
int vcsm_clean_invalid( struct vcsm_user_clean_invalid_s *s );
+struct vcsm_user_clean_invalid2_s {
+ unsigned char op_count;
+ unsigned char zero[3];
+ struct vcsm_user_clean_invalid2_block_s {
+ unsigned short invalidate_mode;
+ unsigned short block_count;
+ void * start_address;
+ unsigned int block_size;
+ unsigned int inter_block_stride;
+ } s[0];
+};
+
+int vcsm_clean_invalid2( struct vcsm_user_clean_invalid2_s *s );
+
#ifdef __cplusplus
}
#endif