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

Re: [Xen-devel] [PATCH v7 2/4] iommu VT-d: separate rmrr addition function



>>> On 02.06.15 at 23:14, <elena.ufimtseva@xxxxxxxxxx> wrote:
> --- a/xen/drivers/passthrough/vtd/dmar.c
> +++ b/xen/drivers/passthrough/vtd/dmar.c
> @@ -581,6 +581,72 @@ out:
>      return ret;
>  }
>  
> +static int register_one_rmrr(struct acpi_rmrr_unit *rmrru)
> +{
> +    bool_t ignore = 0;
> +    unsigned int i = 0;
> +    int ret = 0;
> +
> +    /* Skip checking if segment is not accessible yet. */
> +    if ( !pci_known_segment(rmrru->segment) )
> +    {
> +        dprintk(XENLOG_WARNING VTDPREFIX, "UNKNOWN Prefix! %04x", 
> rmrru->segment);

Apart from lacking a newline character, this has no counterpart in the
original code, and I don't think the message text comes even close to
describe what the issue is. May I please ask you once again that in
patches that are intended to be only code movement you either
clearly spell out what other changes you make, or that you omit any
such changes (other than possible formatting cleanup) in the first
place?

> +        i = UINT_MAX;
> +    }
> +
> +    for ( ; i < rmrru->scope.devices_cnt; i++ )
> +    {
> +        u8 b = PCI_BUS(rmrru->scope.devices[i]);
> +        u8 d = PCI_SLOT(rmrru->scope.devices[i]);
> +        u8 f = PCI_FUNC(rmrru->scope.devices[i]);
> +
> +        if ( pci_device_detect(rmrru->segment, b, d, f) == 0 )
> +        {
> +            dprintk(XENLOG_WARNING VTDPREFIX,
> +                    " Non-existent device (%04x:%02x:%02x.%u) is reported"
> +                    " in RMRR (%"PRIx64", %"PRIx64")'s scope!\n",

An acceptable no-functional-change adjustment would e.g. be to
un-line-break format strings (this one's particularly long so it may
remain as is, but there are shorter ones below) to ease grep-ing
for them based on observed log contents.

> +    else if ( rmrru->base_address > rmrru->end_address )
> +    {
> +        dprintk(XENLOG_WARNING VTDPREFIX,
> +            "  The RMRR (%"PRIx64", %"PRIx64") is incorrect!\n",
> +            rmrru->base_address, rmrru->end_address);

Indentation.

Jan


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


 


Rackspace

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