- 
    
Bug
 - 
    Resolution: Won't Do
 - 
    
Normal
 - 
    None
 - 
    rhel-9.1.0
 
- 
        None
 - 
        Moderate
 
- 
        rhel-virt-core
 - 
        ssg_virtualization
 
- 
        8
 - 
        False
 - 
        False
 - 
        
 - 
        None
 - 
        None
 
- 
        None
 - 
        None
 
- 
        If docs needed, set a value
 
- 
        
 - 
        x86_64
 
- 
        None
 - 
        57,005
 
Description of problem:
Ice lake host has a 2*64G epc sections, but boot a guest with 30GB sgx epc section failed. Guest boots failed in the early stage with Tianocore icon.  
Version-Release number of selected component (if applicable):
kernel-5.14.0-130.el9.x86_64
qemu-kvm-7.0.0-8.el9.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Check host epc sections:
./test-sgx
...
CPUID Leaf 12H, Sub-Leaf 2 of Intel SGX Capabilities (EAX=12H,ECX=2)
eax: 18000001 ebx: 10 ecx: e7800002 edx: f
size of EPC section in Processor Reserved Memory, 65144 M
CPUID Leaf 12H, Sub-Leaf 3 of Intel SGX Capabilities (EAX=12H,ECX=3)
eax: 18000001 ebx: 30 ecx: e8000002 edx: f
size of EPC section in Processor Reserved Memory, 65152 M
...
- dmesg|grep -i sgx
[ 10.054125] sgx: EPC section 0x1018000000-0x1fff7fffff
[ 10.164986] sgx: EPC section 0x3018000000-0x3fffffffff
2. Boot a guest with 30 GB epc sections
...
-machine q35,sgx-epc.0.memdev=mem-epc0,sgx-epc.0.node=0,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars \
-cpu host,+kvm_pv_unhalt \
-m 40960 \
-object memory-backend-epc,size=22960M,prealloc=true,id=mem-epc0 \
-object memory-backend-ram,size=40960M,id=mem-mem0 \
-smp 16,maxcpus=16,cores=4,threads=2,dies=1,sockets=2 \
-numa node,memdev=mem-mem0,cpus=0-15 \
...
3. hmp info sgx:
(qemu) info sgx
SGX support: enabled
SGX1 support: enabled
SGX2 support: enabled
FLC support: enabled
size: 24075304960
NUMA node #0: size=24075304960 
Actual results:
Guest boots failed in the early stage with Tianocore icon
Expected results:
Guest boots successfully
Additional info:
Boots a guest with 20GB epc section successfully.
If setting BIOS with 2*2G epc section, guest with 4G epc sections will boot successfully
- blocks
 - 
                    
RHEL-7095 Fail to boot a guest with 30GB sgx epc section when host is capable of 2*64G epc sections [rhel-8]
-         
 - Closed
 
 -         
 
- external trackers