Re: [PATCH v19 018/130] KVM: x86/mmu: Assume guest MMIOs are shared

From: Edgecombe, Rick P
Date: Mon Mar 25 2024 - 19:42:27 EST


On Mon, 2024-02-26 at 00:25 -0800, isaku.yamahata@xxxxxxxxx wrote:
> From: Chao Gao <chao.gao@xxxxxxxxx>
>
> TODO: Drop this patch once the common patch is merged.

What is this TODO talking about?

>
> When memory slot isn't found for kvm page fault, handle it as MMIO.
>
> The guest of TDX_VM, SNP_VM, or SW_PROTECTED_VM don't necessarily convert
> the virtual MMIO range to shared before accessing it.  When the guest tries
> to access the virtual device's MMIO without any private/shared conversion,
> An NPT fault or EPT violation is raised first to find private-shared
> mismatch.  Don't raise KVM_EXIT_MEMORY_FAULT, fall back to KVM_PFN_NOLSLOT.

If this is general KVM_X86_SW_PROTECTED_VM behavior, can we pull it out of the TDX series?

>
> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
> ---