Page MenuHomeFreeBSD
Feed Advanced Search

Yesterday

jhb added a comment to D26003: vmm: intel: Support rdtscp and rdpid.

I agree btw with not having these be per-vCPU capabilities that can be toggled. It would be really surprising to a guest for rdtscp to transition from "working" to "not-working". OS's expect rdtscp to either work or not work for the duration of a given boot.

Fri, Aug 14, 9:13 PM
jhb added a comment to D26003: vmm: intel: Support rdtscp and rdpid.

In general looks ok to me.

Fri, Aug 14, 9:11 PM
jhb requested review of D26068: Move -L${LIBCOMPATTMP}/usr/lib${libcompat} from CFLAGS to LDFLAGS..
Fri, Aug 14, 5:29 PM

Thu, Aug 13

jhb committed rS364218: Fix a typo in the cpp macro defined for PIC..
Fix a typo in the cpp macro defined for PIC.
Thu, Aug 13, 8:28 PM
jhb closed D26058: Fix a typo in the cpp macro defined for PIC..
Thu, Aug 13, 8:28 PM
jhb added a comment to D25996: Check that the frame pointer is within the current stack..

On arm64 we have the following in fork_trampoline to stop unwinding past the top of the stack.

mov     fp, #0  /* Stack traceback stops here. */
Thu, Aug 13, 6:39 PM
jhb added a comment to D26035: Refactor configuration management in bhyve..

Definitely that is what will happen, somebody else will write a wrapper for this configuration file!!! The problem I see here is the standard(syntax and etc), it does not look like any configuration file I have ever see, and you know after you commit it, it will live there for forever, because we need to respect POLA.

Thu, Aug 13, 6:35 PM
jhb added a comment to D26035: Refactor configuration management in bhyve..

Given the config file syntax will likely change but the "-f" option will be around forever, can a magic number or first-line metadata comment be used to distinguish this key/value file format from a future version ?

Thu, Aug 13, 6:14 PM
jhb added a comment to D25732: Add a USE_GCC_TOOLCHAINS knob to make universe..

https://github.com/bsdjhb/freebsd/compare/gcc_universe...bsdjhb:gcc9_universe are the diffs for GCC 9 so far.

Thu, Aug 13, 5:57 PM
jhb requested review of D26058: Fix a typo in the cpp macro defined for PIC..
Thu, Aug 13, 5:53 PM

Wed, Aug 12

jhb added a comment to D26035: Refactor configuration management in bhyve..
In D26035#578018, @jhb wrote:

Agreed it's a shame this isn't UCL, it could be much closer to jail.conf (which should be made UCL someday, but it's very nearly compatible on a surface level). It doesn't look like any features unique to libnv are used.

The config file overriding options passed on the command-line seems backwards. I'd expect to be able to override config file settings explicitly on the command line.

Please read the mail on virtualization@. It is very feasible to add a UCL config file syntax (and that is even a desired plan, just not currently implemented). Using libnv is more convenient than writing trees by hand in C.

Certainly, I guess I'm not subscribed to that list yet, I'll fix that :)
libucl is unsavory to work with, I know. libnv also has its shortcomings. I have somewhere stashed code to convert between the two, but the features don't map very well so it wasn't a particularly useful exercise; educational, though. But like I said, it doesn't look like anything specific to libnv is being used. If the long-term goal is to eventually support a more canonical config file format in addition to this format, I'm all for it. My main concern was that introducing a strange new config format might preclude us from that. It doesn't sound like that will be the case. May be as simple as interpreting *.cfg one way and *.conf another way.

Wed, Aug 12, 10:24 PM
jhb added a comment to D25732: Add a USE_GCC_TOOLCHAINS knob to make universe..
In D25732#577973, @jhb wrote:

Seems fine to me, although what do we have to fix wrt powerpc-gcc6 before commit?

We'd have to create the flavor of gcc6. I'd rather spend time getting GCC9 working with it instead to be honest.

I agree there's little point in spending effort on gcc6. Does this mean we're just going to hold this change for the foreseeable future?

Wed, Aug 12, 10:21 PM
jhb updated the diff for D26035: Refactor configuration management in bhyve..
  • Don't skip : before port twice.
  • Treat config.dump as a boolean.
Wed, Aug 12, 10:17 PM
jhb added a comment to D25728: ld.bfd requires an explicit emulation for MIPS for ld -r..

@jhb thanks for the info, although I meant are there other places we're passing -m <emulation> (which presumably need or already have something similar) rather than are there other archs that would need it.

Wed, Aug 12, 9:30 PM
jhb added a comment to D26035: Refactor configuration management in bhyve..

