I found a solution. Since Kernel 6.8 or more recent (seems also some
distro with kernel 6.5), the kvm module (example kvm_intel) is used by
the kernel at boot. So you will need to unload the module manually with
kernels version 6.5 to 6.11 (modprobe -r kvm_intel  or modprobe -r
kvm_XXX whatever it is).

For kernels 6.12, there is a bootloader command "kvm.enable_virt_at_load=0" 
which you can use to disable loading kvm at boot.
For grub, do GRUB_CMDLINE_LINUX="kvm.enable_virt_at_load=0" as a command line 
parameter (under debian put it in /etc/default/grub)

But, this is not all. Virtualbox 6.1.50 also needs to be updated some sort 
because it won't compile their modules with kernels higher or equal than 6.8.
So I decided to backports bug fixes by doing diff compare of virtualbox 7.0.22. 
I supply a diff file here so you can update Virtualbox 6.1.50 to make it works 
with kernel 6.8 to 6.12 (and probably working with kernel 6.13 and 6.14 to 
date.) Not all patches has been backported. Just what it needs to support newer 
kernel and some other importants fixes I discovered. You will also need to add 
3 files that are missing in 6.1.50 :
usr/share/virtualbox/src/vboxhost/vboxdrv/include/VBox: VBoxLnxModInline.h
usr/share/virtualbox/src/vboxhost/vboxnetadp/include/VBox: VBoxLnxModInline.h
usr/share/virtualbox/src/vboxhost/vboxnetflt/include/VBox: VBoxLnxModInline.h

Also, note that I tested it with a Normal Kernel. Real-Time RT-PREEMPT
kernels don't work with 6.1.50 (I get Spinlock error and kernel
traceback errors).

The reason why I want to continue using virtualbox 6.1.50 is because it
supports older hardware motherboard and CPU back to date 2009, when
there was no VT-d or VT-c support with those motherboard. Anyway, I made
it works perfectly with debian 10 (buster) from 2020 with a custom
kernel 6.12. I also compiled it with GCC-12 because this old debian
distro had GCC 8.0.

By the way, the Virtualbox's Forum also has many thread to the same bug here:
https://forums.virtualbox.org/viewtopic.php?p=549108
https://forums.virtualbox.org/viewtopic.php?t=111902
https://forums.virtualbox.org/viewtopic.php?p=549757
https://forums.virtualbox.org/viewtopic.php?t=111925
https://forums.virtualbox.org/viewtopic.php?t=111918

Please, if one of you have an account created on those forums, can you
please rely this information there too? Virtualbox dev team decided not
to support 6.1.50 anymore. But it is actually possible to backports
fixes at some point like I did. Actually, i was able to extract the
official DEB package (dpkg-deb -R virtualbox-6.1.50.deb .), then
backports the fixes and recreate a brand new DEB package (dpkg-deb -b
new_virtualbox_folder).

** Patch added: "Virtualbox 6.1.50 Kernel 6.8 to 6.12 support"
   
https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/2073267/+attachment/5866925/+files/virtualbox_6.1.50_DIFF_MODDED_FOR_KERNEL_6.8_to_6.12.diff

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-hwe-6.8 in Ubuntu.
https://bugs.launchpad.net/bugs/2073267

Title:
  Virtualbox Guru meditation on VM start caused by kernel commit in
  v6.9-rc4

Status in linux package in Ubuntu:
  Invalid
Status in linux-hwe-6.8 package in Ubuntu:
  Invalid
Status in linux-signed-hwe-5.15 package in Ubuntu:
  Confirmed
Status in virtualbox package in Ubuntu:
  Confirmed
Status in linux source package in Jammy:
  Fix Released
Status in linux-hwe-6.8 source package in Jammy:
  Fix Released
Status in linux-signed-hwe-5.15 source package in Jammy:
  Invalid
Status in virtualbox source package in Jammy:
  Confirmed

Bug description:
  BugLink: https://bugs.launchpad.net/bugs/2073267

  SRU Justification:

  [Impact]

  Commit "randomize_kstack: Improve entropy diffusion" changed the
  kernel stack for entropy to 1KiB, limiting the thread kernel stack to
  15Kib. This impacts virtualbox 6.1.50 on jammy, that is no longer
  maintained upstream. The issue does not persist on version 7.0.20 due to a
  code refactoring that probably resulted in less stack usage. Fixing it on
  the jammy virtualbox package side is not straightfoward because the fix is
  not easy to backport to 6.x and upgrading the jammy package to 7.x breaks
  current users machines that run Windows, but not only.
  Users need to uninstall the Guest additions drivers, migrate the
  virtualbox package to 7.x, boot each VMs and install the Guest additions
  drivers in each VM.

  This impacts:
  1. jammy:linux
  2. jammy:linux-hwe-6.8
  3. focal:linux-hwe-5.15

  [Fix]

  Revert commit "randomize_kstack: Improve entropy diffusion"

  [Test Plan]

  Without this fix, a VM would crash, showing with "VCPU0: Guru
  Meditation -2708 (VERR_VMM_SET_JMP_ABORTED_RESUME)".
  After the kernel upgrade, all VMs should run with no problem.

  [Where problems could occur]
  This may have an impact on security. The commit is a fix to improve the
  stack entropy.

  Original description:

  It worked yesterday, but today I get a Guru Meditation trying to start
  some of my virtual machines. This shows up in VBox.log as "VCPU0: Guru
  Meditation -2708 (VERR_VMM_SET_JMP_ABORTED_RESUME)". I suspect this
  may have started due to a Linux kernel upgrade I installed this
  morning.

  A fresh VM with no disk shows the issue. Sometimes turning off the I/O
  APIC makes the issue go away, sometimes not. Turning off nested paging
  sometimes lets VirtualBox make a little bit of progress w.r.t. booting
  VMs, but that usually still crashes before the VM finishes starting.

  This may be related to this bug reported on the VirtualBox forums:
  
https://forums.virtualbox.org/viewtopic.php?t=111889&sid=5cd33c0872a03b689e7e9f84d850f538

  https://forums.virtualbox.org/viewtopic.php?t=111918

  Ubuntu is 22.04.4 LTS, kernel is 5.15.0-116-generic, VirtualBox is
  6.1.50-dfsg-1~ubuntu1.22.04.1.

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


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to