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

Re: [PATCH] x86/shadow: Reposition sh_remove_write_access_from_sl1p()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 21 May 2020 14:22:52 +0200
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Thu, 21 May 2020 12:23:45 +0000
  • Ironport-sdr: uV5mpF+hvX5MhqHVXPacy/c6Ks9JGV2IiDP3LEu+MtuwbO4aTbvXhxZPHFCVp/6zVapaQDSyPa prIMLS9A0PchOBkGfEvWoaemPHIXvazb7kVmt+yTgaooKDN5w00Gi+vmettwazkG4Yl8kCi2dR n4LlAzkIWKdDVG0F7wdKZI3W/HIXTkapRU9gdQdhj6YEyETNljHA3KELwLrahsygBIbwSJeH5B XD7mVbWyY0G+Ql8jGuwnOWFoO07X9naAiM9aK6n1kZ4VmHtCQkgHFs0NB5AuZuFbo4R84l5zBk pVE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, May 21, 2020 at 11:32:04AM +0100, Andrew Cooper wrote:
> On 21/05/2020 11:26, Roger Pau Monné wrote:
> > On Thu, May 21, 2020 at 10:04:28AM +0100, Andrew Cooper wrote:
> >> +static int sh_remove_write_access_from_sl1p(struct domain *d, mfn_t gmfn,
> >> +                                            mfn_t smfn, unsigned long off)
> >> +{
> >> +    struct page_info *sp = mfn_to_page(smfn);
> >> +
> >> +    ASSERT(mfn_valid(smfn));
> >> +    ASSERT(mfn_valid(gmfn));
> >> +
> >> +    if ( sp->u.sh.type == SH_type_l1_32_shadow ||
> >> +         sp->u.sh.type == SH_type_fl1_32_shadow )
> > Using a switch would also be nice IMO and would avoid some of the code
> > churn.
> 
> Good point.  Happy to do that if Tim agrees (but I won't bother sending
> a v2 just now).

Sure, feel free to keep my RB after that.

Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.