Page MenuHomeFreeBSD

kp (Kristof Provost)
Troubleshooter

Projects

User Details

User Since
Sep 28 2014, 7:22 PM (305 w, 5 d)

Recent Activity

Yesterday

kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.
In D25531#576420, @jhb wrote:

FYI, I ran into this again and just updated qemu-devel to the latest (at the time) snapshot: 5.1.0 rc2 at D25991.

Fri, Aug 7, 3:25 PM
kp accepted D25494: libifconfig: Add functionality for querying SFP modules.
Fri, Aug 7, 8:43 AM

Wed, Aug 5

kp added a comment to D25935: skip sbin/route jail test if jail not installed.
In D25935#575535, @ngie wrote:

LGTM.

I was a bit surprised to learn that this code relies on the jq utility from ports, by the way:

$ grep -r jq sbin/route/tests/
sbin/route/tests/utils.subr:    gateway=$(echo $result | jq -r ${query}.gateway)
sbin/route/tests/basic.sh:      atf_set require.progs jq
sbin/route/tests/basic.sh:      atf_set require.progs jq

I wish we had a tool capable of ingesting json in base :/...

Yeah, that'd be nice, and it'd make a lot of sense, considering the libxo-ification of a lot of tools.

Wed, Aug 5, 6:13 PM

Mon, Aug 3

kp accepted D25935: skip sbin/route jail test if jail not installed.

I have complicated feelings about this.

Mon, Aug 3, 9:57 PM
kp committed rS363796: libc: Provide sub fp(s|g)etmask() implementations for RISC-V.
libc: Provide sub fp(s|g)etmask() implementations for RISC-V
Mon, Aug 3, 12:49 PM
kp closed D25740: libc: Provide sub fp(s|g)etmask() implementations for RISC-V.
Mon, Aug 3, 12:49 PM

Sun, Jul 26

kp committed rS363568: Revert bridge epochification.
Revert bridge epochification
Sun, Jul 26, 5:44 PM

Fri, Jul 24

kp committed rS363492: bridge: Enter epoch for bridge_transmit().
bridge: Enter epoch for bridge_transmit()
Fri, Jul 24, 8:10 PM
kp committed rS363491: bridge: Fix mismerges from r360345.
bridge: Fix mismerges from r360345
Fri, Jul 24, 8:10 PM

Wed, Jul 22

kp committed rS363430: bridge: Enter epoch for bridge_input()/bridge_output().
bridge: Enter epoch for bridge_input()/bridge_output()
Wed, Jul 22, 8:13 PM
kp closed D25715: bridge: Enter epoch for bridge_input()/bridge_output().
Wed, Jul 22, 8:13 PM
kp committed rS363429: MFC r363308:.
MFC r363308:
Wed, Jul 22, 7:44 PM
kp added a comment to D25740: libc: Provide sub fp(s|g)etmask() implementations for RISC-V.

Yeah, I don't see better options either. If there are no objections I'm going to commit this in a few days.

Wed, Jul 22, 6:21 PM
kp retitled D25740: libc: Provide sub fp(s|g)etmask() implementations for RISC-V from WIP: libc: Provide sub fp(s|g)etmask() implementations for RISC-V to libc: Provide sub fp(s|g)etmask() implementations for RISC-V.
Wed, Jul 22, 6:20 PM

Mon, Jul 20

kp added a comment to D25740: libc: Provide sub fp(s|g)etmask() implementations for RISC-V.

I've provided this as a point of discussion more than as a finished solution. I'm not sure if there's a better way to do this.

Mon, Jul 20, 5:48 AM
kp retitled D25740: libc: Provide sub fp(s|g)etmask() implementations for RISC-V from libc: Provide sub fp(s|g)etmask() implementations for RISC-V to WIP: libc: Provide sub fp(s|g)etmask() implementations for RISC-V.
Mon, Jul 20, 5:48 AM
kp requested review of D25740: libc: Provide sub fp(s|g)etmask() implementations for RISC-V.
Mon, Jul 20, 5:48 AM

Sun, Jul 19

kp abandoned D25716: qemu-devel: Fix RISC-V PLIC.
Sun, Jul 19, 9:01 AM
kp added a comment to D25716: qemu-devel: Fix RISC-V PLIC.

Thanks! That fixes the problem too.

Sun, Jul 19, 9:01 AM
kp accepted D25717: Add Goldfish RTC device driver for RISC-V.
Sun, Jul 19, 8:37 AM

Sat, Jul 18

kp updated subscribers of D25716: qemu-devel: Fix RISC-V PLIC.
Sat, Jul 18, 1:20 PM
kp requested review of D25716: qemu-devel: Fix RISC-V PLIC.
Sat, Jul 18, 1:20 PM
kp updated the diff for D25715: bridge: Enter epoch for bridge_input()/bridge_output().
Sat, Jul 18, 12:49 PM
kp requested review of D25715: bridge: Enter epoch for bridge_input()/bridge_output().
Sat, Jul 18, 12:47 PM
kp committed rS363308: bridge: Don't sleep during epoch.
bridge: Don't sleep during epoch
Sat, Jul 18, 12:43 PM

Fri, Jul 17

kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.

After updating to a recent HEAD I discovered I can no longer boot inside QEMU. I know that the aforementioned bugs in the QEMU's PLIC are to blame, but I did not realize that they would cause a complete deadlock with this change applied. CI didn't catch it because the RISC-V testvm job has been broken for some time.

@kp, can you see that qemu-devel gets updated with the required fixes, or back out this change until the port is updated to 5.0? I will make sure that they get included with that update.

These are the required fixes by @jrtc27: aa4d30f and 5576582

Fri, Jul 17, 10:24 AM

Tue, Jul 14

kp accepted D25312: Relax the rule against declaring variables in nested scopes..
Tue, Jul 14, 4:36 PM

Sat, Jul 11

kp accepted D25619: Don't print VNET pointer when starting up.
Sat, Jul 11, 7:51 PM

Jul 6 2020

kp committed rS362977: riscv plic: Do not complete interrupts until the interrupt handler has run.
riscv plic: Do not complete interrupts until the interrupt handler has run
Jul 6 2020, 9:30 PM
kp closed D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.
Jul 6 2020, 9:30 PM

Jul 2 2020

kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.

Also, are we guaranteed to have the *post_ithread* hook run on the same hart? If not we'll complete for the wrong hart (though in practice all implementations I know of only track claims on a global basis so don't care which hart's claim/complete register you write to).

Jul 2 2020, 7:14 AM

Jul 1 2020

kp accepted D25312: Relax the rule against declaring variables in nested scopes..
Jul 1 2020, 9:05 PM
kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.
In D25531#564579, @kp wrote:

That reminds me: the qemu implementation has a bug that means it won't trigger interrupts when we re-enable them, leading to stalls (until you trigger another interrupt, e.g. by sending something on the console).

The following Qemu patch fixes that:

It appears that Qemu is aware of this, and a patch is either already in, or on its way in: https://lists.nongnu.org/archive/html/qemu-riscv/2020-06/msg00304.html
And upon re-reading that e-mail, it looks like you may already be aware of this too...

Jul 1 2020, 7:22 PM
kp closed D25523: riscv pmap: zero reserved pte bits in ppn.
Jul 1 2020, 7:16 PM · riscv
kp committed rS362853: riscv pmap: zero reserved pte bits in ppn.
riscv pmap: zero reserved pte bits in ppn
Jul 1 2020, 7:16 PM
kp committed rS362852: riscv locore.S: load constant prior to loop.
riscv locore.S: load constant prior to loop
Jul 1 2020, 7:13 PM
kp closed D25524: riscv locore.S: load constant prior to loop.
Jul 1 2020, 7:13 PM · riscv
kp committed rS362851: riscv: Log missing registers in dump_regs().
riscv: Log missing registers in dump_regs()
Jul 1 2020, 7:11 PM
kp updated the diff for D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.

Add comments requested by mhorne

Jul 1 2020, 7:07 PM
kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.

That's what the driver is currently doing in plic_pre_ithread and plic_post_ithread. The spec sucks and doesn't really say what claim/complete actually do, but at least the QEMU and Bluespec implementations of the PLIC will clear the IP bit and forbid the IP bit going high until completed, effectively masking the interrupt for _every_ target by masking on the _source_.

Jul 1 2020, 7:03 PM
kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.
In D25531#564563, @jhb wrote:

FWIW, the general strategy on x86 and other platforms is to mask the interrupt in the PIC in the "pre_ithread" hook and later re-enable it in the PIC again in the "post_ithread" hook. Both "pre_ithread" and "post_filter" send an EOI as they are the only ones guaranteed to run synchronously on the CPU which received the interrupt.

Jul 1 2020, 6:49 PM
kp accepted D25523: riscv pmap: zero reserved pte bits in ppn.

@mhorne Do you want to commit or shall I?

Jul 1 2020, 5:42 PM · riscv
kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.

Based on what the PLIC spec describes, reading/writing from the claim register is what distinguishes a claim and a completion. You are right that we should wait until after the ithread has done its work to signal completion of the interrupt.

Presumably you observed receiving the interrupt twice?

Jul 1 2020, 2:56 PM
kp added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.

