confidential-containers / td-shim

Confidential Containers Shim Firmware
Other
91 stars 51 forks source link

Enhance td-shim/ResetVector to support test on non-TDX hardware platfroms #136

Open jiangliu opened 2 years ago

jiangliu commented 2 years ago

It help ease the development if we could test td-shim on non-TDX hardware platforms. Of course, all TDX related functionality will be disabled on non-TDX hardware platform. Basically we need to enhance ResetVector to support boot from real mode and then switch protected as what expected by TDX.

jyao1 commented 2 years ago

Agree from high level.

Question: What do you think the interface between hypervisor in non-tdx shim ? Option 1: We reuse the normal non-tdx interface. E.g. Shim code runs from real mode. Shim gets memory info from CMOS. Option 2: We reuse the td-shim interface. E.g. Shim code runs from protected mode. Shim gets the memory info via hob in RCX.

jiangliu commented 2 years ago

I like option2, we should share as much code as possible with tdx. Actually we need a shim for td-shim to setup the environment defined/expected by tdx

ariel-adam commented 1 year ago

@jiangliu is this issue still relevant or can be closed? If it's still relevant to what release do you think we should map it to (mid-November, end-December, mid-February etc...)?

jinankjain commented 11 months ago

I am looking to familiarize myself with td-shim. This sounds like a good introductory task. So I have a few question here if someone can help me answer that would be great. What about the special registers provided TDX environment. For example: I think there is a register to obtain the VP count. How would that be emulated in the non-TDX hardware?