!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

334 Members
105 Servers

Load older messages


SenderMessageTime
15 Mar 2022
@colemickens:matrix.orgcolemickensWhat is that? Is that the same as the binfmt trick?22:30:34
@colemickens:matrix.orgcolemickensAnd yes, this builds on top of floweringash's module. Adds support for riscv, and then I'm adding in some more niceties tonight.22:30:59
@colemickens:matrix.orgcolemickensAnd I'm sad to see the notes about overlayfs but really appreciate you sharing them since I was going to head in that direction. I might have a few ideas beyond wanting to try myself and see if things have improved.22:33:00
@colemickens:matrix.orgcolemickensAnd of course thank you for this module. I've hacked on it a fair bit by now but I wouldn't have had the ... gumption to do this all from scratch22:33:39
@ius:nltrix.netius
In reply to @colemickens:matrix.org
What is that? Is that the same as the binfmt trick?
Yep
23:34:16
16 Mar 2022
@ius:nltrix.netius

Re: qemu, looks like the jemalloc bump triggers a new qemu edge case:

test_zero:test/integration/xallocx.c:352: Failed assertion: (validate_fill(p, 0x00, sz, nsz-sz)) == (false) --> true != false: Memory not filled: sz=24576, nsz-sz=4096
  p=0x400292b240, c=0x0, len=32768: 0x7a[0..28672) 0x0[28672..32192) 0x7a[32192..32768)

Let me know if anyone figures it out before I do, chasing qemu bugs is fairly time consuming.

07:55:09
@linus.heckemann:matrix.mayflower.deLinux Hackerman is moving: @linus:schreibt.jetzt
In reply to @colemickens:matrix.org
What is that? Is that the same as the binfmt trick?
qemu-user is what's actually doing the work. binfmt_misc is just the mechanism that tells the kernel to run qemu-user on files that match certain patterns.
08:02:02
@colemickens:matrix.orgcolemickensI had been told that was unreliable in the past, but maybe that was just the binfmt bit?18:30:55
@colemickens:matrix.orgcolemickensAlso qemu 7 looks interesting though I'm unsure if it's super useful beyond allowing more cores on the riscv virt board which... If nothing else should be nice.18:31:32
@ius:nltrix.netius
In reply to @colemickens:matrix.org
I had been told that was unreliable in the past, but maybe that was just the binfmt bit?
No, that would be qemu-user itself. The binfmt glue just tells the kernel to load RISC-V executables using qemu when attempting to execute a RISC-V binary.
22:18:51
@colemickens:matrix.orgcolemickensIs it worth it to run qemu-user, build as much as possible, then run qemu-system to build the rest? I think I'd generally prefer trustable/reliable over "faster" for this sort of thing.22:19:38
@ius:nltrix.netiusIt breaks at times (mostly when running tests), but it's a handful of patches in total. Most things can also be fixed (although I haven't dared looking at qemu's user emulation code yet)22:20:05
@ius:nltrix.netiusIn that case, system would be the best choice yeah22:20:14
@ius:nltrix.netiusI am (or was) trying to keep up with nixos-master, which is slow enough as-is with qemu-user22:20:41
@colemickens:matrix.orgcolemickenshuh, I have to look into qemu-user and figure out what magic it's supposedly doing. I don't have any idea how it works22:20:58
@ius:nltrix.netiusIt's fairly simple in theory. It dynamically translates all RISC-V instructions to x86 and intercepts all syscalls to call their native counterpart.22:22:12
@colemickens:matrix.orgcolemickensone more question to put this together in my head -- is there an advantage to using qemu-user versus using binfmt and trying ot use nix directly?22:23:29
@colemickens:matrix.orgcolemickens * one more question to put this together in my head -- is there an advantage to using qemu-user (standalone) versus using binfmt and trying ot use nix directly?22:23:41
@colemickens:matrix.orgcolemickens * one more question to put this together in my head -- is there an advantage to using qemu-user (standalone) versus using binfmt and trying ot use nix directly? ( I guess I'm assuming qemu-user is used similarly to qemu-system, but maybe not)22:23:53
@ius:nltrix.netiusIn practice, some things turn out to be quite difficult. Emulation of threading for example (there's a ticket about occasional deadlocks, but sadly the status is that it's pretty much unfixable)22:24:01
@ius:nltrix.netiusYou wouldn't use qemu-user standalone in this case - only though binfmt22:24:40
@zhaofeng:zhaofeng.liZhaofeng Li You normally don't invoke qemu-user directly, you set up binfmt registrations (boot.binfmt.emulatedSystems is a helper to set it up) so kernel runs qemu-user for you 22:24:50
@ius:nltrix.netiusI only called it directly when I was debugging qemu issues and hadn't get discovered you can influence its arguments via the environment (that also works with binfmt inbetween)22:25:39
@ius:nltrix.netius * I only called it directly when I was debugging qemu issues and hadn't yet discovered you can influence its arguments via the environment (that also works with binfmt inbetween)22:25:47
@ius:nltrix.netiusI spent some time looking into systemd-boot on RISC-V recently btw. Encountered another reason to patch VisionFive u-boot: https://github.com/u-boot/u-boot/commit/66028930dac08f7116b5e3cdba35c3e65676c0cd22:28:57
@ius:nltrix.netius(though it can be worked around) - tl;dr EFI bug in u-boot, triggered by systemd-boot22:31:06
@linus.heckemann:matrix.mayflower.deLinux Hackerman is moving: @linus:schreibt.jetzt
In reply to @colemickens:matrix.org
Is it worth it to run qemu-user, build as much as possible, then run qemu-system to build the rest? I think I'd generally prefer trustable/reliable over "faster" for this sort of thing.
It's also quite possible for there to be qemu bugs which affect both -user and -system
22:41:05
@ius:nltrix.netius Possible, but I'm not sure about quite. The TCG layer seems okay compared to all of the syscall emulation going on, and everything shared with x86/kvm is solid. 22:49:33
17 Mar 2022
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howhttps://forum.rvspace.org/t/create-debian-system-image-on-risc-v-visionfive/23413:43:16
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howI think we can make a video like this.13:43:22

Show newer messages


Back to Room ListRoom Version: 6