Are there not issues with a device driver disabling interrupts in its handler (either synchronous or asynchronous) for whatever reason and then that being clobbered by the plic_post_filter method? That already happened with pic_post_ithread... But we shouldn't need to disable/enable any more at all? An interrupt is suppressed the entire time we have it claimed, I assume the disable/enable code is there so we don't keep getting interrupts when using an ithread.

Jul 1 2020, 2:03 PM
kp accepted D25523: riscv pmap: zero reserved pte bits in ppn.

For those playing along at home, from 'Volume II: RISC-V Privileged Architectures V20190608-Priv-MSU-Ratified', '4.4.1 Addressing and Memory Protection', page 72: "The PTE format for Sv39 is shown in Figure 4.18. Bits 9–0 have the same meaning as for Sv32. Bits 63–54 are reserved for future use and must be zeroed by software for forward compatibility.".

Jul 1 2020, 1:30 PM · riscv
kp requested review of D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.
Jul 1 2020, 9:28 AM

Jun 29 2020

kp added a comment to D25494: libifconfig: Add functionality for querying SFP modules.

My current plan is to implement as much of the generally useful functionality of ifconfig in libifconfig as I can get away with. I think it would be good to start replacing bits of ifconfig with libifconfig, but I don't have an idea what a good timeline for that is, since I don't know if there is some reason it hasn't been started already.

Jun 29 2020, 9:56 AM
kp accepted D25460: libifconfig: Add function to get bridge status.
Jun 29 2020, 9:52 AM

Jun 28 2020

kp added inline comments to D25460: libifconfig: Add function to get bridge status.
Jun 28 2020, 10:11 AM

Jun 26 2020

kp committed rS362650: MFC r360345:.
MFC r360345:
Jun 26 2020, 12:11 PM
kp committed rS362649: MFC r359641:.
MFC r359641:
Jun 26 2020, 10:09 AM
kp committed rS362648: MFC r358325:.
MFC r358325:
Jun 26 2020, 9:53 AM

Jun 25 2020

kp added a comment to D25447: /usr/libexec/flua: Add bindings for libifconfig.

Without immediate users for this it's probably a bit early to commit this, but I like the notion.
If nothing else it gives a bit more sample code of how we can wrap things in Lua, and I could also see use cases for base-system scripting where we may want something other than shell to do things in.

Jun 25 2020, 6:35 PM

Jun 23 2020

kp closed D25210: llvm: Default to -mno-relax.
Jun 23 2020, 3:22 AM
kp updated the diff for D25210: llvm: Default to -mno-relax.

Add a comment to indicate this is a FreeBSD-specific change.

Jun 23 2020, 3:21 AM
kp updated the diff for D25210: llvm: Default to -mno-relax.

Change the LLVM default

Jun 23 2020, 3:21 AM
kp requested review of D25210: llvm: Default to -mno-relax.
Jun 23 2020, 3:21 AM
kp closed D24538: pf: Improve DIOCADDRULE validation.
Jun 23 2020, 3:17 AM
kp updated the diff for D24538: pf: Improve DIOCADDRULE validation.

Move the check outside of the lock.

Jun 23 2020, 3:17 AM

Jun 18 2020

kp accepted D25163: Update devel/libffi to 3.3.

Still happy on RISC-V.

Jun 18 2020, 9:18 AM
kp accepted D25220: Add tests for "add", "change" and "delete" functionality of /sbin/route..
Jun 18 2020, 9:18 AM
kp accepted D25312: Relax the rule against declaring variables in nested scopes..
Jun 18 2020, 9:18 AM

Jun 16 2020

kp committed rS362235: llvm: Default to -mno-relax on RISC-V.
llvm: Default to -mno-relax on RISC-V
Jun 16 2020, 6:40 PM

Jun 12 2020

kp retitled D25210: llvm: Default to -mno-relax from bsd.cpu.mk: RISC-V requires -mno-relax to llvm: Default to -mno-relax.
Jun 12 2020, 7:50 PM
kp added a comment to D25210: llvm: Default to -mno-relax.

That sounds good to me too.

Jun 12 2020, 4:42 PM
kp added a comment to D25210: llvm: Default to -mno-relax.

That test doesn't show anything, we know the flag is required by default, and there's no easy way for Clang to know what your linker is at compile time (it doesn't get LDFLAGS normally, and you don't know what /usr/bin/ld is).

Jun 12 2020, 4:29 PM
kp added a comment to D25210: llvm: Default to -mno-relax.

I run into this trying to build ports, but this is the simplest reproduction case:

Jun 12 2020, 4:22 PM

Jun 11 2020

kp committed rS362064: MFC r357061:.
MFC r357061:
Jun 11 2020, 4:51 PM

Jun 9 2020

kp accepted D25163: Update devel/libffi to 3.3.

With this patch python3 builds and runs on RISC-V.

Jun 9 2020, 10:00 AM

Jun 8 2020

