aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyve/pci_passthru.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bhyve/pci_passthru.c')
-rw-r--r--usr.sbin/bhyve/pci_passthru.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index 049b49b67c60..285874f3925d 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -212,7 +212,7 @@ cfginitmsi(struct passthru_softc *sc)
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 @@ cfginitmsi(struct passthru_softc *sc)
*/
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);