Date: Thu, 13 Jun 2019 18:36:18 +0000 From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 205549] bhyve pci passthru stops working after guest is restarted Message-ID: <bug-205549-27103-AwMYtCn8RR@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-205549-27103@https.bugs.freebsd.org/bugzilla/> References: <bug-205549-27103@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205549 --- Comment #6 from arkadyi <ark@dudevich.dn.ua> --- Hmm....I don't see in the file usr.sbin/bhyve/pci_passthru.c (origin) bellow strings 642 pci_set_cfgdata16(pi, PCIR_COMMAND, read_config(&sc->psc_sel, 643 PCIR_COMMAND, 2)); # patch < D20623.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: usr.sbin/bhyve/pci_passthru.c |=================================================================== |--- usr.sbin/bhyve/pci_passthru.c |+++ usr.sbin/bhyve/pci_passthru.c -------------------------- Patching file pci_passthru.c using Plan A... Hunk #1 succeeded at 615 (offset -3 lines). Hunk #2 succeeded at 625 (offset -3 lines). Hunk #3 failed at 648. 1 out of 3 hunks failed--saving rejects to pci_passthru.c.rej done cat /usr/src/usr.sbin/bhyve/pci_passthru.c.rej @@ -636,8 +648,13 @@ goto done; } - pci_set_cfgdata16(pi, PCIR_COMMAND, read_config(&sc->psc_sel, - PCIR_COMMAND, 2)); + /* + * Fetch the updated virtual command register and write it to + * the device if needed. + */ + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); + if (cmd != orig_cmd) + write_config(&sc->psc_sel, PCIR_COMMAND, 2, cmd); error = 0; /* success */ done: uname -srv FreeBSD 12.0-RELEASE-p5 FreeBSD 12.0-RELEASE-p5 r349013 -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205549-27103-AwMYtCn8RR>
