Re: Creating a hackable kernel for AMD64

2024-04-24 Thread Emile `iMil' Heitor
re I merge them into current. Cheers, -------- Emile `iMil' Heitor | https://imil.net

Re: [GSOC][NEWBIE]

2024-03-28 Thread Emile 'iMil' Heitor
-------- Emile `iMil' Heitor | https://imil.net

Re: [GSOC][NEWBIE]

2024-03-28 Thread Emile 'iMil' Heitor
heers, -- Emile `iMil' Heitor | https://imil.net

NVMM sync up from DragonFlyBSD

2024-01-27 Thread Emile 'iMil' Heitor
e CPU frequency cpuid leaf which can be used to get CPU frequency from the host instead of doing spending 100ms in DELAY(). Qemu knows hot to expose it via the -cpu host,+invtsc flag. -- -------- Emile `iMil' Heitor | https://imil.net

NetBSD/amd64 current performance patch

2024-01-22 Thread Emile 'iMil' Heitor
json Firecracker must be killed to terminate the vm in --no-api mode. For anyone wanting to try this out without compiling, I've uploaded a kernel and minimal root disk at https://imil.net/NetBSD/netbsd-perf and https://imil.net/NetBSD/disk.img Feedback as always very welcome. Cheers, [1]: https://www.qemu.org/docs/master/system/i386/microvm.html -- Emile `iMil' Heitor | https://imil.net

Re: *oldlenp comes back with wrong value in helper sysctl_createv() function

2024-01-20 Thread Emile 'iMil' Heitor
retries with the right size when that was too small. Got it, makes sense. Thanks for the reply! -- ---- Emile `iMil' Heitor | https://imil.net

Re: *oldlenp comes back with wrong value in helper sysctl_createv() function

2024-01-20 Thread Emile 'iMil' Heitor
slog_setup, "tslog sysctl") { sysctl_createv(NULL, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READONLY, CTLTYPE_STRING, "tslog", SYSCTL_DESCR("Dump recorded event timestamps"), sysctl_debug_tslog, 0, NU

*oldlenp comes back with wrong value in helper sysctl_createv() function

2024-01-19 Thread Emile 'iMil' Heitor
ith the right *oldlenp value. I fail to see where this behavior comes from and I'd like to understand the logic behind it. -- -------- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2024-01-08 Thread Emile 'iMil' Heitor
the review! -- -------- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2024-01-08 Thread Emile 'iMil' Heitor
e ifn?def's GENPVH. Here's the patch: https://imil.net/NetBSD/noxen.patch Does this look reasonable to you? -- -------- Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2024-01-08 Thread Emile 'iMil' Heitor
https://twitter.com/iMilnb/status/1743576957046931647 Feedback appreciated. Cheers, -- ------------ Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2024-01-06 Thread Emile 'iMil' Heitor
On 1/6/24 08:33, Emile 'iMil' Heitor wrote: To support this, I've attached `virtio*` to a newly created bus, `cmdlinebus?` which is attached to mainbus in amd64_mainbus.c I am not entirely sure this is the cleanest way to proceed and would like to have your feedback. I lik

Re: VirtIO MMIO for amd64

2024-01-05 Thread Emile 'iMil' Heitor
uld like to have your feedback. The working branch is here: https://github.com/NetBSDfr/NetBSD-src/tree/mmio_cmdline Cheers, -- ------------ Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2024-01-02 Thread Emile `iMil' Heitor
nfiguration. Can we have a review before I do a PR? Thanks, -------- Emile `iMil' Heitor | https://imil.net

Re: pvclock (kvm_clock) support: where to attach

2023-12-31 Thread Emile 'iMil' Heitor
/clock.c:startrtclock() return when mc146818_read() fails? There seem to have nothing but MC146818 for RTC in x86. -- ------------ Emile `iMil' Heitor | https://imil.net

pvclock (kvm_clock) support: where to attach

2023-12-31 Thread Emile 'iMil' Heitor
re natural. Thoughts? Here's the code: https://github.com/NetBSD/src/commit/c09440be5aca7e16ce845c3ccbdfb47bac03fb63 -- -------- Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2023-12-28 Thread Emile 'iMil' Heitor
mu's -kernel flag. You'll need at least those two: virtio* at cmdlinebus? #virtio* at acpi? ld* at virtio? # Virtio disk device As previously said, virtio* at acpi? also works. -- ------------ Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2023-12-26 Thread Emile 'iMil' Heitor
On 12/26/23 11:35, Emile 'iMil' Heitor wrote: intercepted (or so it seems); I thought the hang, which actually happens sys/kern/subr_disk.c:disk_read_sectors/biowait, Found it. Wrong bus_space_write_4() in virtio_mmio_setup_queue(), 100% my fault, sorry for the noise. IRQ is

