lkml.org 
[lkml]   [2020]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: nVMX: Fix some comment typos and coding style
Date
Hi:
Sean Christopherson <sean.j.christopherson@intel.com> wrote:
> On Thu, Feb 06, 2020 at 12:32:38PM +0100, Vitaly Kuznetsov wrote:
>> linmiaohe <linmiaohe@huawei.com> writes:
>>
>>
>> I have to admit that shadow MMU in KVM is not my strong side but this
>> comment reads weird, I'd appreciate if someone could suggest a better
>> alternative.
>
> /* One off flag for a stupid corner case in shadow paging. */
>>
>> > */
>
> /*
> * Indicates the guest is trying to write a gfn that contains one or
> * more of the PTEs used to translate the write itself, i.e. the access
> * is changing its own translation in the guest page tables. KVM exits
> * to userspace if emulation of the faulting instruction fails and this
> * flag is set, as KVM cannot make forward progress.
> *
> * If emulation fails for a write to guest page tables, KVM unprotects
> * (zaps) the shadow page for the target gfn and resumes the guest to
> * retry the non-emulatable instruction (on hardware). Unprotecting the
> * gfn doesn't allow forward progress for a self-changing access because
> * doing so also zaps the translation for the gfn, i.e. retrying the
> * instruction will hit a !PRESENT fault, which results in a new shadow
> * page and sends KVM back to square one.
> */
>> > bool write_fault_to_shadow_pgtable;

Thanks for your detail comment. This field confused me once.

Thanks to both for review! Will send v2.

\
 
 \ /
  Last update: 2020-02-07 05:06    [W:0.016 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site