diff options
| author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2022-03-29 15:08:06 +0000 |
|---|---|---|
| committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2022-05-12 21:22:00 +0000 |
| commit | b518543be8042a5a0dda9b983f71c4a99d74ad99 (patch) | |
| tree | 835882bb27c196b6a460758dad7fe796d25e34e6 /usr/src/cmd | |
| parent | d7b72f7b52f902da47cc7210a9121f4caabbcb9c (diff) | |
| download | illumos-joyent-b518543be8042a5a0dda9b983f71c4a99d74ad99.tar.gz | |
14603 bhyve passthrough mishandles combined CMD/STATUS reads
Reviewed by: Jorge Schrauwen <registration@blackdot.be>
Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr/src/cmd')
| -rw-r--r-- | usr/src/cmd/bhyve/pci_passthru.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/cmd/bhyve/pci_passthru.c b/usr/src/cmd/bhyve/pci_passthru.c index da64288bc5..75176d6fe6 100644 --- a/usr/src/cmd/bhyve/pci_passthru.c +++ b/usr/src/cmd/bhyve/pci_passthru.c @@ -877,8 +877,8 @@ passthru_cfgread(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, if (coff == PCIR_COMMAND) { if (bytes <= 2) return (-1); - *rv = pci_get_cfgdata16(pi, PCIR_COMMAND) << 16 | - passthru_read_config(sc, PCIR_STATUS, 2); + *rv = passthru_read_config(sc, PCIR_STATUS, 2) << 16 | + pci_get_cfgdata16(pi, PCIR_COMMAND); return (0); } |
