[BitVisor-devel:119] BitVisor の AHCI ドライバにつきまして
Manabu HIRANO
hirano @ toyota-ct.ac.jp
2020年 12月 11日 (金) 09:20:55 JST
豊田高専の平野です。
Sourceforge から最新の BitVisor を持ってきて 2台のマシンで動作確認しています。
どちらのマシンも defconfig の pci に何も指定していない場合(素の BitVisor)は
CentOS7、Windows7、Windows10 のゲストOSが全て動作したのですが、defconfig の pci に
ahci のドライバを追加して make した場合は CentOS7 をゲストOSとして動作させることは
できましたが、Windows 7 と Windows10 が起動しなくなりました。
私の理解だと標準の AHCI のパラパススルードライバは(何もせず)通常動作すると思ってい
たので、普通に Windows7 や Windows10 も動作すると思っていたのですが...。
driver=ahci を指定しないで、pro1000 や x540 を指定した場合だと Windows7 と Windows10
は普通に動いてくれています。
何か driver=ahci の設定の仕方に間違いがあるのでしょうか...。いろいろ試行錯誤した
のですが手詰まりのため、もし何かお気づきの点があればご教示いただけましたら幸いです。
よろしくお願いいたします。
以下、2機種のスペックと症状です。
機種1
マザーボード:ASRock H110M-HDV(UEFI 設定は default)
CPU:Celeron G3920
症状
最新の BitVisor で defconfig の pci に ahci のドライバを追加すると
CentOS7はゲストOSとして起動するが、Windows7 はゲストOSとして起動せず。
「Windows を起動しています」の表示で停止したままになりました。
```
## 以下は BitVisor の make 、ahci の defconfig 追加内容、reboot、dbgsh ログ、parted と lsblk の出力です
[lab @ localhost bitvisor-code]$ hg log -l1
リビジョン: 357:6a040ad96e01
タグ: tip
ユーザ: Ake Koomsin <ake @ igel.co.jp>
日付: Wed Dec 02 12:43:47 2020 +0900
要約: nvme: introduce shared locks to improve controller reset behavior
[lab @ localhost bitvisor-code]$ hg diff
[lab @ localhost bitvisor-code]$
[lab @ localhost bitvisor-code]$ lspci -tv
>>>>>>> rev 14 by @_lab
-[0000:00]-+-00.0 Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
+-01.0-[01]----00.0 Intel Corporation Ethernet Controller 10G X550T
+-02.0 Intel Corporation HD Graphics 510
+-14.0 Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
+-14.2 Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem
+-16.0 Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1
+-17.0 Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode]
+-1c.0-[02]--
+-1c.6-[03]----00.0 Intel Corporation 82572EI Gigabit Ethernet Controller (Copper)
+-1c.7-[04]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
+-1f.0 Intel Corporation H110 Chipset LPC/eSPI Controller
+-1f.2 Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller
+-1f.3 Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller
\-1f.4 Intel Corporation 100 Series/C230 Series Chipset Family SMBus
[lab @ localhost bitvisor-code]$ diff defconfig defconfig.tmpl
147c147
< .pci = "slot=00:17.0, driver=ahci",
---
> .pci = "",
[lab @ localhost bitvisor-code]$ which gcc
/opt/rh/devtoolset-8/root/usr/bin/gcc
[lab @ localhost bitvisor-code]$ make; sudo cp bitvisor.elf /boot/efi; cd boot/uefi-loader; make; sudo cp loadvmm.efi /boot/efi; sudo reboot
Booting BitVisor
[lab @ localhost bitvisor-code]$ cd ./tools/dbgsh/; make; ./dbgsh
> log
Starting BitVisor...
Copyright (c) 2007, 2008 University of Tsukuba
All rights reserved.
ACPI DMAR found.
FACS address 0x7EDB1F80 0x7EDB1F40
Module not found.
Processor 0 (BSP)
.................................................. oooooooooooooooooooooooooooooooooooooooooooooooooo
Using VMX.
Processor 0 2904020912 Hz (Invariant TSC)
Loading drivers.
AES/AES-XTS Encryption Engine initialized (AES=openssl)
Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
Generic ATA/ATAPI para pass-through driver 0.4 registered
Generic AHCI para pass-through driver registered
Generic RAID para pass-through driver registered
Generic IEEE1394 para pass-through driver 0.1 registered
Broadcom NetXtreme Gigabit Ethernet Driver registered
VPN for Intel PRO/100 registered
Intel PRO/1000 driver registered
virtio-net virtual driver registered
NVMe para pass-through driver registered
NVMe para pass-through driver registered
PCI device concealer registered
PCI device monitor registered
Generic EHCI para pass-through driver 0.9 registered
Generic EHCI para pass-through driver 0.9 registered
Generic UHCI para pass-through driver 1.0 registered
xHCI para pass-through driver 0.1 registered
Intel Corporation Ethernet Controller 10 Gigabit X540 Driver registered
PCI: finding devices...
AHCI: Enabled
PCI: 17 devices found
MCFG [0] 0000:00-FF (E0000000,10000000)
Starting a virtual machine.
AHCI 0:0 initialized
Processor 1 (AP)
Processor 1 2904045456 Hz (Invariant TSC)
AHCI 0:9 initialized
AHCI 0:1 initialized
AHCI 0:2 initialized
AHCI 0:3 initialized
AHCI 0:0 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
[00:1F.1] New PCI device found.
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:2 IDENTIFY
[lab @ localhost dbgsh]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
|-sda1 8:1 0 200M 0 part /boot/efi
|-sda2 8:2 0 1G 0 part /boot
`-sda3 8:3 0 231.7G 0 part
|-cl-root 253:0 0 50G 0 lvm /
|-cl-swap 253:1 0 7.6G 0 lvm [SWAP]
`-cl-home 253:2 0 174.1G 0 lvm /home
sdb 8:16 0 111.8G 0 disk
|-sdb1 8:17 0 100M 0 part
|-sdb2 8:18 0 128M 0 part
`-sdb3 8:19 0 111.6G 0 part
[lab @ localhost dbgsh]$ sudo parted -l
Model: ATA CT250BX100SSD1 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot
2 211MB 1285MB 1074MB xfs
3 1285MB 250GB 249GB lvm
Model: ATA KingFast (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot
2 106MB 240MB 134MB Microsoft reserved partition msftres
3 240MB 120GB 120GB ntfs Basic data partition
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/cl-home: 187GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 187GB 187GB xfs
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/cl-swap: 8187MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 8187MB 8187MB linux-swap(v1)
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/cl-root: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 53.7GB 53.7GB xfs
```
機種2 ThinkPad T540p
(UEFI 設定は default、secure boot のみ disable)
症状
最新の BitVisor で defconfig の pci に ahci のドライバを追加すると
CentOS7 はゲストOSとして起動するが、Windows10 はゲストOSとして起動せず。
黒い画面のまま停止しました。
```
## 以下は BitVisor の make 、ahci の defconfig 追加内容、reboot、dbgsh ログ、parted と lsblk の出力です
[lab @ localhost bitvisor-code]$ hg log -l1
リビジョン: 357:6a040ad96e01
タグ: tip
ユーザ: Ake Koomsin <ake @ igel.co.jp>
日付: Wed Dec 02 12:43:47 2020 +0900
要約: nvme: introduce shared locks to improve controller reset behavior
[lab @ localhost bitvisor-code]$ hg diff
[lab @ localhost bitvisor-code]$
[lab @ localhost bitvisor-code]$ lspci -tv
-[0000:00]-+-00.0 Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
+-01.0-[01]----00.0 NVIDIA Corporation GK208M [GeForce GT 730M]
+-02.0 Intel Corporation 4th Gen Core Processor Integrated Graphics Controller
+-03.0 Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
+-14.0 Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI
+-16.0 Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1
+-1a.0 Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2
+-1b.0 Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller
+-1c.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader
+-1c.1-[04]----00.0 Intel Corporation Wireless 7260
+-1c.2-[05-0c]--
+-1d.0 Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1
+-1f.0 Intel Corporation QM87 Express LPC Controller
+-1f.2 Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]
\-1f.3 Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller
[lab @ localhost bitvisor-code]$ diff defconfig defconfig.tmpl
147c147
< .pci = "slot=00:1f.2, driver=ahci",
---
> .pci = "",
[lab @ localhost bitvisor-code]$ which gcc
/opt/rh/devtoolset-8/root/usr/bin/gcc
[lab @ localhost bitvisor-code]$ make; sudo cp bitvisor.elf /boot/efi; cd boot/uefi-loader; make; sudo cp loadvmm.efi /boot/efi; sudo reboot
>>>>>>> rev 14 by @_lab
Booting BitVisor
[lab @ localhost bitvisor-code]$ cd ./tools/dbgsh/; make; ./dbgsh
> log
Starting BitVisor...
Copyright (c) 2007, 2008 University of Tsukuba
All rights reserved.
ACPI DMAR found.
FACS address 0xBCE4A000
Module not found.
Processor 0 (BSP)
.................................................. oooooooooooooooooooooooooooooooooooooooooooooooooo
Using VMX.
Processor 0 2693795584 Hz (Invariant TSC)
Loading drivers.
AES/AES-XTS Encryption Engine initialized (AES=openssl)
Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
Generic ATA/ATAPI para pass-through driver 0.4 registered
Generic AHCI para pass-through driver registered
Generic RAID para pass-through driver registered
Generic IEEE1394 para pass-through driver 0.1 registered
Broadcom NetXtreme Gigabit Ethernet Driver registered
VPN for Intel PRO/100 registered
Intel PRO/1000 driver registered
virtio-net virtual driver registered
NVMe para pass-through driver registered
NVMe para pass-through driver registered
PCI device concealer registered
PCI device monitor registered
Generic EHCI para pass-through driver 0.9 registered
Generic EHCI para pass-through driver 0.9 registered
Generic UHCI para pass-through driver 1.0 registered
xHCI para pass-through driver 0.1 registered
Intel Corporation Ethernet Controller 10 Gigabit X540 Driver registered
PCI: finding devices...
AHCI: Enabled
PCI: 19 devices found
MCFG [0] 0000:00-3F (F8000000,4000000)
Starting a virtual machine.
AHCI 0:5 initialized
Processor 1 (AP)
Processor 2 (AP)
Processor 5 (AP)
Processor 4 (AP)
Processor 3 (AP)
Processor 6 (AP)
Processor 7 (AP)
Processor 2 2693863360 Hz (Invariant TSC)
Processor 7 2693856512 Hz (Invariant TSC)
Processor 5 2693862336 Hz (Invariant TSC)
Processor 1 2693871424 Hz (Invariant TSC)
Processor 6 2693863552 Hz (Invariant TSC)
Processor 3 2693862784 Hz (Invariant TSC)
Processor 4 2693865728 Hz (Invariant TSC)
AHCI 0:0 initialized
AHCI 0:9 initialized
AHCI 0:5 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:5 IDENTIFY
AHCI 0:5 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:5 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:0 IDENTIFY
AHCI 0:5 IDENTIFY
[lab @ localhost ~]$ sudo parted -l
Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 556MB 555MB ntfs Basic data partition hidden, diag
2 556MB 661MB 105MB fat32 EFI system partition boot
3 661MB 677MB 16.8MB Microsoft reserved partition msftres
4 677MB 250GB 249GB ntfs Basic data partition
Model: ATA KINGSTON SUV400S (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 10.0GB 9999MB fat32 EFI System Partition boot
2 10.0GB 30.0GB 20.0GB linux-swap(v1)
3 30.0GB 120GB 90.0GB xfs
[lab @ localhost ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
|-sda1 8:1 0 529M 0 part
|-sda2 8:2 0 100M 0 part
|-sda3 8:3 0 16M 0 part
`-sda4 8:4 0 232.3G 0 part
sdb 8:16 0 111.8G 0 disk
|-sdb1 8:17 0 9.3G 0 part /boot/efi
|-sdb2 8:18 0 18.6G 0 part [SWAP]
`-sdb3 8:19 0 83.9G 0 part /
```
BitVisor-devel メーリングリストの案内