Skip to content
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

Can't lanuch SEV-SNP VM, SEV information block/Firmware GUID Table block not found in pflash rom #218

Open
lcmfq opened this issue Jul 8, 2024 · 1 comment

Comments

@lcmfq
Copy link

lcmfq commented Jul 8, 2024

When I use"/usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu host -smp 4,maxcpus=64 -m 2048M,slots=5,maxmem=10240M -no-reboot -drive if=pflash,format=raw,unit=0,file=/usr/local/share/qemu/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=/home/anolis/os/anolisos.fd -drive file=/home/anolis/os/anolisos.qcow2,if=none,id=disk0,format=qcow2 -device virtio-scsi-pci,id=scsi,disable-legacy=on,iommu_platform=true -device scsi-hd,drive=disk0 -machine memory-encryption=sev0,vmport=off -object memory-backend-memfd,id=ram1,size=2048M,share=true,prealloc=false -machine memory-backend=ram1 -object sev-snp-guest,id=sev0,policy=0xb0000,cbitpos=51,reduced-phys-bits=1 -vnc localhost:1
"to lanuch VM ,I get an issue
qemu-system-x86_64: SEV information block/Firmware GUID Table block not found in pflash rom
qemu-system-x86_64: failed to locate and/or save reset vector

My host:AnolisOS-23.1-ALPHA2-x86_64
Host kernel:6.9.0-snp-host-rc7+
qemu:snp-latest "https://github.com/AMDESE/qemu.git”
ovmf:snp-latest "https://github.com/AMDESE/ovmf.git"
dmesg |grep SEV
[ 0.000000] SEV-SNP: RMP table physical range [0x000000bf8ce00000 - 0x000000c04d3fffff]
[ 9.734412] ccp 0000:01:00.5: SEV API:1.55 build:28
[ 9.734419] ccp 0000:01:00.5: SEV-SNP API:1.55 build:28
[ 19.234477] kvm_amd: SEV enabled (ASIDs 500 - 1006)
[ 19.234480] kvm_amd: SEV-ES enabled (ASIDs 1 - 499)
[ 19.234481] kvm_amd: SEV-SNP enabled (ASIDs 1 - 499)
And I have installed VM success,"/usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu host -smp 4,maxcpus=64 -m 2048M,slots=5,maxmem=10240M -no-reboot -drive if=pflash,format=raw,unit=0,file=/usr/local/share/qemu/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=/home/anolis/os/anolisos.fd -drive file=/home/anolis/os/AnolisOS-23.1-ALPHA2-x86_64-dvd.iso,media=cdrom -boot d -drive file=/home/anolis/os/anolisos.qcow2,if=none,id=disk0,format=qcow2 -device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true -device scsi-hd,drive=disk0 -vnc localhost:1

@tlendacky
Copy link
Collaborator

If you are using the most recent Qemu snp-latest, then you must use the -bios option for the OVMF code file instead of the -drive if=pflash option.

See https://github.com/AMDESE/AMDSEV/blob/snp-latest/launch-qemu.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants