From f2a3b63791beb6b5a7e509de457c690a96667395 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 20 Mar 2019 14:13:37 -0700 Subject: 418.56 --- doc/version.mk | 2 +- samples/version.mk | 2 +- src/common-utils/msg.c | 1 - src/libXNVCtrl/version.mk | 2 +- src/nvml.h | 71 ++++++++++++++++++++++++++++++----------------- src/version.h | 2 +- src/version.mk | 2 +- version.mk | 2 +- 8 files changed, 52 insertions(+), 32 deletions(-) diff --git a/doc/version.mk b/doc/version.mk index 33d731b..6942222 100644 --- a/doc/version.mk +++ b/doc/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff --git a/samples/version.mk b/samples/version.mk index 33d731b..6942222 100644 --- a/samples/version.mk +++ b/samples/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff --git a/src/common-utils/msg.c b/src/common-utils/msg.c index 602bde1..8a78530 100644 --- a/src/common-utils/msg.c +++ b/src/common-utils/msg.c @@ -101,7 +101,6 @@ static void format(FILE *stream, const char *prefix, const char *buf, for (i = 0; i < t->n; i++) fprintf(stream, "%s\n", t->t[i]); nv_free_text_rows(t); - } else { fprintf(stream, "%s%s\n", prefix ? prefix : "", buf); } diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk index 33d731b..6942222 100644 --- a/src/libXNVCtrl/version.mk +++ b/src/libXNVCtrl/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff --git a/src/nvml.h b/src/nvml.h index bda23cc..f0230bd 100644 --- a/src/nvml.h +++ b/src/nvml.h @@ -6145,12 +6145,12 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetAccountingStats(nvmlVgpuInstance_t vgpuI /***************************************************************************************************/ /** - * Structure representing a range of vGPU version + * Structure representing range of vGPU versions. */ typedef struct nvmlVgpuVersion_st { - unsigned int minVersion; //!< Minimum vGPU version. - unsigned int maxVersion; //!< Maximum vGPU version. + unsigned int minVersion; //!< Minimum vGPU version. + unsigned int maxVersion; //!< Maximum vGPU version. } nvmlVgpuVersion_t; /** @@ -6292,41 +6292,62 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuMetadata(nvmlDevice_t device, nvmlVgpuPgpu */ nvmlReturn_t DECLDIR nvmlGetVgpuCompatibility(nvmlVgpuMetadata_t *vgpuMetadata, nvmlVgpuPgpuMetadata_t *pgpuMetadata, nvmlVgpuPgpuCompatibility_t *compatibilityInfo); +/* + * Virtual GPU (vGPU) version + * + * The NVIDIA vGPU Manager and the guest drivers are tagged with a range of supported vGPU versions. This determines the range of NVIDIA guest driver versions that + * are compatible for vGPU feature support with a given NVIDIA vGPU Manager. For vGPU feature support, the range of supported versions for the NVIDIA vGPU Manager + * and the guest driver must overlap. Otherwise, the guest driver fails to load in the VM. + * + * When the NVIDIA guest driver loads, either when the VM is booted or when the driver is installed or upgraded, a negotiation occurs between the guest driver + * and the NVIDIA vGPU Manager to select the highest mutually compatible vGPU version. The negotiated vGPU version stays the same across VM migration. + */ + /** - * Returns the following two version range structures \ref nvmlVgpuVersion_t : - * 1. \a supported : structure representing the range of vGPU versions supported by the host; - * 2. \a current : structure representing the range of supported versions enforced by the caller via \ref nvmlSetVgpuVersion(). - * - * The caller pass in the pointer to the structures, into which the compatible ranges are written. + * Query the ranges of supported vGPU versions. * - * @note: 1. The guest driver will fail to load if the version is below the range returned in the \a current structure. - * 2. If the guest driver is above the range, it will be downgraded to the current structure maximum version. + * This function gets the linear range of supported vGPU versions that is preset for the NVIDIA vGPU Manager and the range set by an administrator. + * If the preset range has not been overridden by \ref nvmlSetVgpuVersion, both ranges are the same. * - * @param supported Pointer to caller-supplied structure into which the supported vGPU version range is returned - * @param current Pointer to caller-supplied structure into which the caller enforced supported vGPU version range is returned. + * The caller passes pointers to the following \ref nvmlVgpuVersion_t structures, into which the NVIDIA vGPU Manager writes the ranges: + * 1. \a supported structure that represents the preset range of vGPU versions supported by the NVIDIA vGPU Manager. + * 2. \a current structure that represents the range of supported vGPU versions set by an administrator. By default, this range is the same as the preset range. + * + * @param supported Pointer to the structure in which the preset range of vGPU versions supported by the NVIDIA vGPU Manager is written + * @param current Pointer to the structure in which the range of supported vGPU versions set by an administrator is written * * @return - * - \ref NVML_SUCCESS vGPU version range structure was successfully returned - * - \ref NVML_ERROR_NOT_SUPPORTED API not supported - * - \ref NVML_ERROR_UNKNOWN Error while getting the data + * - \ref NVML_SUCCESS The vGPU version range structures were successfully obtained. + * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported. + * - \ref NVML_ERROR_INVALID_ARGUMENT The \a supported parameter or the \a current parameter is NULL. + * - \ref NVML_ERROR_UNKNOWN An error occurred while the data was being fetched. */ nvmlReturn_t DECLDIR nvmlGetVgpuVersion(nvmlVgpuVersion_t *supported, nvmlVgpuVersion_t *current); /** - * Takes a vGPU version range structure \ref nvmlVgpuVersion_t and set the vGPU compatible version range to the one provided as input. - * The caller should call the \ref nvmlGetVgpuVersion() to get the range of supported version by the host driver. + * Override the preset range of vGPU versions supported by the NVIDIA vGPU Manager with a range set by an administrator. + * + * This function configures the NVIDIA vGPU Manager with a range of supported vGPU versions set by an administrator. This range must be a subset of the + * preset range that the NVIDIA vGPU Manager supports. The custom range set by an administrator takes precedence over the preset range and is advertised to + * the guest VM for negotiating the vGPU version. See \ref nvmlGetVgpuVersion for details of how to query the preset range of versions supported. + * + * This function takes a pointer to vGPU version range structure \ref nvmlVgpuVersion_t as input to override the preset vGPU version range that the NVIDIA vGPU Manager supports. * - * @note: 1. The guest driver will fail to load if the version is below the range set via \a vgpuVersion structure. - * 2. If the guest driver is above the range, it will be downgraded to the \a vgpuVersion structure maximum version. - * 3. This will result error if there are VMs already active on the host or the supported range being set is outside the range supported by host driver. + * After host system reboot or driver reload, the range of supported versions reverts to the range that is preset for the NVIDIA vGPU Manager. * - * @param vgpuVersion Pointer to caller-supplied vGPU supported version range. + * @note 1. The range set by the administrator must be a subset of the preset range that the NVIDIA vGPU Manager supports. Otherwise, an error is returned. + * 2. If the range of supported guest driver versions does not overlap the range set by the administrator, the guest driver fails to load. + * 3. If the range of supported guest driver versions overlaps the range set by the administrator, the guest driver will load with a negotiated + * vGPU version that is the maximum value in the overlapping range. + * 4. No VMs must be running on the host when this function is called. If a VM is running on the host, the call to this function fails. + * + * @param vgpuVersion Pointer to a caller-supplied range of supported vGPU versions. * * @return - * - \ref NVML_SUCCESS vGPU metadata structure was successfully returned - * - \ref NVML_ERROR_NOT_SUPPORTED API not supported - * - \ref NVML_ERROR_IN_USE Range not set as VM is running on the host - * - \ref NVML_ERROR_INVALID_ARGUMENT Range being set is outside the range supported by host driver + * - \ref NVML_SUCCESS The preset range of supported vGPU versions was successfully overridden. + * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported. + * - \ref NVML_ERROR_IN_USE The range was not overridden because a VM is running on the host. + * - \ref NVML_ERROR_INVALID_ARGUMENT The \a vgpuVersion parameter specifies a range that is outside the range supported by the NVIDIA vGPU Manager or if \a vgpuVersion is NULL. */ nvmlReturn_t DECLDIR nvmlSetVgpuVersion(nvmlVgpuVersion_t *vgpuVersion); diff --git a/src/version.h b/src/version.h index f317b78..dcde6d6 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define NVIDIA_VERSION "418.43" +#define NVIDIA_VERSION "418.56" diff --git a/src/version.mk b/src/version.mk index 33d731b..6942222 100644 --- a/src/version.mk +++ b/src/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff --git a/version.mk b/version.mk index 33d731b..6942222 100644 --- a/version.mk +++ b/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 -- cgit v1.2.3