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

Re: [Xen-devel] [PATCH] xl, libxl: Add per-device and global permissive config options for pci passthrough



George Dunlap writes ("[Xen-devel] [PATCH] xl, libxl: Add per-device and global 
permissive config options for pci passthrough"):
> +        /* Don't restrict writes to the PCI config space from this VM */
> +        if(pcidev->permissive) {

Missing space after "if".

> +            sysfs_path = libxl__sprintf(gc, 
> SYSFS_PCIBACK_DRIVER"/permissive");
> +            f = fopen(sysfs_path, "w");
...
> +            fprintf(f, PCI_BDF, pcidev->domain, pcidev->bus,
> +                    pcidev->dev, pcidev->func);
> +            fclose(f);

Do this fprintf and fclose need error checking at all ?  If the actual
write fails, atm you will ignore it.

I agree with most of the other comments.

TBH although it would be nice to move this parsing to libxlu I don't
think you should be required to do it as part of this patch.  But I'd
encourage you to do so :-).

Thanks,
Ian.

_______________________________________________
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®.