Skip to contentSkip to conversation

Windows 11 guest crashing supposedly in smm after some time of use

DISCUSSION Michał Zegan 2 participants 5 messages Feb 13, 2023 – Feb 16, 2023 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

ping?

W dniu 10.02.2023 o 15:48, Michał Zegan pisze:

Quoted 25 lines

Hello.

I have windows11 installed on a vm. This vm generally works properly, but then might crash unexpectedly at any point, this includes situation like logging onto the system and leaving it intact for like an hour or less. This can be reproduced by waiting long enough but there is no single known action causing it.

What could be the problem?

Configuration and error details:

My host is a msi vector gp76 laptop with intel core i7 12700h, 32gb of memory, host os is fedora linux 37 with custom compiled linux kernel (fedora patches). Current kernel version is 6.1.10 but when I installed the vm it was 6.0 or less, don't quite remember exactly, and this bug was present. Not sure if bios is up to date, but microcode is, if that matters.

Hardware virtualization enabled, nested virtualization enabled in module params for kvm_intel.

For vm using libvirt, qemu 7.0.0. Virtual machine is q35, smm enabled, processor model set to host, firmware is uefi with secureboot and preenrolled keys, tpm is enabled. Most/all hyperv enlightenments are enabled.

Using virtio for what I can including virtio-scsi, virtio-input, virtio-net, virtio-balloon, etc... installed windows drivers for all of these things.

Guest is windows 11 pro 64 bit.

What crashes is qemu itself, not that the guest is bsod'ing.

Below is the link containing libvirt qemu log, containing the full qemu command line and also the crash messages. Note virtualization is disabled in vm even though nested virtualization enabled on host, and hyperv not installed on windows, so it's likely not the cause.

https://gist.github.com/webczat/1f224e7ecdc17c5c26316e0121f4ed43

#2 lore raw
In reply to a message not in the archive

Resending to kvm mailing list, in case someone here might help... Also will try again with newer ovmf, but assume it happens.

--- Treść przekazanej wiadomości ---
Temat: Windows 11 guest crashing supposedly in smm after some time of use
Data: Fri, 10 Feb 2023 15:48:56 +0100
Nadawca: Michał Zegan <[email protected]>
Adresat: [email protected]

Hello.

I have windows11 installed on a vm. This vm generally works properly, but then might crash unexpectedly at any point, this includes situation like logging onto the system and leaving it intact for like an hour or less. This can be reproduced by waiting long enough but there is no single known action causing it.

What could be the problem?

Configuration and error details:

My host is a msi vector gp76 laptop with intel core i7 12700h, 32gb of memory, host os is fedora linux 37 with custom compiled linux kernel (fedora patches). Current kernel version is 6.1.10 but when I installed the vm it was 6.0 or less, don't quite remember exactly, and this bug was present. Not sure if bios is up to date, but microcode is, if that matters.

Hardware virtualization enabled, nested virtualization enabled in module params for kvm_intel.

For vm using libvirt, qemu 7.0.0. Virtual machine is q35, smm enabled, processor model set to host, firmware is uefi with secureboot and preenrolled keys, tpm is enabled. Most/all hyperv enlightenments are enabled.

Using virtio for what I can including virtio-scsi, virtio-input, virtio-net, virtio-balloon, etc... installed windows drivers for all of these things.

Guest is windows 11 pro 64 bit.

What crashes is qemu itself, not that the guest is bsod'ing.

Below is the link containing libvirt qemu log, containing the full qemu command line and also the crash messages. Note virtualization is disabled in vm even though nested virtualization enabled on host, and hyperv not installed on windows, so it's likely not the cause.

https://gist.github.com/webczat/1f224e7ecdc17c5c26316e0121f4ed43

#3 lore raw
Quoted 18 lines · Michał Zegan

Resending to kvm mailing list, in case someone here might help... Also will try again with newer ovmf, but assume it happens.
I have windows11 installed on a vm. This vm generally works properly, but then might crash unexpectedly at any point, this includes situation like logging onto the system and leaving it intact for like an hour or less. This can be reproduced by waiting long enough but there is no single known action causing it.

What could be the problem?

Configuration and error details:

My host is a msi vector gp76 laptop with intel core i7 12700h, 32gb of memory, host os is fedora linux 37 with custom compiled linux kernel (fedora patches). Current kernel version is 6.1.10 but when I installed the vm it was 6.0 or less, don't quite remember exactly, and this bug was present. Not sure if bios is up to date, but microcode is, if that matters.

...

Quoted 3 lines

Guest is windows 11 pro 64 bit.

