[PATCH 5/6] machdev,pci,rump: fix shutdown dosync

2021-03-06 Thread Damien Zammit
--- libmachdev/ds_routines.c | 4 +-- libmachdev/machdev-device_emul.h | 2 +- libmachdev/machdev.h | 2 +- libmachdev/trivfs_server.c | 2 +- pci-arbiter/Makefile | 2 +- pci-arbiter/main.c | 19 - pci-arbiter/startup-ops.c

[PATCH 6/6] pci-arbiter: Close correctly

2021-03-06 Thread Damien Zammit
--- pci-arbiter/main.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pci-arbiter/main.c b/pci-arbiter/main.c index 4a10b264..ddea5aa7 100644 --- a/pci-arbiter/main.c +++ b/pci-arbiter/main.c @@ -62,7 +62,7 @@ pci_device_open (mach_port_t reply_port, mach_msg

[PATCH: hurd x6]

2021-03-06 Thread Damien Zammit
Hi, [PATCH 1/6] pci-arbiter: Fix brokenness [PATCH 2/6] pci-arbiter: Introduce machdev into this server First one or both patches could be applied as is to the tree, and work with the new libpciaccess. [PATCH 3/6] libnetfs: Hacks to allow pci to run with no cred This is still needed to bypass

[PATCH 4/6] rumpdisk: Don't pretend to be the arbiter anymore

2021-03-06 Thread Damien Zammit
--- rumpdisk/block-rump.c | 16 +--- rumpdisk/main.c | 5 - 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 3ee0773d..584056f7 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-rump.c @@ -27,6 +27,7 @@

[PATCH 3/6] libnetfs: Hacks to allow pci to run with no cred

2021-03-06 Thread Damien Zammit
--- libnetfs/dir-lookup.c | 30 +- libnetfs/dir-readdir.c | 3 --- libnetfs/file-getcontrol.c | 13 ++--- libnetfs/make-protid.c | 8 +--- pci-arbiter/netfs_impl.c | 2 ++ 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/lib

[PATCH 1/6] pci-arbiter: Fix brokenness

2021-03-06 Thread Damien Zammit
--- pci-arbiter/netfs_impl.c | 42 ++-- pci-arbiter/pci-ops.c| 6 +++--- pci-arbiter/pcifs.c | 18 +++-- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/pci-arbiter/netfs_impl.c b/pci-arbiter/netfs_impl.c index b987a0bc..e9

[PATCH 2/6] pci-arbiter: Introduce machdev into this server

2021-03-06 Thread Damien Zammit
--- pci-arbiter/Makefile | 7 +- pci-arbiter/main.c| 147 +++--- pci-arbiter/options.c | 19 + pci-arbiter/options.h | 8 +++ pci-arbiter/pcifs.h | 3 + pci-arbiter/startup-ops.c | 2 + 6 files changed, 174 insertions(+), 12 d

Re: [PATCH libpciaccess 2/2] hurd: device_open(pci), /servers/bus/pci fallback

2021-03-06 Thread Damien Zammit
On 7/3/21 11:51 am, Samuel Thibault wrote: > That looks good, I'd say you can submit to upstream libpciaccess :) > > Samuel I created an issue upstream with a merge request that fixes it: https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/issues/14 Damien

Re: [PATCH libpciaccess 2/2] hurd: device_open(pci), /servers/bus/pci fallback

2021-03-06 Thread Samuel Thibault
That looks good, I'd say you can submit to upstream libpciaccess :) Samuel Damien Zammit, le dim. 07 mars 2021 11:44:23 +1100, a ecrit: > Reverted change to .destroy > > --- > src/hurd_pci.c | 121 ++--- > 1 file changed, 74 insertions(+), 47 deletion

[PATCH libpciaccess 2/2] hurd: device_open(pci), /servers/bus/pci fallback

2021-03-06 Thread Damien Zammit
Reverted change to .destroy --- src/hurd_pci.c | 121 ++--- 1 file changed, 74 insertions(+), 47 deletions(-) diff --git a/src/hurd_pci.c b/src/hurd_pci.c index ada7af8..40c9925 100644 --- a/src/hurd_pci.c +++ b/src/hurd_pci.c @@ -33,9 +33,12 @@ #incl

[PATCH libpciaccess 2/2] hurd: device_open(pci), /servers/bus/pci fallback

2021-03-06 Thread Damien Zammit
--- src/hurd_pci.c | 122 ++--- 1 file changed, 74 insertions(+), 48 deletions(-) diff --git a/src/hurd_pci.c b/src/hurd_pci.c index ada7af8..d988a6e 100644 --- a/src/hurd_pci.c +++ b/src/hurd_pci.c @@ -33,9 +33,12 @@ #include #include #include +#

Re: [PATCH libpciaccess] hurd: device_open the pre-existing pci server

2021-03-06 Thread Samuel Thibault
Samuel Thibault, le sam. 06 mars 2021 11:31:59 +0100, a ecrit: > Damien Zammit, le sam. 06 mars 2021 15:00:00 +1100, a ecrit: > > +static int > > +sort_devices(void) > > +{ [...] > > +} > > That probably needs to be discussed with upgrade? (I meant "upstream") Samuel

[PATCH libpciaccess 2/2] hurd: device_open(pci), /servers/bus/pci fallback

2021-03-06 Thread Damien Zammit
--- src/hurd_pci.c | 135 - 1 file changed, 88 insertions(+), 47 deletions(-) diff --git a/src/hurd_pci.c b/src/hurd_pci.c index ada7af8..6b6e299 100644 --- a/src/hurd_pci.c +++ b/src/hurd_pci.c @@ -33,9 +33,12 @@ #include #include #include +#

[PATCH libpciaccess 1/2] common_init: Sort pci devices by B/D/F

2021-03-06 Thread Damien Zammit
--- src/common_init.c | 37 + 1 file changed, 37 insertions(+) diff --git a/src/common_init.c b/src/common_init.c index 1940cff..14f0c6b 100644 --- a/src/common_init.c +++ b/src/common_init.c @@ -40,6 +40,40 @@ _pci_hidden struct pci_system * pci_sys; +sta

[PATCH libpciaccess x2]

2021-03-06 Thread Damien Zammit
This splits the previous patch into two, one for sorting devices, one for hurd improvements. Thanks, Damien

Re: [PATCH libpciaccess] hurd: device_open the pre-existing pci server

2021-03-06 Thread Samuel Thibault
Damien Zammit, le dim. 07 mars 2021 09:36:26 +1100, a ecrit: > devices = realloc(pci_sys->devices, (pci_sys->num_devices + 1) >* sizeof(struct pci_device_private)); > if (!devices) { > -if (closedir(dir) < 0) > -

[PATCH libpciaccess] hurd: device_open the pre-existing pci server

2021-03-06 Thread Damien Zammit
This is a revised version of previous patch. When there is no pci "device" present in the system, the fallback mechanism to use /servers/bus/pci works. It also boots from a static arbiter. --- src/common_init.c | 37 + src/hurd_pci.c| 138 ++---

Re: [PATCH libpciaccess] hurd: device_open the pre-existing pci server

2021-03-06 Thread Samuel Thibault
Hello, Damien Zammit, le sam. 06 mars 2021 15:00:00 +1100, a ecrit: > +static int > +sort_devices(void) > +{ > +int bus, dev, func; > +struct pci_device_private *sorted; > +struct pci_device_private *device; > +struct pci_device_private *tmpdev; > + > +sorted = calloc(pci_sys->