Bug 1969239 - Win2022 guest can't boot when ept is disabled
Summary: Win2022 guest can't boot when ept is disabled
Keywords:
Status: CLOSED DUPLICATE of bug 1906634
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.5
Hardware: x86_64
OS: Windows
medium
medium
Target Milestone: rc
: 8.5
Assignee: Vitaly Kuznetsov
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On:
Blocks: 1968315 2057757
TreeView+ depends on / blocked
 
Reported: 2021-06-08 03:32 UTC by Yumei Huang
Modified: 2022-02-24 02:52 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-16 13:00:44 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yumei Huang 2021-06-08 03:32:17 UTC
Description of problem:
Disable ept on host, boot win2022 guest, hit bsod, the stop code is 'UNEXPECTED KERNEL MODE TRAP' or 'PAGE FAULT IN NANPAGED AREA', or 'KERNEL SECURITY CHECK AILURE'.

Version-Release number of selected component (if applicable):
qemu-kvm-6.0.0-17.module+el8.5.0+11173+c9fce0bb
kernel-4.18.0-310.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. Disable ept on intel host
# rmmod kvm_intel
# modprobe kvm_intel ept=0
# cat /sys/module/kvm_intel/parameters/ept
N

2. Boot up win2022 guest


Actual results:
Guest hit BSOD.

Expected results:
Guest boot up without error.

Additional info:
1. Win2019 guest works well.
2. QEMU cli:
# /usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -machine pc\
    -nodefaults \
    -device VGA,bus=pci.0,addr=0x2 \
    -m 4096 \
    -smp 6,maxcpus=6,cores=3,threads=1,dies=1,sockets=2  \
    -cpu 'Haswell-noTSX',hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,+kvm_pv_unhalt \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 \
    -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/win2022-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
    -device virtio-net-pci,mac=9a:5c:41:18:c9:4e,id=idwyAmhM,netdev=idmsjSu5,bus=pci.0,addr=0x5  \
    -netdev tap,id=idmsjSu5 \
    -vnc :0  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -enable-kvm -monitor stdio

Comment 1 Yvugenfi@redhat.com 2021-06-08 06:12:33 UTC
Related to BZ#1906634.

In any case for Server SKUs - MS requires EPT support in CPUs - https://docs.microsoft.com/en-us/windows-server/get-started-19/sys-reqs-19

Minimum:
1.4 GHz 64-bit processor
Compatible with x64 instruction set
Supports NX and DEP
Supports CMPXCHG16b, LAHF/SAHF, and PrefetchW
Supports Second Level Address Translation (EPT or NPT)

Comment 2 Yumei Huang 2021-06-08 06:23:51 UTC
(In reply to Yvugenfi from comment #1)
> Related to BZ#1906634.
> 
> In any case for Server SKUs - MS requires EPT support in CPUs -
> https://docs.microsoft.com/en-us/windows-server/get-started-19/sys-reqs-19
> 
> Minimum:
> 1.4 GHz 64-bit processor
> Compatible with x64 instruction set
> Supports NX and DEP
> Supports CMPXCHG16b, LAHF/SAHF, and PrefetchW
> Supports Second Level Address Translation (EPT or NPT)

Thanks for the information. But I only hit the issue with Win2022 guest, Win2019 guest works fine. Could it be something else that goes wrong?

Comment 3 Yvugenfi@redhat.com 2021-06-08 07:27:57 UTC
(In reply to Yumei Huang from comment #2)
> (In reply to Yvugenfi from comment #1)
> > Related to BZ#1906634.
> > 
> > In any case for Server SKUs - MS requires EPT support in CPUs -
> > https://docs.microsoft.com/en-us/windows-server/get-started-19/sys-reqs-19
> > 
> > Minimum:
> > 1.4 GHz 64-bit processor
> > Compatible with x64 instruction set
> > Supports NX and DEP
> > Supports CMPXCHG16b, LAHF/SAHF, and PrefetchW
> > Supports Second Level Address Translation (EPT or NPT)
> 
> Thanks for the information. But I only hit the issue with Win2022 guest,
> Win2019 guest works fine.
Strange, BZ#1906634 was opened on Windows Server 2019.

> Could it be something else that goes wrong?
Could be. That's why we are not closing BZ#1906634 and continue to investigate

Comment 4 John Ferlan 2021-06-14 12:55:14 UTC
Meirav - windows guest issue although it looks like Yan is already involved.

Comment 9 Yumei Huang 2021-06-16 08:27:31 UTC
BTW, seems the issue is not 100% reproducible. Sometimes windows 2022 guest can boot up without error and works fine when ept=0.


Note You need to log in before you can comment on or make changes to this bug.