CPU does not support MWAIT?

Hello to everyone. I’ve installed ClearLinux on my PC without much problems and everything seems to work fine. Now I’m trying to boot ClearLinux as guest OS on FreeBSD as host using the bhyve hypervisor. Unfortunately for some reason,it gets stuck on the screen,even if it gives a precise error. In the meantime I want to give you a general overview of the hardware specs of my PC :

# pciconf -lv

hostb0@pci0:0:0:0:      class=0x060000 rev=0x0d hdr=0x00 vendor=0x8086 device=0x3e30 subvendor=0x1458 subdevice=0x5000
    vendor     = 'Intel Corporation'
    device     = '8th/9th Gen Core 8-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S]'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:       class=0x060400 rev=0x0d hdr=0x01 vendor=0x8086 device=0x1901 subvendor=0x1458 subdevice=0x5000
    vendor     = 'Intel Corporation'
    device     = '6th-10th Gen Core Processor PCIe Controller (x16)'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:1:1:       class=0x060400 rev=0x0d hdr=0x01 vendor=0x8086 device=0x1905 subvendor=0x1458 subdevice=0x5000
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8)'
    class      = bridge
    subclass   = PCI-PCI
vgapci0@pci0:0:2:0:     class=0x030000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3e98 subvendor=0x1458 subdevice=0xd000
    vendor     = 'Intel Corporation'
    device     = 'CoffeeLake-S GT2 [UHD Graphics 630]'
    class      = display
    subclass   = VGA
pchtherm0@pci0:0:18:0:  class=0x118000 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa379 subvendor=0x1458 subdevice=0x8888
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH Thermal Controller'
    class      = dasp
xhci0@pci0:0:20:0:      class=0x0c0330 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa36d subvendor=0x1458 subdevice=0x5007
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH USB 3.1 xHCI Host Controller'
    class      = serial bus
    subclass   = USB
none0@pci0:0:20:2:      class=0x050000 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa36f subvendor=0x8086 subdevice=0x7270
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH Shared SRAM'
    class      = memory
    subclass   = RAM
none1@pci0:0:22:0:      class=0x078000 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa360 subvendor=0x1458 subdevice=0x1c3a
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH HECI Controller'
    class      = simple comms
ahci0@pci0:0:23:0:      class=0x010601 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa352 subvendor=0x1458 subdevice=0xb005
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH SATA AHCI Controller'
    class      = mass storage
    subclass   = SATA
pcib3@pci0:0:27:0:      class=0x060400 rev=0xf0 hdr=0x01 vendor=0x8086 device=0xa340 subvendor=0x1458 subdevice=0x5001
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:0:      class=0x060400 rev=0xf0 hdr=0x01 vendor=0x8086 device=0xa338 subvendor=0x1458 subdevice=0x5001
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:28:6:      class=0x060400 rev=0xf0 hdr=0x01 vendor=0x8086 device=0xa33e subvendor=0x1458 subdevice=0x5001
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib6@pci0:0:29:0:      class=0x060400 rev=0xf0 hdr=0x01 vendor=0x8086 device=0xa330 subvendor=0x1458 subdevice=0x5001
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:      class=0x060100 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa305 subvendor=0x1458 subdevice=0x5001
    vendor     = 'Intel Corporation'
    device     = 'Z390 Chipset LPC/eSPI Controller'
    class      = bridge
    subclass   = PCI-ISA
hdac0@pci0:0:31:3:      class=0x040300 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa348 subvendor=0x1458 subdevice=0xa0c3
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH cAVS'
    class      = multimedia
    subclass   = HDA
ichsmb0@pci0:0:31:4:    class=0x0c0500 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa323 subvendor=0x1458 subdevice=0x5001
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH SMBus Controller'
    class      = serial bus
    subclass   = SMBus
none2@pci0:0:31:5:      class=0x0c8000 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa324 subvendor=0x8086 subdevice=0x7270
    vendor     = 'Intel Corporation'
    device     = 'Cannon Lake PCH SPI Controller'
    class      = serial bus
em0@pci0:0:31:6:        class=0x020000 rev=0x10 hdr=0x00 vendor=0x8086 device=0x15bc subvendor=0x1458 subdevice=0xe000
    vendor     = 'Intel Corporation'
    device     = 'Ethernet Connection (7) I219-V'
    class      = network
    subclass   = ethernet
ppt0@pci0:1:0:0:        class=0x0c0330 rev=0x03 hdr=0x00 vendor=0x1912 device=0x0014 subvendor=0x1912 subdevice=0x0015
    vendor     = 'Renesas Technology Corp.'
    device     = 'uPD720201 USB 3.0 Host Controller'
    class      = serial bus
    subclass   = USB
