Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160652424
D40060.id121846.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
950 B
Referenced Files
None
Subscribers
None
D40060.id121846.diff
View Options
diff --git a/usr.sbin/bhyve/pci_gvt-d.c b/usr.sbin/bhyve/pci_gvt-d.c
--- a/usr.sbin/bhyve/pci_gvt-d.c
+++ b/usr.sbin/bhyve/pci_gvt-d.c
@@ -20,6 +20,8 @@
#define MB (1024 * KB)
#define GB (1024 * MB)
+#define PCIR_BDSM 0x5C /* Base of Data Stolen Memory register */
+
#define PCIM_BDSM_GSM_ALIGNMENT \
0x00100000 /* Graphics Stolen Memory is 1 MB aligned */
@@ -73,6 +75,7 @@
struct passthru_softc *sc;
struct passthru_mmio_mapping *gsm;
size_t sysctl_len;
+ uint64_t bdsm;
int error;
sc = pi->pi_arg;
@@ -133,7 +136,12 @@
"Warning: Unable to reuse host address of Graphics Stolen Memory. GPU passthrough might not work properly.");
}
- return (0);
+ bdsm = read_config(passthru_get_sel(sc), PCIR_BDSM, 4);
+ pci_set_cfgdata32(pi, PCIR_BDSM,
+ gsm->gpa | (bdsm & (PCIM_BDSM_GSM_ALIGNMENT - 1)));
+
+ return (set_pcir_handler(sc, PCIR_BDSM, 4, passthru_cfgread_emulate,
+ passthru_cfgwrite_emulate));
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 27, 12:23 PM (14 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34400572
Default Alt Text
D40060.id121846.diff (950 B)
Attached To
Mode
D40060: bhyve: emulate graphics stolen memory register
Attached
Detach File
Event Timeline
Log In to Comment