Re: [PATCH v2 2/3] KVM: TDX: Fix the exit reason handling

"Edgecombe, Rick P" <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed, 2026-08-12 at 15:29 +0800, Xiaoyao Li wrote:
> Well, actually the added comment cannot be shared. For the 
> EXIT_REASON_EPT_MISCONFIG case, the reason to return a synthesized 
> invalid Exit Reason is to differentiate with the case of 
> TDVMCALL(ept_violation), where the exit reason is updated to EPT_MISCONFIG.

Ah, yea. You are right.

> 
> In fact, we don't need such trick for real EPT_MISCONFIG, because there 
> is handling for real EPT_MISCONFIG in tdx_handle_exit()
> 
> 	if (unlikely(vp_enter_ret == EXIT_REASON_EPT_MISCONFIG)) {
> 		KVM_BUG_ON(1, vcpu->kvm);
> 		return -EIO;
> 	}
> 
> before the handling of transformed EPT_MISCONFIG from 
> TDVMCALL(ept_violation)
> 
> 	switch (exit_reason.basic) {
> 	...
> 	case EXIT_REASON_EPT_MISCONFIG:
> 		return tdx_emulate_mmio(vcpu);
> 
> But it's not urgent to fix it and it's not mandatory to enable Bus Lock 
> VM exit on TDX. Let's leave it to the follow-up series.

Ok.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.