Re: Fwd: Re: [PATCH] PCI I/O space

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Sat, 13 Jun 2015 17:37:07 +0000

On 12/06/15 21:25, Robert Millan wrote:

El 08/06/15 a les 07:53, Antti Kantee ha escrit:
>> +int rumpcomp_pci_init(int, int *);
>
> Now that rumpcomp_userfeatures_pci.h is available, that signature can
be simplified.

That'd be "int rumpcomp_pci_init(void);" ?

No, that'd be e.g.

#ifdef rumpcomp_pci_initiopl
rumpcomp_pci_initiopl();
#endif

El 08/06/15 a les 23:20, Antti Kantee ha escrit:
I'm just worried that your print will look too much like an error when
it is not necessary so. Perhaps there's a way to make the print
softer, something to indicate that some features are missing most
likely because the program is not being run as root or with
CAP_SYS_RAWIO. In other words, treat EPERM as the common case error.

Also, the print and the call doesn't match: pci_init() vs. "iopl failed".

How about "pci: initialization returned %d, some features may be
unavailable" ?

See above.

Finally, commenting on the hypercall side of the patch, you should not
return the return value of iopl(), but rather the translated errno.

Are there any facilities and/or standard way of doing this? Or should I
just use an ad-hoc switch/case with possible iopl() errnos?

See <rump/rumpuser_component.h>

Other related posts: