blk

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

README

go-virtio/blk

Placeholder for a future pure-Go virtio-blk driver targeting the go-virtio/common transport interfaces.

Status: not yet implemented. The package exists so go get resolves and so the layout of the go-virtio org is symmetric with the Linux kernel's <linux/virtio_net.h> / <linux/virtio_blk.h> per-device-class split. Today, cloud-boot consumers that need block access during the pre-EBS phase use UEFI's EFI_BLOCK_IO_PROTOCOL directly; the pure-Go driver will be built when there's a concrete caller that needs it.

When implemented, the driver will:

  • Open a modern virtio-blk PCI device (VID 0x1AF4, DID 0x1042) through go-virtio/common.Transport.
  • Negotiate VIRTIO_F_VERSION_1 and the virtio-blk-specific feature bits (Virtio 1.1 §5.2.3).
  • Drive the request virtqueue per Virtio 1.1 §5.2.6 (header descriptor + data descriptors + status byte descriptor).
  • Expose a Go-friendly read/write API.

Sibling packages

License

BSD-3-Clause. See LICENSE.

Documentation

Overview

Package blk is a placeholder for a future pure-Go virtio-blk driver targeting the go-virtio/common transport interfaces.

Not yet implemented — cloud-boot's pre-ExitBootServices phase uses UEFI's EFI_BLOCK_IO_PROTOCOL for block access today. When a concrete post-EBS caller needs pure-Go block access, this package will host the driver, mirroring the structure of go-virtio/net.

References (for the future implementation):

  • Virtio 1.1 §5.2 "Block Device".
  • Linux drivers/block/virtio_blk.c — canonical Go-translatable reference.

Index

Constants

View Source
const DeviceType uint16 = 2

DeviceType is the virtio device-type encoding for virtio-blk (Virtio 1.1 §5.2.1). Exposed for callers enumerating PCI devices that want a stable name.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL