On Tue, Aug 13, 2024 at 11:14:31PM +0800, Xiaoyao Li wrote: >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. The new TDX module simply doesn't support old CPU models. QEMU can report an error and define a new CPU model that works with the TDX module. Sometimes, CPUs may drop features; this may cause KVM to not support some features and in turn some old CPU models having those features cannot be supported. is it a requirement for TDX modules alone that old CPU models must always be supported? > >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.