|
| 1 | +(* |
| 2 | + * Copyright (C) Citrix Systems Inc. |
| 3 | + * |
| 4 | + * This program is free software; you can redistribute it and/or modify |
| 5 | + * it under the terms of the GNU Lesser General Public License as published |
| 6 | + * by the Free Software Foundation; version 2.1 only. with the special |
| 7 | + * exception on linking described in file LICENSE. |
| 8 | + * |
| 9 | + * This program is distributed in the hope that it will be useful, |
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | + * GNU Lesser General Public License for more details. |
| 13 | + *) |
| 14 | + |
| 15 | +let service_name = "gpumon" |
| 16 | +let queue_name = Xcp_service.common_prefix ^ service_name |
| 17 | +let xml_path = "/var/xapi/" ^ service_name |
| 18 | + |
| 19 | +type debug_info = string |
| 20 | + |
| 21 | +type pgpu_address = string |
| 22 | +type pgpu_metadata = string |
| 23 | +type domid = int |
| 24 | + |
| 25 | +type incompatibility_reason = Host_driver | Guest_driver | GPU | Other |
| 26 | +type compatibility = Compatible | Incompatible of incompatibility_reason list |
| 27 | + |
| 28 | +(** Get the metadata for a pGPU, given its address (PCI bus ID). *) |
| 29 | +external get_pgpu_metadata: debug_info -> pgpu_address -> pgpu_metadata = "" |
| 30 | + |
| 31 | +(** Check compatibility between a VM's vGPU(s) and another pGPU. |
| 32 | + * pgpu_address = PCI bus ID of the pGPU in which the VM is currently running. |
| 33 | + * domid = domain ID of the VM in which the vGPU(s) is running. |
| 34 | + * pgpu_metadata = metadata of the pGPU to check compatibility for. *) |
| 35 | +external get_pgpu_vm_compatibility: debug_info -> pgpu_address -> domid -> pgpu_metadata -> compatibility = "" |
0 commit comments