Date: Mon, 28 Mar 2022 12:59:32 +0000 From: =?utf-8?B?Q29ydmluIEvDtmhuZQ==?= <C.Koehne@beckhoff.com> To: Mario Marietto <marietto2008@gmail.com>, "jason@tubnor.net" <jason@tubnor.net> Cc: FreeBSD virtualization <freebsd-virtualization@freebsd.org>, "hackers@freebsd.org" <hackers@freebsd.org> Subject: RE: Virtio-win driver (virtio-blk and virtio-scsi) don't work when they are used on bhyve with Windows 11 as guest os Message-ID: <751e6ce5c5b641e899a3d9f94f3b4605@beckhoff.com> In-Reply-To: <CA%2B1FSihntYCWBZm0EuPmSXq1EmcwdfG%2BVC_RwVgFyukLyS2ARw@mail.gmail.com> References: <CA%2B1FSigxiPPHcE-eig20a6S%2BVEquEwiwG_NvpOahPK3BQh=kng@mail.gmail.com> <02ee01d8421f$cf723f20$6e56bd60$@tubnor.net> <CA%2B1FSihntYCWBZm0EuPmSXq1EmcwdfG%2BVC_RwVgFyukLyS2ARw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi Mario, > Maybe I can make a lighter /boot/loader.conf file,excluding the USB controllers..... You can always exclude pptdevs from /boot/loader.conf. Sadly, it’s nowhere documented properly. FreeBSD is able to switch to the ppt driver at runtime. 1. Remove the pptdevs line from /boot/loader.conf 2. Reboot your system 3. “devctl detach pci0:0:20:0” 4. “devctl set driver pci0:0:20:0 ppt” 5. “bhyve … -s 20,passthru,0/20/0 … vmname” Sometimes it’s possible to successfully reattach a driver: 1. “bhyve … -s 20,passthru,0/20/0 … vmname” 2. “bhyvectl --destroy --vm=vmname” 3. “devctl detach pci0:0:20:0” 4. “devctl set driver pci0:0:20:0 xhci” Best regards Corvin Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 [-- Attachment #2 --] <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:11.0pt; font-family:"Calibri",sans-serif;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; font-size:11.0pt; font-family:"Calibri",sans-serif;} span.EmailStyle23 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri",sans-serif;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} /* List Definitions */ @list l0 {mso-list-id:1395354464; mso-list-type:hybrid; mso-list-template-ids:2102933814 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 {mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l0:level2 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l0:level3 {mso-level-number-format:roman-lower; mso-level-tab-stop:none; mso-level-number-position:right; text-indent:-9.0pt;} @list l0:level4 {mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l0:level5 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l0:level6 {mso-level-number-format:roman-lower; mso-level-tab-stop:none; mso-level-number-position:right; text-indent:-9.0pt;} @list l0:level7 {mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l0:level8 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l0:level9 {mso-level-number-format:roman-lower; mso-level-tab-stop:none; mso-level-number-position:right; text-indent:-9.0pt;} @list l1 {mso-list-id:1825466094; mso-list-type:hybrid; mso-list-template-ids:-1978499856 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l1:level1 {mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l1:level2 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l1:level3 {mso-level-number-format:roman-lower; mso-level-tab-stop:none; mso-level-number-position:right; text-indent:-9.0pt;} @list l1:level4 {mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l1:level5 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l1:level6 {mso-level-number-format:roman-lower; mso-level-tab-stop:none; mso-level-number-position:right; text-indent:-9.0pt;} @list l1:level7 {mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l1:level8 {mso-level-number-format:alpha-lower; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-.25in;} @list l1:level9 {mso-level-number-format:roman-lower; mso-level-tab-stop:none; mso-level-number-position:right; text-indent:-9.0pt;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head> <body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"> <div id="OLX_DISCLAIMER_MARKER" style="visibility:hidden;mso-line-height-rule:exactly;line-height:0px"> </div> <div class="WordSection1"> <p class="MsoNormal">Hi Mario,<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">> Maybe I can make a lighter /boot/loader.conf file,excluding the USB controllers.....<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">You can always exclude pptdevs from /boot/loader.conf.<o:p></o:p></p> <p class="MsoNormal">Sadly, it’s nowhere documented properly.<o:p></o:p></p> <p class="MsoNormal">FreeBSD is able to switch to the ppt driver at runtime.<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <ol style="margin-top:0in" start="1" type="1"> <li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo1">Remove the pptdevs line from /boot/loader.conf<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo1">Reboot your system<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo1">“devctl detach pci0:0:20:0”<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo1">“devctl set driver pci0:0:20:0 ppt”<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo1">“bhyve … -s 20,passthru,0/20/0 … vmname”<o:p></o:p></li></ol> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Sometimes it’s possible to successfully reattach a driver:<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <ol style="margin-top:0in" start="1" type="1"> <li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2">“bhyve … -s 20,passthru,0/20/0 … vmname”<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2">“bhyvectl --destroy --vm=vmname”<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2">“devctl detach pci0:0:20:0”<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2">“devctl set driver pci0:0:20:0 xhci”<o:p></o:p></li></ol> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Best regards<o:p></o:p></p> <p class="MsoNormal">Corvin<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> </div> <br> <span style="FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt">Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff<br> Registered office: Verl, Germany | Register court: Guetersloh HRA 7075</span> <br> <br> </body> </html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?751e6ce5c5b641e899a3d9f94f3b4605>
