Имеется: проц i5-2500, мать AssRock на B75, видяшка для хоста: i5-2500, видяшка для виртуалки: GTX570, kernel 4.2.0, qemu 2.4.0, патчи на ядро: i915_vga_arbitration и acs_override.
Главный вопрос: как сделать многоразовую виртуалку?
У меня она повторно после выключения работать отказывается:
(qemu) qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:01:00.0
Device option ROM contents are probably invalid (check dmesg).
Skip option ROM probe with rombar=0, or load from file with romfile=
vfio-pci 0000:01:00.0: Invalid ROM contents
.Сдампил биос видеокарты, скармливаю ей:
romfile=vbios.rom
- первый запуск все ок (так же как и без дампа), повторный запуск - комп виснет. Перезагрузка гостя тоже приводит к зависанию.И пара мелких вопросиков:
1) Как-нибудь можно обойтись одной мышкой и клавой? И для хоста и для гостя.
2) Возможно ли использовать qemu-шные spice/vnc одновременно с пробросом видяшки? Или единственный вариант - ставить vncserver на гостя?
Всякое разное:
# grep -iE 'vga|vfio' semero4ka.sh
-device vfio-pci,host=01:00.0,addr=07.0,multifunction=on,x-vga=on,romfile=vbios.rom \
-device vfio-pci,host=01:00.1,addr=07.1 \
-vga none \
# lspci -k | grep VGA -A2
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
Subsystem: ASRock Incorporation 2nd Generation Core Processor Family Integrated Graphics Controller
Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 570] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd GF110 [GeForce GTX 570]
Kernel driver in use: vfio-pci
# lspci -n | grep 01:00
01:00.0 0300: 10de:1081 (rev a1)
01:00.1 0403: 10de:0e09 (rev a1)
# grep CMDLINE_LINUX_DEFAULT /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="vfio-pci.ids=10de:1081,10de:0e09 intel_iommu=on pcie_acs_override=downstream i915.enable_hd_vgaarb=1"
# dmesg -t | grep -iE 'iommu|vfio|dmar'
Command line: BOOT_IMAGE=/boot/kernel-genkernel-x86_64-4.2.0-gentoo-r1 root=/dev/sda2 ro vfio-pci.ids=10de:1081,10de:0e09 intel_iommu=on pcie_acs_override=downstream i915.enable_hd_vgaarb=1
Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA
ACPI: DMAR 0x00000000BDF3A748 0000B8 (v01 INTEL SNB 00000001 INTL 00000001)
Kernel command line: BOOT_IMAGE=/boot/kernel-genkernel-x86_64-4.2.0-gentoo-r1 root=/dev/sda2 ro vfio-pci.ids=10de:1081,10de:0e09 intel_iommu=on pcie_acs_override=downstream i915.enable_hd_vgaarb=1
DMAR: IOMMU enabled
DMAR: Host address width 36
DMAR: DRHD base: 0x000000fed90000 flags: 0x0
DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020e60262 ecap f0101a
DMAR: DRHD base: 0x000000fed91000 flags: 0x1
DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap c9008020660262 ecap f0105a
DMAR: RMRR base: 0x000000bdd7c000 end: 0x000000bdda8fff
DMAR: RMRR base: 0x000000bf800000 end: 0x000000cf9fffff
DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
DMAR-IR: HPET id 0 under DRHD base 0xfed91000
DMAR-IR: Enabled IRQ remapping in xapic mode
DMAR: No ATSR found
DMAR: dmar0: Using Queued invalidation
DMAR: dmar1: Using Queued invalidation
DMAR: Setting RMRR:
DMAR: Setting identity map for device 0000:00:02.0 [0xbf800000 - 0xcf9fffff]
DMAR: Setting identity map for device 0000:00:14.0 [0xbdd7c000 - 0xbdda8fff]
DMAR: Setting identity map for device 0000:00:1a.0 [0xbdd7c000 - 0xbdda8fff]
DMAR: Setting identity map for device 0000:00:1d.0 [0xbdd7c000 - 0xbdda8fff]
DMAR: Prepare 0-16MiB unity mapping for LPC
DMAR: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
DMAR: Intel(R) Virtualization Technology for Directed I/O
iommu: Adding device 0000:00:00.0 to group 0
iommu: Adding device 0000:00:01.0 to group 1
iommu: Adding device 0000:00:02.0 to group 2
iommu: Adding device 0000:00:14.0 to group 3
iommu: Adding device 0000:00:16.0 to group 4
iommu: Adding device 0000:00:1a.0 to group 5
iommu: Adding device 0000:00:1b.0 to group 6
iommu: Adding device 0000:00:1c.0 to group 7
iommu: Adding device 0000:00:1c.4 to group 8
iommu: Adding device 0000:00:1c.5 to group 9
iommu: Adding device 0000:00:1d.0 to group 10
iommu: Adding device 0000:00:1e.0 to group 11
iommu: Adding device 0000:00:1f.0 to group 12
iommu: Adding device 0000:00:1f.2 to group 12
iommu: Adding device 0000:00:1f.3 to group 12
iommu: Adding device 0000:01:00.0 to group 13
iommu: Adding device 0000:01:00.1 to group 13
iommu: Adding device 0000:02:00.0 to group 14
iommu: Adding device 0000:03:00.0 to group 15
iommu: Adding device 0000:04:00.0 to group 16
[drm] DMAR active, disabling use of stolen memory
VFIO - User Level meta-driver version: 0.3
vfio_pci: add [10de:1081[ffff:ffff]] class 0x000000/00000000
vfio_pci: add [10de:0e09[ffff:ffff]] class 0x000000/00000000