What crashes is qemu itself, not that the guest is bsod'ing.

Can you try a 6.2 or later kernel? E.g. Linus' HEAD, linux-next, kvm/queue, etc. KVM had a pile of SMM fixes[*] merged for 6.2 specifically aimed at fixing issues with secure boot of Windows 11 guest. They aren't likely to be backported to LTS kernels as they aren't easily consumable (though I'm guessing software vendors will end up backporting to their supported kernels).

[*] https://lore.kernel.org/all/[email protected]

#4 lore raw

What these issues were? I don't have a quick ability to test kernel 6.2, but fedora will receive it, so I will definitely get a chance. Can you give me any pointers so that I can see whether it could be related?

W dniu 16.02.2023 o 19:29, Sean Christopherson pisze:

Quoted 31 lines · Michał Zegan
Quoted 18 lines

Resending to kvm mailing list, in case someone here might help... Also will try again with newer ovmf, but assume it happens.
I have windows11 installed on a vm. This vm generally works properly, but then might crash unexpectedly at any point, this includes situation like logging onto the system and leaving it intact for like an hour or less. This can be reproduced by waiting long enough but there is no single known action causing it.

What could be the problem?

Configuration and error details:

My host is a msi vector gp76 laptop with intel core i7 12700h, 32gb of memory, host os is fedora linux 37 with custom compiled linux kernel (fedora patches). Current kernel version is 6.1.10 but when I installed the vm it was 6.0 or less, don't quite remember exactly, and this bug was present. Not sure if bios is up to date, but microcode is, if that matters.

...

Quoted 3 lines

Guest is windows 11 pro 64 bit.

What crashes is qemu itself, not that the guest is bsod'ing.

Can you try a 6.2 or later kernel? E.g. Linus' HEAD, linux-next, kvm/queue, etc. KVM had a pile of SMM fixes[*] merged for 6.2 specifically aimed at fixing issues with secure boot of Windows 11 guest. They aren't likely to be backported to LTS kernels as they aren't easily consumable (though I'm guessing software vendors will end up backporting to their supported kernels).

[*] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20221025124741.228045-1-mlevitsk%40redhat.com&data=05%7C01%7C%7Ced887369e7a446c55aa208db104bc18f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638121689771499220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oTa%2BDEScxiIn%2Fqd3KRUtqiegCv2J8p6RpZ%2Flnm%2F1f1I%3D&reserved=0

#5 lore raw

+Maxim

Quoted 3 lines · Michał Zegan

What these issues were? I don't have a quick ability to test kernel 6.2, but fedora will receive it, so I will definitely get a chance. Can you give me any pointers so that I can see whether it could be related?

I don't know the details, we (Google) don't rely on emulating SMM to support secure boot.

Maxim, do you have any pointers for determining whether or not the KVM SMM issues might be related?

Quoted 33 lines

W dniu 16.02.2023 o 19:29, Sean Christopherson pisze:

Quoted 31 lines · Michał Zegan
Quoted 18 lines

Resending to kvm mailing list, in case someone here might help... Also will try again with newer ovmf, but assume it happens.
I have windows11 installed on a vm. This vm generally works properly, but then might crash unexpectedly at any point, this includes situation like logging onto the system and leaving it intact for like an hour or less. This can be reproduced by waiting long enough but there is no single known action causing it.

What could be the problem?

Configuration and error details:

My host is a msi vector gp76 laptop with intel core i7 12700h, 32gb of memory, host os is fedora linux 37 with custom compiled linux kernel (fedora patches). Current kernel version is 6.1.10 but when I installed the vm it was 6.0 or less, don't quite remember exactly, and this bug was present. Not sure if bios is up to date, but microcode is, if that matters.

...

Quoted 3 lines

Guest is windows 11 pro 64 bit.

What crashes is qemu itself, not that the guest is bsod'ing.

Can you try a 6.2 or later kernel? E.g. Linus' HEAD, linux-next, kvm/queue, etc. KVM had a pile of SMM fixes[*] merged for 6.2 specifically aimed at fixing issues with secure boot of Windows 11 guest. They aren't likely to be backported to LTS kernels as they aren't easily consumable (though I'm guessing software vendors will end up backporting to their supported kernels).

[*] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20221025124741.228045-1-mlevitsk%40redhat.com&data=05%7C01%7C%7Ced887369e7a446c55aa208db104bc18f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638121689771499220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oTa%2BDEScxiIn%2Fqd3KRUtqiegCv2J8p6RpZ%2Flnm%2F1f1I%3D&reserved=0