On 06.10.2023 15:00, Roger Pau Monne wrote:> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -1601,7 +1601,7 @@ int map_guest_area(struct vcpu *v, paddr_t gaddr, 
> unsigned int size,
>   unmap:
>      if ( pg )
>      {
> -        unmap_domain_page_global(map);
> +        unmap_domain_page_global((void *)((unsigned long)map & PAGE_MASK));
>          put_page_and_type(pg);
>      }
>  
> @@ -1634,7 +1634,7 @@ void unmap_guest_area(struct vcpu *v, struct guest_area 
> *area)
>  
>      if ( pg )
>      {
> -        unmap_domain_page_global(map);
> +        unmap_domain_page_global((void *)((unsigned long)map & PAGE_MASK));
>          put_page_and_type(pg);
>      }
>  }

On v1 in a reply to Julien you talk of "limiting misuse" by not relaxing
expecations in Arm's backing code, but I wonder what kind of misuse you
think about. Aiui there's no strong need to insist on page aligned input,
and relaxing things there may simplify code elsewhere as well.

Jan

Reply via email to