Bug 1595636
Summary: | vdsm-hook-vfio-mdev failed to run VM with Intel GVT-g device. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [oVirt] vdsm | Reporter: | Nisim Simsolo <nsimsolo> | ||||||
Component: | Core | Assignee: | Milan Zamazal <mzamazal> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Nisim Simsolo <nsimsolo> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | --- | CC: | alex.williamson, bugs, mtessun, mzamazal, nsimsolo | ||||||
Target Milestone: | ovirt-4.2.6 | Flags: | rule-engine:
ovirt-4.2+
mtessun: planning_ack+ rule-engine: devel_ack+ rule-engine: testing_ack+ |
||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | v4.20.37 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2018-09-03 15:07:27 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Nisim Simsolo
2018-06-27 08:55:08 UTC
Created attachment 1454986 [details]
vdsm.log
Created attachment 1454987 [details]
engine.log
what are the available types then? what does this return: for device in /sys/class/mdev_bus/*; do for mdev_type in \ $device/mdev_supported_types/*; do echo "mdev_type: \ \"$(basename $mdev_type)\" --- description: $(cat $mdev_type/description)"; \ done; done also, what's the actual content of your /sys/class/mdev_bus/0000\:00\:02.0/mdev_supported_types/i915-GVTg_V5_#/ directory (In reply to Michal Skrivanek from comment #3) > what are the available types then? what does this return: > > for device in /sys/class/mdev_bus/*; do for mdev_type in \ > $device/mdev_supported_types/*; do echo "mdev_type: \ > \"$(basename $mdev_type)\" --- description: $(cat $mdev_type/description)"; \ > done; done mdev_type: "i915-GVTg_V5_4" --- description: low_gm_size: 128MB high_gm_size: 512MB fence: 4 resolution: 1920x1200 weight: 4 mdev_type: "i915-GVTg_V5_8" --- description: low_gm_size: 64MB high_gm_size: 384MB fence: 4 resolution: 1024x768 weight: 2 (In reply to Michal Skrivanek from comment #4) > also, what's the actual content of your > /sys/class/mdev_bus/0000\:00\:02.0/mdev_supported_types/i915-GVTg_V5_#/ > directory # ls -l /sys/class/mdev_bus/0000\:00\:02.0/mdev_supported_types/i915-GVTg_V5_4/ total 0 -r--r--r--. 1 root root 4096 Jun 26 16:59 available_instances --w-------. 1 root root 4096 Jun 26 17:37 create -r--r--r--. 1 root root 4096 Jun 26 16:59 description -r--r--r--. 1 root root 4096 Jun 26 16:59 device_api drwxr-xr-x. 2 root root 0 Jun 27 10:54 devices # The problem is missing `name' file in i915-GVTg_V5_4 directory. mdev hook and Vdsm assume that the file is present, which is apparently not the case with Intel. Idea to fix it: If no name is present, just use the directory name (in this case i915-GVTg_V5_4) OK, thank you for the idea, I'll try it. Not that this is under debate, but note that the kernel documentation shows both the name and description as optional: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-vfio-mdev Clearly we shouldn't depend on optional attributes. Indeed, thank you for the reference! Verification build: ovirt-engine-4.2.6.1_SNAPSHOT-89.g295078e.0.scratch.master.el7ev.noarch libvirt-client-3.9.0-14.el7_5.7.x86_64 qemu-kvm-rhev-2.10.0-21.el7_5.5.x86_64 vdsm-4.20.37-1.el7ev.x86_64 sanlock-3.6.0-1.el7.x86_64 Verification HW: VGA compatible controller: Intel Corporation HD Graphics 530 Model name: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz Verification scenario: 1. Verify GVTg mdev devices are listed under /sys/class/mdev_bus/0000\:00\:0X.0/mdev_supported_types/ 2. Browse Webadmin -> edit VM, add mdev_type hook with GVTg device name 3. Run VM 4. Verify VM is running properly and no errors related in vdsm.log and engine.log Verify GVTg device is added to VM PCI device with the correct kernel driver, for example: 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06) Subsystem: Lenovo Device [17aa:5050] Kernel driver in use: i915 Kernel modules: i915 5. Reboot VM, After reboot has completed, verify VM is running properly with GVTg mdev device 6. Power off VM and run VM. Verify VM is running properly with GVTg mdev device |