[PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-13 Thread Damien Zammit
Previous problems mentioned with 2x rumpdisk partitions all fixed. Booted off rumpdisk / and mounted second partition in userspace: root@zamhurd:~# showtrans /dev/wd0 /hurd/storeio -T typed device:@/dev/rumpdisk:/dev/wd0 root@zamhurd:~# fdisk -l /dev/wd0 Disk /dev/wd0: 298.9 GiB, 320072933376 by

pci-arbiter + rumpdisk

2020-11-13 Thread Damien Zammit
Hi Samuel, I need to figure out the next step of rumpdisk, using the arbiter instead of faking the arbiter. > youpi: pci-arbiter could be exposed as a device name in the master device > port and the userland pci-arbiter running on /server/bus/pci can try to open > that > youpi: just like netdd

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-14 Thread Damien Zammit
On 14/11/20 8:17 pm, Samuel Thibault wrote: > Hello, > > Damien Zammit, le sam. 14 nov. 2020 14:37:37 +1100, a ecrit: >> Previous problems mentioned with 2x rumpdisk partitions all fixed. > > Congrats! > > What was the issue? The logic around default behaviour

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-14 Thread Damien Zammit
Hi, On 14/11/20 9:09 pm, Samuel Thibault wrote: > This looks odd to me. The "@/dev/master:" part should rather be > dropped way before, by the code that opens /dev/master to access the > master device port before calling device_open() on it: the translators > shouldn't have to grok which way they

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-14 Thread Damien Zammit
Hi, On 15/11/20 11:33 am, Damien Zammit wrote: > I will test again without it. It works in both modes with current master! Damien

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-15 Thread Damien Zammit
On 15/11/20 8:56 pm, Samuel Thibault wrote: > I have uploaded it in Debian a minute ago. We'll be able to start to use > this in production :) Unfortunately, it still does not work with the pci-arbiter. I had a go at fixing that today but it's not quite working. I am getting "mapping time: Grat

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-15 Thread Damien Zammit
Hi, On 16/11/20 8:16 am, Samuel Thibault wrote: > wd1 at atabus7 drive 0 Do you have two controllers or one? This looks like IDE (?) > wd1: > wd1: drive supports 16-sector PIO transfers, LBA48 addressing > wd1: 20480 MB, 41610 cyl, 16 head, 63 sec, 512 bytes/sect x 41943040 sectors > wd1: drive

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-15 Thread Damien Zammit
Hi, On 16/11/20 9:24 am, Samuel Thibault wrote: > opening /dev/wd1d > could not open > ext2fs: device:/dev/wd1: No such device or address FYI, I am using the following grub entry for booting off a rumpdisk: menuentry "rumpdisk!" { set root=(hd0,msdos2) multiboot /boot/gnumach-1.8

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-15 Thread Damien Zammit
recall having issues with the driver without patching QEMU. Perhaps this will help? Damien >From 2c672e1902757dcd202c58382dcfc0727217aafa Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Wed, 24 Jun 2020 20:14:48 +1000 Subject: [PATCH] No built-in AHCI on q35 && sync cache on IDE ---

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-15 Thread Damien Zammit
Hi, On 16/11/20 11:04 am, Samuel Thibault wrote: > I tried wd0, it does work (but my setup is using wd1, so doesn't boot :) ) Hmm, I have the same problem on my end trying to boot off wd1: ahcisata0 port 1: device present, speed: 1.5Gb/s ahcisata0 port 0: device present, speed: 1.5Gb/s wd0 at at

Re: [PATCH] libmachdev: Install as translator when bootstrapping && fix rumpdisk injection

2020-11-15 Thread Damien Zammit
On 16/11/20 12:40 pm, Samuel Thibault wrote: > It booted fine :D \o/ YAY!

Re: pci-arbiter + rumpdisk

2020-11-16 Thread Damien Zammit
Hi, How do I expose the hurdish pci subsystem that has no underlying node to attach to for a netfs in pci-arbiter during bootstrap? I have almost completed the loop with rumpdisk and the arbiter, but I cannot start pci-arbiter as it has no underlying node to attach to, and the specific implemen

Re: pci-arbiter + rumpdisk

2020-11-16 Thread Damien Zammit
Hi, On 16/11/20 9:02 pm, Samuel Thibault wrote: > ? Like rumpdisk does? start pci-arbiter: Hurd bootstrap pci pci-arbiter: Must be started as a translator Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 201

Re: pci-arbiter + rumpdisk

2020-11-17 Thread Damien Zammit
Somehow I was able to boot / via rumpdisk and then the arbiter still worked afterwards, so networking via netdde started working. This is the first time I've had a rumpdisk / with network access! Alas, I cannot seem to make it work via the arbiter though. My latest attempt looks like the arbiter s

Re: rumpdisk status

2020-11-23 Thread Damien Zammit
On 24/11/20 5:16 am, Samuel Thibault wrote: > Hello, > > Had you tested support for cd-rom? With qemu I am getting a media sense > error with status 0x50. I think that was the reason for the qemu patch for syncing IDE cache iirc. Damien

Re: problems with daily images

2021-01-23 Thread Damien Zammit
Hi, On 24/1/21 3:32 am, Samuel Thibault wrote: > Yes, but the real answer is that we should fix vim. I noticed that vim is building with -O2, shouldn't it also have these flags for hurd-i386? -mno-sse -mno-mmx -mno-sse2 -mno-3dnow I will try rebuilding the package with these flags and see if i

Re: problems with daily images

2021-01-23 Thread Damien Zammit
Hi, On 24/1/21 11:28 am, Samuel Thibault wrote: > Why so? We do support SSE*. > > (glibc 2.33 will even use them automatically for memcpy etc. thanks to > ifunc support recently getting enabled) OK, I ran the failing test in GDB: initmaster(int f UNUSED) { #ifndef VMS # ifdef POSIX tcflush(

Re: problems with daily images

2021-01-23 Thread Damien Zammit
Hi, On 24/1/21 11:41 am, Damien Zammit wrote: > OK, I ran the failing test in GDB: Forgot to paste the command I used: vim/src/vim-gtk3/testdir $ VIMRUNTIME=../../runtime gdb --args ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -S runtest.vim test_arglist.vim --cmd 'au Sw

Re: problems with daily images

2021-01-23 Thread Damien Zammit
On 24/1/21 12:18 pm, Samuel Thibault wrote: > I'm starting to think that perhaps we should as well just comment the > #define TIOCFLUSH from the headers, since there are so many bogus > callers of the interface. I think we still need to pass -DPOSIX to vim CFLAGS for hurd, otherwise it will not ca

Re: problems with daily images

2021-01-23 Thread Damien Zammit
Hi, On 23/1/21 12:03 pm, Paul Dufresne wrote: > I have seen problems with daily images from: > https://people.debian.org/~sthibault/hurd-i386/installer/cdimage/ > > Was problems with vim, emacs, gdb... in previous days... I think but unsure > Idon't seems to see them now. > Had tried previous mo

Re: problems with daily images

2021-01-23 Thread Damien Zammit
Hi Samuel, On 24/1/21 12:32 pm, Samuel Thibault wrote: > Damien Zammit, le dim. 24 janv. 2021 12:26:35 +1100, a ecrit: >> I think we still need to pass -DPOSIX to vim CFLAGS for hurd, >> otherwise it will not call any flush function if you remove the #define. > > Ok, but A

Re: problems with daily images

2021-01-25 Thread Damien Zammit
On 25/1/21 11:40 pm, Samuel Thibault wrote: > Paul Dufresne, le lun. 25 janv. 2021 07:21:33 -0500, a ecrit: >> Today I tried to install [1]https://people.debian.org/~sthibault/hurd-i386/ >> installer/cdimage/daily/debian-sid-hurd-i386-NETINST-1.iso in QEMU. >> >> I got: >> gdb depends on libboost-r

Re: problems with daily images

2021-01-25 Thread Damien Zammit
Hi, On 25/1/21 11:40 pm, Samuel Thibault wrote: > Ok, I fixed the missing dep in the cd script, tomorrow's build should be > fine in that concern. I burnt the cd to physical media and tried to install natively on X220 thinkpad. We have an issue because the SSD is not detected by gnumach, but sti

Re: problems with daily images

2021-01-25 Thread Damien Zammit
On 26/1/21 4:00 pm, Damien Zammit wrote: > I burnt the cd to physical media and tried to install natively on X220 > thinkpad. I also tried the same image on a physical X230 thinkpad, this time the disk was detected by gnumach, but it failed to detect the CD ROM so the installer cou

[PATCH] gnumach: Add nodisk option to kernel cli

2021-01-25 Thread Damien Zammit
This option disables the built-in disk drivers completely. Passing " nodisk" to gnumach command line will allow the user to boot the installer with a ramdisk, and rumpdisk should initialise AHCI controller in userspace. This is a workaround for the installer for some modern hardware that the gnuma

Re: vim build [was: problems with daily images]

2021-01-30 Thread Damien Zammit
On 31/1/21 7:54 am, Samuel Thibault wrote: > I uploaded to unreleased a version with that fixed, but apparently the > build fails a bit later: > > [...] > ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -S runtest.vim > test_help.vim --cmd 'au SwapExists * let v:swapchoice = "e"' > /dev/nu

[PATCH x3] hurd: pci arbiter bootstrap

2021-02-01 Thread Damien Zammit
Hi all, [PATCH 1/3] libnetfs: Fix mapping of time fallback to mach device This could be merged as is. [PATCH 2/3] Bootstrappable pci-arbiter This is a work in progress, I would like some comments on how I can make the arbiter start up without a / filesystem when it needs to expose the pci inte

[PATCH 1/3] libnetfs: Fix mapping of time fallback to mach device 'time'

2021-02-01 Thread Damien Zammit
--- libnetfs/init-init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnetfs/init-init.c b/libnetfs/init-init.c index 984a5e71..b63e7ffa 100644 --- a/libnetfs/init-init.c +++ b/libnetfs/init-init.c @@ -39,6 +39,8 @@ netfs_init () { error_t err; err = maptime_map (0, 0, &netfs_mti

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

2021-02-01 Thread Damien Zammit
--- rumpdisk/main.c | 5 - 1 file changed, 5 deletions(-) diff --git a/rumpdisk/main.c b/rumpdisk/main.c index 150dc996..b35cbfa7 100644 --- a/rumpdisk/main.c +++ b/rumpdisk/main.c @@ -31,11 +31,6 @@ #include #include -/* TODO: Add api to pciaccess to allow selecting backend. - * For no

[PATCH 2/3] Bootstrappable pci-arbiter

2021-02-01 Thread Damien Zammit
--- pci-arbiter/Makefile | 2 +- pci-arbiter/main.c| 72 --- pci-arbiter/options.c | 19 +++ pci-arbiter/options.h | 8 + pci-arbiter/pcifs.h | 3 ++ pci-arbiter/startup-ops.c | 2 ++ 6 files changed, 100 insertions(+),

Re: [PATCH x3] hurd: pci arbiter bootstrap

2021-02-01 Thread Damien Zammit
Hi, Here is the tail of my start up log with some extra debug mach_prints: I think the "Must be started as a translator" is coming from the netfs start up when it tries to create a node for the pci filesystem. start pci-arbiter: PCI start PCI machdev start Hurd bootstrap pci PCI machdev done

Re: [PATCH x3] hurd: pci arbiter bootstrap

2021-02-04 Thread Damien Zammit
On 3/2/21 8:53 am, Samuel Thibault wrote: > Damien Zammit, le mar. 02 févr. 2021 18:29:42 +1100, a ecrit: >> This is a work in progress, I would like some comments on how I can >> make the arbiter start up without a / filesystem when it needs to >> expose the pci interface

pci-arbiter: netfs startup - chicken/egg problem

2021-02-05 Thread Damien Zammit
Hi, I think we have another chicken/egg problem: netfs needs an underlying node to expose pcifs on, so that the disk driver can start up and expose the real underlying node. It seems like diskfs_startup_diskfs opens the real disk and finds an actual root fs node, but we can't do that in netfs u

Re: pci-arbiter: netfs startup - chicken/egg problem

2021-02-05 Thread Damien Zammit
I'm getting logs like the following: PCI netfs done PCI maptime done PCI pci_system_init done machdev_trivfs_server pci-arbiter: Translator startup failure: fsys_startup: (ipc/send) invalid destin ation portCopyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 20 05, 2006, 2

Re: pci-arbiter: netfs startup - chicken/egg problem

2021-02-06 Thread Damien Zammit
More logs after making the underlying node for netfs not required: It hangs somewhere on netfs_startup() using a bootstrap port i passed from libmachdev. Maybe I am passing the wrong kind of port? start pci-arbiter: PCI start PCI machdev start Hurd bootstrap pci PCI machdev done PCI netfs done PC

Almost working pci-arbiter with rumpdisk

2021-02-08 Thread Damien Zammit
Hi, I'm getting very close to working pci + rump. In pci-arbiter, what port rights do I return in device_open? I am currently doing this: static io_return_t device_open (mach_port_t reply_port, mach_msg_type_name_t reply_port_type, dev_mode_t mode, char *name, device_t * devp,

Re: Almost working pci-arbiter with rumpdisk

2021-02-09 Thread Damien Zammit
On 9/2/21 5:33 am, Samuel Thibault wrote: > Damien Zammit, le lun. 08 févr. 2021 20:33:16 +1100, a ecrit: >> I'm getting very close to working pci + rump. > > Did you manage to find answers to your previous questions? > (I have to admit I didn't have time to dive int

Re: Almost working pci-arbiter with rumpdisk

2021-02-19 Thread Damien Zammit
I'm getting some issue with libpciaccess, I changed it locally to detect the pci port from device_open and it seems to be opening the right port, but there must be a bug with it. I must be pretty close now, because the arbiter opens the x86 method and rump opens the hurd method of pciaccess: sta

Re: Almost working pci-arbiter with rumpdisk

2021-02-20 Thread Damien Zammit
Ok so the problem is that its returning ENODIR on the file_name_lookup_under call. How do I get the root filesystem of pci arbiter to exist so it can look up paths on the hurd pci arbiter before rumpdisk initiates the disk driver? Do I need to call fsys_getroot somewhere in the arbiter? pci0 at

Re: Almost working pci-arbiter with rumpdisk

2021-02-20 Thread Damien Zammit
Hi Samuel, On 20/2/21 10:16 pm, Samuel Thibault wrote: > It's hard to tell exactly without seeing what exactly you have done > already. As I wrote before, device_open should return a port to the > root directory of the pci-arbiter tree. I'm not sure exactly what you > wrote to achieve that. I thi

Re: Almost working pci-arbiter with rumpdisk

2021-02-20 Thread Damien Zammit
Hi, On 21/2/21 12:24 pm, Samuel Thibault wrote: > Ah, possibly. Perhaps you could make libnetfs to accept any access when > auth/proc are not available Done this! > ? once libpciaccess gets a port on pci-arbiter's root, it can use > file_name_lookup_under to open directories and files in it. lib

Re: Almost working pci-arbiter with rumpdisk

2021-02-24 Thread Damien Zammit
On 21/2/21 9:21 pm, Samuel Thibault wrote: > Mmm. I guess that's missing _hurd_init initialization. It would > be tricky to separate out the really basic pieces from proc/auth > initialization, I'd say it will be a lot less tricky to just make > hurd_pci.c use the dir_readdir RPC directly on the ro

Re: Almost working pci-arbiter with rumpdisk

2021-02-27 Thread Damien Zammit
Hi, On 25/2/21 9:30 am, Samuel Thibault wrote: > From reading the libnetfs/dir-readdir.c source and > pci-arbiter/netfs_impl.c source I don't see anything obvious. Probably > some prints in there would allow to make sure how far it is going > actually. I got past a hang, by installing the port re

pci-arbiter + rumpdisk boots!

2021-03-01 Thread Damien Zammit
Hi all, I got the arbiter to play nice with rumpdisk! But as soon as you log in it crashes the disk and qemu, I think probably because there is a mismatched libpciaccess.so in userspace versus the statically linked ones in the pci/disk servers? I'm not sure yet. -- PCI device_open (mem) PC

[PATCH 2/4] libmachdev: Spawn a thread for server loop so main pathway can continue

2021-03-02 Thread Damien Zammit
--- libmachdev/trivfs_server.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 3ab15049..06756f82 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -398,7 +3

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

2021-03-02 Thread Damien Zammit
--- rumpdisk/block-rump.c | 16 +--- rumpdisk/main.c | 12 +++- 2 files changed, 20 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 +

[PATCH x4] hurd: pci-arbiter and rumpdisk static server support

2021-03-02 Thread Damien Zammit
Hi all, This has been a work in progress for some time. I am hoping it does not need much reworking. The only problem I can see is the uid=0 faking the cred by allowing netfs to install ports that have no cred at all, perhaps we need a new RPC for obtaining a temporary uid=0 cred during bootstr

[PATCH 3/4] Bootstrappable pci-arbiter

2021-03-02 Thread Damien Zammit
--- pci-arbiter/Makefile | 7 +- pci-arbiter/main.c| 140 -- pci-arbiter/netfs_impl.c | 39 +++ pci-arbiter/options.c | 19 ++ pci-arbiter/options.h | 8 +++ pci-arbiter/pci-ops.c | 6 +- pci-arbiter/pcifs.c |

[PATCH 1/4] libnetfs: Behave more like diskfs_startup_diskfs

2021-03-02 Thread Damien Zammit
--- libnetfs/dir-lookup.c | 30 +- libnetfs/dir-readdir.c | 3 --- libnetfs/file-getcontrol.c | 13 ++--- libnetfs/init-startup.c| 5 ++--- libnetfs/make-protid.c | 8 +--- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/

[PATCH libpciaccess] hurd: device_open the pre-existing pci server and use dir_readdir RPC

2021-03-02 Thread Damien Zammit
This patch for libpciaccess goes in lockstep with the previous patches I sent for hurd. --- src/hurd_pci.c | 125 ++--- 1 file changed, 98 insertions(+), 27 deletions(-) diff --git a/src/hurd_pci.c b/src/hurd_pci.c index ada7af8..ff14285 100644 --- a/

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

2021-03-05 Thread Damien Zammit
This is a cleaned up version of my previous patch. It fixes a bug by sorting the device array by B/D/F for all backends. (It assumes only domain exists and I think that assumption is also made elsewhere). --- src/common_init.c | 37 src/hurd_pci.c| 108

[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 ++---

[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

[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 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 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 +#

[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

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

[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

[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 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: 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 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 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 hurd x2] - Rebased

2021-03-07 Thread Damien Zammit
[PATCH 1/2] pci-arbiter: Fix brokenness This patch does not include mustbedir option because I believe there is already logic that detects if it is looking up a directory, by checking the entry->dir != 0. When I tried adding it in, it did not work correctly. [PATCH 2/2] pci-arbiter: Introduce ma

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

2021-03-07 Thread Damien Zammit
* pci-arbiter/netfs_impl.c (get_dirents): Fix count and size detection (netfs_attempt_lookup): Strip trailing slashes and leading dot slashes * pci-arbiter/pci-ops.c (check_permissions): Use the overridable method instead --- pci-arbiter/netfs_impl.c | 41

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

2021-03-07 Thread Damien Zammit
* pci-arbiter/Makefile Add machdev lib and simplify * pci-arbiter/main.c (pci_device_{open,close,shutdown}): New methods (netfs_server_func): Thread the demuxer loop (pcifs_startup): Custom startup method (main): Use machdev for server and detach worker threads * pci-arbiter/options.{c,h} Add disk-

Re: [PATCH: hurd x6]

2021-03-07 Thread Damien Zammit
On 7/3/21 9:25 pm, Samuel Thibault wrote: > Damien Zammit, le dim. 07 mars 2021 17:39:04 +1100, a ecrit: >> [PATCH 3/6] libnetfs: Hacks to allow pci to run with no cred >> >> This is still needed to bypass the cred uid=0. >> I tried to call fsys_getroot, but it failed

[PATCH] acpi: Fix brokenness

2021-03-07 Thread Damien Zammit
Fix count and size --- acpi/netfs_impl.c | 41 + 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/acpi/netfs_impl.c b/acpi/netfs_impl.c index 84f52c89..d9853a08 100644 --- a/acpi/netfs_impl.c +++ b/acpi/netfs_impl.c @@ -58,25 +58,26 @@ get_di

[PATCH 3/4] pci-arbiter: Introduce machdev into this server

2021-03-08 Thread Damien Zammit
* pci-arbiter/Makefile Add machdev lib and simplify * pci-arbiter/main.c (pci_device_{open,close,shutdown}): New methods (netfs_server_func): Thread the demuxer loop (pcifs_startup): Custom startup method (main): Use machdev for server and detach worker threads * pci-arbiter/options.{c,h} Add disk-

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

2021-03-08 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 9c6fa10c..a61f7b80 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-rump.c @@ -27,6 +27,7 @@

[PATCH hurd x4] - Working arbiter + rumpdisk

2021-03-08 Thread Damien Zammit
Hi all, This series introduces a working disk driver with no more ugly netfs hacks. Cheers, Damien

[PATCH 2/4] pci-arbiter: Fix brokenness

2021-03-08 Thread Damien Zammit
--- pci-arbiter/netfs_impl.c | 39 ++- pci-arbiter/pci-ops.c| 2 +- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/pci-arbiter/netfs_impl.c b/pci-arbiter/netfs_impl.c index b987a0bc..2748c382 100644 --- a/pci-arbiter/netfs_impl.c +++ b/pci

[PATCH 1/4] acpi: Fix brokenness

2021-03-08 Thread Damien Zammit
--- acpi/netfs_impl.c | 39 ++- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/acpi/netfs_impl.c b/acpi/netfs_impl.c index 84f52c89..b6cb466d 100644 --- a/acpi/netfs_impl.c +++ b/acpi/netfs_impl.c @@ -58,25 +58,22 @@ get_dirents (struct acpifs_d

[PATCH] machdev,pci,rump: Reuse shutdown notify from machdev

2021-03-12 Thread Damien Zammit
This set of changes allows the fsys_init flow of RPCs to work better during bootstrap. It also removes duplicated code for the startup shutdown notify between machdev and the arbiter. However, I am still unsure why the lookup of _SERVERS_STARTUP fails in the arbiter's fsys_init, see the WARNING a

[PATCH] machdev: Fix passthrough of control port and fsys_startup

2021-03-13 Thread Damien Zammit
This fixes the WARNING on the previous patch. The lookup of _SERVERS_STARTUP now works. --- libmachdev/trivfs_server.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 8ee6be65..be5abc9d 100644 --- a/libmachdev

[PATCH] machdev,pci,rump: Rework bootstrap

2021-03-14 Thread Damien Zammit
Hi, This patch fixes the bootstrapping, except for a strange anomaly with: cat /proc/5/stat /proc/6/stat My grub config looks like this: menuentry "pci-arbiter + rumpdisk!" { set root=(hd0,msdos2) multiboot /boot/gnumach-1.8-486-dbg.gz root=part:2:device:wd0 noide modul

[PATCH v2] machdev,pci,rump: Rework bootstrap

2021-03-15 Thread Damien Zammit
* libmachdev/machdev.h (machdev_trivfs_init): Add controlport output parameter * libmachdev/trivfs_server.c Rework the bootstrapping of machdev * pci-arbiter/Makefile Remove startup.c * pci-arbiter/startup.{c,h} Delete files * pci-arbiter/main.c (main): Rework bootstrap, remove notification, add co

[PATCH v3] machdev,rump,pci: Rework bootstrap

2021-03-15 Thread Damien Zammit
* libmachdev/trivfs_server.c Rework the bootstrapping of machdev * pci-arbiter/Makefile Remove startup.c * pci-arbiter/startup.{c,h} Delete files * pci-arbiter/main.c (main): Rework bootstrap, remove duplicated notification * rumpdisk/main.c (main): Don't pretend to be the arbiter anymore --- lib

[PATCH 2/2] machdev: Pass argv through to _hurd_init

2021-03-18 Thread Damien Zammit
--- libmachdev/machdev.h | 2 +- libmachdev/trivfs_server.c | 9 ++--- pci-arbiter/main.c | 2 +- rumpdisk/main.c| 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libmachdev/machdev.h b/libmachdev/machdev.h index 8f613b35..9884c70d 100644 --- a/li

[PATCH 1/2] machdev: Fix parent proc passthrough in fsys_init

2021-03-18 Thread Damien Zammit
--- libmachdev/trivfs_server.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 607166f9..60711348 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -79,6 +79,9 @@ struct p

SMP for gnumach

2021-03-19 Thread Damien Zammit
Hi all, As you know, AlmuHS did a bunch of great work for SMP support so far. However, I have noticed there are a stack of commits in 0.0.10_2 branch that are not rebased onto master. Is it desirable/possible to squash all the smp support into one or two commits so we can rebase it onto master a

[PATCH] WIP: ioapic support - linux drivers disabled

2021-03-20 Thread Damien Zammit
) diff --git a/i386/i386at/ioapic.c b/i386/i386at/ioapic.c new file mode 100644 index ..72830653 --- /dev/null +++ b/i386/i386at/ioapic.c @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2019 Damien Zammit + */ + +#include +#include +#include +#include +#include +#include +#include +#in

Re: [PATCH] WIP: ioapic support - linux drivers disabled

2021-03-20 Thread Damien Zammit
On 21/3/21 11:54 am, Samuel Thibault wrote: > Damien Zammit, le dim. 21 mars 2021 11:48:29 +1100, a ecrit: >> {cpu0} ../kern/slab.c:1021: kmem_cache_free_to_slab: Assertion `((unsigned >> long) >> buf + cache->buf_size) <= vm_page_trunc((unsigned long)slab->a

[PATCH gnumach] fix timer bug

2021-03-25 Thread Damien Zammit
--- kern/mach_clock.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kern/mach_clock.c b/kern/mach_clock.c index e4d44f57..ed5cdfd3 100644 --- a/kern/mach_clock.c +++ b/kern/mach_clock.c @@ -152,7 +152,9 @@ void clock_interrupt( timer_bump(&thread->user_timer,

[PATCH gnumach] fixup acpi base table search

2021-03-25 Thread Damien Zammit
--- i386/i386at/acpi_parse_apic.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 7855e8a5..9dbc6825 100644 --- a/i386/i386at/acpi_parse_apic.c +++ b/i386/i386at/acpi_parse_apic.c @@

gnumach: IOAPIC and LAPIC support

2021-03-26 Thread Damien Zammit
This patchset provides a way to disable linux/ drivers and build gnumach with basic IOAPIC interrupts and LAPIC timer support in SMP mode. You can still build gnumach the old way with PIC interrupts and single core, with or without linux/ drivers. Note that it currently assumes there is only one

[PATCH 5/5] ioapic interrupts and lapic timer support

2021-03-26 Thread Damien Zammit
Defaults to --enable-apic To build with SMP and APIC support, use for example: --enable-ncpus=4 Otherwise to build with PIC only and no SMP: --enable-apic=no --- i386/Makefrag.am | 13 +- i386/configfrag.ac | 12 ++ i386/i386/apic.c | 34 ++- i3

[PATCH 1/5] Make linux drivers optional

2021-03-26 Thread Damien Zammit
Defaults to build with linux drivers. To build without linux drivers, use: --enable-qemu-group=no --enable-net-group=no --enable-scsi-group=no --enable-wireless-group=no --enable-pcmcia-group=no --- device/intr.c | 36 linux/configfrag.ac | 38 +

[PATCH 2/5] fixup acpi base table search

2021-03-26 Thread Damien Zammit
--- i386/i386at/acpi_parse_apic.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 7855e8a5..9dbc6825 100644 --- a/i386/i386at/acpi_parse_apic.c +++ b/i386/i386at/acpi_parse_apic.c @@

[PATCH 3/5] fix timer bug

2021-03-26 Thread Damien Zammit
--- kern/mach_clock.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kern/mach_clock.c b/kern/mach_clock.c index e4d44f57..ed5cdfd3 100644 --- a/kern/mach_clock.c +++ b/kern/mach_clock.c @@ -152,7 +152,9 @@ void clock_interrupt( timer_bump(&thread->user_timer,

[PATCH 4/5] fix EISA check in init_IRQ

2021-03-26 Thread Damien Zammit
--- linux/dev/arch/i386/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/dev/arch/i386/kernel/irq.c b/linux/dev/arch/i386/kernel/irq.c index 522ed0ac..06889e58 100644 --- a/linux/dev/arch/i386/kernel/irq.c +++ b/linux/dev/arch/i386/kernel/irq.c @@ -743,7 +743,

Re: gnumach: IOAPIC and LAPIC support

2021-03-26 Thread Damien Zammit
On 26/3/21 8:59 pm, Samuel Thibault wrote: > Damien Zammit, le ven. 26 mars 2021 20:48:45 +1100, a ecrit: >> As discussed, this should be done via a new pci-arbiter RPC that >> requests the IRQ id for a particular device. > > Mmm, AIUI a driver can already read the PCI

[PATCH v2 gnumach] - IOAPIC and LAPIC support

2021-03-27 Thread Damien Zammit
I have split the patches up into logical pieces. Perhaps all can be merged except the last patch until we fix the selection of apic via kernel cmdline (?) It now almost boots when you give it the right IRQ. I am not sure why it hangs just before "proc" is supposed to appear, but it probes and find

[PATCH 2/6] fixup acpi base table search

2021-03-27 Thread Damien Zammit
--- i386/i386at/acpi_parse_apic.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 7855e8a5..36e2805d 100644 --- a/i386/i386at/acpi_parse_apic.c +++ b/i386/i386at/acpi_parse_ap

[PATCH 4/6] Existing SMP apic code improvements

2021-03-27 Thread Damien Zammit
--- i386/i386/apic.c | 35 +++- i386/i386/apic.h | 75 +-- i386/i386at/acpi_parse_apic.c | 15 --- i386/i386at/acpi_parse_apic.h | 2 +- 4 files changed, 106 insertions(+), 21 deletions(-) diff --git a/i386/i386/apic.c b/i

[PATCH 1/6] Make linux drivers optional

2021-03-27 Thread Damien Zammit
Defaults to build with linux drivers. To build without linux drivers, use: --enable-block-group=no --enable-net-group=no --enable-scsi-group=no --enable-wireless-group=no --enable-pcmcia-group=no --- device/intr.c | 91 + linux/configfrag.ac | 32

[PATCH 5/6] Move PIC interrupt vector base from 0x40 to 0x20

2021-03-27 Thread Damien Zammit
--- i386/i386/locore.S | 15 +++ i386/i386/pic.h| 4 +++- i386/i386at/idt.h | 17 +++-- i386/i386at/int_init.c | 15 +-- 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/i386/i386/locore.S b/i386/i386/locore.S index bee3630c..8a1

[PATCH 3/6] Don't allow writing to acpi table in memory

2021-03-27 Thread Damien Zammit
--- i386/i386at/acpi_parse_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 36e2805d..af70934d 100644 --- a/i386/i386at/acpi_parse_apic.c +++ b/i386/i386at/acpi_parse_apic.c @@ -280,7 +280,7 @@ acpi_get_a

  1   2   3   4   5   6   7   >