On Tue, Oct 25, 2022 at 06:04:49PM +0200, Jan Beulich wrote:
> On 25.10.2022 17:42, Roger Pau Monné wrote:
> > On Tue, Oct 11, 2022 at 10:48:38AM +0200, Jan Beulich wrote:
> >> --- a/xen/common/domain.c
> >> +++ b/xen/common/domain.c
> >> @@ -1484,7 +1484,7 @@ int map_vcpu_info(struct vcpu *v, unsign
> >>      if ( (v != current) && !(v->pause_flags & VPF_down) )
> >>          return -EINVAL;
> >>  
> >> -    page = get_page_from_gfn(d, gfn, NULL, P2M_ALLOC);
> >> +    page = get_page_from_gfn(d, gfn, NULL, P2M_UNSHARE);
> > 
> > I had to go look up that P2M_UNSHARE implies P2M_ALLOC for the users
> > of the parameter, it would be helpful to add a comment in p2m.h that
> > UNSHARE implies ALLOC.
> 
> Same here, plus I needed to further figure out that the same implication
> missing on Arm is okay merely because they ignore the respective argument.

... it's made worse by some callers using P2M_ALLOC | P2M_UNSHARE
which adds to the confusion.

Thanks, Roger.

Reply via email to