Agreed it's a shame this isn't UCL, it could be much closer to jail.conf (which should be made UCL someday, but it's very nearly compatible on a surface level). It doesn't look like any features unique to libnv are used.

The config file overriding options passed on the command-line seems backwards. I'd expect to be able to override config file settings explicitly on the command line.

Wed, Aug 12, 9:28 PM
jhb added a comment to D26035: Refactor configuration management in bhyve..

The configuration file is not intuitive at all, how I will know what pci slot my virtio-blk shall live?
Why not simplify it instead of complicate more? The configuration file supposed to be something to simplify the command line, and instead is getting more complex than bhyve cli itself. Perhaps we will need another io<something> wrapper to simplify the creation of bhyve configuration files.

This is much more complex than bhyve cli itself.
pci.0.0.0.device=hostbridge
pci.0.2.0.device=virtio-net
pci.0.2.0.backend=%(tap)
pci.0.3.0.device=virtio-blk
pci.0.3.0.path=/dev/zvol/zroot/bhyve/%(name)
pci.0.4.0.device=virtio-rnd
pci.0.31.0.device=lpc
lpc.com1.device=stdio
lpc.com2.device=/dev/nmdm%(name)2B
lpc.bootrom=/usr/local/share/uefi-firmware/BHYVE_UEFI.fd

Could we use a similar approach of the configuration file syntax like everybody else is using? I know make things simple is hard.

Wed, Aug 12, 9:14 PM
jhb added a comment to D25671: geli: use unmapped I/O.

Somehow my earlier comment was stuck. There are still some style nits about leading spaces before block comments (and before the new "skip" macro in criov.c). I think the general change looks good. I think it would be good to commit the new buffer type separately from the geli changes (so two commits). I will probably test this for KTLS in the near future.

Wed, Aug 12, 9:05 PM
jhb added inline comments to D25671: geli: use unmapped I/O.
Wed, Aug 12, 9:01 PM
jhb accepted D26017: Enable interrupts while handling traps.

Looks ok to me. Others have already explained the rationale well I think. I don't think there are any other kernel faults for which interrupts should be enabled. ddb and panic() are probably fine to run with interrupts disabled. dtrace is the only part I'm less sure of, but I suspect it is fine to run with them disabled?

Wed, Aug 12, 8:58 PM
jhb added a comment to D25728: ld.bfd requires an explicit emulation for MIPS for ld -r..

MIPS is kind of special as we use the same toolchain for multiple ABIs whereas for most other platforms we use a dedicated toolchain for each ABI where the default ABI matches. lld is a bit better about this as it will infer the emulation from the object files. If powerpc were fixed to use a shared GCC toolchain for powerpc and powerpc64 it would probably need this, similar to if we had a shared amd64/i386 GCC.

Wed, Aug 12, 8:47 PM
jhb added a comment to D26015: Check for invalid pc in unwind_frame.

I guess this is ok. Nominally if you could have a user pc for things like faults and exceptions, but those all require a custom unwinder in DDB anyway. unwind_frame() doesn't handle them. If we fixed unwind_frame() to learn about trap frames and unwind across them, then you would perhaps not want this check in unwind_frame(). Is this still needed after the changes in D26016?

Wed, Aug 12, 8:44 PM
jhb accepted D26016: Small fixes in locore.S.
Wed, Aug 12, 8:41 PM
jhb added a comment to D25732: Add a USE_GCC_TOOLCHAINS knob to make universe..

Seems fine to me, although what do we have to fix wrt powerpc-gcc6 before commit?

Wed, Aug 12, 8:35 PM
jhb committed rS364181: Check that the frame pointer is within the current stack..
Check that the frame pointer is within the current stack.
Wed, Aug 12, 8:33 PM
jhb closed D25996: Check that the frame pointer is within the current stack..
Wed, Aug 12, 8:33 PM
jhb updated subscribers of D25996: Check that the frame pointer is within the current stack..

I was investigating a panic recently encountered on the Jenkins run of the test suite, and ended up with an identical patch.

While I haven't had any luck reproducing the issue, the excerpt (P412) shows recursive panics in unwind_frame(), so I strongly suspect this is the cause.

Note that arm64 might benefit from this check as well, but that code has been in widespread use for a while now and has seemingly never encountered this.

Wed, Aug 12, 8:31 PM
jhb committed rS364180: Use uintptr_t instead of uint64_t for pointers in stack frames..
Use uintptr_t instead of uint64_t for pointers in stack frames.
Wed, Aug 12, 8:30 PM
jhb closed D25995: Use uintptr_t instead of uint64_t for pointers in stack frames..
Wed, Aug 12, 8:30 PM
jhb closed D25867: Correct padding length for RISC-V PCPU data..
Wed, Aug 12, 6:45 PM
jhb committed rS364176: Correct padding length for RISC-V PCPU data..
Correct padding length for RISC-V PCPU data.
Wed, Aug 12, 6:45 PM

Tue, Aug 11

jhb added a comment to D26035: Refactor configuration management in bhyve..

As an example, suppose I have the following file in ~/work/bhyve/uefi.cfg:

Tue, Aug 11, 9:26 PM
jhb requested review of D26035: Refactor configuration management in bhyve..
Tue, Aug 11, 9:03 PM

Fri, Aug 7

jhb requested review of D25996: Check that the frame pointer is within the current stack..
Fri, Aug 7, 4:17 PM
jhb added a comment to D25995: Use uintptr_t instead of uint64_t for pointers in stack frames..

In theory this would be more RV32 friendly as well, though I don't really think we need a FreeBSD/riscv32.

Fri, Aug 7, 4:14 PM
jhb requested review of D25995: Use uintptr_t instead of uint64_t for pointers in stack frames..
Fri, Aug 7, 4:12 PM
jhb added a comment to D25991: Update emulators/qemu-devel to 5.1.0 rc2..

Oops, I failed to notice the qemu50 port. Feel free to use this as a starting point if you wish for updating qemu-devel to 5.1.0 or to discard it if you don't want that and would rather just do a qemu51 port when 5.1.0 is released.

Fri, Aug 7, 3:32 PM
jhb added a comment to D25531: riscv plic: Do not complete interrupts until the interrupt handler has run.
In D25531#568832, @kp wrote:

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

I'll try to post patches for the qemu-devel port today, or before Monday at the latest.

Fri, Aug 7, 3:18 PM
jhb requested review of D25991: Update emulators/qemu-devel to 5.1.0 rc2..
Fri, Aug 7, 3:17 PM

Wed, Aug 5

jhb committed rP544254: Add a new security/isal-kmod port..
Add a new security/isal-kmod port.
Wed, Aug 5, 11:53 PM
jhb closed D25514: Add a new security/isal-kmod port..
Wed, Aug 5, 11:53 PM

Tue, Aug 4

jhb updated the diff for D25867: Correct padding length for RISC-V PCPU data..
  • Add a comment and static assertion for pad size.
Tue, Aug 4, 9:45 PM
jhb added a comment to D25732: Add a USE_GCC_TOOLCHAINS knob to make universe..

Any thoughts? This (and all the fixes needed for GCC 6) have sat in review for 2 weeks with no feedback. I'll probably commit this in the next day or so barring feedback.

Tue, Aug 4, 6:26 PM
jhb committed rS363849: Disable errors for -Wsystem-headers for GCC on aarch64..
Disable errors for -Wsystem-headers for GCC on aarch64.
Tue, Aug 4, 6:25 PM
jhb closed D25729: Disable errors for -Wsystem-headers for GCC on aarch64..
Tue, Aug 4, 6:25 PM
jhb committed rS363848: ld.bfd requires an explicit emulation for MIPS for ld -r..
ld.bfd requires an explicit emulation for MIPS for ld -r.
Tue, Aug 4, 6:24 PM
jhb closed D25728: ld.bfd requires an explicit emulation for MIPS for ld -r..
Tue, Aug 4, 6:24 PM
jhb closed D25727: Disable errors for -Wredundant-decls for GCC 6+..
Tue, Aug 4, 6:20 PM
jhb committed rS363847: Disable errors for -Wredundant-decls for GCC 6+..
Disable errors for -Wredundant-decls for GCC 6+.
Tue, Aug 4, 6:20 PM
jhb committed rS363846: Turn off errors for -Wmaybe-uninitialized in GCC 6+..
Turn off errors for -Wmaybe-uninitialized in GCC 6+.
Tue, Aug 4, 6:19 PM
jhb closed D25726: Turn off errors for -Wmaybe-uninitialized in GCC 6+..
Tue, Aug 4, 6:19 PM
jhb retitled D25729: Disable errors for -Wsystem-headers for GCC on aarch64. from Disable errors for -Wmissing-braces for GCC on aarch64. to Disable errors for -Wsystem-headers for GCC on aarch64..
Tue, Aug 4, 4:12 PM
jhb updated the diff for D25729: Disable errors for -Wsystem-headers for GCC on aarch64..
  • Just turn off -Wsystem-headers for aarch64 instead for arm_neon.h.
Tue, Aug 4, 4:12 PM
jhb updated the diff for D25728: ld.bfd requires an explicit emulation for MIPS for ld -r..
  • Fixup to MIPS ld flags.
Tue, Aug 4, 4:10 PM

Mon, Aug 3

jhb committed rS363804: Pass the full CFLAGS to cpp for MKlib_gen.sh..
Pass the full CFLAGS to cpp for MKlib_gen.sh.
Mon, Aug 3, 5:53 PM
jhb closed D25731: Pass the full CFLAGS to cpp for MKlib_gen.sh..
Mon, Aug 3, 5:53 PM

Wed, Jul 29

jhb added inline comments to D25872: Comprehensive changes for vendored openzfs.
Wed, Jul 29, 11:44 PM
jhb closed D25838: Properly handle a closed TLS socket with pending receive data..
Wed, Jul 29, 11:24 PM
jhb committed rS363680: Properly handle a closed TLS socket with pending receive data..
Properly handle a closed TLS socket with pending receive data.
Wed, Jul 29, 11:24 PM
jhb added a comment to D25514: Add a new security/isal-kmod port..

Ping @mat

Wed, Jul 29, 11:21 PM
jhb added a comment to D25873: vxlan(4): Support for stateless NIC hardware offloads with VXLAN encapsulated traffic..

You can link reviews in phabricator using "Edit related revisions" where "child" revisions depend on "parent" revisions. Once you link revisions you then get a "Stack" tab in the Revision Contents window that shows the related revisions and gives a summary of their state, etc. D25732 is a review I currently have open where I did this (all the GCC6 fixes are children of the knob to turn on a GCC6 tinderbox option).

Wed, Jul 29, 10:52 PM

Tue, Jul 28

jhb added a comment to D25867: Correct padding length for RISC-V PCPU data..
(gdb) ptype /o struct pcpu
/* offset    |  size */  type = struct pcpu {
/*    0      |     8 */    struct thread *pc_curthread;
/*    8      |     8 */    struct thread *pc_idlethread;
/*   16      |     8 */    struct thread *pc_fpcurthread;
/*   24      |     8 */    struct thread *pc_deadthread;
/*   32      |     8 */    struct pcb *pc_curpcb;
/*   40      |    16 */    void *pc_sched;
/*   48      |     8 */    uint64_t pc_switchtime;
/*   56      |     4 */    int pc_switchticks;
/*   60      |     4 */    u_int pc_cpuid;
/*   64      |     8 */    struct {
/*   64      |     8 */        struct pcpu *stqe_next;
Tue, Jul 28, 6:19 PM
jhb requested review of D25867: Correct padding length for RISC-V PCPU data..
Tue, Jul 28, 6:17 PM
jhb committed rS363652: Add further clarification on si_addr and si_trapno..
Add further clarification on si_addr and si_trapno.
Tue, Jul 28, 5:09 PM
jhb closed D25777: Add further clarification on si_addr and si_trapno..
Tue, Jul 28, 5:09 PM

Mon, Jul 27

jhb added a comment to D25838: Properly handle a closed TLS socket with pending receive data..

My original KTLS patchset had some other changes in soreceive_generic() to check for M_NOTREADY that I left out. One of those changes happened to protect against this case (it had added an m != NULL check before the goto dontblock) which is why I never saw this during my pre-commit testing. I chose the immediate goto even though it's a larger patch as I think the meaning is clearer this way (if you have any valid data, always return it) and it also matches the previous block above for so_error. I also chose to put the tlsdcc and tlscc checks under KERN_TLS.

Mon, Jul 27, 10:38 PM
jhb requested review of D25838: Properly handle a closed TLS socket with pending receive data..
Mon, Jul 27, 10:34 PM
jhb updated the diff for D25777: Add further clarification on si_addr and si_trapno..
  • More wording tweaks.
Mon, Jul 27, 7:53 PM
jhb updated the summary of D25777: Add further clarification on si_addr and si_trapno..
Mon, Jul 27, 7:53 PM
jhb added inline comments to D25777: Add further clarification on si_addr and si_trapno..
Mon, Jul 27, 7:41 PM
jhb accepted D25816: Restrict definition of CTL_P1003_1B_MAXID to the kernel.

Perhaps move it into posix4_mib.c even? But this is also ok. I looked at the C file hoping we could replace this constant with using nitems() or the like, but the code is not really structured for that.

Mon, Jul 27, 6:50 PM
jhb updated the diff for D25777: Add further clarification on si_addr and si_trapno..
  • Wording tweaks.
Mon, Jul 27, 4:47 PM
jhb committed rS363619: Trim some extraneous parentheses..
Trim some extraneous parentheses.
Mon, Jul 27, 4:37 PM
jhb closed D25776: Set si_addr to dar for MMU and alignment faults..
Mon, Jul 27, 4:34 PM
jhb committed rS363618: Set si_addr to dar for MMU and alignment faults..
Set si_addr to dar for MMU and alignment faults.
Mon, Jul 27, 4:34 PM
jhb committed rS363617: Fix si_addr value for breakpoints in a delay slot..
Fix si_addr value for breakpoints in a delay slot.
Mon, Jul 27, 4:32 PM
jhb closed D25773: Fix si_addr value for breakpoints in a delay slot..
Mon, Jul 27, 4:32 PM
jhb committed rS363616: Fix indentation..
Fix indentation.
Mon, Jul 27, 4:31 PM
jhb committed rS363615: Set si_trapno to the fault index from fsr..
Set si_trapno to the fault index from fsr.
Mon, Jul 27, 4:29 PM
jhb closed D25772: Set si_trapno to the fault index from fsr..
Mon, Jul 27, 4:29 PM
jhb committed rS363614: Set si_trapno to the exception code from scause..
Set si_trapno to the exception code from scause.
Mon, Jul 27, 4:28 PM
jhb closed D25770: Set si_trapno to the exception code from scause..
Mon, Jul 27, 4:28 PM
jhb added inline comments to D25770: Set si_trapno to the exception code from scause..
Mon, Jul 27, 4:27 PM
jhb committed rS363613: Don't include T_USER in si_trapno reported to userland..
Don't include T_USER in si_trapno reported to userland.
Mon, Jul 27, 4:25 PM
jhb closed D25769: Don't include T_USER in si_trapno reported to userland..
Mon, Jul 27, 4:25 PM

Sat, Jul 25

jhb added a comment to D25729: Disable errors for -Wsystem-headers for GCC on aarch64..

I reworked this for GCC 9 to instead use -Wno-system-header since GCC 9 had other errors with arm_neon.h.

Sat, Jul 25, 6:16 PM
jhb abandoned D25730: Disable LTO on aarch64 when using GCC..

Fixed this by enabling LTO in the aarch64-gcc packages instead in D25783.

Sat, Jul 25, 6:15 PM

Thu, Jul 23

jhb abandoned D22917: Initial support for kernel TLS receive offload..
Thu, Jul 23, 11:51 PM
jhb committed rP542975: Update security/ktls-isa-l_crypto-kmod to work with KTLS RX API changes..
Update security/ktls-isa-l_crypto-kmod to work with KTLS RX API changes.
Thu, Jul 23, 11:50 PM
jhb closed D25698: Update security/ktls-isa-l_crypto-kmod to work with KTLS RX API changes..
Thu, Jul 23, 11:50 PM
jhb committed rS363464: Add support for KTLS RX via software decryption..
Add support for KTLS RX via software decryption.
Thu, Jul 23, 11:48 PM
jhb closed D24628: Add support for KTLS RX via software decryption..
Thu, Jul 23, 11:48 PM
jhb updated the diff for D24628: Add support for KTLS RX via software decryption..
  • Rebase.
  • Update for no-malloc.
  • Use ktls_ocf_dispatch.
  • Tidy to match other process methods.
  • More nomalloc fixes.
  • Yet more nomalloc.
Thu, Jul 23, 11:23 PM
jhb added a comment to D25769: Don't include T_USER in si_trapno reported to userland..
In D25769#571137, @kib wrote:

Is usermode variable in mips/trap.c::trap() redundant ?

Thu, Jul 23, 10:48 PM
jhb committed rS363461: Consolidate duplicated code into a ktls_ocf_dispatch function..
Consolidate duplicated code into a ktls_ocf_dispatch function.
Thu, Jul 23, 9:43 PM
jhb closed D25757: Consolidate duplicated code into a ktls_ocf_dispatch function..
Thu, Jul 23, 9:43 PM
jhb committed rS363460: Set si_trapno to the exception code from esr..
Set si_trapno to the exception code from esr.
Thu, Jul 23, 9:40 PM
jhb closed D25771: Set si_trapno to the exception code from esr..
Thu, Jul 23, 9:40 PM
jhb committed rS363459: Pass the right size to memcpy() when copying the array of FP registers..
Pass the right size to memcpy() when copying the array of FP registers.
Thu, Jul 23, 9:33 PM
jhb closed D25791: Pass the right size to memcpy() when copying the array of FP registers..
Thu, Jul 23, 9:33 PM
jhb requested review of D25791: Pass the right size to memcpy() when copying the array of FP registers..
Thu, Jul 23, 8:16 PM