[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 8/8] [xen/pcifront] Check pci_claim_resource return value.
Currently if we allocate more than 4GB to the unprivileged domain we cannot use PCI passthrough. Make the user aware that the device is no good. Will remove this once the 4GB issue is fixed. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- drivers/pci/xen-pcifront.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 10b2227..9ad0ea5 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -402,7 +402,12 @@ static int pcifront_claim_resource(struct pci_dev *dev, void *data) if (!r->parent && r->start && r->flags) { dev_dbg(&pdev->xdev->dev, "claiming resource %s/%d\n", pci_name(dev), i); - pci_claim_resource(dev, i); + if (pci_claim_resource(dev, i)) { + dev_err(&pdev->xdev->dev, "Could not claim " + "resource %s/%d! Device offline. Try " + "giving less than 4GB to domain.\n", + pci_name(dev), i); + } } } -- 1.6.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |