Re: [PATCH v2 10/10] KVM: x86/mmu: check for invalid async page faults involving private memory
From: Paolo Bonzini
Date: Fri Apr 19 2024 - 03:38:53 EST
On Fri, Apr 19, 2024 at 9:35 AM Xiaoyao Li <xiaoyao.li@xxxxxxxxx> wrote:
>
> On 4/17/2024 4:19 AM, Paolo Bonzini wrote:
> > Right now the error code is not used when an async page fault is completed.
> > This is not a problem in the current code, but it is untidy. For protected
> > VMs, we will also need to check that the page attributes match the current
> > state of the page, because asynchronous page faults can only occur on
> > shared pages (private pages go through kvm_faultin_pfn_private() instead of
> > __gfn_to_pfn_memslot()).
> >
> > Start by piping the error code from kvm_arch_setup_async_pf() to
> > kvm_arch_async_page_ready() via the architecture-specific async page
> > fault data.
>
> It is missed in this patch ...
Ugh, thanks Xiaoyao!
Paolo