diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-24 01:58:15 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-24 01:58:15 -0400 |
| commit | 0b799c9487477fd31a56e0c386e6ba3896c4c569 (patch) | |
| tree | 3a4ae80aa78433d31a3f098c68b3b47b4c157e58 /kernel/gsp_sema_service.h | |
| parent | 2a59dcb768541b759ada9cd6f24986e2c234bd37 (diff) | |
| download | open-iov-0b799c9487477fd31a56e0c386e6ba3896c4c569.tar.gz open-iov-0b799c9487477fd31a56e0c386e6ba3896c4c569.zip | |
kernel: validate learned semaphore maps and post guest GPU events
- admit {GPU VA -> PA} pairs only when the preceding bytes form a valid
client memory descriptor header (type 0/1, CPU+GPU mapped bits), prefer
validated pairs over headerless candidates under first-wins dedup, and
invalidate the translation cache on every rebuild; fixes stale identity
entries shadowing live pool pages and lets the guest UVM channel
bring-up complete on its own
- capture OS event allocations (class 0x79) and post event records
(function 0x1003) into the guest status queue when a channel's busy
notification is consumed, with a broadcast fallback, serialized with
replies via a queue lock
- add BAR0 shadow introspection (dump_bar0/scan_bar0) and guest-side
diagnostic scripts for the VM cycle
Diffstat (limited to 'kernel/gsp_sema_service.h')
| -rw-r--r-- | kernel/gsp_sema_service.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.h b/kernel/gsp_sema_service.h index 16a045f..a6893bd 100644 --- a/kernel/gsp_sema_service.h +++ b/kernel/gsp_sema_service.h @@ -22,19 +22,42 @@ struct sema_channel_desc { u32 h_object; u32 engine_type; + u32 cid; /* RM channel id (the doorbell token vector) */ u64 gpfifo_va; u32 gpfifo_entries; u64 userd_pa; /* NvA06FControl: GPGet @0x88, GPPut @0x8c */ u32 userd_as; /* NV_ADDR_SYSMEM(1) / NV_ADDR_FBMEM(2) */ u64 instance_pa; u64 notifier_pa; + u32 notifier_as; /* NV_ADDR_SYSMEM(1) / NV_ADDR_FBMEM(2) */ }; void gsp_sema_service_channel_add(const struct sema_channel_desc *desc); void gsp_sema_service_channel_del(u32 h_object); +/* + * A GPU VA space whose top-level page directory the driver has published (the + * driver builds its own page tables for the address spaces it owns, then hands + * the directory's physical address to the GPU through SET_PAGE_DIRECTORY). + * + * pdb is the directory base in the aperture selected by b_vidmem (false = + * guest RAM, true = emulated vidmem); num_entries is the root entry count and + * fixes the number of VA bits the root covers. + */ +struct sema_vaspace_desc { + u32 h_vaspace; + u64 pdb; + u32 num_entries; + bool b_vidmem; +}; + +void gsp_sema_service_vaspace_add(const struct sema_vaspace_desc *desc); +void gsp_sema_service_vaspace_del(u32 h_vaspace); + int gsp_sema_service_start(void); void gsp_sema_service_stop(void); int gsp_sema_service_probe(u64 gpu_va, u32 count); +int gsp_sema_service_add_map(u64 gpu_va, u64 pa, u64 len); +void gsp_sema_service_doorbell(u32 token); #endif /* _GSP_SEMA_SERVICE_H_ */ |