ppt1@pci0:2:0:0:        class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1e04 subvendor=0x19da subdevice=0x2503
    vendor     = 'NVIDIA Corporation'
    device     = 'TU102 [GeForce RTX 2080 Ti]'
    class      = display
    subclass   = VGA
ppt2@pci0:2:0:1:        class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x10f7 subvendor=0x19da subdevice=0x2503
    vendor     = 'NVIDIA Corporation'
    device     = 'TU102 High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
ppt3@pci0:2:0:2:        class=0x0c0330 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1ad6 subvendor=0x19da subdevice=0x2503
    vendor     = 'NVIDIA Corporation'
    device     = 'TU102 USB 3.1 Host Controller'
    class      = serial bus
    subclass   = USB
ppt4@pci0:2:0:3:        class=0x0c8000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1ad7 subvendor=0x19da subdevice=0x2503
    vendor     = 'NVIDIA Corporation'
    device     = 'TU102 USB Type-C UCSI Controller'
    class      = serial bus
nvme0@pci0:3:0:0:       class=0x010802 rev=0x03 hdr=0x00 vendor=0xc0a9 device=0x5403 subvendor=0xc0a9 subdevice=0x2100
    vendor     = 'Micron/Crucial Technology'
    class      = mass storage
    subclass   = NVM
ppt5@pci0:5:0:0:        class=0x0c0330 rev=0x10 hdr=0x00 vendor=0x1b73 device=0x1100 subvendor=0x1b73 subdevice=0x1100
    vendor     = 'Fresco Logic'
    device     = 'FL1100 USB 3.0 Host Controller'
    class      = serial bus
    subclass   = USB

then,I’ve launched the bhyve hypervisor using the following parameters :


bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \
-s 0,hostbridge \
-s 1,passthru,1/0/0,bootindex=1 \
-s 8:,virtio-net,tap20 \
-s 29,fbuf,tcp=0.0.0.0:5920,w=1600,h=950 \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
vm20 < /dev/null & sleep 2 && vncviewer 0:20

this is the error I get :

as u can see,the error seems to be "CPU does not support MWAIT. So,is there a way to disable this parameter between the kernel parameters used when CL boots for the first time ? thanks.

According to the bhyve docs a request for MWAIT that causes a VMExit is because it was trying to change access from non-root at ring 0 to root and was denied.

ok. Do you have a workaround in your mind ? I’m talking with a bhyve developer to understand how to fix it.

This is a fundamental question, not irony.

Is Intel Virtualization Technology (Intel VT-x) “ON” in UEFI setting?
Different from QEMU, BHyVe depends on Intel VT-x.

I can tell you that it is enabled on the BIOS and it works because I’m virtualizing a lot of OSes on FreeBSD with bhyve and I have no problems. They are fast and they work great. I’ve collected some informations that can be useful to you to understand if I have activated VT-x

From FreeBSD :

root@marietto:/home/marietto # acpidump -t | grep DMAR

DMAR: Length=168, Revision=1, Checksum=204,

root@marietto:/home/marietto # dmesg | grep -i vt-

VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID

VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID

I wonder whether you can run this script. It has check script related KVM, too.
https://docs.01.org/clearlinux/latest/get-started/compatibility-check.html

Since he noted that he had been able to boot Clear Linux on the computer in question prior to using bhyve, i skipped the UEFI question altogether. But I was thinking the samething.

If my brain still serves, MWAIT attempts to allocate a page in memory when called.

If I am reading the condition correctly, the host is telling the hypervisor that it cant allocate that page without a root level authority. So since Clear works on the PC without the use of a hypervisor, I tend to look at the hypervisor and not at the OS.

But in this case the Clear Linux request for a page is unique in such a way the bhyve hypervisor cant map it and punts.

Does clearlinux requires a com port ? because when I have attached it,I’ve reached the terminal command. Without it,it was frozen.
Since Xorg didn’t want to work with the framebuffer, I have configured ssh on Clear Linux and I’ve activated the X forwarding. What I don’t understand yet is why some linux distributions are capable to run a full desktop environment and for some others is needed to forward the X server. And also I don’t understand why if I use this parameter "-l com1,stdio " I reach the login prompt,without it,instead, it freezes. X server needs a driver for the bhyve efi gop. E.g. Ubuntu is very powerful and is shipped with many drivers by default. Maybe Ubuntu contains a proper driver and clearlinux not.