FS#68541 - [virtualbox] It doesn't work with AMD SME

Attached to Project: Community Packages
Opened by Andrej Podzimek (andrej) - Friday, 06 November 2020, 02:42 GMT
Last edited by Toolybird (Toolybird) - Sunday, 16 April 2023, 02:46 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

With AMD SME turned on (mem_encrypt=on), VirtualBox doesn't work.

I've tried everything I could to report this to Oracle, because they have a bug tracker for VirtualBox. Unfortunately, my account is blocked, their account validation E-mails don't work and their helpdesk doesn't respond. Perhaps someone with a similar issue (and a working Oracle account) could post this into their bug tracker.


Additional info:

* package version(s)

virtualbox 6.1.16-1
virtualbox-ext-oracle 6.1.16-1

* config and/or log files etc.

The system is an ASRock x570 Creator with Ryzen 3950X, latest firmware.

[ 142.036870] SUPR0GipMap: fGetGipCpu=0x3b
[ 143.030150] BUG: unable to handle page fault for address: ffffa6250707fa40
[ 143.030154] #PF: supervisor write access in kernel mode
[ 143.030155] #PF: error_code(0x0003) - permissions violation
[ 143.030157] PGD 801fe8400067 P4D 801fe8400067 PUD 801fe85c6067 PMD 801f3edbc067 PTE 801f49f50161
[ 143.030160] Oops: 0003 [#1] PREEMPT SMP NOPTI
[ 143.030162] CPU: 27 PID: 3391 Comm: EMT-0 Tainted: G OE 5.9.1-arch1-1-zen2 #1
[ 143.030163] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X570 Creator, BIOS P3.00 08/27/2020
[ 143.030165] RIP: 0010:0xffffa6250707fa40
[ 143.030166] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 143.030167] RSP: 0018:ffffa62505db3e18 EFLAGS: 00010282
[ 143.030168] RAX: ffffa6250707fa40 RBX: ffffa625071fd010 RCX: ffffa62507000000
[ 143.030169] RDX: ffffa6250707ee80 RSI: 0000000000000000 RDI: ffff8d10cd433090
[ 143.030169] RBP: ffffa62505db3ea8 R08: ffff8d10734b4010 R09: ffff8d11af2fc000
[ 143.030170] R10: ffffffffc0f315e0 R11: 0000000000000006 R12: 0000000000000024
[ 143.030170] R13: 0000000000000000 R14: ffffa625071fd010 R15: ffff8d10cd433090
[ 143.030172] FS: 00007faaac3e1640(0000) GS:ffff8d112f0c0000(0000) knlGS:0000000000000000
[ 143.030172] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 143.030173] CR2: ffffa6250707fa40 CR3: 0000801f2f4ee000 CR4: 0000000000350ee0
[ 143.030174] Call Trace:
[ 143.030189] ? supdrvIOCtl+0x331d/0x3820 [vboxdrv]
[ 143.030196] VBoxDrvLinuxIOCtl_6_1_16+0x154/0x250 [vboxdrv]
[ 143.030201] __x64_sys_ioctl+0x83/0xb0
[ 143.030205] do_syscall_64+0x33/0x40
[ 143.030208] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 143.030210] RIP: 0033:0x7fab5cdcff6b
[ 143.030211] Code: 89 d8 49 8d 3c 1c 48 f7 d8 49 39 c4 72 b5 e8 1c ff ff ff 85 c0 78 ba 4c 89 e0 5b 5d 41 5c c3 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 ae 0c 00 f7 d8 64 89 01 48
[ 143.030211] RSP: 002b:00007faaac3dfbd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 143.030212] RAX: ffffffffffffffda RBX: 00007faa441e06f0 RCX: 00007fab5cdcff6b
[ 143.030213] RDX: 00007faa441e06f0 RSI: 0000000000005684 RDI: 0000000000000007
[ 143.030213] RBP: 00007faaac3dfbe0 R08: 0000000000000000 R09: 00000000fffffffc
[ 143.030214] R10: 0000000000000000 R11: 0000000000000246 R12: 00007faaac73c8df
[ 143.030214] R13: 00007faaac3e0040 R14: 00007faaac3dfe90 R15: 0000000000000000
[ 143.030216] Modules linked in: rfcomm fuse nls_iso8859_1 nls_cp437 vfat fat ccm raid1 md_mod squashfs cmac algif_hash algif_skcipher af_alg bnep loop nct6683 lm92 iwlmvm snd_hda_codec_realtek snd_hda_codec_generic uvcvideo mac80211 wmi_bmof intel_wmi_thunderbolt mxm_wmi ledtrig_audio snd_hda_codec_hdmi videobuf2_vmalloc btusb libarc4 videobuf2_memops snd_usb_audio btrtl videobuf2_v4l2 btbcm snd_hda_intel amd64_edac_mod btintel videobuf2_common edac_mce_amd snd_intel_dspcfg snd_hda_codec kvm_amd snd_usbmidi_lib iwlwifi videodev bluetooth snd_hda_core snd_rawmidi razerkbd(OE) mousedev razermouse(OE) input_leds snd_seq_device joydev kvm snd_hwdep mc snd_pcm irqbypass snd_timer ecdh_generic razeraccessory(OE) rapl snd sp5100_tco ecc pcspkr zenpower(OE) crc16 i2c_piix4 soundcore cfg80211 thunderbolt igb atlantic tpm_crb dca macsec rfkill wmi tpm_tis tpm_tis_core evdev pinctrl_amd mac_hid acpi_cpufreq vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) usbip_host usbip_core sg crypto_user ip_tables
[ 143.030258] x_tables xxhash_generic btrfs blake2b_generic libcrc32c crc32c_generic xor raid6_pq dm_crypt cbc encrypted_keys trusted tpm radeon uas usb_storage hid_generic usbhid hid crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel dm_mod crypto_simd cryptd glue_helper ccp rng_core xhci_pci xhci_pci_renesas xhci_hcd amdgpu gpu_sched i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec rc_core ttm drm agpgart
[ 143.030278] CR2: ffffa6250707fa40
[ 143.030279] ---[ end trace bcfff6185859d4b0 ]---
[ 143.030280] RIP: 0010:0xffffa6250707fa40
[ 143.030281] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 143.030282] RSP: 0018:ffffa62505db3e18 EFLAGS: 00010282
[ 143.030283] RAX: ffffa6250707fa40 RBX: ffffa625071fd010 RCX: ffffa62507000000
[ 143.030284] RDX: ffffa6250707ee80 RSI: 0000000000000000 RDI: ffff8d10cd433090
[ 143.030284] RBP: ffffa62505db3ea8 R08: ffff8d10734b4010 R09: ffff8d11af2fc000
[ 143.030285] R10: ffffffffc0f315e0 R11: 0000000000000006 R12: 0000000000000024
[ 143.030286] R13: 0000000000000000 R14: ffffa625071fd010 R15: ffff8d10cd433090
[ 143.030287] FS: 00007faaac3e1640(0000) GS:ffff8d112f0c0000(0000) knlGS:0000000000000000
[ 143.030287] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 143.030288] CR2: ffffa6250707fa40 CR3: 0000801f2f4ee000 CR4: 0000000000350ee0