Re: VirtIO MMIO for amd64

2023-12-26 Thread Emile 'iMil' Heitor
ang, which actually happens sys/kern/subr_disk.c:disk_read_sectors/biowait, might be related to bad/missing VirtIO device features but I checked on FreeBSD and the features are correctly computed. Ideas are welcome. -- -------- Emile `iM

Re: VirtIO MMIO for amd64

2023-12-20 Thread Emile 'iMil' Heitor
ead, 63 sec, 512 bytes/sect x 61441 sectors [ 1.0107398] boot device: ld0 -- -------- Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2023-12-19 Thread Emile 'iMil' Heitor
On 12/20/23 06:55, Emile 'iMil' Heitor wrote: Well that's the thing, I can't find where does MMIO attaches on FreeBSD, they have a very simple way of creating the resources: After a bit of digging, their virtio_mmio device attaches to "nexus0", which if

Re: VirtIO MMIO for amd64

2023-12-19 Thread Emile 'iMil' Heitor
orted on Firecracker. -- -------- Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2023-12-18 Thread Emile 'iMil' Heitor
On 12/16/23 10:25, Emile 'iMil' Heitor wrote: FYI I'm on it, based on Colin Percival's work here https://github.com/freebsd/freebsd-src/blob/main/sys/dev/virtio/mmio/virtio_mmio_cmdline.c I'm getting some results but Firecracker uses MMIO v2 and we only have v1 so

Re: VirtIO MMIO for amd64

2023-12-16 Thread Emile 'iMil' Heitor
x27;m getting some results but Firecracker uses MMIO v2 and we only have v1 so there's still quite some work to do. -- ------------ Emile `iMil' Heitor | https://imil.net

Re: VirtIO MMIO for amd64

2023-12-12 Thread Emile 'iMil' Heitor
ation and uses it to setup the MMIO devices on the VM side the way Firecracker expects it to; and then attach virtio through that, right? Was there any more work on this topic? -- -------- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2023-12-11 Thread Emile `iMil' Heitor
On Mon, 11 Dec 2023, Emile `iMil' Heitor wrote: We still need to check if we didn't break anything on Xen side and test Firecracker. FYI qemu-system-x86_64 also works with the "microvm" machine type. I am able to boot this patched NetBSD kernel using Colin Percival'

Re: PVH boot with qemu

2023-12-11 Thread Emile `iMil' Heitor
dvice. Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2023-12-11 Thread Emile `iMil' Heitor
modes? I am focusing on making the resulting kernel smaller but this could be done also. ------------ Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2023-12-10 Thread Emile `iMil' Heitor
t Firecracker. FYI qemu-system-x86_64 also works with the "microvm" machine type. Feedback very welcome. -------- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2023-12-06 Thread Emile `iMil' Heitor
* it is ugly at the moment. I *will* make it clean, just wanted to share the joy ;) Cheers, -------- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2023-11-29 Thread Emile `iMil' Heitor
atch, and sorry for the noise. -------- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2023-11-28 Thread Emile `iMil' Heitor
On Thu, 23 Nov 2023, Emile `iMil' Heitor wrote: It seems we have a similar problem to the second bullet point Colin Percival noted here https://www.daemonology.net/blog/2022-10-18-FreeBSD-Firecracker.html When removing the hvm_start_info address save portion, the sym mapping doesn't

Re: PVH boot with qemu

2023-11-23 Thread Emile `iMil' Heitor
On Mon, 13 Nov 2023, Manuel Bouyer wrote: On Mon, Nov 13, 2023 at 06:37:01AM +0100, Emile `iMil' Heitor wrote: The start_xen32 entrypoint is then found, and the kernel start, but falls in an infinite loop in locore.S when mapping symbols and preloaded modules, more precisely, i

PVH boot with qemu

2023-11-12 Thread Emile `iMil' Heitor
on where to look and possible reasons of this loop would be greatly appreciated. Note that this feature would also allow NetBSD to run on AWS's Firecracker, a microvm hypervisor used in their Lambda product. Thanks, ----------

Disabling drivers from a NetBSD kernel without `userconf(4)` nor rebuild

2023-01-31 Thread Emile `iMil' Heitor
ideas to make it cleaner. Cheers, -------- Emile `iMil' Heitor | https://imil.net

Re: x86 bootstrap features

2020-01-20 Thread Emile `iMil' Heitor
vm/firecracker -------- Emile `iMil' Heitor * _ | http://imil.net| ASCII ribbon campaign ( ) | http://www.NetBSD.org | - against HTML email X