-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sev guest cannot boot correctly #3
Comments
One of recent EDK2 commit broke the SEV support. I have root caused it and submitted a patch to fix the issue. Can you please apply the patch from here and let me know if you still have trouble. https://lists.01.org/pipermail/edk2-devel/2018-January/020030.html |
I apply the patch and the problem wasn't solved. sudo ./launch-qemu.sh -hda vm2/ubuntu-img-2.qcow2 -nosev -cdrom ../../../ubuntu-16.04.3-desktop-amd64.iso -vnc 2
UEFI Interactive Shell v2.287477C2-69C7-11D2-8E39-00A0C969723B 7EC7ABA0 This problem didn't happen when I launch first VM and the first VM can successful boot now without sev. |
Also some information about cannot boot successful with sev. /home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Event/Timer.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c(GetPermissionAttributeForMemoryType (EfiBootServicesCode) & 0x0000000000004000ULL) == 0/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c(GetPermissionAttributeForMemoryType (EfiRuntimeServicesCode) & 0x0000000000004000ULL) == 0(GetPermissionAttributeForMemoryType (EfiLoaderCode) & 0x0000000000004000ULL) == 0GetPermissionAttributeForMemoryType (EfiBootServicesData) == GetPermissionAttributeForMemoryType (EfiConventionalMemory)VectorInfo != ((void *) 0)/home/user/AMDSEV/src/edk2/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
|
I redo the whole process with the patch. It seems work now. |
I followed the instructions and no error during the installation.
I can successfully launch guest vm using
sudo ./launch-qemu.sh -hda ubuntu-img.qcow2 -nosev -vnc 1
and I install the kernel image for the guest VM
linux-image-4.15.0-rc1-kvm_4.15.0-rc1-kvm-1_amd64.deb
But when I try to launch SEV enabled guest using
sudo ./launch-qemu.sh -hda -vnc 1
There is some error output:
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7F6E32C0
Loading driver at 0x0007FB85000 EntryPoint=0x0007FB8542D AmdSevDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F6E3598
ProtectUefiImageCommon - 0x7F6E32C0
!!!! X64 Exception Type - 0E(#PF - Page-Fault) CPU Apic ID - 00000000 !!!!
ExceptionData - 0000000000000003 I:0 R:0 U:0 W:1 P:1 PK:0 S:0
RIP - 000000007FB86AE6, CS - 0000000000000038, RFLAGS - 0000000000010006
RAX - 000000007F6E2000, RCX - 0000800000200000, RDX - 00000000001FF003
RBX - 0000800000000003, RSP - 000000007FE71BC0, RBP - 0000800000200000
RSI - 000000007FC03000, RDI - 0000800000000000
R8 - 000000007F6E1000, R9 - 0000000000001000, R10 - 00000000000003FD
R11 - 00000000000003F8, R12 - 000080007F6E1003, R13 - 000000007FC03000
R14 - 42146F0205AD3401, R15 - 42146F0205AD34BA
DS - 0000000000000008, ES - 0000000000000008, FS - 0000000000000008
GS - 0000000000000008, SS - 0000000000000008
CR0 - 0000000080010033, CR2 - 000000007FC03000, CR3 - 000000007FC01000
CR4 - 0000000000000668, CR8 - 0000000000000000
DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 000000007FECE8E0 0000000000000047, LDTR - 0000000000000000
IDTR - 000000007FBFF008 00000000000001FF, TR - 0000000000000000
FXSAVE_STATE - 000000007FE71820
!!!! Find image based on IP(0x7FB86AE6) /home/user/AMDSEV/src/edk2/Build/Ovmf3264/DEBUG_GCC5/X64/OvmfPkg/AmdSevDxe/AmdSevDxe/DEBUG/AmdSevDxe.dll (ImageBase=000000007FB85000, EntryPoint=000000007FB8542D) !!!!
I have also checked the output when I use command
sudo ./launch-qemu.sh -hda ubuntu-img.qcow2 -nosev -vnc 1
There is also an unsupported error, but I can successfully launch the guest vm without sev.
Loading driver at 0x0007FB85000 EntryPoint=0x0007FB8542D AmdSevDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F6E3598
ProtectUefiImageCommon - 0x7F6E32C0
Error: Image at 0007FB85000 start failed: Unsupported
I have checked SYSCFG and when I use
sudo rdmsr 0xC0010010 -a
The return values are all f40000
Also the cpuid return
0x8000001f 0x00: eax=0x0000000f ebx=0x0000016f ecx=0x0000000f edx=0x00000001
The cpu model is AMD EPYC 7251 8-Core Processor.
Could someone help me to figure out where is wrong.
Thank you for your time and patience.
The text was updated successfully, but these errors were encountered: