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

Re: [Xen-devel] [PATCH for-4.10] common/gnttab: Improve logging message by including relevent domid



>>> On 10.10.17 at 22:24, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -76,6 +76,9 @@ struct grant_table {
>      /* Mapping tracking table per vcpu. */
>      struct grant_mapping **maptrack;
>  
> +    /* Domain to which this struct grant_table belongs. */
> +    struct domain *domain;

As you're after only the domain ID, why not just domid_t? Or
otherwise at least const-qualify the pointer?

> @@ -2027,7 +2034,7 @@ gnttab_transfer(
>          /* Read from caller address space. */
>          if ( unlikely(__copy_from_guest(&gop, uop, 1)) )
>          {
> -            gdprintk(XENLOG_INFO, "gnttab_transfer: error reading req 
> %d/%d\n",
> +            gdprintk(XENLOG_INFO, "error reading req %d/%d\n",
>                      i, count);

"i" (wrongly) is plain int, so %d is fine, but "count" wants %u.

> @@ -2076,8 +2081,7 @@ gnttab_transfer(
>          /* Find the target domain. */
>          if ( unlikely((e = rcu_lock_domain_by_id(gop.domid)) == NULL) )
>          {
> -            gdprintk(XENLOG_INFO, "gnttab_transfer: can't find domain %d\n",
> -                    gop.domid);
> +            gdprintk(XENLOG_INFO, "can't find domain %d\n", gop.domid);

d%d here too?

If you decide to take care of all of the above, then
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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