2020-04-19 22:00:21 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2017-08-23 01:26:56 +08:00
|
|
|
/*
|
2015-07-17 00:40:48 +08:00
|
|
|
* Copyright (C) 2010 - 2015 UNISYS CORPORATION
|
2014-03-04 21:58:07 +08:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2016-09-03 04:41:32 +08:00
|
|
|
#ifndef __VISORBUS_PRIVATE_H__
|
|
|
|
#define __VISORBUS_PRIVATE_H__
|
2014-03-04 21:58:07 +08:00
|
|
|
|
2014-05-06 21:58:23 +08:00
|
|
|
#include <linux/uuid.h>
|
2016-09-26 23:03:41 +08:00
|
|
|
#include <linux/utsname.h>
|
2017-12-08 01:11:07 +08:00
|
|
|
#include <linux/visorbus.h>
|
2014-05-06 21:58:23 +08:00
|
|
|
|
2014-03-04 21:58:07 +08:00
|
|
|
#include "controlvmchannel.h"
|
2016-09-03 04:41:39 +08:00
|
|
|
#include "vbuschannel.h"
|
2016-09-03 04:41:31 +08:00
|
|
|
|
2017-09-28 01:14:36 +08:00
|
|
|
struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
|
|
|
|
struct visor_device *from);
|
2017-08-23 01:27:24 +08:00
|
|
|
int visorbus_create_instance(struct visor_device *dev);
|
2017-08-23 01:27:33 +08:00
|
|
|
void visorbus_remove_instance(struct visor_device *bus_info);
|
2017-08-23 01:27:34 +08:00
|
|
|
int create_visor_device(struct visor_device *dev_info);
|
2017-08-23 01:27:35 +08:00
|
|
|
void remove_visor_device(struct visor_device *dev_info);
|
2017-05-20 04:17:41 +08:00
|
|
|
int visorchipset_device_pause(struct visor_device *dev_info);
|
|
|
|
int visorchipset_device_resume(struct visor_device *dev_info);
|
2017-08-23 01:27:03 +08:00
|
|
|
void visorbus_response(struct visor_device *p, int response, int controlvm_id);
|
2017-08-23 01:27:04 +08:00
|
|
|
void visorbus_device_changestate_response(struct visor_device *p, int response,
|
|
|
|
struct visor_segment_state state);
|
2015-05-06 06:37:02 +08:00
|
|
|
int visorbus_init(void);
|
2015-05-06 06:36:15 +08:00
|
|
|
void visorbus_exit(void);
|
2016-06-11 09:48:19 +08:00
|
|
|
|
2016-06-11 09:48:23 +08:00
|
|
|
/* visorchannel access functions */
|
2017-08-31 01:36:31 +08:00
|
|
|
struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
|
2017-09-28 01:14:44 +08:00
|
|
|
const guid_t *guid, bool needs_lock);
|
2016-06-11 09:48:19 +08:00
|
|
|
void visorchannel_destroy(struct visorchannel *channel);
|
|
|
|
int visorchannel_read(struct visorchannel *channel, ulong offset,
|
2016-11-22 01:15:43 +08:00
|
|
|
void *dest, ulong nbytes);
|
2016-06-11 09:48:19 +08:00
|
|
|
int visorchannel_write(struct visorchannel *channel, ulong offset,
|
2016-11-22 01:15:43 +08:00
|
|
|
void *dest, ulong nbytes);
|
2016-06-11 09:48:19 +08:00
|
|
|
u64 visorchannel_get_physaddr(struct visorchannel *channel);
|
|
|
|
ulong visorchannel_get_nbytes(struct visorchannel *channel);
|
|
|
|
char *visorchannel_id(struct visorchannel *channel, char *s);
|
|
|
|
char *visorchannel_zoneid(struct visorchannel *channel, char *s);
|
|
|
|
u64 visorchannel_get_clientpartition(struct visorchannel *channel);
|
|
|
|
int visorchannel_set_clientpartition(struct visorchannel *channel,
|
|
|
|
u64 partition_handle);
|
2017-08-23 01:26:54 +08:00
|
|
|
char *visorchannel_guid_id(const guid_t *guid, char *s);
|
2017-03-17 23:27:11 +08:00
|
|
|
void *visorchannel_get_header(struct visorchannel *channel);
|
2014-03-04 21:58:07 +08:00
|
|
|
#endif
|