Re: [PATCH v29 09/32] x86/mm: Introduce _PAGE_COW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2021-08-21 at 19:20 +0000, Edgecombe, Rick P wrote:
> +KVM list.
> 
> On Fri, 2021-08-20 at 11:11 -0700, Yu-cheng Yu wrote:
> >  
> >  static inline int pte_write(pte_t pte)
> >  {
> > -       return pte_flags(pte) & _PAGE_RW;
> > +       /*
> > +        * Shadow stack pages are always writable - but not by
> > normal
> > +        * instructions, and only by shadow stack operations. 
> > Therefore,
> > +        * the W=0,D=1 test with pte_shstk().
> > +        */
> > +       return (pte_flags(pte) & _PAGE_RW) || pte_shstk(pte);
> >  }
> >  
> 
> KVM uses this in a couple places when checking EPT ptes. But bit 6
> (dirty) is a totally different meaning in EPT. I think it's just used
> to trigger an optimization, but wondering if KVM should have its own
> TDP specific function instead of using pte_write().
> 
Argh, never mind. I misread the new KVM mmu notifier refactor.






[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux