Page MenuHomeFreeBSD

bhyve: export passthru softc
AbandonedPublic

Authored by corvink on Mar 28 2023, 10:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 9:05 PM
Unknown Object (File)
Sat, Nov 23, 4:27 PM
Unknown Object (File)
Oct 4 2024, 11:06 PM
Unknown Object (File)
Oct 4 2024, 9:05 PM
Unknown Object (File)
Oct 4 2024, 6:40 AM
Unknown Object (File)
Oct 2 2024, 12:11 AM
Unknown Object (File)
Sep 26 2024, 10:51 AM
Unknown Object (File)
Sep 1 2024, 11:14 AM

Details

Reviewers
jhb
markj
Group Reviewers
bhyve
Summary

The gpu passthrough emulation will be handled in a seperate source file.
Therefore, export the passthru softc to give the gpu passthrough
emulation access to softc members.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 50612
Build 47503: arc lint + arc unit

Event Timeline

corvink retitled this revision from bhyve: export some passthru softc to bhyve: export passthru softc.

Seems a bit odd making this public? as opposed to keeping a reference of the softc in gpu_passthru and passing that off to pci?

something like:

gpu_passthru.c:

struct gpu_passthru {
   struct pci_passthru *passthru_sc;
}

struct gpu_passthru *gp_sc;
passthru_read(gp_sc->passthru_sc);

just a thought - its a pattern I've seen in other areas of the code.

I've checked my gpu passthrough code and it requires access to some internal fields of passthru_softc. We can add some helper to access them. So, this patch isn't required.