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)
Sat, Mar 16, 9:51 AM
Unknown Object (File)
Jan 11 2024, 12:53 PM
Unknown Object (File)
Jan 8 2024, 8:38 AM
Unknown Object (File)
Dec 22 2023, 11:49 PM
Unknown Object (File)
Dec 21 2023, 11:54 PM
Unknown Object (File)
Dec 10 2023, 9:09 PM
Unknown Object (File)
Sep 11 2023, 9:47 AM
Unknown Object (File)
Aug 29 2023, 10:37 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.