Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102718662
D37490.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
829 B
Referenced Files
None
Subscribers
None
D37490.diff
View Options
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -212,7 +212,7 @@
struct pcisel sel;
struct pci_devinst *pi;
struct msixcap msixcap;
- uint32_t *msixcap_ptr;
+ char *msixcap_ptr;
pi = sc->psc_pi;
sel = sc->psc_sel;
@@ -249,15 +249,15 @@
*/
sc->psc_msix.capoff = ptr;
caplen = 12;
- msixcap_ptr = (uint32_t*) &msixcap;
+ msixcap_ptr = (char *)&msixcap;
capptr = ptr;
while (caplen > 0) {
u32 = read_config(&sel, capptr, 4);
- *msixcap_ptr = u32;
+ memcpy(msixcap_ptr, &u32, 4);
pci_set_cfgdata32(pi, capptr, u32);
caplen -= 4;
capptr += 4;
- msixcap_ptr++;
+ msixcap_ptr += 4;
}
}
ptr = read_config(&sel, ptr + PCICAP_NEXTPTR, 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 7:40 AM (21 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14672691
Default Alt Text
D37490.diff (829 B)
Attached To
Mode
D37490: bhyve: Appease warning about a potentially unaligned pointer.
Attached
Detach File
Event Timeline
Log In to Comment