OpRegion support for skylake.
Submitted by José Pekkarinen
Assigned to Terrence Xu
Link to original bug (#102321)
Description
Hi,
I'm running kernel 4.12.7 with vfio modules for mediated devices and kvmgt, and qemu 2.9. I create a mediated device using the following script lines:
uuid=<write some valid uuid here>
[ ! -d "/sys/class/mdev_bus/0000:00:02.0/$uuid" ] && echo "$uuid" >> /sys/class/mdev_bus/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/create
The device turns up in sys correctly:
$ ls /sys/bus/pci/devices/0000:00:02.0/<uuid>
/
driver intel_vgpu iommu_group mdev_type power remove subsystem uevent
[ 2746.481909] vfio_mdev <uuid>
: MDEV: group_id = 8
Trying to run the virtual machine using:
sudo qemu-system-x86_64 -enable-kvm -cpu host -smp 2,cores=1,threads=2 <br>
-m 8G -mem-path /mnt/hugepages -vga none <br>
-device vfio-pci,romfile=/sys/devices/pci0000:00/0000:00:02.0/rom,sysfsdev="/sys/class/mdev_bus/0000:00:02.0/$uuid",bus=pci.0,addr=02.0 <br>
-netdev user,id=user.0 -device e1000,netdev=user.0 <br>
-device ich9-usb-uhci3,id=uhci -device usb-ehci,id=ehci -device nec-usb-xhci,id=xhci <br>
-device virtio-serial <br>
-chardev socket,path=/tmp/virtio-serial.sock,server,nowait,id=serial-log <br>
-device virtserialport,chardev=serial-log,name=ant.port.0 <br>
-drive file=win7.img,format=raw,cache=none,aio=native,if=virtio
Brings the following output:
No protocol specified
qemu-system-x86_64: -device vfio-pci,romfile=/sys/devices/pci0000:00/0000:00:02.0/rom,sysfsdev=/sys/class/mdev_bus/0000:00:02.0/<uuid>
,bus=pci.0,addr=02.0: IGD device <uuid>
does not support OpRegion access,legacy mode disabled
Device is:
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07) (prog-if 00 [VGA controller])
Subsystem: CLEVO/KAPOK Computer HD Graphics 520
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >
SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 131
Region 0: Memory at de000000 (64-bit, non-prefetchable) [size=16M]
Region 2: Memory at c0000000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at f000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express (v2) Root Complex Integrated Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-, OBFF Not Supported
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee00018 Data: 0000
Capabilities: [d0] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Process Address Space ID (PASID)
PASIDCap: Exec+ Priv-, Max PASID Width: 14
PASIDCtl: Enable- Exec- Priv-
Capabilities: [200 v1] Address Translation Service (ATS)
ATSCap: Invalidate Queue Depth: 00
ATSCtl: Enable-, Smallest Translation Unit: 00
Capabilities: [300 v1] Page Request Interface (PRI)
PRICtl: Enable- Reset-
PRISta: RF- UPRGI- Stopped-
Page Request Capacity: 00008000, Page Request Allocation: 00000000
Kernel driver in use: i915
Kernel modules: i915
Please, let me know if there is something I can help you with.
Thanks!
José.