kp accepted D25183: riscv: Use SBI shutdown call to implement RB_POWEROFF.
Jun 8 2020, 8:15 AM

Jun 7 2020

kp committed rS361893: bridge tests: Re-enable STP test.
bridge tests: Re-enable STP test
Jun 7 2020, 1:53 PM

Jun 3 2020

kp committed rS361762: MFC r361279:.
MFC r361279:
Jun 3 2020, 6:09 PM
kp committed rS361761: MFC r361279:.
MFC r361279:
Jun 3 2020, 6:09 PM

Jun 1 2020

kp added a comment to D25084: bridge tests: Avoid building a switching loop.

Minor nit: any chance jails a and b can be named bridge_stp_a and bridge_stp_b to avoid potential clashes with other tests?

Jun 1 2020, 7:27 PM
kp committed rS361701: bridge tests: Avoid building a switching loop.
bridge tests: Avoid building a switching loop
Jun 1 2020, 7:26 PM
kp closed D25084: bridge tests: Avoid building a switching loop.
Jun 1 2020, 7:26 PM
kp updated the diff for D25084: bridge tests: Avoid building a switching loop.

We no longer require jq

Jun 1 2020, 3:39 PM
kp committed rD54188: EuroBSDCon 2020 has been cancelled.
EuroBSDCon 2020 has been cancelled
Jun 1 2020, 2:15 PM

May 31 2020

kp requested review of D25084: bridge tests: Avoid building a switching loop.
May 31 2020, 7:20 PM

May 28 2020

kp added inline comments to D25034: riscv: honor the environment set via the kernel config file .
May 28 2020, 5:58 PM

May 27 2020

kp accepted D25026: Proper check if divert(4) module is present by the relevant tests.
May 27 2020, 1:00 PM

May 25 2020

kp accepted D22691: ifnet: drain+halt ioctl operations on detach.

Looks sane to me (and passes regression tests), but I'm not the expert on this part of the stack,

May 25 2020, 4:10 PM

May 20 2020

kp accepted D24929: vmm(4): Add 12 user ABI compat after r349948.

Yeah, with these changes my CURRENT kernel / 12.1 user land machine starts bhyve just fine.

May 20 2020, 5:23 PM
kp closed D24922: bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two.
May 20 2020, 4:07 PM
kp committed rS361279: bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two.
bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two
May 20 2020, 4:07 PM
kp updated the diff for D24922: bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two.

Add a comment explaining that the RX/TX descriptor limit must be a power of two.

May 20 2020, 2:59 PM

May 19 2020

kp requested review of D24922: bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two.
May 19 2020, 9:46 PM
kp accepted D24909: Simplify the RISC-V kernel linker invocation.

Works for me (as in: I've tested this in my setup, and this works just fine).

May 19 2020, 4:51 PM

May 15 2020

kp accepted D24843: pf: Add a new zone for per-table entry counters..
May 15 2020, 9:04 PM

May 11 2020

kp committed rS360935: opencrypto: Add missing ioctl exit SDTs.
opencrypto: Add missing ioctl exit SDTs
May 11 2020, 9:42 PM
kp accepted D24809: Add a basic table entry counter regression test..

Thanks!

May 11 2020, 6:58 PM
kp accepted D24803: pf: Don't allocate per-table entry counters unless requested..

It'd be nice (but it's not required for this to proceed) to have a test to exercise this, i.e. create a table with counters, send some traffic through, check that the counters incremented.

May 11 2020, 7:52 AM

May 10 2020

kp committed rS360868: MFC r360609:.
MFC r360609:
May 10 2020, 9:51 AM
kp committed rS360867: MFC r360609:.
MFC r360609:
May 10 2020, 9:50 AM

May 7 2020

kp committed rS360800: MFC r360231:.
MFC r360231:
May 7 2020, 9:14 PM
kp committed rS360799: MFC r360231:.
MFC r360231:
May 7 2020, 9:14 PM

May 4 2020

kp abandoned D24680: remove unused flowid argument from rib_lookup_info().

Fair enough. I have no immediate plans to dig deeper into this part of the code. I'd run into this a while back, and figured it made sense to remove unused arguments. I finally got around to this particular item on my todo list. If there's pending work that'll rely on it that's clearly not a good idea at this point.

May 4 2020, 4:13 PM
kp added a comment to D24684: Add basic routing LPM tests..

There are some non-rfc1918 IPs used in these cases. Are they necessary?

May 4 2020, 4:04 PM

May 3 2020

kp requested review of D24680: remove unused flowid argument from rib_lookup_info().
May 3 2020, 4:56 PM
kp committed rS360609: pf: Improve DIOCADDRULE validation.
pf: Improve DIOCADDRULE validation
May 3 2020, 4:10 PM