Re: [RFC PATCH v5 042/104] KVM: x86/mmu: Track shadow MMIO value/mask on a per-VM basis

From: Kai Huang
Date: Fri Apr 08 2022 - 19:34:48 EST


On Fri, 2022-04-08 at 12:12 -0700, Isaku Yamahata wrote:
> > > - shadow_present_mask = has_exec_only ? 0ull :
> > > VMX_EPT_READABLE_MASK;
> > > + shadow_present_mask =
> > > + (has_exec_only ? 0ull : VMX_EPT_READABLE_MASK) |
> > > init_value;
> >
> > This change doesn't seem make any sense.  Why should "Suppress #VE" bit be
> > set
> > for a present PTE?
>
> Because W or NX violation also needs #VE.  Although the name uses present,
> it's
> actually readable.

Yeah I forgot this. Thanks!

--
Thanks,
-Kai