Skip to content

Commit

Permalink
[vmbus] Do not expect version in version_response
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rvka authored and mcb30 committed Jul 7, 2018
1 parent 16d7495 commit 4095654
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/interface/hyperv/vmbus.c
Expand Up @@ -195,16 +195,10 @@ static int vmbus_initiate_contact ( struct hv_hypervisor *hv,
vmbus );
return -ENOTSUP;
}
if ( version->version.raw != cpu_to_le32 ( raw ) ) {
DBGC ( vmbus, "VMBUS %p unexpected version %d.%d\n",
vmbus, le16_to_cpu ( version->version.major ),
le16_to_cpu ( version->version.minor ) );
return -EPROTO;
}

DBGC ( vmbus, "VMBUS %p initiated contact using version %d.%d\n",
vmbus, le16_to_cpu ( version->version.major ),
le16_to_cpu ( version->version.minor ) );
vmbus, le16_to_cpu ( initiate.version.major ),
le16_to_cpu ( initiate.version.minor ) );
return 0;
}

Expand Down

0 comments on commit 4095654

Please sign in to comment.