visorbus_private.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2010 - 2015 UNISYS CORPORATION
  4. * All rights reserved.
  5. */
  6. #ifndef __VISORBUS_PRIVATE_H__
  7. #define __VISORBUS_PRIVATE_H__
  8. #include <linux/uuid.h>
  9. #include <linux/utsname.h>
  10. #include <linux/visorbus.h>
  11. #include "controlvmchannel.h"
  12. #include "vbuschannel.h"
  13. struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
  14. struct visor_device *from);
  15. int visorbus_create_instance(struct visor_device *dev);
  16. void visorbus_remove_instance(struct visor_device *bus_info);
  17. int create_visor_device(struct visor_device *dev_info);
  18. void remove_visor_device(struct visor_device *dev_info);
  19. int visorchipset_device_pause(struct visor_device *dev_info);
  20. int visorchipset_device_resume(struct visor_device *dev_info);
  21. void visorbus_response(struct visor_device *p, int response, int controlvm_id);
  22. void visorbus_device_changestate_response(struct visor_device *p, int response,
  23. struct visor_segment_state state);
  24. int visorbus_init(void);
  25. void visorbus_exit(void);
  26. /* visorchannel access functions */
  27. struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
  28. const guid_t *guid, bool needs_lock);
  29. void visorchannel_destroy(struct visorchannel *channel);
  30. int visorchannel_read(struct visorchannel *channel, ulong offset,
  31. void *dest, ulong nbytes);
  32. int visorchannel_write(struct visorchannel *channel, ulong offset,
  33. void *dest, ulong nbytes);
  34. u64 visorchannel_get_physaddr(struct visorchannel *channel);
  35. ulong visorchannel_get_nbytes(struct visorchannel *channel);
  36. char *visorchannel_id(struct visorchannel *channel, char *s);
  37. char *visorchannel_zoneid(struct visorchannel *channel, char *s);
  38. u64 visorchannel_get_clientpartition(struct visorchannel *channel);
  39. int visorchannel_set_clientpartition(struct visorchannel *channel,
  40. u64 partition_handle);
  41. char *visorchannel_guid_id(const guid_t *guid, char *s);
  42. void *visorchannel_get_header(struct visorchannel *channel);
  43. #endif