2018-11-23 07:09:51 |
Christian Ehrhardt |
bug |
|
|
added bug |
2018-11-23 07:10:54 |
Christian Ehrhardt |
nominated for series |
|
Ubuntu Cosmic |
|
2018-11-23 07:10:54 |
Christian Ehrhardt |
bug task added |
|
qemu (Ubuntu Cosmic) |
|
2018-11-23 07:10:54 |
Christian Ehrhardt |
nominated for series |
|
Ubuntu Bionic |
|
2018-11-23 07:10:54 |
Christian Ehrhardt |
bug task added |
|
qemu (Ubuntu Bionic) |
|
2018-11-23 07:10:59 |
Christian Ehrhardt |
qemu (Ubuntu Bionic): status |
New |
Triaged |
|
2018-11-23 07:11:01 |
Christian Ehrhardt |
qemu (Ubuntu Cosmic): status |
New |
Triaged |
|
2018-11-23 07:21:53 |
Christian Ehrhardt |
qemu (Ubuntu): status |
New |
In Progress |
|
2018-11-26 10:41:05 |
Christian Ehrhardt |
description |
Hi,
for quite a while we had thought enabling opengl to go along the MIR for virglrenderer (bug 1657409), but missed that it is a prereq for using MDEVs as well.
This now become much more important as newer drivers (recent nvidia drivers, as well as kernel >4.16 for intel) made this much more available to users - and it would work just fine if qemu had opengl enabled.
Other than for virgl we don't need additional libraries to be promoted to MAIN.
Those we need for "just" opengl are already in MAIN for Ubuntu Desktop support.
So the change is as easy as adding a few build-deps and setting a config option.
The code is already in place, qemu 2.11 (Bionic) has all it needs for nvidia and 2.12 >=Cosmic has the code for Intel.
That said flipping this build option (no other change) would allow:
- >= 18.10 use vfio MDEVs for gpu's of nvidia and intel
- 18.04 use vfio MDEVs for gpu's of nvidia
- 18.04 + HWE kernel + later Cloud-Archive with qemu >2.12 use vfio MDEVs for intel gpus
I did a bunch of tests and found no related regressions.
And in terms of SRU terms this falls clearly under "enabling new HW/Feature in LTS" exception as the use of vfio-MDEV for gpus just wasn't as clear back then but becomes more and more important now. |
[Impact]
* Newer GPU hardware of Nvidia (4.15) and Intel (4.16) can be split into
virtual GPUs by their host device driver. It is customers demand to be
able to utilize that sooner than waiting for 20.04 to happen. While the
usability prior to very recent libvirt versions (not backporting all of
that as it is not SRUable) isn't perfect it works well enough as-is.
* The fix is enabling a build option and some build depends, the code is
already there.
* This applies to the safe SRU exception of "For Long Term Support
releases we sometimes want to introduce new features. They must not
change the behaviour on existing installations ..." due to the fact
that gl is disabled by default. So users need to opt-in to use it after
the change here.
[Test Case]
* TBD: I need to convert my notes into something someone can follow more easily
[Regression Potential]
* by being default off the regressions to current users should be near
zero. We are not changing actual code, but "only" enable a config.
If the config would enable code that runs in cases that are default
enabled (like by an ifdef in C code that makes code outside of gl=on
run the extra code) there could be a regression that we don't see yet.
[Other Info]
* This is NOT virgl based vGPUs as in bug 1657409
----
Hi,
for quite a while we had thought enabling opengl to go along the MIR for virglrenderer (bug 1657409), but missed that it is a prereq for using MDEVs as well.
This now become much more important as newer drivers (recent nvidia drivers, as well as kernel >4.16 for intel) made this much more available to users - and it would work just fine if qemu had opengl enabled.
Other than for virgl we don't need additional libraries to be promoted to MAIN.
Those we need for "just" opengl are already in MAIN for Ubuntu Desktop support.
So the change is as easy as adding a few build-deps and setting a config option.
The code is already in place, qemu 2.11 (Bionic) has all it needs for nvidia and 2.12 >=Cosmic has the code for Intel.
That said flipping this build option (no other change) would allow:
- >= 18.10 use vfio MDEVs for gpu's of nvidia and intel
- 18.04 use vfio MDEVs for gpu's of nvidia
- 18.04 + HWE kernel + later Cloud-Archive with qemu >2.12 use vfio MDEVs for intel gpus
I did a bunch of tests and found no related regressions.
And in terms of SRU terms this falls clearly under "enabling new HW/Feature in LTS" exception as the use of vfio-MDEV for gpus just wasn't as clear back then but becomes more and more important now. |
|
2018-11-26 11:12:33 |
Christian Ehrhardt |
description |
[Impact]
* Newer GPU hardware of Nvidia (4.15) and Intel (4.16) can be split into
virtual GPUs by their host device driver. It is customers demand to be
able to utilize that sooner than waiting for 20.04 to happen. While the
usability prior to very recent libvirt versions (not backporting all of
that as it is not SRUable) isn't perfect it works well enough as-is.
* The fix is enabling a build option and some build depends, the code is
already there.
* This applies to the safe SRU exception of "For Long Term Support
releases we sometimes want to introduce new features. They must not
change the behaviour on existing installations ..." due to the fact
that gl is disabled by default. So users need to opt-in to use it after
the change here.
[Test Case]
* TBD: I need to convert my notes into something someone can follow more easily
[Regression Potential]
* by being default off the regressions to current users should be near
zero. We are not changing actual code, but "only" enable a config.
If the config would enable code that runs in cases that are default
enabled (like by an ifdef in C code that makes code outside of gl=on
run the extra code) there could be a regression that we don't see yet.
[Other Info]
* This is NOT virgl based vGPUs as in bug 1657409
----
Hi,
for quite a while we had thought enabling opengl to go along the MIR for virglrenderer (bug 1657409), but missed that it is a prereq for using MDEVs as well.
This now become much more important as newer drivers (recent nvidia drivers, as well as kernel >4.16 for intel) made this much more available to users - and it would work just fine if qemu had opengl enabled.
Other than for virgl we don't need additional libraries to be promoted to MAIN.
Those we need for "just" opengl are already in MAIN for Ubuntu Desktop support.
So the change is as easy as adding a few build-deps and setting a config option.
The code is already in place, qemu 2.11 (Bionic) has all it needs for nvidia and 2.12 >=Cosmic has the code for Intel.
That said flipping this build option (no other change) would allow:
- >= 18.10 use vfio MDEVs for gpu's of nvidia and intel
- 18.04 use vfio MDEVs for gpu's of nvidia
- 18.04 + HWE kernel + later Cloud-Archive with qemu >2.12 use vfio MDEVs for intel gpus
I did a bunch of tests and found no related regressions.
And in terms of SRU terms this falls clearly under "enabling new HW/Feature in LTS" exception as the use of vfio-MDEV for gpus just wasn't as clear back then but becomes more and more important now. |
[Impact]
* Newer GPU hardware of Nvidia (4.15) and Intel (4.16) can be split into
virtual GPUs by their host device driver. It is customers demand to be
able to utilize that sooner than waiting for 20.04 to happen. While the
usability prior to very recent libvirt versions (not backporting all of
that as it is not SRUable) isn't perfect it works well enough as-is.
* The fix is enabling a build option and some build depends, the code is
already there.
* This applies to the safe SRU exception of "For Long Term Support
releases we sometimes want to introduce new features. They must not
change the behaviour on existing installations ..." due to the fact
that gl is disabled by default. So users need to opt-in to use it after
the change here.
[Test Case]
* There are various ways to test this but they all depend on certain HW
to be available as the feature starts with the Hosts GPU device driver
breaking the card into shareable mediated devices.
* In theory some Nvidia GPU cards [1] can work as well, but I didn't have
one of those to test and most others verifying this might not have one
either. Therefore I'll outline the use of the much more widespread
Intel i915 chips. Note in Bionic i915 vGPU needs the HWE kernel to
work.
* Prepare Host to be able to split the GPU
# loading modules
$ printf "kvmgt\nvfio-iommu-type1\nvfio-mdev" | sudo tee /etc/initramfs-tools/modules
# in /etc/default/grub add kernel opts
i915.enable_gvt=1 intel_iommu=on drm.debug=0
# Refresh boot config and reboot
$ sudo update-initramfs -u
$ sudo update-grub
* Create vGPUs in the host, the PCI path depends on your system.
# Check lspci if you have a different slot than 0000:00:02.0
$ cd /sys/bus/pci/devices/0000:00:02.0/i915-GVTg_V4_4/
# you need new UUIDs, you can e.g. run
$ uuid -n 2
# and then take these UUIDs into the driver to create the vGPUs
$ echo 4dd50f26-ec08-11e8-b838-4bc3356865b6 | sudo tee create
$ echo 4dd511f6-ec08-11e8-b839-2f163ddee3b3 | sudo tee create
# you should then see soemthing like:
$ ls -laF /sys/bus/mdev/devices/
lrwxrwxrwx 1 root root 0 Nov 19 15:38 4dd50f26-ec08-11e8-b838-4bc3356865b6 -> ../../../devices/pci0000:00/0000:00:02.0/4dd50f26-ec08-11e8-b838-4bc3356865b6/
lrwxrwxrwx 1 root root 0 Nov 19 15:38 4dd511f6-ec08-11e8-b839-2f163ddee3b3 -> ../../../devices/pci0000:00/0000:00:02.0/4dd511f6-ec08-11e8-b839-2f163ddee3b3/
* you can start qemu "as usual" with the tweak of adding
- gl=on to the display statement
- a vfio-pci device referencing the MDEV uuid path
# Example qemu:
/usr/bin/qemu-system-x86_64 \
-m 2048 \
-nodefaults \
-enable-kvm \
-M graphics=off \
-serial stdio \
-cpu host \
-display gtk,gl=on \
-usb -usbdevice tablet \
-net nic -net user \
-device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/4dd511f6-ec08-11e8-b839-2f163ddee3b3,display=on,rombar=0 \
-hda /var/lib/uvtool/libvirt/images/bionic-vgpu.qcow
This qemu will boot (you could as well use a Ubuntu ISO, I used a image
I created with uvtool in this case) and when you log in you will see in
the guest the Intel HD graphics card in e.g. lspci.
[Regression Potential]
* by being default off the regressions to current users should be near
zero. We are not changing actual code, but "only" enable a config.
If the config would enable code that runs in cases that are default
enabled (like by an ifdef in C code that makes code outside of gl=on
run the extra code) there could be a regression that we don't see yet.
[Other Info]
* This is NOT virgl based vGPUs as in bug 1657409
* Some related links for the MDEV-GPU topic in general:
https://bugzilla.redhat.com/show_bug.cgi?id=1460804
https://bugzilla.redhat.com/show_bug.cgi?id=1337290
https://docs.nvidia.com/grid/latest/grid-vgpu-release-notes-red-hat-el-kvm/index.html
http://on-demand.gputechconf.com/gtc/2017/presentation/s7572-suneel-marthi-trevor-grant-extending-mahout-samsara.pdf
https://www.kraxel.org/blog/2018/04/vgpu-display-support-finally-merged-upstream/
https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide
https://docs.nvidia.com/grid/latest/grid-vgpu-release-notes-red-hat-el-kvm/index.html
https://www.linux-kvm.org/images/5/59/02x03-Neo_Jia_and_Kirti_Wankhede-vGPU_on_KVM-A_VFIO_based_Framework.pdf
http://on-demand.gputechconf.com/gtc/2017/presentation/s7572-suneel-marthi-trevor-grant-extending-mahout-samsara.pdf
[1]: https://docs.nvidia.com/grid/latest/grid-vgpu-user-guide/index.html
----
Hi,
for quite a while we had thought enabling opengl to go along the MIR for virglrenderer (bug 1657409), but missed that it is a prereq for using MDEVs as well.
This now become much more important as newer drivers (recent nvidia drivers, as well as kernel >4.16 for intel) made this much more available to users - and it would work just fine if qemu had opengl enabled.
Other than for virgl we don't need additional libraries to be promoted to MAIN.
Those we need for "just" opengl are already in MAIN for Ubuntu Desktop support.
So the change is as easy as adding a few build-deps and setting a config option.
The code is already in place, qemu 2.11 (Bionic) has all it needs for nvidia and 2.12 >=Cosmic has the code for Intel.
That said flipping this build option (no other change) would allow:
- >= 18.10 use vfio MDEVs for gpu's of nvidia and intel
- 18.04 use vfio MDEVs for gpu's of nvidia
- 18.04 + HWE kernel + later Cloud-Archive with qemu >2.12 use vfio MDEVs for intel gpus
I did a bunch of tests and found no related regressions.
And in terms of SRU terms this falls clearly under "enabling new HW/Feature in LTS" exception as the use of vfio-MDEV for gpus just wasn't as clear back then but becomes more and more important now. |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
qemu (Ubuntu): status |
In Progress |
Fix Released |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-10839 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-12617 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-16847 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-17958 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-17962 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-17963 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-18849 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-18954 |
|
2018-11-27 23:20:33 |
Launchpad Janitor |
cve linked |
|
2018-19364 |
|
2018-11-28 10:36:11 |
Christian Ehrhardt |
qemu (Ubuntu Bionic): importance |
Undecided |
Wishlist |
|
2018-11-28 10:36:13 |
Christian Ehrhardt |
qemu (Ubuntu Cosmic): importance |
Undecided |
Wishlist |
|
2018-11-28 10:36:25 |
Christian Ehrhardt |
bug task added |
|
libvirt (Ubuntu) |
|
2018-11-28 10:36:32 |
Christian Ehrhardt |
libvirt (Ubuntu Bionic): status |
New |
Triaged |
|
2018-11-28 10:36:35 |
Christian Ehrhardt |
libvirt (Ubuntu Bionic): importance |
Undecided |
Wishlist |
|
2018-11-28 10:36:37 |
Christian Ehrhardt |
libvirt (Ubuntu Cosmic): importance |
Undecided |
Wishlist |
|
2018-11-28 10:36:39 |
Christian Ehrhardt |
libvirt (Ubuntu Cosmic): status |
New |
Triaged |
|
2018-11-28 10:36:41 |
Christian Ehrhardt |
libvirt (Ubuntu): status |
New |
Triaged |
|
2018-11-28 10:36:43 |
Christian Ehrhardt |
libvirt (Ubuntu): importance |
Undecided |
High |
|
2018-11-28 10:37:45 |
Christian Ehrhardt |
bug |
|
|
added subscriber Ubuntu Security Team |
2018-11-28 10:49:50 |
Christian Ehrhardt |
tags |
|
libvirt-19.04 qemu-19.04 |
|
2019-01-27 19:28:31 |
Launchpad Janitor |
libvirt (Ubuntu): status |
Triaged |
Fix Released |
|
2019-01-31 08:24:55 |
Christian Ehrhardt |
qemu (Ubuntu Cosmic): status |
Triaged |
Won't Fix |
|
2019-01-31 08:24:57 |
Christian Ehrhardt |
qemu (Ubuntu Bionic): status |
Triaged |
Won't Fix |
|
2019-01-31 08:24:59 |
Christian Ehrhardt |
libvirt (Ubuntu Cosmic): status |
Triaged |
Won't Fix |
|
2019-01-31 08:25:01 |
Christian Ehrhardt |
libvirt (Ubuntu Bionic): status |
Triaged |
Won't Fix |
|