Page MenuHomeFreeBSD

hyperv/vmbus: add new vmbus methods to support PCIe pass-through
ClosedPublic

Authored by decui_microsoft.com on Nov 1 2016, 9:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 3, 12:32 PM
Unknown Object (File)
Sun, Mar 3, 11:48 AM
Unknown Object (File)
Sun, Mar 3, 11:40 AM
Unknown Object (File)
Sun, Mar 3, 11:28 AM
Unknown Object (File)
Sat, Mar 2, 12:42 AM
Unknown Object (File)
Feb 15 2024, 11:37 AM
Unknown Object (File)
Dec 29 2023, 12:04 PM
Unknown Object (File)
Dec 26 2023, 6:42 AM
Subscribers
None

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 new vmbus methods to support PCIe pass-through.
decui_microsoft.com updated this object.
decui_microsoft.com edited the test plan for this revision. (Show Details)
sys/dev/hyperv/vmbus/vmbus_if.m
49 ↗(On Diff #21876)

This replaced by:
vmbus_chan_guid_inst(vmbus_get_channel(dev))

sys/dev/hyperv/vmbus/vmbus_if.m
49 ↗(On Diff #21876)

OK, will remove this method.

removed the get instance guid method, and moved the get_vcpu_id method to a separate patch (https://reviews.freebsd.org/D8410)

sys/dev/hyperv/vmbus/vmbus.c
47–52 ↗(On Diff #21878)

Move sys/rman.h to the above inclusion group. Group machine/*.h together

59 ↗(On Diff #21878)

Move this after "acpi_if.h" inclusion. Strip the blank line bewteen dev/pci/*.h and dev/acpica/acpivar.h

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 comments.

This revision now requires review to proceed.Nov 2 2016, 2:27 AM

I uploaded the new version to address the comments.

This revision is now accepted and ready to land.Nov 2 2016, 2:31 AM

This looks fine. Note that there is some existing code this somewhat duplicates. For example, the ACPI Host-PCI bridge driver also parses _CRS to determine valid ranges. It uses the pcib_host_res_* API to add those ranges to a list that it then iterates on allocation requests. I'm not sure if does the same trick of preferring > 4G ranges for 64-bit BARs (though if pcib_host_res_*() would otherwise work for you I'd be fine with fixing it to do the same).

In D8409#175275, @jhb wrote:

This looks fine. Note that there is some existing code this somewhat duplicates. For example, the ACPI Host-PCI bridge driver also parses _CRS to determine valid ranges. It uses the pcib_host_res_* API to add those ranges to a list that it then iterates on allocation requests. I'm not sure if does the same trick of preferring > 4G ranges for 64-bit BARs (though if pcib_host_res_*() would otherwise work for you I'd be fine with fixing it to do the same).

Hmm, we probably can reuse the existing APIs, but do two pass decodes, the first pass adds the 64-bits BARs, the second one adds 32-bits BARs.

Hi jhb, Thanks for the suggestion! I'll update the patch with the pcib_host_res_* APIs.

In D8409#175275, @jhb wrote:

This looks fine. Note that there is some existing code this somewhat duplicates. For example, the ACPI Host-PCI bridge driver also parses _CRS to determine valid ranges. It uses the pcib_host_res_* API to add those ranges to a list that it then iterates on allocation requests. I'm not sure if does the same trick of preferring > 4G ranges for 64-bit BARs (though if pcib_host_res_*() would otherwise work for you I'd be fine with fixing it to do the same).

Hmm, we probably can reuse the existing APIs, but do two pass decodes, the first pass adds the 64-bits BARs, the second one adds 32-bits BARs.

Good suggestion! I've made a patch with the 2-pass method. Will upload it shortly.

decui_microsoft.com edited edge metadata.

This new version addressed jhb and sephe's comments.

This revision now requires review to proceed.Nov 3 2016, 9:13 AM
This revision is now accepted and ready to land.Nov 3 2016, 9:32 AM
This revision was automatically updated to reflect the committed changes.