hyperv/vmbus: add a new method to get vcpu_id
authordexuan <dexuan@FreeBSD.org>
Wed, 16 Nov 2016 09:02:17 +0000 (09:02 +0000)
committerdexuan <dexuan@FreeBSD.org>
Wed, 16 Nov 2016 09:02:17 +0000 (09:02 +0000)
commitd16d83d31d8474f120b1d4f9a586d1dcfe2235b2
treec6fa1c6fde9feef273fe7294efe57985f17d22b1
parent10f77ef73e8757d703057848f32ed6267aa49ff5
hyperv/vmbus: add a new method to get vcpu_id

vcpu_id is host's representation of guest CPU.
We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus
driver is loaded. Later, when a driver, like the coming pcib driver, talks
to the host and needs to refer to a guest CPU, the driver must use the
vcpu_id.

Reviewed by: jhb, sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8410
sys/dev/hyperv/vmbus/vmbus.c
sys/dev/hyperv/vmbus/vmbus_if.m