Page MenuHomeFreeBSD

hyperv/vmbus: add a new method to get vcpu_id
ClosedPublic

Authored by decui_microsoft.com on Nov 1 2016, 11:08 AM.
Tags
None
Referenced Files
F81970743: D8410.id21920.diff
Sat, Dec 14, 8:58 PM
F81970723: D8410.id21877.diff
Sat, Dec 14, 8:50 PM
F81970489: D8410.diff
Sat, Dec 14, 5:46 PM
Unknown Object (File)
Mar 30 2024, 6:32 PM
Unknown Object (File)
Mar 28 2024, 4:28 PM
Unknown Object (File)
Mar 28 2024, 3:26 PM
Unknown Object (File)
Mar 11 2024, 3:11 AM
Unknown Object (File)
Feb 19 2024, 7:34 PM
Subscribers
None

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

decui_microsoft.com retitled this revision from to hyperv/vmbus: add a new method to get vcpu_id.
decui_microsoft.com updated this object.
decui_microsoft.com edited the test plan for this revision. (Show Details)
sys/dev/hyperv/vmbus/vmbus.c
999–1001 ↗(On Diff #21877)

Or:
const struct vmbus_softc *sc = device_get_softc(bus);

return (VMBUS_PCPU_GET(sc, vcpuid, cpu));

This revision is now accepted and ready to land.Nov 2 2016, 1:19 AM
decui_microsoft.com edited edge metadata.

This new version addressed Sephe's comment.

This revision now requires review to proceed.Nov 2 2016, 2:26 AM
This revision is now accepted and ready to land.Nov 2 2016, 2:28 AM
jhb edited edge metadata.
This revision was automatically updated to reflect the committed changes.