← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1566564] Re: support query-gic-version QMP command

 

** Description changed:

- [Note - the patches are all upstream, so risk on this patchset should be
- low]
+ [Impact]
+ TLDR; It is not currently possible to define a libvirt KVM guest that will boot on any arm64 system. This breaks assumptions of higher level tools like nova and virt-install.
  
- There currently is no interface for an external tool to determine what
- GIC versions can be used by guests on the current hardware/QEMU
- combination. Upstream patches have recently landed to solve this
- problem, exposing a QMP interface for probing the system:
+ ARM systems can only boot KVM guests that have the same GIC (Generic
+ Interrupt Controller) version as the host. GICv2 is the QEMU default
+ but, if your system does not have a GICv2, you need to know your GIC
+ version and pass that down to the QEMU command line (e.g. -M
+ virt,gic_version=3). If you (or your tools) don't know to do that, your
+ guests will just fail to boot on non-GICv2 hosts with the obscure error
+ "Failed to set device address: No such device". Starting with Ubuntu
+ 16.04, we support at least one GICv3-only system (Cavium ThunderX).
  
- dannf@mustang:~$ telnet localhost 4444
- Trying ::1...
- Connected to localhost.
- Escape character is '^]'.
- {"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 2}, "package": " (Debian 1:2.5+dfsg-5ubuntu6)"}, "capabilities": []}}
- { "execute": "qmp_capabilities" }
- {"return": {}}
- { "execute": "query-gic-capabilities" }
- {"return": [{"emulated": false, "version": 3, "kernel": false}, {"emulated": true, "version": 2, "kernel": true}]}
+ Recent changes to QEMU and libvirt have improved this situation. QEMU
+ now exposes a "query-gic-capabilities" QMP interface that can let the
+ caller ask what GIC types are available for guests to use on that host.
+ libvirt can now make use of this QEMU interface, and expose that
+ information to users via the domcapabilities interface. Further, the
+ user can specify a gic version of "host" to have libvirt choose a
+ detected GIC version, or the user can omit the <gic> feature altogether,
+ and libvirt will choose a GIC version supported by the host and update
+ the guest XML appropriately. This allows tools like virt-install and
+ nova to generate GIC-agnostic XML that can boot on any arm64 host.
  
- This is important, because VM management software (i.e. libvirt) need to
- be able to figure out what guest configurations are supported.
+ [Test Case]
+ Detection. Run this command on an arm64 host:
+ 
+ $ sudo virsh domcapabilities --machine virt --virttype kvm
+ 
+ After the update, you should see a <gic> capability with a list of
+ supported GIC versions that match the host system.
+ 
+ Runtime1. Place the attached gic.xml file in /etc/libvirt/qemu.
+ $ sudo virsh define /etc/libvirt/qemu/gic.xml
+ $ sudo virsh start /etc/libvirt/qemu/gic.xml
+ 
+ Prior to this update, it will error out with:
+ error: XML error: malformed gic version: host
+ 
+ After the update, it'll boot using whatever GIC version is available on
+ your system.
+ 
+ Runtime2. On a GICv3 system, edit the gic.xml file and remove the <gic version='host'/> line.
+ $ sudo virsh define /etc/libvirt/qemu/gic.xml
+ $ sudo virsh start /etc/libvirt/qemu/gic.xml
+ 
+ Prior to this update, this will fail with an I/O error. After this
+ update, it will succeed, and a <gic version='3'/> setting will be added
+ to the XML.
+ 
+ [Regression Risk]
+ These patches are all upstream, so risk on this patchset should be low.
+ 
+ The change to both QEMU and libvirt are backwards compatible with the
+ existing versions in xenial. If no GIC version is specified, QEMU still
+ defaults to GICv2. If a GIC is specified w/o a version, libvirt
+ continues to default to GICv2.

** Changed in: libvirt (Ubuntu)
       Status: New => Confirmed

** Description changed:

  [Impact]
  TLDR; It is not currently possible to define a libvirt KVM guest that will boot on any arm64 system. This breaks assumptions of higher level tools like nova and virt-install.
  
  ARM systems can only boot KVM guests that have the same GIC (Generic
  Interrupt Controller) version as the host. GICv2 is the QEMU default
  but, if your system does not have a GICv2, you need to know your GIC
  version and pass that down to the QEMU command line (e.g. -M
  virt,gic_version=3). If you (or your tools) don't know to do that, your
  guests will just fail to boot on non-GICv2 hosts with the obscure error
  "Failed to set device address: No such device". Starting with Ubuntu
  16.04, we support at least one GICv3-only system (Cavium ThunderX).
+ 
+ I consider this a hardware enablement issue, and seek SRU approval based
+ on that criteria.
  
  Recent changes to QEMU and libvirt have improved this situation. QEMU
  now exposes a "query-gic-capabilities" QMP interface that can let the
  caller ask what GIC types are available for guests to use on that host.
  libvirt can now make use of this QEMU interface, and expose that
  information to users via the domcapabilities interface. Further, the
  user can specify a gic version of "host" to have libvirt choose a
  detected GIC version, or the user can omit the <gic> feature altogether,
  and libvirt will choose a GIC version supported by the host and update
  the guest XML appropriately. This allows tools like virt-install and
  nova to generate GIC-agnostic XML that can boot on any arm64 host.
  
  [Test Case]
  Detection. Run this command on an arm64 host:
  
  $ sudo virsh domcapabilities --machine virt --virttype kvm
  
  After the update, you should see a <gic> capability with a list of
  supported GIC versions that match the host system.
  
  Runtime1. Place the attached gic.xml file in /etc/libvirt/qemu.
  $ sudo virsh define /etc/libvirt/qemu/gic.xml
  $ sudo virsh start /etc/libvirt/qemu/gic.xml
  
  Prior to this update, it will error out with:
  error: XML error: malformed gic version: host
  
  After the update, it'll boot using whatever GIC version is available on
  your system.
  
  Runtime2. On a GICv3 system, edit the gic.xml file and remove the <gic version='host'/> line.
  $ sudo virsh define /etc/libvirt/qemu/gic.xml
  $ sudo virsh start /etc/libvirt/qemu/gic.xml
  
  Prior to this update, this will fail with an I/O error. After this
  update, it will succeed, and a <gic version='3'/> setting will be added
  to the XML.
  
  [Regression Risk]
  These patches are all upstream, so risk on this patchset should be low.
  
  The change to both QEMU and libvirt are backwards compatible with the
  existing versions in xenial. If no GIC version is specified, QEMU still
  defaults to GICv2. If a GIC is specified w/o a version, libvirt
  continues to default to GICv2.

** Also affects: qemu (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Also affects: libvirt (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Changed in: libvirt (Ubuntu Xenial)
       Status: New => Confirmed

** Changed in: qemu (Ubuntu Xenial)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1566564

Title:
  support query-gic-version QMP command

Status in libvirt package in Ubuntu:
  Confirmed
Status in qemu package in Ubuntu:
  Fix Released
Status in libvirt source package in Xenial:
  Confirmed
Status in qemu source package in Xenial:
  Confirmed

Bug description:
  [Impact]
  TLDR; It is not currently possible to define a libvirt KVM guest that will boot on any arm64 system. This breaks assumptions of higher level tools like nova and virt-install.

  ARM systems can only boot KVM guests that have the same GIC (Generic
  Interrupt Controller) version as the host. GICv2 is the QEMU default
  but, if your system does not have a GICv2, you need to know your GIC
  version and pass that down to the QEMU command line (e.g. -M
  virt,gic_version=3). If you (or your tools) don't know to do that,
  your guests will just fail to boot on non-GICv2 hosts with the obscure
  error "Failed to set device address: No such device". Starting with
  Ubuntu 16.04, we support at least one GICv3-only system (Cavium
  ThunderX).

  I consider this a hardware enablement issue, and seek SRU approval
  based on that criteria.

  Recent changes to QEMU and libvirt have improved this situation. QEMU
  now exposes a "query-gic-capabilities" QMP interface that can let the
  caller ask what GIC types are available for guests to use on that
  host. libvirt can now make use of this QEMU interface, and expose that
  information to users via the domcapabilities interface. Further, the
  user can specify a gic version of "host" to have libvirt choose a
  detected GIC version, or the user can omit the <gic> feature
  altogether, and libvirt will choose a GIC version supported by the
  host and update the guest XML appropriately. This allows tools like
  virt-install and nova to generate GIC-agnostic XML that can boot on
  any arm64 host.

  [Test Case]
  Detection. Run this command on an arm64 host:

  $ sudo virsh domcapabilities --machine virt --virttype kvm

  After the update, you should see a <gic> capability with a list of
  supported GIC versions that match the host system.

  Runtime1. Place the attached gic.xml file in /etc/libvirt/qemu.
  $ sudo virsh define /etc/libvirt/qemu/gic.xml
  $ sudo virsh start /etc/libvirt/qemu/gic.xml

  Prior to this update, it will error out with:
  error: XML error: malformed gic version: host

  After the update, it'll boot using whatever GIC version is available
  on your system.

  Runtime2. On a GICv3 system, edit the gic.xml file and remove the <gic version='host'/> line.
  $ sudo virsh define /etc/libvirt/qemu/gic.xml
  $ sudo virsh start /etc/libvirt/qemu/gic.xml

  Prior to this update, this will fail with an I/O error. After this
  update, it will succeed, and a <gic version='3'/> setting will be
  added to the XML.

  [Regression Risk]
  These patches are all upstream, so risk on this patchset should be low.

  The change to both QEMU and libvirt are backwards compatible with the
  existing versions in xenial. If no GIC version is specified, QEMU
  still defaults to GICv2. If a GIC is specified w/o a version, libvirt
  continues to default to GICv2.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1566564/+subscriptions