On 8/13/2024 7:34 PM, Chao Gao wrote:
I think adding new fixed-1 bits is fine as long as they don't break KVM, i.e., KVM shouldn't need to take any action for the new fixed-1 bits, like saving/restoring more host CPU states across TD-enter/exit or emulating CPUID/MSR accesses from guests
I disagree. Adding new fixed-1 bits in a newer TDX module can lead to a different TD with same cpu model.
People may argue that for the new features that have no vmcs control bit (usually the new instruction) face the similar issue. Booting a VM with same cpu model on a new platform with such new feature leads to the VM actually can use the new feature.
However, for the perspective of CPUID, VMM at least can make sure it unchanged, though guest can access the feature even when guest CPUID tells no such feature. This is virtualization hole. no one like it.