Page MenuHomeFreeBSD

hyperv/vmbus: also find acpi_syscontainer0 for _CRS
AbandonedPublic

Authored by decui_microsoft.com on Apr 28 2017, 9:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 18, 3:29 AM
Unknown Object (File)
Sat, Jun 14, 12:36 AM
Unknown Object (File)
Mon, May 26, 5:37 PM
Unknown Object (File)
Apr 14 2025, 3:27 PM
Unknown Object (File)
Mar 28 2025, 3:48 AM
Unknown Object (File)
Mar 18 2025, 9:13 PM
Unknown Object (File)
Mar 14 2025, 8:30 PM
Unknown Object (File)
Mar 12 2025, 1:42 PM
Subscribers
None

Details

Summary

This is needed for PCIe pass-through on Hyper-V Generation 2 VM.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8955
Build 9347: arc lint + arc unit

Event Timeline

Humm, ok I guess. This is a gross hack though that would be fixed by making vmbus a child of whatever device it belongs to. Also, it seems like you should be trying to find _CRS on your parent in the namespace. That wouldn't be on acpi0, but instead you would use something like:

ACPI_STATUS status;
ACPI_HANDLE handle;

status = AcpiGetParent(acpi_get_handle(dev), &handle);
if (ACPI_SUCCESS(status)) {
    device_t parent;

    parent = acpi_get_device(handle);
    if (parent != NULL)
        vmbus_get_crs(parent, dev, pass);
}

This would find the parent of the VMBus device in the ACPI namespace and use that device's device_t.

Sephe will send out a patchset that will handle the issue in a better way.