[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 08/11] vpci/header: allow multiple map operations
>>> On 17.07.18 at 11:48, <roger.pau@xxxxxxxxxx> wrote: > --- a/xen/drivers/vpci/header.c > +++ b/xen/drivers/vpci/header.c > @@ -184,7 +184,19 @@ static void defer_map(struct domain *d, struct pci_dev > *pdev, > * started for the same device if the domain is not well-behaved. > */ > curr->vpci.pdev = pdev; > - curr->vpci.mem = mem; > + if ( !curr->vpci.mem ) > + curr->vpci.mem = mem; > + else > + { > + int rc = rangeset_merge(curr->vpci.mem, mem); > + > + if ( rc ) > + gprintk(XENLOG_WARNING, > + "%04x:%02x:%02x.%u: unable to %smap memory region: %d\n", > + pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), > + PCI_FUNC(pdev->devfn), map ? "" : "un", rc); > + rangeset_destroy(mem); > + } > curr->vpci.map = map; > curr->vpci.rom_only = rom_only; Is it certain that all other arguments match (pdev, map, rom_only)? If so, please add ASSERT()s to that effect, and perhaps also half a sentence to the description as to why that is guaranteed. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |