Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_gvt-d.c
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | if (opregion->gpa != opregion->hpa) { | ||||
* change in the future. | * change in the future. | ||||
*/ | */ | ||||
warnx( | warnx( | ||||
"Warning: Unable to reuse host address of OpRegion. GPU passthrough might not work properly."); | "Warning: Unable to reuse host address of OpRegion. GPU passthrough might not work properly."); | ||||
} | } | ||||
memcpy(opregion->gva, opregion->hva, opregion->len); | memcpy(opregion->gva, opregion->hva, opregion->len); | ||||
return (0); | pci_set_cfgdata32(pi, PCIR_ASLS_CTL, opregion->gpa); | ||||
return (set_pcir_handler(sc, PCIR_ASLS_CTL, 4, passthru_cfgread_emulate, | |||||
passthru_cfgwrite_emulate)); | |||||
} | } | ||||
static int | static int | ||||
gvt_d_init(struct pci_devinst *const pi, nvlist_t *const nvl __unused) | gvt_d_init(struct pci_devinst *const pi, nvlist_t *const nvl __unused) | ||||
{ | { | ||||
int error; | int error; | ||||
if ((error = gvt_d_setup_gsm(pi)) != 0) { | if ((error = gvt_d_setup_gsm(pi)) != 0) { | ||||
Show All 34 Lines |