Просмотр исходного кода

[vmbus] Do not expect version in version_response

The definition of version_response channel message in Linux doesn't
include version field, so the upcoming VMBus implementation in QEMU
doesn't set it either.  Neither Windows nor Linux had any problem with
this.

The check against this field is redundant because the message is the
response to initiate_contact message containing the specific version
requested, so the response with version_supported=true is unambiguous.

Drop this check and don't rely on the field to be present in the
message.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Roman Kagan 6 лет назад
Родитель
Сommit
40956545e2
1 измененных файлов: 2 добавлений и 8 удалений
  1. 2
    8
      src/interface/hyperv/vmbus.c

+ 2
- 8
src/interface/hyperv/vmbus.c Просмотреть файл

@@ -195,16 +195,10 @@ static int vmbus_initiate_contact ( struct hv_hypervisor *hv,
195 195
 		       vmbus );
196 196
 		return -ENOTSUP;
197 197
 	}
198
-	if ( version->version.raw != cpu_to_le32 ( raw ) ) {
199
-		DBGC ( vmbus, "VMBUS %p unexpected version %d.%d\n",
200
-		       vmbus, le16_to_cpu ( version->version.major ),
201
-		       le16_to_cpu ( version->version.minor ) );
202
-		return -EPROTO;
203
-	}
204 198
 
205 199
 	DBGC ( vmbus, "VMBUS %p initiated contact using version %d.%d\n",
206
-	       vmbus, le16_to_cpu ( version->version.major ),
207
-	       le16_to_cpu ( version->version.minor ) );
200
+	       vmbus, le16_to_cpu ( initiate.version.major ),
201
+	       le16_to_cpu ( initiate.version.minor ) );
208 202
 	return 0;
209 203
 }
210 204
 

Загрузка…
Отмена
Сохранить