* link to upstream bug report, if any

N/A, because I can't file one. Oracle's account management is broken and I'm locked out.

Steps to reproduce:

* Enable AMD SME (mem_encrypt=on).
* Try to start a VirtualBox VM.
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 16 April 2023, 02:46 GMT
Reason for closing:  Upstream
Additional comments about closing:  Nothing Arch can do here. Upstream simply need to get enterprise features working if they want to compete in the enterprise space.
Comment by Andrej Podzimek (andrej) - Sunday, 14 February 2021, 00:26 GMT
The problem is still around with kernel 5.10.16, but the error messages are now different. There's a NX bit violation and other interesting stuff.

[ 252.883627] kernel tried to execute NX-protected page - exploit attempt? (uid: 1984)
[ 252.883632] BUG: unable to handle page fault for address: ffffb972d3166000
[ 252.883634] #PF: supervisor instruction fetch in kernel mode
[ 252.883636] #PF: error_code(0x0011) - permissions violation
[ 252.883637] PGD 800100000067 P4D 800100000067 PUD 8001001b0067 PMD 8001fef97067 PTE 800080020ef94161
[ 252.883643] Oops: 0011 [#1] PREEMPT SMP NOPTI
[ 252.883646] CPU: 15 PID: 6204 Comm: EMT-0 Tainted: P OE 5.10.16-arch1-1-zen2 #1
[ 252.883648] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X570 Creator, BIOS P3.40 01/28/2021
[ 252.883651] RIP: 0010:0xffffb972d3166000
[ 252.883653] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 252.883655] RSP: 0018:ffffb972c7e57e18 EFLAGS: 00010282
[ 252.883658] RAX: ffffb972d3080a30 RBX: ffffb972d3401010 RCX: ffffb972d3001000
[ 252.883659] RDX: ffffb972d307fe70 RSI: 0000000000000000 RDI: ffff8ea95b311810
[ 252.883661] RBP: ffffb972c7e57ea8 R08: 8000800000000163 R09: 0000000000000001
[ 252.883662] R10: ffffffffc0c5f620 R11: 00000000000321c0 R12: 0000000000000024
[ 252.883663] R13: 0000000000000000 R14: ffffb972d3401010 R15: ffff8ea95b311810
[ 252.883665] FS: 00007fa170145640(0000) GS:ffff8ec54edc0000(0000) knlGS:0000000000000000
[ 252.883667] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 252.883668] CR2: ffffb972d3166000 CR3: 00008003a6dae000 CR4: 0000000000350ee0
[ 252.883670] Call Trace:
[ 252.883685] ? supdrvIOCtl+0x331d/0x3820 [vboxdrv]
[ 252.883697] VBoxDrvLinuxIOCtl_6_1_18+0x154/0x250 [vboxdrv]
[ 252.883703] __x64_sys_ioctl+0x83/0xb0
[ 252.883706] do_syscall_64+0x33/0x40
[ 252.883710] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 252.883712] RIP: 0033:0x7fa201a00f6b
[ 252.883714] Code: ff ff ff 85 c0 79 8b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 ae 0c 00 f7 d8 64 89 01 48
[ 252.883716] RSP: 002b:00007fa170143bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 252.883718] RAX: ffffffffffffffda RBX: 00007fa0e41e0420 RCX: 00007fa201a00f6b
[ 252.883719] RDX: 00007fa0e41e0420 RSI: 0000000000005684 RDI: 0000000000000007
[ 252.883721] RBP: 00007fa170143be0 R08: 0000000000000000 R09: 00000000fffffffc
[ 252.883722] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa1704a08df
[ 252.883723] R13: 00007fa170144040 R14: 00007fa170143e90 R15: 0000000000000000
[ 252.883726] Modules linked in: ecb ecryptfs rfcomm ax88179_178a usbnet mii nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) ccm nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct cmac algif_hash algif_skcipher af_alg bnep nft_nat vfat fat nft_chain_nat nf_nat nf_conntrack squashfs nf_defrag_ipv6 nf_defrag_ipv4 loop 8021q garp mrp stp nf_tables llc nct6683 nfnetlink lm92 raid1 md_mod joydev mousedev snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi iwlmvm snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec mac80211 snd_hda_core soundwire_bus snd_usb_audio snd_soc_core uvcvideo libarc4 videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 snd_usbmidi_lib videobuf2_common btusb snd_compress iwlwifi snd_hwdep amd64_edac_mod snd_rawmidi btrtl edac_mce_amd ac97_bus btbcm snd_seq_device snd_pcm_dmaengine wmi_bmof intel_wmi_thunderbolt mxm_wmi videodev btintel snd_pcm kvm_amd kvm irqbypass snd_timer
[ 252.883785] razeraccessory(OE) bluetooth cfg80211 mc razermouse(OE) razerkbd(OE) rapl atlantic(OE) sp5100_tco snd ecdh_generic pcspkr ecc crc16 i2c_piix4 zenpower(OE) soundcore igb macsec thunderbolt tpm_crb rfkill crc_itu_t dca wmi tpm_tis tpm_tis_core pinctrl_amd mac_hid acpi_cpufreq vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) usbip_host usbip_core sg crypto_user fuse ip_tables x_tables xxhash_generic btrfs blake2b_generic libcrc32c crc32c_generic xor raid6_pq dm_crypt cbc encrypted_keys trusted tpm uas usb_storage usbhid crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd ccp cryptd glue_helper dm_mod rng_core amdgpu xhci_pci xhci_pci_renesas gpu_sched ttm i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec drm agpgart
[ 252.883838] CR2: ffffb972d3166000
[ 252.883840] ---[ end trace 331f1c74b16b394b ]---
[ 253.071453] RIP: 0010:0xffffb972d3166000
[ 253.071456] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 253.071458] RSP: 0018:ffffb972c7e57e18 EFLAGS: 00010282
[ 253.071460] RAX: ffffb972d3080a30 RBX: ffffb972d3401010 RCX: ffffb972d3001000
[ 253.071461] RDX: ffffb972d307fe70 RSI: 0000000000000000 RDI: ffff8ea95b311810
[ 253.071463] RBP: ffffb972c7e57ea8 R08: 8000800000000163 R09: 0000000000000001
[ 253.071464] R10: ffffffffc0c5f620 R11: 00000000000321c0 R12: 0000000000000024
[ 253.071465] R13: 0000000000000000 R14: ffffb972d3401010 R15: ffff8ea95b311810
[ 253.071467] FS: 00007fa170145640(0000) GS:ffff8ec54edc0000(0000) knlGS:0000000000000000
[ 253.071469] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 253.071470] CR2: ffffb972d3166000 CR3: 00008003a6dae000 CR4: 0000000000350ee0
Comment by Christian Hesse (eworm) - Sunday, 14 February 2021, 20:07 GMT
I do not have AMD hardware, thus can not reproduce it.
Still hoping for anybody else to report it upstream.
Comment by Andrej Podzimek (andrej) - Monday, 15 February 2021, 14:08 GMT
Just for the record, I’ve found a workaround (sort of).

I’ve just bitten the bullet and reinstalled the VM in virt-manager. With virt-manager, everything works fine with AMD SME, no freezes / crashes, virtio drivers for block devices even work fine there (instead of crashing the VM like in VirtualBox) and, in general, a few other things work better. So it looks like virt-manager is an option here.

Graphics are a pain point though. VirtualBox has way faster graphics with at least a sign of acceleration. In virt-manager this is not the case. Graphics are ultra-slow (especially on my 5k monitors). I even tried to give the VM my NVidia eGPU, but that didn’t work well either; it would only work with a separate monitor connected to the NVidia, so it won’t do any GPU switching / prime magic. That’s not exactly seamless.

Loading...