Skip to content

Instantly share code, notes, and snippets.

@slp
slp / enable-legacy-uart.diff
Created March 17, 2025 17:05
libkrun: enable legacy UART
diff --git a/src/vmm/src/builder.rs b/src/vmm/src/builder.rs
index e67af76..b56ed94 100644
--- a/src/vmm/src/builder.rs
+++ b/src/vmm/src/builder.rs
@@ -10,7 +10,7 @@ use std::fmt::{Display, Formatter};
use std::fs::File;
use std::io::{self, Read};
#[cfg(target_os = "linux")]
-use std::os::fd::AsRawFd;
+use std::os::fd::{RawFd, AsRawFd};
@slp
slp / libkrun-ubuntu.pc
Created February 20, 2025 16:42
libkrun-ubuntu.pc
prefix=/usr
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu
Name: libkrun
Version: 1.10.1
Description: Library providing Virtualization-based process isolation
Requires:
Libs: -L${libdir} -lkrun
Cflags: -I${includedir}
@slp
slp / vulkaninfo.txt
Created February 11, 2024 10:43
vulkaninfo for M1 MacBook using MoltenVK
WARNING: [MoltenVK] Code 0 : vkCreateMacOSSurfaceMVK() is deprecated. Use vkCreateMetalSurfaceEXT() from the VK_EXT_metal_surface extension.
==========
VULKANINFO
==========
Vulkan Instance Version: 1.3.275
Instance Extensions: count = 17
===============================
@slp
slp / llama-vulkan-msl.txt
Created February 11, 2024 08:29
llama.cpp Vulkan MATMUT shader translation to MSL
[mvk-info] Converting SPIR-V:
; SPIR-V
; Version: 1.5
; Generator: Google Shaderc over Glslang; 11
; Bound: 869
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability StorageBuffer16BitAccess
%1 = OpExtInstImport "GLSL.std.450"
@slp
slp / llama-vulkan-tests.txt
Created February 11, 2024 08:27
llama.cpp Vulkan tests output for M1 GPU
Log start
main: build = 2085 (87db9adf)
main: built with Apple clang version 15.0.0 (clang-1500.1.0.2.5) for arm64-apple-darwin23.2.0
main: seed = 1707639415
ggml_vulkan: Using Apple M1 | uma: 1 | fp16: 1 | warp size: 32
llama_model_loader: loaded meta data with 23 key-value pairs and 201 tensors from ../libkrun/examples/models/tinyllama-1.1b-chat-v1.0.Q4_0.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv 0: general.architecture str = llama
llama_model_loader: - kv 1: general.name str = tinyllama_tinyllama-1.1b-chat-v1.0
llama_model_loader: - kv 2: llama.context_length u32 = 2048
@slp
slp / gunyah-hypervisor-fix-dynamic-earley.patch
Last active February 15, 2023 10:38
gunyah-hypervisor.next Dynamic Earley patch
diff --git a/tools/grammars/typed_dsl.lark b/tools/grammars/typed_dsl.lark
index 8e8b2b2..16a3892 100644
--- a/tools/grammars/typed_dsl.lark
+++ b/tools/grammars/typed_dsl.lark
@@ -51,7 +51,7 @@ SIGN_OPERATOR : "+" | "-"
add_operation : _add_expr SIGN_OPERATOR _mult_expr
_shift_expr : _add_expr | shift_operation
-SHIFT_OPERATOR.2 : "<<" | ">>"
+SHIFT_OPERATOR : "<<" | ">>"

openpgp4fpr:BED5FCF7512D86809142E8A2F469278D2F0C0235

From 05446d0ccd5575c5286579780abc75cff27a9e8b Mon Sep 17 00:00:00 2001
From: Sergio Lopez <[email protected]>
Date: Mon, 25 Jan 2021 14:55:06 +0100
Subject: [PATCH 4/4] Makefile: allow building without .git
Use the same strategy as podman for obtaining the commit id, so we
don't fail if this is a release without the ".git" directory.
Signed-off-by: Sergio Lopez <[email protected]>
(cherry picked from commit 8d9e9d6f73468b6e0b876342b54589281459180a)
From 3396c40dc7cf133896e9c8a9bcf0f0bc09e6ad4d Mon Sep 17 00:00:00 2001
From: Sergio Lopez <[email protected]>
Date: Thu, 9 Jun 2022 12:06:13 +0200
Subject: [PATCH 3/4] run_unix: don't return an error from getNetworkInterface
While networking is not supported on non-Linux systems, many
operations can still succeed if we allow buildah to proceed without a
NetworkInterface object.
To do so, don't return an error from getNetworkInterface.
From 7de989625b0d643893b8f66ce1f305cc579ead90 Mon Sep 17 00:00:00 2001
From: Sergio Lopez <[email protected]>
Date: Mon, 25 Jan 2021 14:01:01 +0100
Subject: [PATCH 2/4] run_unix: return a valid DefaultNamespaceOptions
On non-Linux systems return a valid DefaultNamespaceOptions with all
namespaces disabled. This allows buildah to still perform most image
operations even on systems without support for namespaces.
[NO NEW TESTS NEEDED] This only has an impact to the "darwin" target