cc-api / evidence-api

Unified API to Access TCG Compliant measurement, event log, quote in Confidential Computing Environment.
Apache License 2.0
32 stars 19 forks source link

Output of VM Image Rewriter has issues on both tdx 1.0 stack and tdx 1.5 stack #102

Closed wenhuizhang closed 5 months ago

wenhuizhang commented 8 months ago

System log on TDX 1.5 stack

root@n73-164-13:/data01/wenhui/cc-trusted-vmsdk/src/cvm-image-rewriter# uname -a
Linux n73-164-13 6.2.16-v5.0.mvp40-generic #tdx SMP PREEMPT_DYNAMIC Tue Oct 10 03:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux 
./qemu-test.sh -i output.qcow2 -k /boot/vmlinuz-6.2.16-v5.0.mvp40-generic
+ echo =========================================
=========================================
+ launch_vm
+ echo 'Remapping CTRL-C to CTRL-]'
Remapping CTRL-C to CTRL-]
+ stty intr '^]'
+ echo 'Launch VM:'
Launch VM:
+ echo /usr/bin/qemu-system-x86_64 -accel kvm -name process=tdxvm,debug-threads=on -m 4G -vga none -monitor pty -no-hpet -nodefaults -drive 
/usr/bin/qemu-system-x86_64 -accel kvm -name process=tdxvm,debug-threads=on -m 4G -vga none -monitor pty -no-hpet -nodefaults -drive file=/d
+ eval /usr/bin/qemu-system-x86_64 -accel kvm -name process=tdxvm,debug-threads=on -m 4G -vga none -monitor pty -no-hpet -nodefaults -drive 
++ /usr/bin/qemu-system-x86_64 -accel kvm -name process=tdxvm,debug-threads=on -m 4G -vga none -monitor pty -no-hpet -nodefaults -drive file
char device redirected to /dev/pts/1 (label compat_monitor0)
qemu-system-x86_64: warning: Unknown start 0x0 size 0x1000 shared_to_private 1
EAX=00000000 EBX=00000000 ECX=00000000 EDX=000806f8
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300
CS =f000 ffff0000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT=     00000000 0000ffff
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
qemu-system-x86_64: terminating on signal 15 from pid 3746 (-bash)
Terminated
ruomengh commented 8 months ago

The image seems not complete or re-configured properly after running image rewriter. Any error happened while running image rewriter tool?

ruomengh commented 5 months ago

@wenhuizhang Is the issue still there? Is it OK to close the issue?

wenhuizhang commented 5 months ago

I am closing it, tested with new version tdx module, it works now