Re: Creating a hackable kernel for AMD64

2024-04-24 Thread Emile `iMil' Heitor
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
, -- Emile `iMil' Heitor | https://imil.net

NVMM sync up from DragonFlyBSD

2024-01-27 Thread Emile 'iMil' Heitor
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
st 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
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
ot;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, NULL, 0,

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

2024-01-19 Thread Emile 'iMil' Heitor
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
! -- Emile `iMil' Heitor | https://imil.net

Re: PVH boot with qemu

2024-01-08 Thread Emile 'iMil' Heitor
?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
ps://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 like the design

Re: VirtIO MMIO for amd64

2024-01-05 Thread Emile 'iMil' Heitor
o 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
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
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
. 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
ag. 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 triggered

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
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 I understand correct

Re: VirtIO MMIO for amd64

2023-12-19 Thread Emile 'iMil' Heitor
. -- 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 there's still quite some

Re: VirtIO MMIO for amd64

2023-12-16 Thread Emile 'iMil' Heitor
me 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
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's PVH-enabled F

Re: PVH boot with qemu

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

Re: PVH boot with qemu

2023-12-11 Thread Emile `iMil' Heitor
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
-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
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
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 fall

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

PVH boot with qemu

2023-11-12 Thread Emile `iMil' Heitor
d 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, -------- Emile `iMil' Heito

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

2023-01-31 Thread Emile `iMil' Heitor
. 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