On Thu, Jun 6, 2024 at 6:07 PM Xiaoyao Li <xiaoyao...@intel.com> wrote: > > On 6/6/2024 6:44 AM, Paolo Bonzini wrote: > > There can be other confidential computing classes that are not derived > > from sev-common. Avoid aborting when encountering them. > > I hit it today when rebasing TDX patches to latest QEMU master, which > has the SEV-SNP series merged. (I didn't get time to review it between > it gets merged.) > > my approach is to guard with sev_enabled() when calling > sev_es_set_reset_vector() in kvm_arch_reset_vcpu(), because calling sev* > specific function in generic kvm code doesn't look reasonable to me.
On the other hand I would like to avoid too many sev/tdx conditionals in common code. Neither choice is great. Another possibility is to make this a X86ConfidentialGuest method, if the TDX code has anything similar. Feel free to keep this patch, or anything that replaces it, in your TDX series. Apart from this issue, I could rebase the previous TDX patches on top of SEV-SNP without any problems. Paolo