vgpu in-guest producer in-tree, release CI, flexible vmie discovery

- src/si/vgpu-stream: in-guest vgpu producer built as a Windows cross-compiled target (if(WIN32))
- .gitea: release workflow — cross-build the agent and build/publish the deb against system vmie
- cmake/makefile: resolve vmie from a source tree (LIBVMIE_PATH) or installed libvmie-dev
This commit is contained in:
2026-06-22 18:35:12 +03:00
parent 9bde398b6c
commit bd8b966017
31 changed files with 2393 additions and 8 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef VGPU_REGION_H
#define VGPU_REGION_H
/* region.h — win32 pinned contract region (resolves blocks for the region-view). */
#include <stdint.h>
#include "vgpu_stream.h" /* public contract: blocks, offsets, slot geometry */
/*
* One contiguous 2 MiB-aligned pinned region holding the full contract:
* producer block (page 0), control block (page 1), then SLOT_COUNT frame slots
* starting at VGPU_RING_OFFSET. Object = memory: the region owns the mapping,
* its lifetime is the mapping's lifetime. No hidden global state.
*/
typedef struct {
void* os_base; /* raw allocation base (for free) */
uint8_t* base; /* 2 MiB-aligned region base (== contract origin) */
uint64_t os_total; /* bytes reserved at os_base */
vgpu_producer_t* producer; /* base + VGPU_PRODUCER_OFFSET */
vgpu_control_t* control; /* base + VGPU_CONTROL_OFFSET */
uint8_t* ring; /* base + VGPU_RING_OFFSET */
} vgpu_region_t;
/* Returns 0 on success, non-zero on failure (region zeroed on failure). */
int vgpu_region_create(vgpu_region_t* out);
void vgpu_region_destroy(vgpu_region_t* r);
#endif /* VGPU_REGION_H */