← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1830268] Re: libvirt caches nested vmx capability (in domcapabilities)

 

Currently libvirt tracks these elements to consider refreshing (they are
stored in the capability XMLs themselves).


  <qemuctime>1558846766</qemuctime>
  <selfctime>1557980947</selfctime>
  <selfvers>4000000</selfvers>

There are other ctime based caches as well like virQEMUCapsKVMUsable for
/dev/kvm.

The checker for the main caps is virQEMUCapsIsValid and so far checks:
- libvirt ctime (binary)
- libvirt version (internal build time value)
- qemu bin ctime (binary)
- do not not go further down if on emulated arch (won't change)
- /dev/kvm got accessible since last caching (DAC)
- /dev/kvm got unavailable since last caching (DAC)
- microcode changed (cpuinfo)
- kernel version changed
- Nesting is now supported

The latter sounds familiar right?
=> https://libvirt.org/git/?p=libvirt.git;a=commit;h=b183a75319b90d0af5512be513743e1eab950612

That is in 5.0 which means =>Disco already.
Lets check how backportable that is ...

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

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

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

** Changed in: libvirt (Ubuntu)
       Status: Triaged => Fix Released

-- 
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/1830268

Title:
  libvirt caches nested vmx capability (in domcapabilities)

Status in libvirt package in Ubuntu:
  Fix Released
Status in libvirt source package in Xenial:
  New
Status in libvirt source package in Bionic:
  New
Status in libvirt source package in Cosmic:
  New

Bug description:
  [impact]

  libvirt caches the 'nested vmx' capability of the host and does not
  update that even if the host's capability to handle nested vmx
  changes.  Having this domcapability missing means no guests are able
  to start any nested, kvm-accelerated, guests.  Additionally, since
  openstack live migration requires matching cpu features, this makes
  migrating guests that do have vmx enabled impossible to hosts where
  libvirt thinks nested vmx is disabled.

  Once the kernel module (kvm_intel) is reloaded with 'nested' enabled,
  libvirt does not update its domcapabilities cache, even over a
  libvirtd restart, or even over an entire system reboot.  Only certain
  conditions cause libvirt to update its capabilities cache (possibly
  libvirt upgrade, or qemu upgrade, or kernel upgrade...I haven't
  verified any of those yet)

  libvirt creates caches for its domcapabilities at /var/cache/libvirt/qemu/capabilities/.
  removing the cache xml files there and restarting libvirtd will cause the caches to be recreated with the correct current values.

  [test case]

  check the kvm_intel module nested parameter:
  $ cat /sys/module/kvm_intel/parameters/nested
  Y

  it can be Y or N.  make sure libvirt agrees with the current setting:
  $ virsh domcapabilities | grep vmx
        <feature policy='require' name='vmx'/>

  if 'nested' is Y, domcapabilities should include a vmx feature line;
  if 'nested' is N, it should have no output (i.e. vmx not supported in
  guests).

  Then, change the kernel nested setting, and re-check domcapabilities.
  Restarting libvirtd doesn't update the cache, and even rebooting the
  entire system doesn't update the cache.

  $ virsh domcapabilities | grep vmx
  $ cat /sys/module/kvm_intel/parameters/nested
  N
  $ sudo rmmod kvm_intel
  $ sudo modprobe kvm_intel nested=1
  $ cat /sys/module/kvm_intel/parameters/nested
  Y
  $ virsh domcapabilities | grep vmx
  $ sudo systemctl restart libvirtd
  $ virsh domcapabilities | grep vmx
  $

  [regression potential]

  TBD, but this should only require better invalidating of the caps
  cache, which seems very low for any regression potential.  More
  overhead to regenerate the cache more often maybe.

  [other info]

  related RH bugs, though no changes appear to have resulted from either:
  https://bugzilla.redhat.com/show_bug.cgi?id=1474874
  https://bugzilla.redhat.com/show_bug.cgi?id=1650950

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