update gpu_driver_versions.proto to support vgpu

Add the field supported_host_versions for each DriverVersion - this is a
list for the host gpu driver versions supported for this guest-vgpu
driver version.

BUG=b/423030998
TEST=Create fresh VM --> COS_GPU_INSTALLER=gcr.io/$PROJECT/cos-gpu-installer sudo -E cos-extensions install gpu --> verify installation.
RELEASE_NOTE=NONE

Change-Id: I9dcb8c426e80865b91dec158beeabd6cdc13da99
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/110642
Reviewed-by: Shuo Yang <gshuoy@google.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Tested-by: Miri Amarilio <mirilio@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
diff --git a/src/pkg/gpuconfig/pb/gpu_driver_versions.pb.go b/src/pkg/gpuconfig/pb/gpu_driver_versions.pb.go
index 180bdef..98c5d57 100644
--- a/src/pkg/gpuconfig/pb/gpu_driver_versions.pb.go
+++ b/src/pkg/gpuconfig/pb/gpu_driver_versions.pb.go
@@ -23,6 +23,51 @@
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+// Represents a supported host driver version for vGPU.
+type HostDriverVersion struct {
+	state         protoimpl.MessageState `protogen:"open.v1"`
+	Version       string                 `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // more metadata about host driver versions.
+	unknownFields protoimpl.UnknownFields
+	sizeCache     protoimpl.SizeCache
+}
+
+func (x *HostDriverVersion) Reset() {
+	*x = HostDriverVersion{}
+	mi := &file_gpu_driver_versions_proto_msgTypes[0]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *HostDriverVersion) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HostDriverVersion) ProtoMessage() {}
+
+func (x *HostDriverVersion) ProtoReflect() protoreflect.Message {
+	mi := &file_gpu_driver_versions_proto_msgTypes[0]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use HostDriverVersion.ProtoReflect.Descriptor instead.
+func (*HostDriverVersion) Descriptor() ([]byte, []int) {
+	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *HostDriverVersion) GetVersion() string {
+	if x != nil {
+		return x.Version
+	}
+	return ""
+}
+
 // Represents all the information about a GPU driver version.
 // It contains the GPU driver version label (e.g., "default", "latest"), and the GPU driver version that is associated with that label.
 type DriverVersion struct {
@@ -30,14 +75,16 @@
 	// GPU driver version label.
 	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
 	// The driver version that is associated with this label.
-	Version       string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // more metadata about the driver version.
-	unknownFields protoimpl.UnknownFields
-	sizeCache     protoimpl.SizeCache
+	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+	// List of supported host driver versions for vGPU.
+	SupportedHostVersions []*HostDriverVersion `protobuf:"bytes,3,rep,name=supported_host_versions,json=supportedHostVersions,proto3" json:"supported_host_versions,omitempty"` // more metadata about the driver version.
+	unknownFields         protoimpl.UnknownFields
+	sizeCache             protoimpl.SizeCache
 }
 
 func (x *DriverVersion) Reset() {
 	*x = DriverVersion{}
-	mi := &file_gpu_driver_versions_proto_msgTypes[0]
+	mi := &file_gpu_driver_versions_proto_msgTypes[1]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -49,7 +96,7 @@
 func (*DriverVersion) ProtoMessage() {}
 
 func (x *DriverVersion) ProtoReflect() protoreflect.Message {
-	mi := &file_gpu_driver_versions_proto_msgTypes[0]
+	mi := &file_gpu_driver_versions_proto_msgTypes[1]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -62,7 +109,7 @@
 
 // Deprecated: Use DriverVersion.ProtoReflect.Descriptor instead.
 func (*DriverVersion) Descriptor() ([]byte, []int) {
-	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{0}
+	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{1}
 }
 
 func (x *DriverVersion) GetLabel() string {
@@ -79,6 +126,13 @@
 	return ""
 }
 
+func (x *DriverVersion) GetSupportedHostVersions() []*HostDriverVersion {
+	if x != nil {
+		return x.SupportedHostVersions
+	}
+	return nil
+}
+
 // Represents the information about a GPU device.
 type GPUDevice struct {
 	state protoimpl.MessageState `protogen:"open.v1"`
@@ -92,7 +146,7 @@
 
 func (x *GPUDevice) Reset() {
 	*x = GPUDevice{}
-	mi := &file_gpu_driver_versions_proto_msgTypes[1]
+	mi := &file_gpu_driver_versions_proto_msgTypes[2]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -104,7 +158,7 @@
 func (*GPUDevice) ProtoMessage() {}
 
 func (x *GPUDevice) ProtoReflect() protoreflect.Message {
-	mi := &file_gpu_driver_versions_proto_msgTypes[1]
+	mi := &file_gpu_driver_versions_proto_msgTypes[2]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -117,7 +171,7 @@
 
 // Deprecated: Use GPUDevice.ProtoReflect.Descriptor instead.
 func (*GPUDevice) Descriptor() ([]byte, []int) {
-	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{1}
+	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{2}
 }
 
 func (x *GPUDevice) GetGpuType() string {
@@ -148,7 +202,7 @@
 
 func (x *GPUDriverVersionInfo) Reset() {
 	*x = GPUDriverVersionInfo{}
-	mi := &file_gpu_driver_versions_proto_msgTypes[2]
+	mi := &file_gpu_driver_versions_proto_msgTypes[3]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -160,7 +214,7 @@
 func (*GPUDriverVersionInfo) ProtoMessage() {}
 
 func (x *GPUDriverVersionInfo) ProtoReflect() protoreflect.Message {
-	mi := &file_gpu_driver_versions_proto_msgTypes[2]
+	mi := &file_gpu_driver_versions_proto_msgTypes[3]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -173,7 +227,7 @@
 
 // Deprecated: Use GPUDriverVersionInfo.ProtoReflect.Descriptor instead.
 func (*GPUDriverVersionInfo) Descriptor() ([]byte, []int) {
-	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{2}
+	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{3}
 }
 
 func (x *GPUDriverVersionInfo) GetGpuDevice() *GPUDevice {
@@ -200,7 +254,7 @@
 
 func (x *GPUDriverVersionInfoList) Reset() {
 	*x = GPUDriverVersionInfoList{}
-	mi := &file_gpu_driver_versions_proto_msgTypes[3]
+	mi := &file_gpu_driver_versions_proto_msgTypes[4]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -212,7 +266,7 @@
 func (*GPUDriverVersionInfoList) ProtoMessage() {}
 
 func (x *GPUDriverVersionInfoList) ProtoReflect() protoreflect.Message {
-	mi := &file_gpu_driver_versions_proto_msgTypes[3]
+	mi := &file_gpu_driver_versions_proto_msgTypes[4]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -225,7 +279,7 @@
 
 // Deprecated: Use GPUDriverVersionInfoList.ProtoReflect.Descriptor instead.
 func (*GPUDriverVersionInfoList) Descriptor() ([]byte, []int) {
-	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{3}
+	return file_gpu_driver_versions_proto_rawDescGZIP(), []int{4}
 }
 
 func (x *GPUDriverVersionInfoList) GetGpuDriverVersionInfo() []*GPUDriverVersionInfo {
@@ -239,10 +293,13 @@
 
 const file_gpu_driver_versions_proto_rawDesc = "" +
 	"\n" +
-	"\x19gpu_driver_versions.proto\x12\x02pb\"?\n" +
+	"\x19gpu_driver_versions.proto\x12\x02pb\"-\n" +
+	"\x11HostDriverVersion\x12\x18\n" +
+	"\aversion\x18\x01 \x01(\tR\aversion\"\x8e\x01\n" +
 	"\rDriverVersion\x12\x14\n" +
 	"\x05label\x18\x01 \x01(\tR\x05label\x12\x18\n" +
-	"\aversion\x18\x02 \x01(\tR\aversion\"?\n" +
+	"\aversion\x18\x02 \x01(\tR\aversion\x12M\n" +
+	"\x17supported_host_versions\x18\x03 \x03(\v2\x15.pb.HostDriverVersionR\x15supportedHostVersions\"?\n" +
 	"\tGPUDevice\x12\x19\n" +
 	"\bgpu_type\x18\x01 \x01(\tR\agpuType\x12\x17\n" +
 	"\ais_vgpu\x18\x02 \x01(\bR\x06isVgpu\"\x93\x01\n" +
@@ -265,22 +322,24 @@
 	return file_gpu_driver_versions_proto_rawDescData
 }
 
-var file_gpu_driver_versions_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_gpu_driver_versions_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 var file_gpu_driver_versions_proto_goTypes = []any{
-	(*DriverVersion)(nil),            // 0: pb.DriverVersion
-	(*GPUDevice)(nil),                // 1: pb.GPUDevice
-	(*GPUDriverVersionInfo)(nil),     // 2: pb.GPUDriverVersionInfo
-	(*GPUDriverVersionInfoList)(nil), // 3: pb.GPUDriverVersionInfoList
+	(*HostDriverVersion)(nil),        // 0: pb.HostDriverVersion
+	(*DriverVersion)(nil),            // 1: pb.DriverVersion
+	(*GPUDevice)(nil),                // 2: pb.GPUDevice
+	(*GPUDriverVersionInfo)(nil),     // 3: pb.GPUDriverVersionInfo
+	(*GPUDriverVersionInfoList)(nil), // 4: pb.GPUDriverVersionInfoList
 }
 var file_gpu_driver_versions_proto_depIdxs = []int32{
-	1, // 0: pb.GPUDriverVersionInfo.gpu_device:type_name -> pb.GPUDevice
-	0, // 1: pb.GPUDriverVersionInfo.supported_driver_versions:type_name -> pb.DriverVersion
-	2, // 2: pb.GPUDriverVersionInfoList.gpu_driver_version_info:type_name -> pb.GPUDriverVersionInfo
-	3, // [3:3] is the sub-list for method output_type
-	3, // [3:3] is the sub-list for method input_type
-	3, // [3:3] is the sub-list for extension type_name
-	3, // [3:3] is the sub-list for extension extendee
-	0, // [0:3] is the sub-list for field type_name
+	0, // 0: pb.DriverVersion.supported_host_versions:type_name -> pb.HostDriverVersion
+	2, // 1: pb.GPUDriverVersionInfo.gpu_device:type_name -> pb.GPUDevice
+	1, // 2: pb.GPUDriverVersionInfo.supported_driver_versions:type_name -> pb.DriverVersion
+	3, // 3: pb.GPUDriverVersionInfoList.gpu_driver_version_info:type_name -> pb.GPUDriverVersionInfo
+	4, // [4:4] is the sub-list for method output_type
+	4, // [4:4] is the sub-list for method input_type
+	4, // [4:4] is the sub-list for extension type_name
+	4, // [4:4] is the sub-list for extension extendee
+	0, // [0:4] is the sub-list for field type_name
 }
 
 func init() { file_gpu_driver_versions_proto_init() }
@@ -294,7 +353,7 @@
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_gpu_driver_versions_proto_rawDesc), len(file_gpu_driver_versions_proto_rawDesc)),
 			NumEnums:      0,
-			NumMessages:   4,
+			NumMessages:   5,
 			NumExtensions: 0,
 			NumServices:   0,
 		},
diff --git a/src/pkg/gpuconfig/proto/gpu_driver_versions.proto b/src/pkg/gpuconfig/proto/gpu_driver_versions.proto
index d11c924..1fbc179 100644
--- a/src/pkg/gpuconfig/proto/gpu_driver_versions.proto
+++ b/src/pkg/gpuconfig/proto/gpu_driver_versions.proto
@@ -5,6 +5,12 @@
 
 option go_package = ".;pb";
 
+// Represents a supported host driver version for vGPU.
+message HostDriverVersion {
+  string version = 1;
+  // more metadata about host driver versions.
+}
+
 // Represents all the information about a GPU driver version.
 // It contains the GPU driver version label (e.g., "default", "latest"), and the GPU driver version that is associated with that label.
 message DriverVersion {
@@ -12,6 +18,8 @@
   string label = 1;
   // The driver version that is associated with this label.
   string version = 2;
+  // List of supported host driver versions for vGPU.
+  repeated HostDriverVersion supported_host_versions = 3;
   // more metadata about the driver version.
 }